Monday, 10 February 2014
The font fix was easy - add a byte to the start of each glyph describing the actual width of the glyph. I then wrote a tool which worked out the maximum width of each glyph, to save a lot of tedious calculation. Fun arose when I found out the font I was using had glyphs centered in the box rather than left aligned like a sane person might do. Nothing some 16-bit left shifts couldn't fix though.
The font I'm using is Hallfetica Normal from http://www.henningkarlsen.com/electronics/r_fonts.php.
I'd been flailing around for a few days, trying to debug the more analog parts of my PCB. I was seeing a 5V rail at around 2V and my board reset when the backlight was connected, but fine without the backlight. This was all not helped by the fact I found I have at least two brand new micro USB cables that don't work (board lights up, CPU just resets - different cable, works perfectly).
So, I've removed the three MIC2005 high side switches and soldered some nice fat wire between the 3.3v input of the LCD and the 3.3v output of the Launchpad, and between the 5V input, Launchpad 5V pin and the backlight power pin.
If I can't get the load switches to work, it's possible I can get the LCD power consumption down to a manageable level electronically. If that's too high to remain on all the time, I'll probably need to build and off-board power control circuit. I have a spare output pin I can use to indicate "Do not power off" and with a few diodes and a small relay I'll have something that comes on with the ignition and turns off when the micro is happy to turn off.
Booting up! Apologies for the terrible brightness issues.
Saturday, 25 January 2014
I was in Tesco today and saw a DAB alarm/clock/radio for £5. Five pounds. Well, that's got to be worth a poke - even if it lasts 10 minutes before I've blown it up it'll be good value.
Inside there are three boards. The smallest board takes 5V in and offers a headphone out via an 8-pin TSOP amplifier. The largest board runs the MMI and houses the screen and all of the buttons. That's connected via a 14-pin ribbon to the main event - a Gyro-1130E DAB module from GyroSignal Technology Co Ltd.
This FM/DAB module drives the single speaker directly, sends a 5 pin (differential) stereo audio to the headphone amplifier and carries a ton of plated through holes along each of, 14 of which go the MMI board as I mentioned before. The interesting bits are mostly hidden under a large can labelled 'Tunbow', but you can see an FC2507 (PDF) tri-band downmixer from Future Communications Integrated circuit Inc. I might try and lift the can at some point, but there's a whole lot of solder holding it down.
The "Tunbow" label on the can was odd, so I looked it up. It turns out, they make DAB radios and in fact make a radio in an identical case - the a Tunbow E80012. The only difference is in the picture, that has a segmented LCD, whereas mine has a dot matrix (which is actually as described in the specification, so perhaps the picture is just wrong).
Anyway, the audio quality isn't bad and I've seen references to a Gyro-1128 module receive praise in a full-size Audiolab 8200-T DAB receiver. This is quite promising. If I see another, I'll buy it so I can destructively lift the can and see what's underneath.
Sunday, 19 January 2014
Wednesday, 15 January 2014
I've elected to stay with 8-bit mode as I need the pins as GPIO. Text rendering works well provided you are careful to over print a region rather than blanking it first (which causes a flicker).
The fonts came from UTFT. I might patch them to add proportional support but monospace is fine for now. I've knocked up a basic menu system too.
Tired of all the wires the prototype, I ordered some PCBs from OSHpark.com. $50 for three, they should be here any day now.
Saturday, 21 December 2013
In other news:
- I can't set optimisations to O2 or O3 without my code crashing on startup. O1 is fine.
- Function calls appear to be very slow on the LM4F. Inlining a bunch of stuff speeded it up no end.
- Even with heavy inlining, it's still taking a while to draw the screen. We'll see how it goes when I'm rendering glyphs instead of boxes. Plus, 16 bit mode will help - I'm writing 3 bytes per pixel at the moment.