-- lcd hd44780 compatible with T7934 driver, one row, 16 characters
-- acts like 2 rows 8 characters display
-- tested by Surducan Vasile
-- date: 10 may 2001
-- compiler: Jal 04.35
include 16f84_4 -- microcontroller fuse definition
include jpic -- pic base definitions
include max232p -- pic pins for lcd and communications
include jseriala -- serial routine 19200,8,n,1
include hd447804 -- nible mode interface to lcd
hd44780_clear -- initialize lcd
hd44780_line1 -- put cursor on line1 char0
var byte count = 0 -- define a counting variable
forever loop -- do forever next job:
asynch_receive -- receive a character from serial rx pin
if count == 8 then -- test if first line is full
hd44780_line2 -- and jump on line 2
elsif count > 15 then -- test if second line is full
count = 0 -- reset counter
hd44780_clear -- clear display
hd44780_line1 -- put cursor on line1 char0
end if -- end testing condition
hd44780 = lastreceived -- write into lcd
count = count + 1 -- increment counter
asynch_send ( lastreceived ) -- send back to terminal received character
end loop -- back again
               (
geocities.com/vsurducan/electro)                   (
geocities.com/vsurducan)