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

30 lines
634 B
Plaintext

' ########### start ###########
' pic:PIC16F886
' ########### end ###########
'Switch_Dual.gcb
'Monitor two switches and light LED when pressed.
'Setup for Demo-Shield
'D8 switch controls D10 LED
'D9 switch control D13 LED
;Chip Settings
#chip 16F886,16
#include <chipino.h>
DIR D8 in 'Set D8 switch pin to input
DIR D9 in 'Set D9 switch pin to input
DIR D10 out 'Set D10 LED pin to output
DIR D13 out 'Set D13 LED pin to output
Start:
If D8=0 Then
set D10 on 'D10 LED on
Set D13 off 'D13 LED off
End If
If D9=0 Then
Set D13 on 'D13 LED on
set D10 off 'D10 LED off
End If
Goto Start