42 lines
916 B
Plaintext
42 lines
916 B
Plaintext
' ########### start ###########
|
|
' pic:PIC10F200
|
|
' ########### end ###########
|
|
'
|
|
|
|
' A program to flash LED on GPIO.0
|
|
' 2016-08-11 (c) Paolo Iocco
|
|
' ******************************************************************
|
|
|
|
' ******************************************************************
|
|
'
|
|
' Circuit diagram
|
|
' ---------------
|
|
' +--\/--+
|
|
' A0/D0/PGD -----|1° 6|----- D3/RES/VPP
|
|
' GND ---------->|2 5|<------- +5V
|
|
' A1/D1/PGC -----|3 4|----- D2
|
|
' +------+
|
|
'
|
|
' ******************************************************************
|
|
|
|
#include "pic6_pin.h"
|
|
'Chip model
|
|
#chip 10f200, 4
|
|
#config WDT = OFF, CP = OFF ' PWRTE = ON
|
|
#define led D0
|
|
|
|
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
|
|
|