Go Down

Topic: MEGA 2560 reset voltage (Read 5257 times) previous topic - next topic

liuzengqiang

I am considering using an xbee to reset an Arduino MEGA2560 but I don't know if it will work reliably. The xbee outputs 3.3V and the MEGA2560 operates at 5V. I found this in Atmel doc.

I don't quite understand what it means. Does it mean I have to supply 0.9Vcc to keep it from resetting? Thanks.

If the 3.3V won't reliably work, I will use a transistor.

Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter

raschemmel

A TTL logic LOW on a 3.3V system is compatible with a TTL logic LOW on a 5V sytem. Pull the RESET pin low and it will reset. It makes no difference what the logic HIGH voltage is because it does not apply to the RESET pin.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Budvar10

#2
Sep 08, 2014, 03:05 pm Last Edit: Sep 10, 2014, 11:40 am by Budvar10 Reason: 1
Quote
I don't quite understand what it means. Does it mean I have to supply 0.9Vcc to keep it from resetting? Thanks.

I suppose that question concerns VRST row, so it is treshold voltage range where logical value isn't safe. Below 0.2VCC is LOW and above 0.9VCC it is HIGH. It means you have to apply at least  0.9VCC  to RESET pin to keep it from resetting.
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

raschemmel

Quote
I suppose that question concerns VRST row, so it is treshold voltage range where logical value isn't safe. Below 0.2V is LOW and above 0.9V it is HIGH. It means you have to apply at least  0.9V  to RESET pin to keep it from resetting. 


That's not what the table says. It says Min: 0.2 V , Max : 0.9 V (meaning Typical falls between those two limits at 0.7V dc (one diode drop).
http://en.wikipedia.org/wiki/Logic_level   

Examples of binary logic levels:
Technology                  L voltage                       H voltage   Notes
CMOS                     0 V to 1/3 VDD               2/3 VDD to VDD               
TTL                           0 V to 0.8 V                     2 V to VCC   
ECL                           VEE to ?1.4 V                  ?1.2 V to 0  V   



There is no reason to suspect that a 3.3V TTL logic circuit cannot pull down a 5V TTL logic circuit to a logic LOW.
(the same cannot be said for a logic HIGH).
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Budvar10

#4
Sep 09, 2014, 08:13 am Last Edit: Sep 10, 2014, 11:41 am by Budvar10 Reason: 1
There is nothing about typical value, but yes, it says VRST treshold voltage falls between 0.2VCC and 0.9VCC. This value may vary and not only depending on technology. ATmega2560 can operate with VCC between 1.8V and 5.5V and it has also an impact to treshold voltage value. This range defines voltage levels which can't guarantee required logic level.
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

raschemmel

Nevertheless, the table means that when the xbee outputs a logoc LOW , as long as it is less than the 0.9  V Max then the Mega will still see it as a LOW and execute a Reset . You have to agree with that conclusion, right?
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

liuzengqiang

I am still confused with what threshold means here. 0.1Vcc or lower is required to reset, correct? 0.9Vcc or more is required to come out of reset, correct?
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter

raschemmel

#7
Sep 10, 2014, 04:49 am Last Edit: Sep 10, 2014, 05:24 am by raschemmel Reason: 1
Quote
I am still confused with what threshold means here. 0.1Vcc or lower is required to reset, correct? 0.9Vcc or more is required to come out of reset, correct?


