Electronics > Microcontrollers

PIC18 - reset in middle of running code

(1/12) > >>

richcj10:
Hi,

I have had Atmega's lock up on me but never reset while executing code. Any ideas?
P.S.- WDT disabled, running board off of Power supply.

Thanks,

Rick

AndyC_772:
A few obvious things to check:

- do you have a pull-up resistor between MCLR and VCC?
- do you have decoupling caps on the power & ground pins, physically located right next to the pins and on very short leads?
- what's the brown-out voltage set to (#pragma config BORV)? Is it anywhere close to your VCC voltage?
- where's the clock coming from, is it an external clock or the internal RC oscillator / HSPLL?

What's the code doing? Is it possible it's just a software bug writing over a pointer or something and causing a crash?

AlphZeta:
Also, if the power supply is shared with some inductive components (e.g. motors), this tend to happen quite a bit if the decoupling and filtering of the power supply is not sufficient.

richcj10:
It is not a power issue. I have checked it with a scope. No inductive loads attached to the device.
It works for hours and then reboots into a loop that continues to reboot. I haven't looked at the Brown out but it doesn't seam likely that it would be causing this. 

Psi:
Have you tried another chip?
That will prove if its a software issue or a faulty IC

Are you doing anything complex with pointers?

Are you using a bootloader?

Using the EEPROM values for anything? especially eeprom address 0 ?

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod