Pages

Friday, May 20, 2011

Simple Test Running LED




step 1). make Scheme on your project like the picture
setp 2). copy paste code listing program in BascomAVR


'// Simple Running LED
'// Using PortC as output


$regfile = "m8535.dat"
$crystal = 1000000
Config Portc = Output


Main:
Do
Portc = 00000001
Waitms 100
Portc = 00000011
Waitms 100
Portc = 00000111
Waitms 100
Portc = 00001111
Waitms 100
Portc = 00011111
Waitms 100
Portc = 00111111
Waitms 100
Portc = 01111111
Waitms 100
Portc = 11111111
Waitms 100
Portc = 00000000
Waitms 100
Loop


step 3). Compile Program ( click Program > Compile (F7) on BascomAVR )
step 4). Download to Your Microcontroller with ISP Programmer

0 comments:

Post a Comment