Searching \ for '[PIC]: Internal RC osc problems...' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/microchip/time.htm?key=osc
Search entire site for: 'Internal RC osc problems...'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Internal RC osc problems...'
2001\06\27@105944 by Roman Black

flavicon
face
Hi, has anyone had trouble using the internal
RC oscillator on the lower PICs, like the 12c508
or 16c505 ??

Mine is not starting 80% of the time, using the
internal RC osc and internal MCLR. Touching the
PIC pins when powering up helps a lot, but starting
is still unreliable. As MCLR is selected to internal
I have no brownout circuit, Vdd rises to full +5v in
less than 150mS.
-Roman

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\27@112524 by Bob Ammerman

picon face
150ms sounds pretty slow for a Vdd rise time to me.

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

{Original Message removed}

2001\06\27@113125 by Roman Black

flavicon
face
Do you think that is problem? I assumed that
Microchip knew their stuff and when you set a
PIC to internal RC osc and internal MCLR control
this would be ok. After all, it's not hard to
start up an RC osc is it?
-Roman


Bob Ammerman wrote:
>
> 150ms sounds pretty slow for a Vdd rise time to me.
>
> Bob Ammerman
> RAm Systems
> (contract development of high performance, high function, low-level
> software)
>
> {Original Message removed}

2001\06\27@115410 by Marcelo Yamamoto

flavicon
face
I had the same problem. 150ms is really very slow. Use a 78L05 to supply the
PIC and it should work.

Marcelo Y.

{Quote hidden}

> > {Original Message removed}

2001\06\27@120016 by Roman Black
flavicon
face
Marcelo Yamamoto wrote:
>
> I had the same problem. 150ms is really very slow. Use a 78L05 to supply the
> PIC and it should work.


Thanks Marcelo! Are you sure that is what it was?
Unfortunately my circuit is going to have a slightly
slow Vdd rise, the hardware design is finalised.

I really didn't think the RC osc would be fussy with
Vdd rise... If you can offer any more info about your
experiences with this that would be great! :o)
-Roman



{Quote hidden}

> > > {Original Message removed}

2001\06\27@120323 by Bob Ammerman

picon face
Might be more an MCLR than an RCOSC issue.

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

{Original Message removed}

2001\06\27@121931 by Spehro Pefhany

picon face
At 12:02 PM 6/27/01 -0400, you wrote:
>Might be more an MCLR than an RCOSC issue.

Can the WDT generally bring the chip out of this state ?

Best regards,
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany --"it's the network..."            "The Journey is the reward"
spam_OUTspeffTakeThisOuTspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\27@121939 by Gordon Varney (personal)

flavicon
face
>
> Might be more an MCLR than an RCOSC issue.
>
> Bob Ammerman
> RAm Systems
> (contract development of high performance, high function, low-level
> software)

Very true, a slow Vdd will cause the master clear to behave in a strange
manor. This will cause the Int RC to startup funny as well, or not startup.
To much capacitance on Vdd or a slow ramp up will most definitely act the
way you are explaining. I just had this problem on a board I was working on.


Good  luck

Gordon Varney


>
> {Original Message removed}

2001\06\27@122354 by Marcelo Yamamoto

flavicon
face
Roman,
I designed a circuit using a PIC12C508A and a capacitive power supply. The
rise time was very slow and sometimes the PIC did not start.
I used all its 6 pins so have not some way to test an external Reset, but I
think the problem is the MCLR that does not resets the device properly.
Using a small voltage regulador (78L05, TO-92 package), the power supply
rise time gone faster and no fails until now (>10,000 devices running).

Marcelo Y.