No.
You've seen the datasheet. You know what it says. Now , if you want to find out the answer to your question, forget what you read
and put a jumper from the RESET(NOT) pin to a breadboard. Now connect a pot across the 5V bus (or 3.3V , it really isn't going to matter either way) and connect the wiper of the pot to the jumper you connected to the RESET pin. You will find that as long as the voltage on the RESET pin remains ABOVE 2.1 V (+/- 50 mV), you can plug the jumper into the RESET pin and remove it and nothing happens. If , however , the wiper voltage is or LESS THAN 2.05 V (+/- 50mV), when you plug the jumper into the RESET pin, nothing will happen UNTIL you REMOVE it. Obviously , this means that RESET is NOT executed when the RESET pin is pulled LOW. It is executed when the reset pin is pulled BELOW the lower threshold voltage of a LOGIC HIGH and THEN RAISED back up to a logic HIGH.
The sequence is LOW (less than 2.0V), HIGH=>RESET. If you're sceptical, take a jumper and plug it directly to GROUND and plug it into the RESET pin and leave it. Go have lunch. Come back and it still has not reset . Remove the jumper and it will reset.
I know what the datasheet says but you that is not what you asked . You asked what voltage , when applied to the RESET pin will
result in a reset. The question was not exactly correct but you are not expected to know that nothing happens until the RESET pin goes HIGH. Long story short, the xbee can reset the UNO no problem because it can pull the RESET pin below 2.0 V, and when it raises the RESET pin back to a HIGH, the UNO will reset.
[EDIT]

Correction, when the voltage drops below the 2.0V threshold, the processor halts, but doesn't execute the RESET sequence until the rising edge of the HIGH following the low, so technically SOMETHING does happen , or to be more accurate , EVERYTHING STOPS HAPPENING and just waits until the voltage returns to a HIGH.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Docedison

@ Raschemmel your information is not quite correct... Pull up  the reset pin above ~ 11V (read the data sheet...) and you will place the chip in HV programming mode.. Commonly used to fix accidently Bricked controllers.. and become more familiar with actual Low and High input pin levels both  regular and Schmitt  trigger type inputs...

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Budvar10

#9
Sep 10, 2014, 01:28 pm Last Edit: Sep 10, 2014, 01:31 pm by Budvar10 Reason: 1
At the first. I realised that I was not so thoroughgoing  as I read this thread today. I had corrected some mixture of V and VCC. It could cause misunderstanding. I hope it is correct now. Sorry for it and don't beat me.  :smiley-mr-green:

@raschemmel
Quote
Nevertheless, the table means that when the xbee outputs a logoc LOW , as long as it is less than the 0.9  V Max then the Mega will still see it as a LOW and execute a Reset . You have to agree with that conclusion, right?

Agree.


Min 0.9Vcc has to be on RESET pin to surely prevent MCU of reset. If Vcc = 5V, it means between 4,5V  and Vcc.
Max 0.2Vcc has to be on RESET pin to surely caused MCU reset. If Vcc = 5V, it means between GND and 1.0V.
If you see DC characteristics (table 31.1) it is 0.1Vcc for LOW (max 0.5V at Vcc= 5V ) ! And look at notes below the table:
1. "Max" means the highest value where the pin is guaranteed to be read as low.
2. "Min" means the lowest value where the pin is guaranteed to be read as high.

LOW from XBee (max 0.5V isn't it ?) will be LOW for mega also. But if HIGH output will be applied directly to RESET (something between 2,8-3,3V) it is not enough to keep mega surely out of reset even if it has reset pin pulled up to Vcc.

Look at this:
http://www.ladyada.net/make/xbee/arduino.html
in the middle of page.

Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

raschemmel

#10
Sep 10, 2014, 04:07 pm Last Edit: Sep 10, 2014, 04:40 pm by raschemmel Reason: 1
Quote
@ Raschemmel your information is not quite correct... Pull up  the reset pin above ~ 11V (read the data sheet...) and you will place the chip in HV programming mode.. Commonly used to fix accidently Bricked controllers.. and become more familiar with actual Low and High input pin levels both  regular and Schmitt  trigger type inputs...

@DocEdison,
Your right about I should have specified a limit of Vcc, instead of just saying above, but really, do you think the OP interpreted it any other way ? (meaning , do you think he understood me to be saying anything other than  "above x voltage with a max of Vcc?).
Technically , you are correct, I should have clarified that but I think it is irrelevant in the OP's case. Also, I know  what the logic levels are stated in the datasheet. I have an UNO ,not a Mega, so all my testing was done with a 328. As I stated to the OP, his question was NOT what does it say or not say on the data sheet. His question was what voltage level will trigger a RESET on a MEGA2560. My answer was , check it yourself. Don't take my word for it. Put a pot across Vcc & GND and connect the wiper to a breadboard and connect a DMM on Volts and a jumper to the wiper. Set the pot for a voltage ABOVE 2.1 V , (if the pot is across Vcc & GND, what is the chance it will reach 11 V ?) Plug the jumper with 2.1 V on it into the RESET pin and remove it quickly. Nothing happens. Set the pot to 1.8 or 1.9 V and repeat the test, only don't remove the jumper, just plug it into RESET and count to 10. After 10 seconds , remove the jumper and you will see the board RESET, indicating that while the processor Halts when the RESET pin goes LOW, it does not actually reboot and execute code until it goes HIGH again.  That is what I observed on an UNO.  I believe the results will be the same for a Mega. You can talk about the datasheet all day but at the end of the day, what matters is what the board does when your using it. I appreciate the correction , albeit not all that relevant but I think I deserve the benefit of the doubt. You didn't perform the test I described above or you would have said so. At least try  the test above  before quoting datasheets about logic levels.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

raschemmel

Quote
LOW from XBee (max 0.5V isn't it ?) will be LOW for mega also. But if HIGH output will be applied directly to RESET (something between 2,8-3,3V) it is not enough to keep mega surely out of reset even if it has reset pin pulled up to Vcc. 


Try the test I described in my last post and I believe you will find the above to not be correct.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

liuzengqiang


Quote
LOW from XBee (max 0.5V isn't it ?) will be LOW for mega also. But if HIGH output will be applied directly to RESET (something between 2,8-3,3V) it is not enough to keep mega surely out of reset even if it has reset pin pulled up to Vcc. 


Try the test I described in my last post and I believe you will find the above to not be correct.


raschemmel,

I appreciate your effort to test out the voltage but I was looking for ATMEL guaranteed values. The data loggers will stay outdoors and endure some hot and cold temperatures. I can't take your indoor test value over ATMEL values. Thanks.
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter

liuzengqiang

Budvar10,

Thank you for pointing out the DC characteristic section. Here is a screen shot. It apparently states that the RESET requires 0.9Vcc to guarantee a reset after 0.1Vcc is supplied. The test parameter is -40DegC to 85DegC. I was more or less looking at -30 to 50 range for my data loggers. Also the adafruit tut link is appreciated. It does say the xbee is too weak to reset arduino. Problem solved, transistor it is.

So for the transistor diagram in adafruit's website, is the capacitor there to stabilize the logic level?
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter

raschemmel

#14
Sep 10, 2014, 06:34 pm Last Edit: Sep 10, 2014, 06:37 pm by raschemmel Reason: 1
Quote
I can't take your indoor test value over ATMEL values  


Indoors or outdoors, it doesn't matter. If you test it outdoors , the result will be the same. The voltage that triggers a RESET is NOT the voltage specified for a logic LOW, which is what you would expect but rather any voltage that is NOT  a HIGH , which includes the X-Don't Care deadzone in between the LOW range and the HIGH range. You do know about that deadzone right ? Well the RESET will trigger for anything that falls OUTSIDE the HIGH range, including the DEADZONE. You can read the datasheet all day but you won't know the truth until you walk outside and do the test I described, and I believe what you will find is that any voltage below a 2.0 V dc on the RESET pin  will Halt the processor and RESET sequence will execute when the signal goes HIGH. As far as the xbee,
I think it WILL reset the MEGA but IF it doesn't you can use a CD4050 level converter non-inverting buffer chip to drive the RESET pin from the Xbee. It is a CMOS to TTL converter so it converts low current logic signals to TTL current level signals.
  https://www.fairchildsemi.com/datasheets/CD/CD4049UBC.pdf
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Go Up