Thanks much for the info, I am learning (more by making mistakes than otherwise). I am embarrased to say this, but even tho I wrote it in my program "use 10k pullup on MCLR", I neglected to do it. Now that it is installed, things work like I expect.
Thanks much for the info, I am learning (more by making mistakes than otherwise). I am embarrased to say this, but even tho I wrote it in my program "use 10k pullup on MCLR", I neglected to do it. Now that it is installed, things work like I expect.
I tried the pause loop and the stop command but both leave the oscillator running and the current draw is 800 microamps. I tried sleep $FFF with the watchdog timer turned off;this stops the oscillator and, after a few minutes, it settles down to 40 microamps current draw which is quite acceptable.
>I tried the pause loop and the stop command but both leave the oscillator running and the current draw is...
Yes, but getting the current down is moot because if you look at your logical flow when you get your hardware sorted out the PIC will switch itself off before you get to the STOP point... it's only until then you need a way of stopping you code, thereafter, if everything is working as it should, you'll never get to that point (well in reality you will but the PSU would be in the throws of shutting down anyway).
How do you disable the watchdog timer in picbasic? I am trying to step through a program with the ICD2 and I keep getting the error that you can't debug with the watchdog timer enabled.
You've not specified what PIC you're using... so, go look in the Datasheet for your PIC... it's usually a setting of the Config Word and that information can be found in the "Special Features of the CPU" section of the Datasheet. When you program your PIC, it should appear as one of the options you can manually switch ON or OFF.
Sorry about that....I am using the PIC18F452 that came with the PICDEM2 board.
I started poking around in some of the files and came across "_WDT_OFF_2H" in a "__config" statement. That solved my problem.
Thanks for the help!
Bookmarks