Roman wrote:
> Marcelo Yamamoto wrote:
> >
> > I had the same problem. 150ms is really very slow. Use a 78L05 to supply
the
{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\27@135054 by Bob Ammerman

picon face
----- Original Message -----
From: "Spehro Pefhany" <.....speffKILLspamspam@spam@INTERLOG.COM>
To: <PICLISTspamKILLspamMITVMA.MIT.EDU>
Sent: Wednesday, June 27, 2001 12:21 PM
Subject: Re: [PIC]: Internal RC osc problems...


> At 12:02 PM 6/27/01 -0400, you wrote:
> >Might be more an MCLR than an RCOSC issue.
>
> Can the WDT generally bring the chip out of this state ?

Unfortunately: generally not!

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\27@142837 by Spehro Pefhany

picon face
At 01:49 PM 6/27/01 -0400, you wrote:

>> Can the WDT generally bring the chip out of this state ?
>
>Unfortunately: generally not!

O.K.. so the (only) reliable solution is to tack something
like an MCP809 on /MCLR

Best regards,



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany --"it's the network..."            "The Journey is the reward"
.....speffKILLspamspam.....interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\27@144346 by Andrew Warren

flavicon
face
Roman Black <EraseMEPICLISTspam_OUTspamTakeThisOuTmitvma.mit.edu> wrote:

> has anyone had trouble using the internal RC oscillator on the
> lower PICs, like the 12c508 or 16c505 ??
> ....
> Vdd rises to full +5v in less than 150mS.

then

> I assumed that Microchip knew their stuff and when you set a PIC
> to internal RC osc and internal MCLR control this would be ok.
> After all, it's not hard to start up an RC osc is it?

Roman:

The failure of the RC oscillator is just a symptom of your REAL
problem, which is either that your Vdd rise time is too long or that
Vdd isn't starting its rise from < 0.7V.

You only characterized your rise time as "less than" 150 ms. I don't
have a datasheet here, but I recall that Microchip's specified
Minimum Vdd Rise Rate is 0.05V/ms.

Are you sure that your PIC's power supply is dropping to below 0.7V
before you switch it on?

-Andy


=== Andrew Warren --- aiwspamspam_OUTcypress.com
=== IPD Systems Engineering, CYSD
=== Cypress Semiconductor Corporation
===
=== Opinions expressed above do not
=== necessarily represent those of
=== Cypress Semiconductor Corporation

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\27@151402 by Bob Ammerman

picon face
No:

As long as you can guarantee that Vdd behaves according to spec:

rise time,
monotonicity at power up,
dropping all the way to zero when 'off',
brown-out,
etc.

you will be just fine.

Unfortunately, making the guarantees is not necessarily trivial.

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

{Original Message removed}

2001\06\28@023711 by ELBA-STARA PAZOVA

flavicon
face
I designed a circuit using a PIC12C509A and a capacitive power supply,
RC-network with two zener diode 12V
0.4W, and cap 100nf and 7805 and 100nf (for filter), always correct work
100%.
I think that your problem is noise in power supply or not write in program:

;**********************************************************************
;    Filename:     reasmf3.asm                                        *
;    Date:         18.01.2001.                                        *
;    File Version: 07.05.2001                                         *
;                                                                     *
;    Author:       POZNIC GORAN                                       *
;    Company:      ELBA                                               *
;**********************************************************************
;    PREMA SHEMI                                                      *
;               reasm3.pcb                                            *
;               reasm3.sch                                            *
;**********************************************************************

list      p=12c509a           ; list directive to define processor
#include <p12c509a.inc>       ; processor specific variable definitions

__CONFIG   _CP_OFF & _WDT_ON & _MCLRE_OFF & _IntRC_OSC    <<<<<<<<<< THIS

If your problem insolvent, translate me your asm file @spam@pgoranKILLspamspamelba-sp.co.yu

Goran.


{Original Message removed}

2001\06\28@063149 by Roman Black

flavicon
face
Thank you Andy and everyone else who helped! :o)
I did my homework last night and tracked it down.
My actual Vdd rise time is less than 70mS to
reach 95% of Vdd. The datasheet spec is 0.05v/mS
(100mS at 5v supply) so this is fine. I also hold
all pins as outputs and set to low, which reduces
the chance of startup latchup.

After checking all my hardware I realised there
was a software bug, caused by Microchip's shoddy
documentation (Grrrrr!)

