CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

dsPIC30F3014 using PLL
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Jan 11, 2023 8:16 am     Reply with quote

curious...
would enabling the 'PUT', Power Up Timer help ??
MCUprogrammer



Joined: 08 Sep 2020
Posts: 221

View user's profile Send private message

PostPosted: Wed Jan 11, 2023 8:49 am     Reply with quote

Code:

#fuses PUT4

I tried the code above. It didn't work.[url]
http://ww1.microchip.com/downloads/en/DeviceDoc/70138b.pdf[/url]

on page 141 at this link
FIGURE 20-6: EXTERNAL POWER-ON RESET CIRCUIT
(FOR SLOW VDD POWER-UP)
I think you are talking about setting up the circuit in this way.
I couldn't see the component values.
R1:330ohm
R:10K
A:10nf
Diode: Is it ok if I use BAT43?
_________________
Best Regards...
MCUprogrammer
_______________________________
Work Hard
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

PostPosted: Wed Jan 11, 2023 9:05 am     Reply with quote

Your RC combination gives a time constant of 100us. Given Ttelmah's anecdote:

Quote:
I think it requires a
rise time to 5v that is less than 0.1sec. If you go over this the internal
reset circuit won't work properly.


...That implies that your power supply is taking more than 100ms to rise. You, therefore, must select component values that ensure that 5 * tau (time constant) must be > 100ms which will allow your Vdd to stabilize before the external RC allows /MCLR to rise which in turn allows the processor to start running.

One word of caution: most programmers tend to "dislike" such circuits on /MCLR (in my experience anyway).
Ttelmah



Joined: 11 Mar 2010
Posts: 19540

View user's profile Send private message

PostPosted: Wed Jan 11, 2023 9:06 am     Reply with quote

No, as you have already found PUT won't help. That allows time for the
oscillator to stabilise _after_ the chip starts. The problem is the internal
reset circuit is dependant for it's operation on the rise time of the supply.

If that's the old standard PIC reset circuit, then you have to choose the
resistance and capacitance to suit your PIC and supply. However I'd use
something smarter like an MCP909, MAX810 etc.. These all give a
guaranteed pulse duration after the supply reaches the required voltage.

Why not just improve the supply rise time?. This is almost certainly a
sign that you have more capacitance on the output of the regulator than
is optimal. Having this can easily damage the regulator when the supply
goes off, so better to fix it.
MCUprogrammer



Joined: 08 Sep 2020
Posts: 221

View user's profile Send private message

PostPosted: Wed Jan 11, 2023 9:27 am     Reply with quote

"Why not just improve the supply rise time?" What exactly do you want to say here? What does it mean to improve the supply increase time?

And another piece of information is that when I did PUT64, there was an improvement. Better now than before. But Ttelmah I agree. I need to improve the external reset circuit. But I should be able to do this with the MCLR circuit, not the MCP909 with this kind of integrated. Can you help with this?
Newguy, what formula did you use to calculate this time?
_________________
Best Regards...
MCUprogrammer
_______________________________
Work Hard
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

PostPosted: Wed Jan 11, 2023 10:16 am     Reply with quote

tau = RC

10nF and 10k gives 100us. Elementary electrical circuit theory.
MCUprogrammer



Joined: 08 Sep 2020
Posts: 221

View user's profile Send private message

PostPosted: Wed Jan 11, 2023 1:34 pm     Reply with quote

then if I install 10uf and 10K instead of 10nf;
tau = 10Kx 10us = 100ms. I can do it this way. Why does he suggest using diodes? Do I need to use diodes?
Would it be BAT43?
_________________
Best Regards...
MCUprogrammer
_______________________________
Work Hard
Ttelmah



Joined: 11 Mar 2010
Posts: 19540

View user's profile Send private message

PostPosted: Wed Jan 11, 2023 11:09 pm     Reply with quote

Two things apply.

First, the capacitor needs to be quickly discharged when the supply goes
off. Second, the MCLR line is taken high during programming.
Hence diode needed.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group