Great Cow Basic CHIPINO
Search
  • Home
  • Getting Started Guide
  • GCB
  • CHIPINO
  • Sample Projects
  • Contact Us
  • GCB Forum
Picture

Controlling a 2x16 LCD

This project shows you how to drive an LCD shield with the CHIPINO module. It writes Hello on the first line and then shifts over three spots to write World on the second line.

;Chip Settings
#chip 16F886,16
 '#config MCLRE = on 'enable reset switch on CHIPINO

;Defines (Constants)
 #define LCD_NO_RW 'Needed when RW is grounded
 #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




Picture
Picture