Searching \ for '[PIC] 16f628 Help' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=16F
Search entire site for: '16f628 Help'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] 16f628 Help'
2005\04\12@143705 by Josh Koffman

face picon face
Ok, I'm stumped. I've been struggling with a little 16f628 based
project I built the other day. I can't make it work. It seems as
though the clock frequency is running at about 500Hz with a 16MHz
crystal installed. I didn't trust scoping the OSC lines, so I wrote a
little program to toggle a bit over and over...it seems to be running
at about 80Hz. It doesn't make sense at all. My bias caps are
grounded. Software worked great on the breadboard. I can't understand
why I'm running so slow. My config fuses are set to HS oscillator,
MCLR on pin, no code protection, watchdog, BOD, or LVP. I read back a
chip on another computer and the fuses were set correctly. I've tried
two chips, numerous crystals (both 16 and 20MHz) and two sets of bias
caps. I've checked my PCB numerous times over the last two days. Power
is nice and clean, bypass caps installed.

I've pretty much exhausted every avenue I can think of. I've never had
a PIC run, but at a tiny fraction of the speed it should be at. At
that clock speed the chip is just sitting forever in an opening delay
loop.

AAAHHHHH!
All help muchly appreciated.

Josh
--
A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete
fools.
       -Douglas Adams

2005\04\12@180802 by Josh Koffman

face picon face
Just a little update. I seem to have gotten it working, though I still
can't explain the previous behaviour I was seeing. I found an
intermittent short between two tracks. HOWEVER, these were two tracks
on a data bus that was unconnected earlier when I was trying to figure
out what was going wrong. So...I'm not really sure how they could have
effected my clock frequency so much. I'm still at a loss to understand
why my chip was still running, but running very slowly. It's working
now (I think...not all tests have been completed)...that crazy
curiousity bug still has me though.

Josh
--
A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete
fools.
       -Douglas Adams

2005\04\12@180811 by Jinx

face picon face
> though the clock frequency is running at about 500Hz with a
> 16MHz crystal installed. I didn't trust scoping the OSC lines,
> so I wrote a

I think you should scope the OSC lines, just to cover all the
bases. A x10 setting on the probe will work, or picking the
frequency up by radiation. You might also be able make out
small oscillator ripple on an active port pin eg

http://www.sxlist.com/images/sxlist/an_sc_04.gif

2005\04\12@195847 by Josh Koffman

face picon face
I worded that poorly. I meant that I measured about 500Hz on the OSC
lines, but I was worried I was pulling it too much with my probe, so I
wrote the bit toggle problem. I was using the x10 setting, and I
verified that it worked by scoping another functioning circuit.

Josh
--
A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete
fools.
       -Douglas Adams

On 4/12/05, Jinx <spam_OUTjoecolquittTakeThisOuTspamclear.net.nz> wrote:
{Quote hidden}

2005\04\12@201038 by Jinx
face picon face

> I worded that poorly. I meant that I measured about 500Hz on the
> OSC lines, but I was worried I was pulling it too much with my probe,
> so I wrote the bit toggle problem. I was using the x10 setting, and I
> verified that it worked by scoping another functioning circuit.

Ah. I'm very surprised that you'd measure a crystal being so far, inter-
planetarily far, away from its fundamental. It looks like the OSC circuitry
wasn't started or running properly

2005\04\12@205233 by Josh Koffman

face picon face
On 4/12/05, Jinx <.....joecolquittKILLspamspam@spam@clear.net.nz> wrote:
> > I worded that poorly. I meant that I measured about 500Hz on the
> > OSC lines, but I was worried I was pulling it too much with my probe,
> > so I wrote the bit toggle problem. I was using the x10 setting, and I
> > verified that it worked by scoping another functioning circuit.
>
> Ah. I'm very surprised that you'd measure a crystal being so far, inter-
> planetarily far, away from its fundamental. It looks like the OSC circuitry
> wasn't started or running properly

Yes, well, I was pretty surprised too. I actually suspected the scope
at first. I didn't have my good scope handy. I have no idea how this
happened...as I said before, an intermittent short on two data bus
connections seems to have done this.

Weird eh?

Josh
--
A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete
fools.
       -Douglas Adams

2005\04\12@213857 by Nick A

picon face
This is interresting, I have seen this before on a
radio design I did using a 6502 processor. I was new (
still am) and still learning to "code". The 6502 was
used to set PLL registers in a radio design. Long
story short, I/O shorted and somehow caused the part
to starve out and when it came up it latched the I/O
to source and sink. The only difference though is that
processor was toasted. I did observe 60hz and 400Hz
signal across the Osc which was probably my digital
scope wigging out on noise.  

Best Regards,
Nick





               
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

2005\04\13@071337 by Aza D. Oberman

flavicon
face
<Josh Koffman notes>
> Just a little update. I seem to have gotten it working, though I still
> can't explain the previous behaviour I was seeing. I found an
> intermittent short between two tracks. HOWEVER, these were two tracks
> on a data bus that was unconnected earlier when I was trying to figure
> out what was going wrong. So...I'm not really sure how they could have
> effected my clock frequency so much. I'm still at a loss to understand
> why my chip was still running, but running very slowly. It's working
> now (I think...not all tests have been completed)...that crazy
> curiousity bug still has me though.

Any chance Josh, that the watchdog timer was going off and cycling the whole
chip? Id I recall correctly you were looking at an ouput port for a
heartbeat, what you may have been seing was each restart triggered by the
watchdog.

Aza D. Oberman

2005\04\13@075722 by Josh Koffman

face picon face
I had that thought too...so I checked a few times. No WDT.

Good thought though!

Josh
--
A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete
fools.
       -Douglas Adams

On 4/13/05, Aza D. Oberman <WinspamKILLspamslycurves.com> wrote:
> Any chance Josh, that the watchdog timer was going off and cycling the whole
> chip? Id I recall correctly you were looking at an ouput port for a
> heartbeat, what you may have been seing was each restart triggered by the
> watchdog.

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