Overview
Now that it's assembled, you can reprogram the chip with persistance of vision code, to display custom messages & images!To program the chip you will need a computer with a serial port (basically, any PC) or a USB/Serial converter for computers without serial ports.
I have tried KeySpan brand converters and the GWC AP1100 (PL-2303 chipset, $17 from NewEgg or Jameco) with suceess. If you're using that or some other PL-2303 chipset ones on MacOS X then be sure to install this version instead of the one that comes on the driver CD. There's also been reports of success with the FTDI chipset, this one is $11 from tigerdirect. Note that not all converters work (especially the real cheap ones) so if you own one already, try the one you have (and let me know!) but there's virtually no way for me to 'make it work with X brand that I have'.
Note: if you are trying this out with a new microcontroller (i.e. not from a kit) you'll need to burn the fuses first, otherwise it won't work right and might not be programmable. Run make burn-fuse before you type in make program-minipov, while the minipov is powered and connected to the serial port. You might have to do it a couple of times if it's failing.
Note 2: When plugged into the serial port, the LEDs may light up oddly or dimly, this is normal.Still, the minipov3 must be powered on to be programmed.
Right now there's thorough instructions for:
Windows
First, you'll need to setup WinAVR. Step by step instructions are here. Once you're done with that, come back here and do the remaining steps.If you're using a USB to Serial converter cable, you'll need to make some small modifications to the WinAVR package to support the MiniPOV3:
- Download the zip file of the modified AVRDUDE software
- Uncompress it onto the desktop
- Open up the folder C:\WinAVR\bin (or wherever WinAVR was installed, perhaps C:\WinAVR-2008-01-06\bin)
- Rename the two files avrdude.conf and avrdude.exe in C:\WinAVR\bin to avrdude-backup.conf and avrdude-backup.exe
- Copy the two files avrdude.conf and avrdude.exe from the uncompressed folder in step 2 into C:\WinAVR\bin
Now download the zip of example source code for the Minipov3
Uncompress it somewhere convenient, the C:\ drive is a good place and is short enough to type in the command line.
Run dir or ls and verify that there is a file called minipov.hex
Now it's time to figure out what COM port you are using. By default almost all Windows computers have only COM1 but if you are using a USB adaptor or have a different configuration, you will have a different COM port. Open up the Device Manager (under the System control panel) and look under Ports.
Next, if you're using a USB to serial adapter cable, open up the file C:\WinAVR\bin\avrdude.conf in Wordpad and search for "dasa" so that it will take you to the part shown below. Make sure you see a line with "delay = 2000" in it as shown below. That means that we are telling the programmer to go slow (wait 2 milliseconds between commands) because otherwise it gets confused. If you're not using a usb to serial converter, this line isn't necessary, but it doesnt hurt either.
If you're using a USB/serial converter, it'll take a long time (up to 3 minutes!) to program the MiniPOV. You can adjust the delay to try and shorten the time. If you're getting errors try increasing the time in the avrdude.conf file. 2000 to 3000 is a good starting point, make it larger (5000 or more) to increase the delay.
If you get a bad response, such as
avrdude: initialization failed, rc=-1
Double check connections and try again
It means you probably have something connected up wrong. Check your soldering, are there any bridges or unsoldered parts? Are the diodes in correctly? Is the chip seated well? Is it turned on? Try connecting directly to the computer (not using a serial extension cable) or try a different USB to serial adaptor. Don't use -F to override the initialization check even though avrdude suggests it! It will not make things work, it will only make debugging more confusing!
Once you've gotten the programming procedure running, you can now create your own new and exciting messages!
Can't get it working? Dont worry, help is available in the forums!
MacOS X
First, you'll need to setup avr-gcc and related tools. Step by step instructions are here. Once you're done with that, come back here and do the remaining steps.
All the software is installed, now you just have to get the minipov3 firware!
Step 8. Setup MiniPOV firmware
Download the minipov3 firmware, uncompress it and put the minipov3 folder into your Home directory.
Plug in your USB/Serial converter, making sure the driver is installed properly. If you're using a PL2303 chipset type adaptor, use this driver which works much better than the ones often distributed with these adaptors.
Next you have to figure out what the name of the USB adaptor device is. In a Terminal window, type: ls /dev/cu.*
and look at the output. It should be something like /dev/cu.usbserial in this case its /dev/cu.usbserial-FTCTYG5C whatever that means.
Step 8b. Download patched avrdude if necessary
For some reason, FTDI-chip based adapters need some special help programming these chips. You'll need to use a modified verson of avrdude so download the package from here. Replace /usr/local/AVRMacPack/bin/avrdude and /usr/local/AVRMacPack/bin/avrdude.conf with the patched versions you just downloaded.
Step 9. Program some chips!
Power up your working MiniPOV and plug it into the adapter. Now in a Terminal window, type in avrdude -p t2313 -c dasa -P /dev/cu.usbserial-FTCYG5C
The -p t2313 indicates that this is a attiny2313 type chip
the -c dasa indicates its a serial port programmer
the -P /dev/cu.usbserial-FTCYG5C indicates where to find the USB-serial converter
avrdude: initialization failed, rc=-1
Double check connections and try again
It could be that the delay is not long enough. Open up the file /usr/local/AVRMacPack/bin/avrdude.conf using TextEdit and and search for "dasa" so that it will take you to the part shown below. Make sure you see a line with "delay = 2000" in it as shown below. That means that we are telling the programmer to go slow (wait 2 milliseconds between commands) because otherwise it gets confused.
If it -still- doesn't work, it means you probably have something connected up wrong. Check your soldering, are there any bridges or unsoldered parts? Are the diodes in correctly? Is the chip seated well? Is it turned on? Try connecting directly to the computer (not using a serial extension cable) or try a different USB to serial adaptor. Don't use -F to override the initialization check even though avrdude suggests it! It will not make things work, it will only make debugging more confusing!
Next, open the Makefile in the minipov3 firmware directory with TextEdit and look at the top couple of lines:
Type in make program-alt_leds which will program the chip with the alt_leds.c program.
Once you've gotten the programming procedure running, you can now create your own new and exciting messages!
Can't get it working? Dont worry, help is available in the forums!
Linux (& other Unix-y machines)
Follow the instructions for getting avr tools set up from here.- Download the zip of example source code
- Uncompress and cd into the source directory.
- Run make and verify that avr-gcc was found and everything compiled all happy (there should be a bunch of .hex files now).
- Plug in the MiniPOV into the serial port, and turn on the battery pack (it must be powered to be programmed even if its looking like its powered off of the serial port).
- Edit the Makefile in the minipov directory to change the AVRDUDE_PORT to /dev/cuaa0, /dev/ttyS0, /dev/ttyUSB0, /dev/cu.KeySerial1 or /dev/cu.usbserial or whatever you're using. (Check your distribution docs for info on what the serial ports are called!)
- Run make program-minipov, this will start the programming procedure.
Page last edited March 11, 2013
Text editor powered by tinymce.