Agree with using sleep and IOC. Years ago I had a similar problem. I contacted Charles at Melabs
he gave me a solution where you set osccon to 500Khz which reduces the current to a couple hundred microamps (vdd3.3v). Then trick PBP by multipling your baud rates and dividing your pause statements. DEFINE OSC 4mhz, set osccon to 500khz. The pic will be running 8 times slower. So if you wanted a PAUSE 1 you would make it PAUSEUS 125. Serial out at 2400 baud would be written at 19200. For shorter pause statements you could use nops as suggested above. This combined with sleep you can acheive very low current consumption on average and still use PBP. Also this chip has clock switching between 31khz and high frequency, which you might want to study.




Bookmarks