25 lines
446 B
Plaintext
25 lines
446 B
Plaintext
' ########### start ###########
|
|
' pic:PIC16F57
|
|
' ########### end ###########
|
|
'A program to flash LED on PIN 13/PORTB5
|
|
|
|
'Chip model
|
|
#chip 16f57, 8
|
|
#config OSC = XT, WDT = OFF, CP = OFF ' PWRTE = ON
|
|
#define led PORTB.5
|
|
|
|
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
|
|
|