Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Disabling Hardware Reset in Atmega8

Status
Not open for further replies.

RollingEEE

Full Member level 3
Joined
Mar 25, 2006
Messages
166
Helped
8
Reputation
16
Reaction score
7
Trophy points
1,298
Location
Bangladesh
Activity points
2,406
Hi,

I want to disable the hardware reset pin of ATmega8 and use it as an IO pin. Can any one please give me a C / WinAVR code example of how to do it? Thank you.
 

mm2426

Newbie level 3
Joined
May 29, 2010
Messages
3
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Location
INDIA
Activity points
1,303
I had programmed the RSTDISBL fuse bit of Atmega8 this solves the problem of doing reset using hardware but after that I was not able to program the controller, I was not even able to read fuses or read from the flash. I tried doing Chip Erase but nothing happened. But the code inside the controller was working. I would like to have replies for how to make my MCU working now. Thanks to all in advance.
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,348
Reputation
4,690
Reaction score
2,274
Trophy points
1,413
Location
Southwest, USA
Activity points
62,510
I had programmed the RSTDISBL fuse bit of Atmega8 this solves the problem of doing reset using hardware but after that I was not able to program the controller, I was not even able to read fuses or read from the flash. I tried doing Chip Erase but nothing happened. But the code inside the controller was working. I would like to have replies for how to make my MCU working now. Thanks to all in advance.

I've attached a simple circuit and procedure to return your ATMEGA to default settings.

It should solve your problem.
 

Attachments

  • FactoryDefaultMega8.zip
    113.5 KB · Views: 126

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,348
Reputation
4,690
Reaction score
2,274
Trophy points
1,413
Location
Southwest, USA
Activity points
62,510
Hi,

I want to disable the hardware reset pin of ATmega8 and use it as an IO pin. Can any one please give me a C / WinAVR code example of how to do it? Thank you.

Hi RollingEEE,

You should proceed with caution when disabling the hardware reset pin, depending on your chip programmer it can prevent you from reprogramming or access to fuse settings.

However should you decide to proceed simply at this to your code, fuse RSTDISBL= 0.

Or you can use the online tool:

Engbedded Atmel AVR® Fuse Calculator
 

pjcxb

Newbie level 2
Joined
Oct 21, 2011
Messages
2
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,289
I've attached a simple circuit and procedure to return your ATMEGA to default settings.

It should solve your problem.

Thanks for the circuit. I am unclear as to the function of the main Mega8 - if this requires a program and connections to the Mega8 which requires resetting to factory defaults, would you please advise where the main Mega8 hex file can be obtained and also what interconnections between the two Mega8s are required?

With thanks
Pj
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377
The zip file includes everything that you need.
You connect a mega8 loaded with the provided hex file to the mega8 that needs to be restored to factory defaults.
The schematic shows the main AVR (which is programmed with the provided hex) and how it should be connected to the target mega8 (the target will be restored to factory defaults), the target flash content is irrelevant.

Alex
 

pjcxb

Newbie level 2
Joined
Oct 21, 2011
Messages
2
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,289
Thank you for your prompt reply.
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,348
Reputation
4,690
Reaction score
2,274
Trophy points
1,413
Location
Southwest, USA
Activity points
62,510
The attachment is still available in Reply #3.

You might want to try using a different browser.


BigDog
 

Attachments

  • FactoryDefaultMega8.zip
    113.5 KB · Views: 25

emin1

Newbie
Joined
Jun 5, 2012
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,298
Thanks bigdogguru

I found and got it...

May healthy days be with you....

- - - Updated - - -

Sorry but,

i could not find hex file in the zip.
even link in the text file is broken...
thanks
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377
The zip file contains a bin file, that is the firmware
 

emin1

Newbie
Joined
Jun 5, 2012
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,298
I can not open this zip file. I tried winrar, bintohex, and some other utilities but could not. Could you explain how to open it? or send it in normal hex format.

Thanks
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377
It is a simple zip file , it can open by almost any program that can open compression files so I assume that the file is not downloaded correctly for some reason.
Try a download manager, firefox, internet explorer
 

emin1

Newbie
Joined
Jun 5, 2012
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,298
Well, i opened it but can not load it into the atmega8 (first one) using ISP Programmer that operates properly normally.

I use win7 32 bit
respond to attempt to load hex file is "no data in file"

editing it with "free hex editor neo" does not change result

please help
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377
Here is the hex file (converted with bin2hex)
 

Attachments

  • FACTORYDEFAULTMEGA8.zip
    684 bytes · Views: 1,791

elaerico

Newbie level 1
Joined
Jun 9, 2015
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
4
Hi. Can you pass me the fuse settings for the master atmega? Thanks!
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,348
Reputation
4,690
Reaction score
2,274
Trophy points
1,413
Location
Southwest, USA
Activity points
62,510
I believe required fuse settings for the ATMEGA utilized as the programming device are the factory defaults as well.

The fuse settings are listed in the RestoreATMEGA8toFactoryDefault.doc, Word document, found in the ZIP file I initially uploaded.

One of the most important fuse settings is the OSC set to internal RC Oscillator @1MHz.

BigDog
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top