Files
SyncHome/trunk/workspace/gcb/18f4580-blink.gcb
2023-03-09 12:51:54 +00:00

26 lines
466 B
Plaintext

' ########### start ###########
' pic:PIC18F4580
' ########### end ###########
'A program to flash LED on PORTB.3
'Chip model
#chip 18f4580, 32
#config OSC = HS, WDT = OFF, PWRTE = ON', CP = OFF
#define led PORTB.3
Startup:
count = ReadAD(AN0)
'Main routine
Loop:
'Turn one LED on, the other off
SET led ON
wait 1 sec
'Now toggle the LEDs
SET led OFF
wait 1 sec
'Jump back to the start of the program
goto Loop