Is it possible that decoupling capacitors are not installed?
Is it possible that decoupling capacitors are not installed?
@Jerson - Decoupling caps are connected directly across the power pins at the PIC and across the DS1307.
@Henrik, I'll have to search through some old backups as I all the development versions I have are multi-channel.... I still have the original e-mails from DT relating to the project so there is a slim possibility the attachments are still available... I wasn't suggesting the PID routine was buggy, just that whilst I changed the CON setting from 4 to 1 in the main code - strange things were still occurring, and as I wanted 4 routines running at the same time I never thought to test that option..
I'm still getting resets and strange things happening to the clock (even though the clock routine is the same from code that works fine in the current vivarium controller) - like it changes to 08:00 hrs when it reaches 16:00 hrs and 10:00 when turning 17:00 - but so far it's still running the PID routine and has done for three hours now... but I still wouldn't use it to control the heaters !
Hi,
Provided the hardware is sound I suspect you're writing outside of an array or something like that, corrupting whatever is there. You know that PBP doesn't verify the bounds of an array so it's perfectly valid to say myArray[6] =123 even though myArray is only 3 bytes long. It will then, obviously, overwrite something else - whatever is at that memory location.
It is of course possible that the multi channel PID routine, which IS using arrays, is doing just that (in error of course) but then I would suspect it misbehaving in when doing multiple channels as well.
Anyway, the single channel version is available on the in post #57 in this thread. I strongly suggest you read that thread as well since it covers a lot of details on how it's implemented, how it handles negative numbers, what to do when you don't want "negtative drive" (which is the case in your case) and so on.
Or, you're just getting bad reads from the clock chip.....there are a lot of DIP switches to configure those developmement boards. Are you sure you don't have something "cross connected" or whatever?
/Henrik.
I've spent so many days now trying to resolve this that I went back to basics and wrote a basic bit of code that didn't rely on interupts or have any of the include files.. It powered up 1st time and seems very stable - I'll let it run for a day or so to confirm... but it did seem that it was a software issue that was causing my issues.
If I get time, I might look at the PID that's in post #57, but my deadline for this project is running out and I don't think I have enough of a window in which to complete a new PID based version.
Bookmarks