Continue to Site

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.

start up problem with a pulse generator program

Status
Not open for further replies.

regrin

Newbie level 3
Joined
Apr 24, 2009
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,301
start up problem

hello,
i have written a pulse generator program (my first) and it runs perfectly in mplab simulator, but when i plug chip into hard ware it only runs sometimes. i have to turn supply on and off. crystal runs always (20mhz) and once running i can manual reset fine (mclr to gnd) is this hardware or software? mclr has 100nf to ground and 100k to 5v. 5v is regulated and has filtering caps. thanks for any replies.
 

Re: start up problem

Using mplab it must be a pic micro.
Your mclr pull up resistor is too high in value. If you read the electrical specifications, you will see that mclr can have 5uA of leakage current, which will result in a 0.5 volt drop acros the 100K pullup. The maximum value recommended by Microchip for mclr pull up rsistor is 39K.
10K is a better value to choose.
The 100nF capacitor with the 100K pull up is most probably making the reset line rise to slowly. Get rid of the cap, you dont need it.

So:

Enable power up timer in the config fuses, and also brown out detect if it has it.
Change the pull up to 10K, get rid of the cap.
 

Re: start up problem

thanks for reply, tried what you said, still no joy. it is a pic16f819, sorry i forgot to say. this is my config:
__CONFIG _WDT_OFF & _HS_OSC& _LVP_OFF& _PWRTE_ON&_BODEN_ON&_DEBUG_OFF
 

Re: start up problem

The only other thing I can think of is the rise time of the power supply. If it rises too slowly, the micro sometimes doesnt reset. Its in the electrical specifications somewhere. This would only happen if you had large caps on the 5 volt rail.

Also, try setting the oscillator as XT. The setting just changes the gain of the oscillator circuit. It might be a better match for your xtal?

You could enable the watchdog timer and see if that makes it start up.
 

Re: start up problem

i shall try that now, thanks. i use icprog and it says ccpmx is on, all my rb's are inputs so should i turn this off? if so how?
 

Re: start up problem

Floating inputs can cause problems, you can enable pull ups on Portb in the OPTION_REG.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top