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

45 lines
1.1 KiB
Plaintext

' ########### start ###########
' pic:PIC16F1847
' ########### end ###########
'
' ******************************************************************
' A program to flash LED on PORTA.2
' 2014-08-18 (c) Paolo Iocco
' ******************************************************************
'
' Circuit diagram
' ---------------
' +--\/--+
' LED<-----|1° 18|-----nc
' nc-----|2 17|-----nc
' nc-----|3 16|-----nc
' +5V--|50K|-->|4 15|-----nc
' GND-------->|5 14|<--------+5V
' nc-----|6 13|-----nc
' nc-----|7 12|-----nc
' nc-----|8 11|-----nc
' nc-----|9 10|-----nc
' +------+
'
' ******************************************************************
'Chip model
#chip 16f1847, 8
#config OSC = INTOSCIO, 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