29 lines
640 B
Plaintext
29 lines
640 B
Plaintext
' ########### start ###########
|
|
' pic:PIC16F886
|
|
' ########### end ###########
|
|
|
|
;Chip Settings
|
|
#chip 16F886,16
|
|
'#config MCLRE = on 'enable reset switch on CHIPINO
|
|
|
|
#define LCD_NO_RW 'Needed when RW is grounded
|
|
;Defines (Constants)
|
|
#define LCD_IO 4
|
|
#define LCD_RS PORTB.0
|
|
#define LCD_Enable PORTB.1
|
|
#define LCD_DB4 PORTC.3
|
|
#define LCD_DB5 PORTC.2
|
|
#define LCD_DB6 PORTC.1
|
|
#define LCD_DB7 PORTC.0
|
|
Dir Portb.2 in ' Backlight on
|
|
|
|
Start:
|
|
CLS
|
|
Locate 0,0 'Move to first line first column
|
|
Print "Hello" 'Print "Hello" on first line
|
|
locate 1,3 'Move to 2nd line column
|
|
print "World"
|
|
Wait 10 s
|
|
Goto Start
|
|
|