LCD Hello world!

Welcome to CRATEL blogs. This is your first post. Edit or delete it, then start blogging!

Well I must say it’s good to be here… Where am I?

This may be jumping the gun a little bit but I hooked up an LCD module and got it working. Here’s the logochip program. Here’s a picture and a schematic.

LCD Mod1     Schem

Here’s the Logochip program: 

;——————————————- 

to startup
 write porta-ddr 0
 write portb-ddr 0
 cc $80 cc $38 cc $0C cc $40 cc $01
 dd 32 dd 32 dd 32
 dd 72 dd 101 dd 108 dd 108 dd 111 ;Hello
 dd 32
 dd 87 dd 111 dd 114 dd 108 dd 100  ;World
end

to cc :xx   ;send a command
 clearbit 2 $f89    ;clear RS to write commands
 write portb :xx
 setbit 3 $f89      ;clock the command in
 mwait 2
 clearbit 3 $f89
 mwait 300
end

to dd :xx  ;send character data
 setbit 2 $f89     ;set RS to write data
 write portb :xx
 clearbit 3 $f89   ;clock the data in
 mwait 2
 setbit 3 $f89
 print :xx
end

;—————————————



Leave a Reply

You must be logged in to post a comment.