About

Archives

01 Jul - 31 Jul 2006
01 Aug - 31 Aug 2006
01 Sep - 30 Sep 2006
01 Oct - 31 Oct 2006
01 Nov - 30 Nov 2006
01 Dec - 31 Dec 2006
01 Jan - 31 Jan 2007
01 Feb - 28 Feb 2007
01 Mar - 31 Mar 2007
01 Apr - 30 Apr 2007
01 May - 31 May 2007
01 Jun - 30 Jun 2007
01 Jul - 31 Jul 2007
01 Aug - 31 Aug 2007
01 Oct - 31 Oct 2007
01 Nov - 30 Nov 2007
01 Dec - 31 Dec 2007
01 Jan - 31 Jan 2008
01 Feb - 28 Feb 2008
01 Mar - 31 Mar 2008
01 Aug - 31 Aug 2009
01 Sep - 30 Sep 2009
01 Jan - 31 Jan 2010
01 May - 31 May 2010
01 Jun - 30 Jun 2010
01 Aug - 31 Aug 2010
01 Sep - 30 Sep 2010

Links

Search!

Last Comments

Alvaro Oliver (StackBook Part 4 …): Hey! nice post. I just bo…
Tiago Gomes (Let's start again…): ok, now feel happy, you a…
Tiago Gomes (Let's start again…): ok, now feel happy, you a…
ir0nhide (StackBook Part 4.…): Very cool, nice work
Toby (Gigabyte, LCDs, a…): Good stuff, although now …
luke (StackBook part 3 …): what are you planing to u…
Toby (A quick rant...): Bastards
Hugh (StackBook Part 2 …): Nicely done, but you now …
gm (StackBook Part 2 …): Hmm, I plan to go a littl…
luke (StackBook Part 2 …): i cant help but wonder if…

Stuff

Powered by Pivot - 1.40.4: 'Dreadwind' 
XML: RSS Feed 
XML: Atom Feed 

« Fixing a power brick.… | Home | StackBook Part 4.1 - … »

StackBook Part 4 - More screen!

25 08 09 - 11:49 It was quite clear from the start that the character LCD would not be anywhere near enough screen space for anything serious.



So something had to be done. Anyway, you probably know about what happened to the previous gLCD I had.

Anyway, I have a nice new 192x64 LCD that is not only bigger than the old one, it came with a testing board, and has it's magic smoke intact. So let's wire it up:


(Remember what I said about improvising?)





The testing board is pretty good - power is taken from the USB port - and there's space for a pin header on the left which you can solder a programming header on and reprogram the chip. Unfortunately the chip is a 16F57 - rather low end, but it serves the purpose.

So let's get it onto the breadboard.

There's an Arduino library for the KS0108 controller (again, nearly all of these GLCDs use the same chip or a clone of it - but you have to be careful as there's two different pinouts, and the 192x64s are different to the 128x64s.


Hey, it works.


Except when it doesn't.

After much annoyance, the problem was eventually traced to a) Chip Select 3 was floating, and b) there were no capacitors on the crystal.

If you don't know what Chip Select lines do on one of these LCDs: it's simple. The 4 ICs on the back of the display are a KS0107 and 3 KS0108s. The KS0107 controls the 64 row inputs and the general LCD. The KS0108s control each lot of 64 columns: 192x64 LCDs have 3 of them, 128x64 LCDs have 2 of them. Since we can only write to one at a time, we have enable lines for them. But the Arduino library that I'm using only seems to be set up for 128x64 screens. After I put a wire in to pull CS3 high, the LCD panel started behaving somewhat more. When I switched it to the internal oscillator, the garbage drawing problems were fixed. I need to put two caps on the crystal. Side effect of the internal oscillator is that the chip is now running at 8MHZ - but it's not the slowdown that makes it more reliable as I already turned up the delay and that didn't fix things.


Seems, though, that I had CS1 and CS2 swapped. They seem to be right now (you can tell because the 64x64 blocks are in the wrong order).

We're going to need a better font than Arial 14 point though (Helvetica > Arial anyway...). For this I used GLCDFontCreator, a handy java applet that not only can create new fonts, but can convert existing ones.

To do this, go to File->New Font



Rename the font, select the font you want to convert, and for a pixelfont, pick the right size. Hit OK, then use Export -> Export Font to save it as a .h file.
You may notice that I named the font f04b03 - this is because identifiers in C cannot start with a number. The font being converted is from this page.


one comment

Hey! nice post. I just bought a 192×64 GLCD before notice that arduino GLCD library is 128×64 only.
could you please share your modified GLCD library? i really need to get this display working.
Datasheet is here: https://www.crystalfontz.com/products/19264d/datasheets/942/CFAG19264DYYHVN.pdf

thanks!
Alvaro Oliver (Email) - 31 05 10 - 01:57


Trackback link: http://gm.stackunderflow.com/blog/pivot/tb.php?tb_id=137

  
Remember personal info?

Emoticons / Textile

To prevent automated comment spam, the answer to this rather simple question is required...

 

  (Register your username / Log in)

Notify:
Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.

 

Linkdump