Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Mega168 reset pin.

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
davidapex

Bascom Member



Joined: 12 Mar 2006
Posts: 42
Location: Auckland

newzealand.gif
PostPosted: Mon Aug 14, 2006 9:50 am    Post subject: Mega168 reset pin. Reply with quote

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
View user's profile
i.dobson

Bascom Expert



Joined: 05 Jan 2006
Posts: 1570
Location: Basel, Switzerland

switzerland.gif
PostPosted: Mon Aug 14, 2006 10:01 am    Post subject: Reply with quote

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
View user's profile
Luciano

Bascom Member



Joined: 29 Nov 2004
Posts: 3149
Location: Italy

blank.gif
PostPosted: Mon Aug 14, 2006 10:22 am    Post subject: Reply with quote

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
View user's profile
davidapex

Bascom Member



Joined: 12 Mar 2006
Posts: 42
Location: Auckland

newzealand.gif
PostPosted: Mon Aug 14, 2006 10:29 am    Post subject: Reply with quote

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
View user's profile
Luciano

Bascom Member



Joined: 29 Nov 2004
Posts: 3149
Location: Italy

blank.gif
PostPosted: Mon Aug 14, 2006 10:57 am    Post subject: Reply with quote

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
View user's profile
davidapex

Bascom Member



Joined: 12 Mar 2006
Posts: 42
Location: Auckland

newzealand.gif
PostPosted: Mon Aug 14, 2006 11:52 am    Post subject: Reply with quote

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
View user's profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum