Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Plz explain to me how i program and like that

Status
Not open for further replies.
Hi,

Flashing a led is one of the first things to do with a micro.

You need a bit of hardware, could be a breadboard as shown in that video or a ready made developement board - depends what is easily avaialable where you are.
You also need a programmer to put the code into the micro chip - that will depend on which type of micro you go for. AVR or PIC etc.

You then need to decide on which programming language you want to use Assembler or things like C or Basic.

Look around this forum and the web for tutorials for whichever chip and language you prefer.

Here is an example of a Pic tutorial in assembler which also incorperates a hardware series.

http://www.winpicprog.co.uk/pic_tutorial.htm
 

ha here is the code
//ccs


Code:
 #include <18F2550.h> 
#fuses HSPLL,NOWDT,NOPROTECT,NOLVP,NODEBUG,USBDIV,PLL5,CPUDIV1,VREGEN
#use delay(clock=20000000)
#include <lcd.c> 

void main()
{
	int a=1;

	while(1)
	{	
		output_b(a);
		if(a==0x80)
		{	
			a=1;
		}
			else
		{
			a=a*2;
		} 
		delay_ms(100);     //required delay
		
	}
	
}
 

get PIC18F4550 mcu from microchip, download MPLAB, C18 and Microchip USB framework from microchip website, use project called "CDC basic demo" for PICDEM board, modify in it, compile and build, download hex file on the PIC, your PC now will see a virtual COM port, you can now send data to and from the microcontroller using C++/VB or even matlab and windows hyperterminal, thats how you can make control over USB.
I know its very brief but if you need more details I don't mind at all.
good luck
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top