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

38 lines
673 B
Plaintext

' ########### start ###########
' pic:PIC16F874A
' ########### end ###########
'A program to flash LED on PORTB0
'Chip model
#chip 16f874a, 25
#config FOSC = HS, WDTE = OFF, CP = OFF, PWRTE = OFF, LVP = OFF, DEBUG = ON
#define led PORTB.3
#define LCD_IO 4
#define LCD_NO_RW
#define LCD_RS PORTD.2
#define LCD_Enable PORTD.3
#define LCD_DB4 PORTD.4
#define LCD_DB5 PORTD.5
#define LCD_DB6 PORTD.6
#define LCD_DB7 PORTD.7
Startup:
Locate 0,0
Print "* Love *"
Locate 1,0
Print "*Silvia*"
ana = ReadAD(AN0)
'Main routine
Loop:
'Turn one LED on, then off
SET led ON
Wait 500 ms
SET led OFF
Wait 500 ms
goto Loop