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 

« StackBook Part 2 - th… | Home | A quick rant... »

StackBook part 3 - the motherboard and the screen

14 08 09 - 22:35 If you haven't been following: Part 2 and Part 1

Alright, so it's getting to be about time to start moving this thing off a breadboard.

I've begun the task of soldering up a motherboard. First a 10-pin programming header was added. This is for programming, but more importantly power. A power LED was then added, but a high value resistor was used to cut back the power draw.

After putting an ATMega32 in the socket, the programming was tested and it actually works (always good). However, it had no I/O pins (yet), so it's back to the breadboard because I didn't have any to solder in. $30 of them just came from Electus and I've had to start a second box of electronics junk - I've got a _ton_ of IC sockets, pin headers, plugs, IDC connectors etc etc (and a solder sucker - the "undo" button for soldering).

Of course, we're going to need some way of outputting the data. For this we will require a screen. This came from an online electronics store in Hong Kong (like most of my box of junk, and half of the random gadgets here) - Sure Electronics' creatively-named 2002 LCD Module black character no backlight.



Reading the datasheet tells you it has a "KS0076B" controller chip. This may look obscure from the Google results - but it's also much more commonly known as the hd44780 - and that chip is in almost every character LCD out there. The Arduino library for it is called LiquidCrystal.

I didn't have pin headers at the time, so I soldered LEDs across the header, then trimmed all the legs. Works reasonably well. The key to success in electronics is always improvisation.

After making a 16-pin cable to replicate this over to the breadboard, I messed around quite a bit but still couldn't get the display to output anything. I tried inputting power to the connector on the left, bridging the solder division to enable it, but still nothing. Hmmmm. Then I re-read the datasheet and figured out that in Section 4, the parameter "VDD - V0" having a range of 4.4 to 5.1v actually means that this voltage is negative relative to VDD. In other words, that pin is to be provided with -0.1 to 0.6v for a 5v input. Since 0 is within that range, I just tied the pin to ground (I should use a 10k potentiometer to set contrast, I'll rewire it when i have one). And suddenly the screen came on. After a bit more fiddling, it even displayed something!



I wired up the 16-pin ribbon cable before I'd read the specs for the LCD though. You actually don't need all 16 pins. Read the datasheet for further details: but in short, pins 1-6 and 11-14 are all you really need. So I split the cable into 6 and 4 pins, then crimped a 16-pin connector with them in the right place. After some messing around, it works!

The point of this was so that I could put a smaller 10-pin header on the motherboard instead but still have the LCD work. Which I did - and put it in the top left, which by necessity, is closest to port A. Unfortunately this is the analog input port... but oh well. It's closest, and there are still two analogue input lines available. I also wired the pins into them in the order for which it is physically easiest - it just took a bit of multimeter poking to figure out what was what so I could tell the software what went where. One more pin was saved from the AVR by simply grounding the R/W line - we don't plan to read from the LCD display. I am told by a friend of mine, though, that reading back from it is useful because you can check the busy flag and slow down the data transfer if it's not ready, but this display seems to cope fine. YMMV.

Anyway, it works (which is always good):



And a close-up view:



I think I need to get a less anger-inspiring test sentence...
one comment

what are you planing to use for a keyboard ?
one off a old qwerty phone ?
one off those kiddy laptops they sell at toy stores ?
a home made one ?

this could be a contender to the MBA!
are you thinking ethernet or wifi :P
http://hackaday.com/2008/09/18/web-serve..
( maybe a help with the TCP/IP implementation ? )
luke - 15 08 09 - 10:54


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

  
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