electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

start up problem with a pulse generator program


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> start up problem with a pulse generator program
Author Message
regrin



Joined: 24 Apr 2009
Posts: 3


Post10 May 2009 13:30   

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.
Back to top
btbass



Joined: 20 Jul 2001
Posts: 1187
Helped: 113
Location: Oberon


Post10 May 2009 15:29   

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.
Back to top
regrin



Joined: 24 Apr 2009
Posts: 3


Post10 May 2009 16:28   

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
Back to top
Google
AdSense
Google Adsense




Post10 May 2009 16:28   

Ads




Back to top
btbass



Joined: 20 Jul 2001
Posts: 1187
Helped: 113
Location: Oberon


Post10 May 2009 17:04   

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.
Back to top
regrin



Joined: 24 Apr 2009
Posts: 3


Post10 May 2009 17:20   

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?
Back to top
btbass



Joined: 20 Jul 2001
Posts: 1187
Helped: 113
Location: Oberon


Post10 May 2009 17:33   

Re: start up problem


Floating inputs can cause problems, you can enable pull ups on Portb in the OPTION_REG.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> start up problem with a pulse generator program
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
Pulse Generator Problem - I do not get any output (5)
start up problem with HC08 LK24 (1)
How to deal with start surge current problem? (3)
Problem with system generator (5)
Problem with RC sinus generator... (3)
uC as pulse a generator (10)
pulse generator (1)
pulse generator (1)
pulse generator (3)
Pulse generator (2)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS