Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20780

BASCOM-AVR : Brownout reset : REPLY

$
0
0
WELL !!!!! After a huge amount of knashing of teeth and lost sleep, I think i have stumbled on my brownout problem. My new PCB's arrived today - the ones with the ground plane on both sides. I have just assembled one, and am please to say that it all worked 100% without any track errors. BUT, my old brownout reset was still there. The following test program was used to check that the board was running. [code:1:2ccf351e8f] '******************************************************************************* $regfile = "m1284pdef.dat" $crystal = 9830400 $framesize = 100 $hwstack = 100 $swstack = 100 ' '------------------------------------------------------------------------------- 'Open a software UART channel for debug dB9 Open "comc.3:9600,8,n,1" For Output As #1 '******************************************************************************* config PORTD.7 = output 'led config PORTC.4 = output 'led config PORTA.4 = output 'led config PORTA.3 = output 'led print #1 , "There has been a restart" do print #1 , "hello cruel world" toggle portc.4 toggle portd.7 'toggle porta.4 'toggle porta.3 wait 1 loop [/code:1:2ccf351e8f] The board ran correctly, "hello cruel world " appears on the screen, and the two C.4 and D.7 leds toggle as they should. These LEDs are smd and pull 4.5mA each, and are driven via a 470 with the led connected to ground via the resistor, directly from the port pin. I have brownout set to 4.3v. Now here is the interesting part: If I remove the comment from either of the two lines that toggle the a.4 or a.3 leds, the processor STOPS running. !!! No serial output, and no leds. If I go into fuses and set the brownout to 1.8 or 2.7, the processor runs. The AVcc pin is powered via a 100uH choke with a 0.1 to ground and is steady at 5.02v. With one of the C or D port leds turned on Pin 30 the Aref is 4.3v DC when measured with a fluke DVM set to the highest range. I believe the input impedance on this range is at least 10meg. BUT BUT BUT with either of the A port leds turned on, the AVref drops to 4.23v and the brownout happens. Now on all of my production boards, I have a flashing LED on port A.4 powered by a 1K ( not a 470. It just so happens I ran out of smd 1k on this new board and chose to use smd 470, which made the problem much worse and allowed me to stumble upon it. With 1k I believe the problem was much more insidious and happened only now and again, which is what was driving me nuts). CONCLUSION Despite what Atmega says in the data sheet, pulling 4.5mA from one of the A port pins, causes the brownout to trigger. I believe this has been my problem all along. The circuit diag of the board I published a few weeks ago in an earlier posting.

Viewing all articles
Browse latest Browse all 20780

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>