Sunday, January 07, 2007

Plus/4 LCD addon!!!

COOL!!! My first proper hardware add on! I've connected up the remaining lines, added some power and wrote a little test program to initilaise it, and then print to it and hay presto! A little LCD screen add-on!

Of course...Its not that easy. I've missed out a lot of stuff here. For proper full speed access I need to be able to read the busy line which requires READ access. This in turn requires another buffer (I think), and some more logic to detect the READ line and then setting the datalines (at least 1 bit) to be the values it needs to be. All I've done just now is put in some big delays so I know the text will have been set.

Although...after playing a little...it looks like the Plus/4 is so slow.... the delays can more or less be taken out! Which is pretty cool...Still, its not "right", but it does work. I also have no way to reset it properly just now, which means I'd have to add some rest circuitry.

But aside from this...I don't care! It works! Its really easy to write to! And its cool!!!

2 comments:

Anonymous said...

Very few people check busy flag anyway... The method I've used in my embedded projects is to use busy loops during LCD init, and afterwards throw data bytes into circular buffer. Buffer is read from ~2 KHz timer interrupt which does the actual LCD writing. With 2*16 char LCD that gives >60 Hz refresh, which is a lot faster that LCD can display.

With 1 MHz computers it might be faster to just busy wait the <50 usec needed between chars :)

--
TNT

Mike said...

Yes, you're quite right... properly sized delays are fine. I needed it on the PIC I used before - or rather it was easier on the PIC rather than work out delays.

It would speed things up AND allow you to read the current DRAM address... but yes...you can live without them.

I'll post the code up soon in case anyone cares, although without the hardware...who's gonna use it! :)