Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Is the program working properly or not (18F4520)

Status
Not open for further replies.

camerart

Well-Known Member
Hi,

I'm asking a general question about PIC programs and odd results. I have a program on an 18F4520 PIC, which works one day then doesn't the next. I have attached a link to the program, but it may complicate things, here it is: https://www.electro-tech-online.com/threads/gps-controlled-nmea-data-following-tracker.146733/page-2

The PIC program gives different results at different times. Once it gives the correct results, then it will keep working ok. What I want to know is, can a PIC work correctly intermittently, or is it most likely to be something I'm doing?

Camerart.
 
Hard to tell from the board/PCB diagram, but do you have the recommended 0.01uF and 1000pF bypass caps close to the VDD and VSS pins on the chip? It may be possible it is breaking into some kind of oscillation at random times? Just a guess from a hardware point of view...
 
Hard to tell from the board/PCB diagram, but do you have the recommended 0.01uF and 1000pF bypass caps close to the VDD and VSS pins on the chip? It may be possible it is breaking into some kind of oscillation at random times? Just a guess from a hardware point of view...

H Sagor,
Yes, I have the required capacitors.
When this sort of thing happens, I keep checking in case it is my fault, and as expected I have found an error in the TXT file I use for testing:oops::oops:
Thanks for your reply,
C.
 
Yes, I had some doubts you would miss that, we all know to add those capacitors. Just thought I'd ask, since the PCB picture showed one or two caps close, but not two at a time - hard to see..
Anyway, glad you worked it out. Cannot see the forest for the trees in the way....
 
Yes, I had some doubts you would miss that, we all know to add those capacitors. Just thought I'd ask, since the PCB picture showed one or two caps close, but not two at a time - hard to see..
Anyway, glad you worked it out. Cannot see the forest for the trees in the way....

Hi S,
I spend much of my life in the trees and not seeing the forest;) (Actually, in the wild, I'm quite observant)

Anyway, there was a second thing wrong in my program, and if you're interested, you can see it here: https://mymathforum.com/trigonometry/333045-divide-zero-correction-9.html
I thought I wouldn't complicate things, then thought it may be interesting, for some people. so I've added it.
Cheers, C.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top