January, 2007

Logochip Xylophone

January 31st, 2007 January 31st, 2007
Posted in Logochip
No Comments

I’m getting the hang of some of this linking pictures and movies in blogs.

This is a Logochip driving a stepper motor and relay coil to play a xylophone.

xylophone1.jpg

Here’s the Logochip code that I showed you in class.

And a schematic of the drive circuit and motor.

And just for kicks watch the  video .

LCD Display

January 28th, 2007 January 28th, 2007
Posted in Logochip
No 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.

WD-C2401P

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

LCD Hello world!

January 25th, 2007 January 25th, 2007
Posted in Logochip
No Comments

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

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