Wednesday 30 September 2009 at 01:01 am
After a lot of point-to-point soldering on both boards, I have the main LCD working on the soldered StackBook board. That is - after finding the hanging wire :)
After coding a basic shell and an IRC client...
(sorry for the short posts, there'll be more later).
Wednesday 30 September 2009 at 12:55 am
(this post is disproportionately short for the amount of time this took)
Ok, so after soldering a 4-pin connector onto the Stackbook's board, I interfaced a PS/2 keyboard to it.
The keyboard was
this one from DealExtreme.
So let's open it up...
After this, I stripped it down and replaced the PS/2 connector with an IDC header.
A PS/2 driver was written using an interrupt pin for the clock, however, for some reason it didn't behave right - much much messing around was had with this.
Using a combination of:
http://www.atmel.com/dyn/resources/prod_documents/DOC1235.PDF and
http://code.google.com/p/ps2keypolled/source/browse/trunk/ps2keypolled.c
a polling-based driver was written instead.

.
Monday 07 September 2009 at 8:31 pm
I got about half way through soldering a small bit of board to the bottom of the graphical LCD so I could plug a 16-pin header in it (I wasn't in the mood for extensive point-to-point soldering...).
So instead I tried something easier - the ethernet module. I soldered up the SPI pins, and plugged the ethernet module into the board... but I couldn't seem to make it behave. Initially I had the module's chip select tied high, but still no luck. The module would come up, and the computer would recognise the ethernet cable as plugged in, but it wasn't showing up at that IP - or generating any traffic. So I wired it to the AVR's CS line - I figured the AVR may have a problem with not being able to see that something is on the CS line.
Sometimes after programming, lights would come on, sometimes it wouldn't - and after replugging the power cable it'd come sometimes as well. But I still couldn't send any traffic. Anyway, I read somewhere else that this arrangement sometimes does not produce a long enough reset pulse for the ethernet module and that it should be connected to a normal pin. So I put it on one, and pulled the line low for 10ms upon startup (much longer than necessary). The module then had lights every time it was turned on, which was a bit better than before. But still no data.
I decided to look through the header files, and eventually found spi.h in the Utility folder of the ethernet library... apparently using the hardware SPI does require setting pins. A few changes later, and it worked!
A bit more messing round, and I had this going:
Ethernet controlled character LCD :D
Now I just need to wire up the GLCD board, and once the keyboard arrives, get some IRC'ing going :D
Wednesday 02 September 2009 at 9:46 pm
If you have a disk image of a corrupted drive that you're trying to recover from, you may find when you double-click it, it won't mount due to filesystem corruption. It is then detached from the /dev node it had because of this, and you can't use it. But suppose you want to use something like
Prosoft Engineering's Data Rescue II on it.
If you attempt to use hdiutil to attach it from Terminal, this is what you get:
$ hdiutil attach Macintosh\ HD.dmg
hdiutil: attach failed - no mountable file systems
The right way to do this is this - the "nomount" option stops it from attempting to mount, so instead it just attaches and doesn't fail.
$ hdiutil attach -readonly -nomount Macintosh\ HD.dmg
/dev/disk2
(-readonly is not required but may be useful).
Now you can recover from it.
Tuesday 01 September 2009 at 10:36 pm
I'm going to need 3.3v for the ethernet module, so I may as well build the power supply.
It's a rather simple design - two low-drop-out linear regulators - a LM3940IT-3.3 and a LM2940CT-5.0. Essentially, the voltage comes in via the DC socket, or terminal block, and is dropped down to 5v by the LM2940. The 3.3v regulator is then powered off the 5v regulator to provide 3.3v. This is done because the 3.3v regulator can only handle 7.5v on it's input terminals as an absolute maximum, but the 5v regulator is rated up to 26v - otherwise this would exclude powering it from standard 12v sources. Since the 3.3v regulator is a low drop out regulator, it can provide 3.3v with Vin down to 4.5v.
Yes, the board is upside down because I initially thought it would go on the left, forgetting the layout of the board.
No, that battery pack is not the final design. It's just the closest DC source with a 2.1mm plug (I need to find where the ends of my plugpacks all went - I have a quite suitable switchmode 3/4.5/5/6/7v plugpack which should supply quite nicely at 6v.
Next up is I guess getting the graphical LCD onto this board (you can see the 16-pin connector at the top there - that is the start of it).