Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

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

Please be positive and constructive with your questions and comments.

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

by Russell 27 on Thu Nov 07, 2013 11:26 am

Proto Fusebit.JPG
Proto Fusebit.JPG (62.79 KiB) Viewed 1393 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 167 times


Happy bricking


Russell


Simple Fusebit Doctor.PNG
Simple Fusebit Doctor.PNG (101.92 KiB) Viewed 1393 times
Last edited by Russell 27 on Thu Feb 06, 2014 1:16 pm, edited 3 times in total.
Russell 27
 
Posts: 240
Joined: Thu Sep 12, 2013 3:59 pm

Re: Unbrick that ICE TUBE YO, Doctor is in

by jarchie on Thu Nov 07, 2013 5:39 pm

Awesome work! I will definitely give this a go when I have some free time.
--John <www.jarchie.com/email>

jarchie
 
Posts: 595
Joined: Sun Jun 24, 2012 2:16 pm
Location: Santa Cruz, California, United States

Re: Unbrick that ICE TUBE ATmega, Doctor is in

by Russell 27 on Tue Feb 04, 2014 4:11 pm

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 1184 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 1184 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 1184 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.
Russell 27
 
Posts: 240
Joined: Thu Sep 12, 2013 3:59 pm

Re: Unbrick that ICE TUBE ATmega, Doctor is in

by Russell 27 on Tue Feb 04, 2014 4:13 pm

ZIP file for above.

USB to UART converter.zip
(149.74 KiB) Downloaded 93 times
Russell 27
 
Posts: 240
Joined: Thu Sep 12, 2013 3:59 pm

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

by Russell 27 on Mon Mar 03, 2014 3:35 pm

FINAL UPDATE:

Completed Atmega Fusebit Doctor with USB to UART interface
Completed Fusebit doctor.PNG
Completed Fusebit doctor.PNG (562.17 KiB) Viewed 1063 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 1063 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.
Russell 27
 
Posts: 240
Joined: Thu Sep 12, 2013 3:59 pm

Please be positive and constructive with your questions and comments.