Archive

Archive for November, 2010

Flashing uC’s with GoodFET

November 23, 2010 Leave a comment

I got myself one of GoodFET40 PCB’s the other day. The pcb is thin! But not only that, it requires you to surface mount some parts. Now, I haven’t done SMD soldering before so I enlisted help of one of my buddies. It didn’t go so well the first time, but I did manage to get the GoodFET firmware installed.

Once soldering is done, you first need to load goodfet firmware onto the main chip. For GoodFET40’s, it uses MSP430F2618. This chip allows you to load the firmware via Bootstrap Loading (BSL). I am not entirely sure how this works, but it seems to require a password to have it enabled so that you can bit-bang the firmware into the chip bytes or words at a time.

./goodfet.bsl --fromweb

This command will require you to have pre-installed:

– pyserial
– pysqlite
– curl

I’ve also tried

# --fromweb retrieves the precompiled hex from the web and stashes it to /tmp
./goodfet.bsl -e -p /tmp/.goodfet.hex

Now, once your GoodFET is programmed, you can test by

./goodfet.monitor test

If all goes well, you shouldn’t see any error or warning messages. For me, the results of the test were inconsistent between 2 different Ubuntu versions. (UPDATE: Kenneth has found a solution for errors I was getting on Ubuntu 10.04.)  I am not sure if this due to FTDI drivers being different or some quirky differences in python serial library. I had intermittent timeouts. (The goodfet code seems to have defined timeout at 2 seconds).

In any case, once you have 1) hardware built 2) goodfet firmware loaded, it’s time to program your target chips.

Read more…

Advertisements
Categories: uC and Electronics

Led Matrix Canvas

November 19, 2010 33 comments

I wanted something “flashy” that grabs my attention when I am working. I am flooded with constant influx of emails, internal chat windows, and many terminal screens full of code. Sometimes it’s hard to get my attention when critical things happen in the trading environment and I notice it too late.

I had 2 of sure electronics 16×24 led matrix boards laying around. So I set out to create a led matrix “canvas” out of these 2 display boards. I didn’t want just a simple led display board. I wanted to build something flexible that can make the best out of our precious LED “real estate”. I envisioned something that I can easily control from a host PC. To make matters more complex, I not only wanted scrolling text messages, but render monochrome animations and images through it.

I didn’t think it’d be feasible to implement _all_ the functionalities I wanted into teensy firmware.  One may argue that this is possible ( Peggy seems to have implemented lots of features into firmware), but I thought it’d be cooler to leave the complex image/animation processing on the host PC-side. I’ve decided to make teensy code concentrate on deciphering the drawing “commands”, and offload content generation on the host PC.

When you do a google search of led matrix boards, you can find tons of neat projects out there. However, many of them lack explanation or sufficient documentation on them. I am not sure if folks might find this project interesting or useful at all. I certain learned a lot from it, and herein I describe the details of this project hoping that it can be of use to someone who’s aiming to do something similar.

For the Impatient

Here’s the demo video of the project.


Parts/tools used:

  • Teensy 2.0
  • 2 x Sure Electronics LED Boards
  • 2 female headers
  • 2 male headers (2×5)
  • Protoboard for wiring parts together
  • C lib for communicating with ht1632 driver on led matrix board
  • C lib for usb_serial
  • C code to parse commands and control led matrix
  • Python code to translate imgs, text, and 3D cube into commands
  • PySerial lib to sent over serial device : /dev/ttyACM0

And here’s the source code for download. If you are on a linux box, you can simply run “make” in the project directory.

Now, if you want to know the details, continue reading below.

Read more…

Categories: uC and Electronics

My First Complete AVR Project

November 18, 2010 1 comment

I’ve only dabbled at microcontrollers for about 1.5 yrs. Throughout this time it was mostly light tinkering, nothing serious. But my wife gave me a challenge. Build a digital clock with the parts I already owned – something our son can read.

So I created one, and was fortunate enough to get noticed by hackaday.com.  Here is the link

http://hackaday.com/2010/09/22/matrix-clock-is-a-breadboarding-win/

And the original post at nerdkits.com.

http://www.nerdkits.com/forum/thread/992/

 

 

Categories: Uncategorized