Unbrick that ICE TUBE ATmega, Doctor is in_UPDATE: ADD UART

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
russell 27
 
Posts: 242
Joined: Thu Sep 12, 2013 3:59 pm

Unbrick that ICE TUBE ATmega, Doctor is in_UPDATE: ADD UART

Post by russell 27 »

Proto Fusebit.JPG
Proto Fusebit.JPG (62.79 KiB) Viewed 1587 times
Knew I'd lock a chip eventually, an Atmega 328P actually, trying some alternative firmware. I'll do it again. Not much information in the posts here, so thought I'd pass this on. I might be wrong here, but I have the feeling some consider "bricking" an AVR as foolish or a source of shame. I don't feel that way. Part of my interest in the ICE TUBE, was learning C and AVRs, and that means experimenting. I know what the fuses do, but there's a lot to know here, all around. Besides I learned quite a bit from this. Had a look online to find a solution, and soon came to find this is very common. I use the USBTINY icsp programmer like many of you, great little device. But with certain fuse settings, or situations that can arrive from setting fuses incorrectly, the USBTINY can no longer communicate with the AVR. Commonly this happens by disabling the AVR's internal oscillator (no microprocessor), or by disabling the use of isp programming, among other possibilities. If you have a programmer capable of higher voltage programming, no problem, those are set up to communicate with the AVR differently. I don't. If you have an Arduino board, it can be setup to communicate with the AVR and change the fuses. I don't. Tried some other little tricks to no avail. Finally, I came upon the FUSEBIT DOCTOR. Strictly a do-it-yourself circuit, no kits or etched boards for purchase. You can view the Web page here: http://mdiy.pl/atmega-fusebit-doctor-hvpp/?lang=en. There's a ton of information and personal support, not only about this circuit, but many others he's shared, totally worth a look. I already had the circuit components at hand, just a matter of putting it together. All of the interconnecting chip pins are done so with resistors for safety, consequently resistors comprise most of the components. The circuit uses a Doctor programmed Atmega, to connect and communicate with the "broke" chip. It does so with 12 volts. The Doc Atmega can be flashed to one of six different Atmegas, with corresponding .hex. I used a 168V. You need a 12 volt REGULATED power supply to power the circuit, I used a 12 volt switch mode. How it works: The Doc Atmega program communicates with your chip, using high voltage programming, reads the device signature, and rewrites the fuses to factory default. If desired, you also have the option to erase the chip flash and eeprom by jumpering pin 27 to ground. In some circumstances a full erase is needed to reflash the fuses. I jumpered for a full erase. It's so easy even I can do it. Pop your brick in the circuit, power up, push the button. There's a red and green LED for status. After two or three seconds green LED lit, DONE. Connected my 328 to the USBTINY, back in business. Read the fuses, back to factory settings, as well as eeprom and flash. I built the circuit on a proto bread board, and posted a simplified circuit drawing the way I built, can be printed out on one page. The original circuit includes several chip sockets, to Doctor a multitude of chips, I only needed for the 8 series. Fuse settings for the Atmega 168 Doctor are: L:0x62 H:0xD7 E:0xF9. Also posted the zip including program .hex files.
update11-30.04.2011.zip
(553.92 KiB) Downloaded 200 times
Happy bricking


Russell

Simple Fusebit Doctor.PNG
Simple Fusebit Doctor.PNG (101.92 KiB) Viewed 1587 times
Last edited by russell 27 on Thu Feb 06, 2014 1:16 pm, edited 3 times in total.

User avatar
jarchie
 
Posts: 615
Joined: Sun Jun 24, 2012 2:16 pm

Re: Unbrick that ICE TUBE YO, Doctor is in

Post by jarchie »

Awesome work! I will definitely give this a go when I have some free time.

User avatar
russell 27
 
Posts: 242
Joined: Thu Sep 12, 2013 3:59 pm

Re: Unbrick that ICE TUBE ATmega, Doctor is in

Post by russell 27 »

update:
To anyone who had interest in the original post, I finally finished my permanent version, well almost. An etched board is nice, but this will do.
Fusebit Doctor.png
Fusebit Doctor.png (558.92 KiB) Viewed 1378 times
The FUSEBIT DOCTOR also has the ability to send information via UART, and can communicate via your computer so you can not only see what's going on, but visually choose what operations you want to do. This was my first en devour here with UART, so I thought I would pass this on to others in my place. You need some kind of TERMINAL to interface to. I tried several, TERMITE, HyperTerminal, BASCOM-AVR terminal. Termite is totally free ware and can be used on the fly, nice. HyperTerminal is really nice too. I'm not an Arduino man but I believe there is a terminal there also. Correct Baud rate is a must, set incorrectly all I got was unreadable characters. If your computer has an RS-232 connector you're all set, not many do these days. There are some RS-232 adapters out there, ADAFRUIT has the FTDI friend. I found a simple USB to UART converter made with the ATtiny 2313. It took a little tweaking, but I posted the working circuit I used. I'm still using windows XP, and I put the driver, .hex and circuit in the zip. I put in some alternate drivers as well. You will need to install the correct driver to interface with your computer. Some other information on the design can be found here:http://www.recursion.jp/avrcdc/.
Basically to connect, converter TXD to Atmega RXD and converter RXD to ATmega TXD, Just remember to connect the TXD transmit pin of each device to corresponding RXD receive pin of the opposite device. Don't forget to connect the grounds together.
UART terminal.png
UART terminal.png (25.14 KiB) Viewed 1378 times


Terminal settings:
baudrate: 4800
parity: none
databits: 8
stopbits: 1
handshake: none

USB to UART converter.png
USB to UART converter.png (33.5 KiB) Viewed 1378 times
The converter is supposed to have an automatically configured self baud range of 600 - 38400 bps, so it should work with other projects. Fuse for ATtiny are: FF CD FF low, high, extended

Guess I'll have to post the ZIP in the next window.
Hope this helps get you on your way.
Last edited by russell 27 on Sat Feb 14, 2015 8:51 pm, edited 3 times in total.

User avatar
russell 27
 
Posts: 242
Joined: Thu Sep 12, 2013 3:59 pm

Re: Unbrick that ICE TUBE ATmega, Doctor is in

Post by russell 27 »

ZIP file for above.
USB to UART converter.zip
(149.74 KiB) Downloaded 113 times

User avatar
russell 27
 
Posts: 242
Joined: Thu Sep 12, 2013 3:59 pm

Re: Unbrick that ICE TUBE ATmega, Doctor is in_UPDATE: ADD U

Post by russell 27 »

FINAL UPDATE:

Completed Atmega Fusebit Doctor with USB to UART interface
Completed Fusebit doctor.PNG
Completed Fusebit doctor.PNG (562.17 KiB) Viewed 1257 times

Soldered on male header pins to make USB cable, board connector, and finished off with shrink tube. For UART TXD- RXD cable, soldered on female header pins to a small piece of ribbon cable, and finished off with shrink tube.
cables.PNG
cables.PNG (388.42 KiB) Viewed 1257 times
While it's not a high voltage parallel programmer, it can accomplish many of those same communication tasks, including erasing chip flash, reset lock bits, and restoring fuse bits to factory default. While in terminal mode, fuses can be manually set by typing any variable desired for LOW, HIGH or EXTENDED fusebit. Any trouble you ever get into, this circuit should get you out of. An excellent circuit to add to my AVR arsenal.

Locked
Please be positive and constructive with your questions and comments.

Return to “Clock Kits (discontinued)”