Logochip Xylophone
January 31st, 2007 January 31st, 2007 Posted in LogochipNo Comments
Well that was a challange. John gave one of the WD_C2401P LCD modules to me and I played with it till I got it to work.
Here’s the new code:
to startup
 write porta-ddr 0
 write portb-ddr 0
 cc $1C cc $14 cc $28 cc $4f cc $60 cc 1
 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
 wait 1
end
to dd :xx ;send character data
 setbit 2 $f89    ;set RS to write data
 write portb :xx
 setbit 3 $f89  ;clock the data in
 mwait 2
 clearbit 3 $f89
end
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.
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
;—————————————