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

33 lines
596 B
Plaintext

' ########### start ###########
' pic:PIC16F886
' ########### end ###########
'A program to drive LED Display
'Program will count from 0 to 9 and then repeat
'Chip model
#chip 16F886, 16
#include <chipino.h> ' Define CHIPINO I/O pins
#define DISP_COUNT 1
#define DISP_SEG_A D7
#define DISP_SEG_B D6
#define DISP_SEG_C D5
#define DISP_SEG_D D4
#define DISP_SEG_E D3
#define DISP_SEG_F D2
#define DISP_SEG_G D1
#define DISP_SEG_DOT D0
DIR PORTC out
temp = 0
main:
displayValue 1,temp
wait 1 s
temp = temp + 1
if temp > 9 then
temp = 0
end if
goto main