Hokay. I’ve finally finished my Birthday Countdown Clock for my uncle.* It uses the ez430 launchpad with a Nokia 3310 LCD from sparkfun. The pin assignments are documented better in the source code, but I basically soldered a male pin header on the LCD and plugged it into the Launchpad. The Clock counts down until my uncle’s 50th birthday then plays “seasons don’t fear the reaper” from a greeting card circuit.
The Image above is displaying ASCII chars, but I had to cut that from my final code. If you want that code in a nice char table look at the arduino code on sparkfun’s site. I used alot of code snippets from different places but the two most useful were Kenneth’s clock code and sparkfun’s arduino code. So thanks to both of those. So, other than the LCD being plugged into the MSP430, I used 3 AAA’s and an LM317 variable voltage regulator to get the 3.3V needed for the LCD. The MSP430 can run at much lower voltage but the LCD can’t take much less than 3V. This circuit doesn’t have the LCD backlight hooked up but a quick little jumper on the chip carrier after the 7th pin to another open pin (p1.6 or p1.7) on the other side will allow you to pwm the backlight. There is a small transistor circuit thats connected to p1.6 to turn on the greeting card board I have crammed in there, and thats where I got the art for the top of the Altoids Tin. The * from above is to say that I’m not really finished with this project, cause when his birthday does come around, I’ll take the clock back and make an actual clock out of it he can stick on his desk. I’ll cut a hole in the side that can take an external power supply to run the backlight. I’ll make sure to post that code when I’m done with it as well. So my code isn’t commented very well, but beggars can’t be choosers. Heres the code and a final picture of the LCD. The LCD isn’t displaying it, but theres an hours and a minutes and a days that are all displayed normally.. I just didn’t get a picture of that before I gave it away.
I’m almost ashamed to post this code.. its messy, it could better use the low power mode (ran into some issues being as it took more than a second to update the screen at first) I could use another interrupt for the display loop, I could comment more, use better naming conventions, so on and so forth but I didn’t. I’m too lazy. Oh and helpful criticism is great, but beggars can’t be choosers… if your guna crack on my code, don’t even look at it.
code: nokia3310
This post isn’t finished.. but I know a couple people wanted the code. It was very hard to fit it all into that 2k, and thats what I’ll blame some of my crappy code conventions (c^3) on. Anyone know a good way to display code in wordpress?
TopHat



