'This program will turn the Dios into a serial LCD. func main() dim inchar as integer dim cmd as integer '32 Pin Module LCDinit(23,25,24,29,28,27,26) 'RS, E, RW, D0,D1,D2,D3 'Dios Ultra LCDinit(23,25,24,29,28,27,26) 'RS, E, RW, D0,D1,D2,D3 LCDcls() LCDcharxy(1,1,"Kronos Robotics") LCDcharxy(2,1,"Serial LCD v1.0") pause 2000 LCDcls() hsersetup baud,HBAUD9600,start cmd = 0 mainloop: hserin mainloop,inchar branch cmd,cmd0,line1,line2,line3,line4,control,raw '---------------------------------- 'Fall through point '---------------------------------- cmd0: if inchar < 7 then cmd = inchar goto mainloop endif LCDraw(inchar) goto mainloop '--------------------------------- '1,x Select character on line 1 '--------------------------------- line1: LCDgoto(1,inchar) cmd = 0 goto mainloop '--------------------------------- '2,x Select character on line 2 '--------------------------------- line2: LCDgoto(2,inchar) cmd = 0 goto mainloop '--------------------------------- '3,x Select character on line 3 '--------------------------------- line3: 'Reserverd for future use '--------------------------------- '4,x Select character on line 4 '--------------------------------- line4: 'Reserverd for future use '--------------------------------- '5,x Send LCD control codes '--------------------------------- control: LCDcontrol(inchar) cmd = 0 goto mainloop '--------------------------------- '6,x Send characters 0-6 '--------------------------------- raw: print "raw =",inchar LCDraw(inchar) cmd = 0 goto mainloop endfunc include \lib\DiosLCD.lib