View previous topic :: View next topic |
Author |
Message |
davidapex
Joined: 12 Mar 2006 Posts: 42 Location: Auckland
|
Posted: Mon Aug 14, 2006 9:50 am Post subject: Mega168 reset pin. |
|
|
Hi,
I just discovered how to configure the reset pin on a mega168 as an I/O but I now wish I hadn't.
I don't seem to be able to indentify/programme the chip any more and thinking about it that would seem right.
Am I goosed or can I get back to programming again?
Cheers,
David |
|
Back to top |
|
|
i.dobson
Joined: 05 Jan 2006 Posts: 1570 Location: Basel, Switzerland
|
Posted: Mon Aug 14, 2006 10:01 am Post subject: |
|
|
Hi,
Welcome to the wonderful world of microprocessors, one small mistake and your chip is goosed.
A normal programmer (STK200/300) sets the reset pin high during programming, and if it is defined as an I/O then that doesn't work anymore.
The only thing you can do is use a "High Voltage programmer", something like a STK500.
Hope this helps
Regards
Ian Dobson _________________ Walking on water and writing software to specification is easy if they're frozen. |
|
Back to top |
|
|
Luciano
Joined: 29 Nov 2004 Posts: 3149 Location: Italy
|
Posted: Mon Aug 14, 2006 10:22 am Post subject: |
|
|
Hi,
You will need the High-voltage programming.
(See Atmel STK500 user manual 3.7.2).
You will need the High-voltage programming to program
the chip while the RESET pin is disabled via (RSTDISBL fuse)
and you will need the High-voltage programming to enable again
the reset pin so that you can program the chip with normal
ISP programming. In High-voltage programming mode a 12V
programming voltage is applied to the RESET pin.
The High-voltage programming mode is called parallel programming
in the datasheet of the ATmega168.
ISP amd parallel programming use a different programming algorithm.
(Not just only 12V on the reset pin).
Best regards,
Luciano |
|
Back to top |
|
|
davidapex
Joined: 12 Mar 2006 Posts: 42 Location: Auckland
|
Posted: Mon Aug 14, 2006 10:29 am Post subject: |
|
|
Hello Ian,
Many thanks for the quick feedback.
I can't believe this - I do it routinely with Pics, hence the screw-up on my part.
....I'll give it high voltage alright! Come to think of it, the Pic programmer does use 13V for programming.
So really the Mega168 is flash reprogrammable if you don't use the reset pin but almost becomes an OTP if you do use it? No programmer/compiler warning that the chip is about to go to data heaven?
As I mentioned in another post, if you wanted to use the mega168 with a xtal controlled UART function you don't have a full 8 bit port left and with the reset pin now off the list I'm beginning to think the chip is a bit of a dog. Any suggestions for a better hobby part from Atmel?
Cheers,
David |
|
Back to top |
|
|
Luciano
Joined: 29 Nov 2004 Posts: 3149 Location: Italy
|
Posted: Mon Aug 14, 2006 10:57 am Post subject: |
|
|
davidapex wrote: | ...I'll give it high voltage alright! Come to think of it, the Pic programmer does use 13V for programming. |
See my previous post in the thread about the 12V.
Luciano |
|
Back to top |
|
|
davidapex
Joined: 12 Mar 2006 Posts: 42 Location: Auckland
|
Posted: Mon Aug 14, 2006 11:52 am Post subject: |
|
|
Hi Luciano,
I don't know why I couldn't see your post earlier.
Many thanks for the detailed explanation which now sounds very similar to Pics which todate I have only used on high voltage programming. I suspect I would suffer the same fate if using the low voltage programming on the Pics also.
My opinion on the mega168 still stands - why didn't/couldn't they put the UART and xtal pins on the incomplete port C and left two good 8 bit ports?
Thanks and cheers,
David |
|
Back to top |
|
|
|