Transient status at power on reset .

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello.

Please consider this typical circuit.

Turning  the S1 key on/off  may cause to trig the SCR? whereas we never trig the SCR in the AVR‘s code.

Thanks in advance

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AVR ports are initially configureed as (high impedance?) inputs and should not trigger your SCR.

During configering the port howerver you should make sure to do it in the right order so you don't accidentaly (even temporarily) enable internal pullups for example.

So Re-read the I/O port section of the dataseet of the AVR you use.

Not all AVR's are the same, and not all Ports are the same.

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What you haven't shown in the rest of the microcontroller's power supply.

 

There will be capacitors, which will take some time to charge/discharge when S1 is closed/opened - this can lead to "interesting" things with protection diodes, etc ...

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for  respons

So Re-read the I/O port

 I don’t find something info about that .

There will be capacitors, which will take some time to charge/discharge

 This is typical circuit so I didn’t show reset and bypass capacitors and etc...
On  8051  I had glitch during power-up or power-down  but  I have not yet tested it on AVR.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Goorman wrote:
 This is typical circuit so I didn’t show reset and bypass capacitors and etc...

But they will be there and will have an effect

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Goorman wrote:
On  8051  I had glitch during power-up or power-down  but  I have not yet tested it on AVR.

8051 have pullups by default on the port pins. The 8051 ports can only actively pull down. The AVR ports are a bit more sophisticated.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

8051 have pullups by default on the port pins

Right. but Im asking about glitch  and this circuit in typical .

 

 

I usually use an external power supervisor to powering output, but I don’t have experience about AVR.

 

Suppose that  the reset pin is always connected to the ground , now, by  *powr_on  and  power_off*   dose  AVR  make unwanted  trig  ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Generally not.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

8051 have pullups by default on the port pins.

So the pin SCR gate is triggered on power up.

 

 AVR ports are initially configureed as (high impedance?) inputs and should not trigger your SCR.

Correct, so the SCR should not be triggered on power up.

 

 but  I have not yet tested it on AVR.

 So go ahead and give it a try.

If everything else is done correctly, it should work as expected, without any power up mis-triggering.

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

IIRC there are some fuses that relate to the power-on sequence.
Also, I expect that if one holds the device in reset until the

power supply is stable and good, no glitches will occur.

"Demons after money.
Whatever happened to the still beating heart of a virgin?
No one has any standards anymore." -- Giles