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

44 lines
1.0 KiB
Plaintext

' ########### start ###########
' pic:PIC16F688
' ########### end ###########
'
' ******************************************************************
' A program to flash LED on PORTA.2
' 2014-08-18 (c) Paolo Iocco
' ******************************************************************
'
' Circuit diagram
' ---------------
' +--\/--+
' VCC-----|1° 14|<-----GND
' nc-----|2 13|-----nc
' nc-----|3 12|-----nc
' nc-----|4 11|----->LED
' nc-----|5 10|-----nc
' nc-----|6 9|-----nc
' nc-----|7 8|-----nc
' +------+
'
' ******************************************************************
'Chip model
#chip 16f688, 8
#config OSC = INTOSC
#config WDTE = OFF, PWRTE = ON, CP = OFF
#define led PORTA.2
Startup:
'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