With the 16c505 the FSR register bit7 CANNOT be
cleared. Unlike other PICs. This is not mentioned
in the datasheet anywhere, I found it with the
simulator. Very nasty, the first thing I do on
startup is clear all ram registers, using the
typical FSR loop, and while I know FSR is only a
7 bit register (bit7 is unused), but whenever you
read it to see where it is up to bit7 reads
as 1.

Very nasty, I don't mind software bugs when they
are my fault, but that annoys me a lot...
I have put big red notes on all the
applicable pages in my 16c505 datasheet. :o(
-Roman






Andrew Warren wrote:

{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\06\28@064628 by Spehro Pefhany

picon face
At 08:26 PM 6/28/01 +1000, you wrote:

>Very nasty, I don't mind software bugs when they
>are my fault, but that annoys me a lot...
>I have put big red notes on all the
>applicable pages in my 16c505 datasheet. :o(

Well, OK, but how come it _worked_ 20% of the
time??

Best regards,

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany --"it's the network..."            "The Journey is the reward"
KILLspamspeffKILLspamspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\06\28@071612 by Roman Black

flavicon
face
Spehro Pefhany wrote:
>
> At 08:26 PM 6/28/01 +1000, you wrote:
>
> >Very nasty, I don't mind software bugs when they
> >are my fault, but that annoys me a lot...
> >I have put big red notes on all the
> >applicable pages in my 16c505 datasheet. :o(
>
> Well, OK, but how come it _worked_ 20% of the
> time??


Ha ha! Well the fault caused the ramclear program
loop to clear an unknown number of registers,
as the registers contain undefined data at
startup the point where it exited the loop
would be undefined. Sometimes it would be
exiting in a valid place and sometimes would
trash status, option etc before exiting the
loop.

Re the hardware issue, I have heeded everyones
warnings re the slow Vdd rise and did some
testing with even larger caps and slower rise
times. It's reliable up to 4 times the period
I have now, Vdd rise is reliable up to about 300mS.
That is a big enough safety margin. :o)
-Roman

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\06\28@083304 by myke predko

flavicon
face
Hi Roman,

> After checking all my hardware I realised there
> was a software bug, caused by Microchip's shoddy
> documentation (Grrrrr!)
>
> With the 16c505 the FSR register bit7 CANNOT be
> cleared. Unlike other PICs. This is not mentioned
> in the datasheet anywhere, I found it with the
> simulator. Very nasty, the first thing I do on
> startup is clear all ram registers, using the
> typical FSR loop, and while I know FSR is only a
> 7 bit register (bit7 is unused), but whenever you
> read it to see where it is up to bit7 reads
> as 1.

What you've discovered is a part of the low-end PICmicro MCU architecture
that *everybody* seems to learn the hard way.  In my datasheet, Bit 7 is
marked as always being "1" on power up and different processor resets - it
doesn't indicate that it can never be reset.

ALL low-end PICmicro MCUs will always have the MSB or more MSBs set in the
FSR at all times, depending on how many register banks are built into the
device.  This means that the PIC12C50x, PIC16C505, PIC16C5x will all have
one or more FSR bits always set.

But, the PIC12C67x, PIC16C55x are mid-range architected parts and the FSR
can have all its bits reset to zero.

> Very nasty, I don't mind software bugs when they
> are my fault, but that annoys me a lot...
> I have put big red notes on all the
> applicable pages in my 16c505 datasheet. :o(

Also make sure you mark the PIC12C50x datasheets as well.

myke

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\06\28@101735 by Roman Black

flavicon
face
myke predko wrote:

> What you've discovered is a part of the low-end PICmicro MCU architecture
> that *everybody* seems to learn the hard way.  In my datasheet, Bit 7 is
> marked as always being "1" on power up and different processor resets - it
> doesn't indicate that it can never be reset.


I didn't care what value it was at reset, because
I explicitly cleared it in software.
The fact that you CAN'T EVER clear it just happens
to be omitted from the datasheet. If anything
deserves a datasheet warning than that does.
So what happened to the Microchip convention that
unused bits read as zeros???


{Quote hidden}

Thanks Myke for the info!! My code was refined and
tested on a number of PICs before loading it into the
16c505. I have marked my datasheets as you suggested.

Adding insult to injury the 16c505 datasheet tells
me "the FSR is a 5 bit register" when in fact it is
a 7 bit register. As someone that spends a lot of time
reading the datasheet when coding new projects I am
rather annoyed that my code was perfect and tested on
a few other PICs and their shoddy documentation cost
me about 10 hours chasing a hardware fault that didn't
exist. Which Microchip address do I send the bill to??
-Roman

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\06\28@150331 by Andrew Warren

flavicon
face
Roman Black <RemoveMEPICLISTTakeThisOuTspammitvma.mit.edu> wrote:

> So what happened to the Microchip convention that unused bits read
> as zeros???

Roman:

The 16C505's FSR-register behavior (along with the datasheet's
description of it as "a 5-bit register") is left over from the 16C54.

On that part, it made sense to hardwire the upper bits to 1, since it
allowed loops like this one, which clears all 16C54 RAM, to be short
and fast:

     MOVLW   PORTA
     MOVWF   FSR

   LOOP:

     CLRF    INDF
     INCFSZ  FSR
     GOTO    LOOP

If the upper bits were hardwired to 0, INCFSZ would cease to work on
the FSR register, so the above loop would have to become:

   LOOP:

     CLRF    INDF
     INCF    FSR
     TSTF    FSR
     SKPZ
     GOTO    LOOP

It's not a BIG deal... But I guess the guys who'd been contracted to
design the PIC figured that, since it didn't cost anything to
hardwire those bits to 1, it was better not to break the INCFSZ
instruction.  Also, if the larger-RAM PICs that the C54's designers
had anticipated had been designed with contiguously-addressed RAM,
hardwiring the upper bits to 1 would have made code portable from the
54 to other PICs.

-Andy


=== Andrew Warren --- spamBeGoneaiwspamBeGonespamcypress.com
=== IPD Systems Engineering, CYSD
=== Cypress Semiconductor Corporation
===
=== Opinions expressed above do not
=== necessarily represent those of
=== Cypress Semiconductor Corporation

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\06\28@150557 by Peter L. Peres

picon face
Hi Roman, I use a lot of 12C508A and I never have troubles. Turn the
watchdog on though (I do).

Peter

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\06\28@195205 by J Nagy

flavicon
face
>Hi, has anyone had trouble using the internal
>RC oscillator on the lower PICs, like the 12c508
>or 16c505 ??
>
<snip>

       The spec on the 12C508 says "VDD Rise Rate to Ensure Power-on
Reset" = 0.05 V/ms at the minimum (or 5V in 100 ms). They wouldn't spec it
if they didn't think you could get in trouble with it.


       Jim Nagy
       Elm Electronics
 ICs for Experimenters
http://www.elmelectronics.com/

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\06\28@224634 by Andrew E. Kalman

flavicon
face
>  >Hi, has anyone had trouble using the internal
>>RC oscillator on the lower PICs, like the 12c508
>  >or 16c505 ??

I had no difficulty running a 12C509A with internal oscillator and
reset (I needed all 6 GP pins for I/O), both from battery and from
wall-wart DC power, and even switching in-between. This was the first
PIC12 project I did.

You can see the entire schematic and code in App Note AN-6 on our website.

Regards,
--

 ______________________________________
Andrew E. Kalman, Ph.D.


Salvo(TM), The RTOS that runs in tiny places(TM)
Pumpkin, Inc.
750 Naples Street
San Francisco, CA 94112
tel: (415) 584-6360
fax: (415) 585-7948
web: http://www.pumpkininc.com
email: TakeThisOuTaekEraseMEspamspam_OUTpumpkininc.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\06\29@020522 by dr. Imre Bartfai

flavicon
face
Data sheet states: "The FSR is a 5-bit wide register." (p. 18). However,
FSR<6:5> are bank select bits. On p. 13 is shown, that FSR<7> contains 1
after any kind of reset. Such way, the puzzle can be solved. I allow, it
is not very simple (I met also the same pitfall).

Imre

On Thu, 28 Jun 2001, Roman Black wrote:

{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body


2001\06\29@090402 by myke predko

flavicon
face
Hi Roman,

> I didn't care what value it was at reset, because
> I explicitly cleared it in software.
> The fact that you CAN'T EVER clear it just happens
> to be omitted from the datasheet. If anything
> deserves a datasheet warning than that does.
> So what happened to the Microchip convention that
> unused bits read as zeros???

I *think* the low-end convention is that unused bits are set to 1.

> Adding insult to injury the 16c505 datasheet tells
> me "the FSR is a 5 bit register" when in fact it is
> a 7 bit register. As someone that spends a lot of time
> reading the datasheet when coding new projects I am
> rather annoyed that my code was perfect and tested on
> a few other PICs and their shoddy documentation cost
> me about 10 hours chasing a hardware fault that didn't
> exist. Which Microchip address do I send the bill to??

I would suggest your local FAE.

The documentation is very unclear on this point and as I indicated, you
really only learn about the problem by having to suffer through it.

Microchip does update their documentation reasonably frequently and maybe
you could help specify a change.  The PIC12C5xx and PIC16C505 are popular
products and better documentation would help to make them more popular.

Good luck,

myke

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservEraseMEspam.....mitvma.mit.edu with SET PICList DIGEST in the body


2001\06\29@104431 by Roman Black

flavicon
face
dr. Imre Bartfai wrote:
>
> Data sheet states: "The FSR is a 5-bit wide register." (p. 18). However,
> FSR<6:5> are bank select bits. On p. 13 is shown, that FSR<7> contains 1
> after any kind of reset. Such way, the puzzle can be solved. I allow, it
> is not very simple (I met also the same pitfall).

Hi Imre, yep it's nice to know what the register
contains after a reset, most registers have a
particular value after reset.
What annoyed me was loading zero into the register
and then it didn't contain zero. Bits that CAN'T
be cleared really should be mentioned in the
datasheet.

The actual code was written to work on a number of
different PICs and I shouldn't have to hardware
debug each one to see if its datasheet is correct
or not. :o)
-Roman

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspammitvma.mit.edu with SET PICList DIGEST in the body


2001\06\29@114305 by Roman Black

flavicon
face
J Nagy wrote:
>
> >Hi, has anyone had trouble using the internal
> >RC oscillator on the lower PICs, like the 12c508
> >or 16c505 ??
> >
> <snip>
>
>         The spec on the 12C508 says "VDD Rise Rate to Ensure Power-on
> Reset" = 0.05 V/ms at the minimum (or 5V in 100 ms). They wouldn't spec it
> if they didn't think you could get in trouble with it.


Hi Jim, yes I researched the spec when I designed
the PSU section of the product. As long as you reach
the min operating Vdd before the PWRT or DRT times
out and allows the first instructions to take place.

In my case I keep all pins as outputs and tied low
for a good half second after startup, giving the
PIC even longer before it has to source current.

With the product under test I was able to get 300mS
reliably before any problems occured, which is 3x the
"official" spec for 5v Vdd.
My final circuit was <70mS to reach 95% of 5v Vdd,
and pretty bulletproof. :o)
-Roman

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservEraseMEspamEraseMEmitvma.mit.edu with SET PICList DIGEST in the body


2001\06\29@115725 by Roman Black

flavicon
face
Thanks for taking the time to post the explanation
Andrew!:o)
It's always good to hear from the oldtimers who
learned their magic in the dawn of the PIC age! ;o)

I understand your example but still find it amusing
as in my ram_clear loops I tend to DEC the counters
and test for the end, so a DECFSZ probably makes more
sense to me, although I prefer a concrete test like
>=X as you don't always need to clear all the ram.

Either way it's extremely annoying to "read" a register
and receive crap, then have to mask the unused bits
out before you know what the register value is.
Hopefully Microchip will stick to the convention that
unused bits==0 now and when you read a register you
get its darn value! :o)
-Roman


Andrew Warren wrote:
{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspamspamspamBeGonemitvma.mit.edu with SET PICList DIGEST in the body


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...