At 08:02 PM 27/05/98 -0300, you wrote: >Lads - > >After some due consideration and scouring of the microchip databook I have >decided that I am going to re-design a PIC into my battery powered product >and the current processor is getting heaved. The wake-up on port b <7:4> >and the super low current in sleep mode made up my mind - I'm looking at >the 16C620 series as a likely candidate but the 16F84 could be used for >much of the development without having to play the "wait to erase" game... > >The above having been proclaimed, I have a couple of questions that may >sound trivial for those that have been designing with this processor >already but I figure I'll pass them by in the interest of coming up the >curve quicker - > >1) Is it just my mis-reading, but does the brown out enabled, turn the pic >into a current HOG in sleep mode? i.e. from 1uA to 300+uA? > >2) I will be powering the system from 2 lithium cells and would like to >detect a low battery without having to use a big$, low dropout, low >Quiescent I regulator. I'm thinking of doing the following and wonder if >it sounds reasonable; >- Dedicate a port pin to the driving of a zener diode >- Feed this reference into one of the analog comparators on the '620 chip. >- Feed the raw Vdd battery voltage into the "on-chip" programmable >reference and tie it to the other comparator input line - programming this >reference for 2.4-2.5 volts. > >3) If I protect the electronics from a reverse battery with a diode right >across the battery terminal, I will protect the electronics at the >sacrifice of the batteries - this is ok - but - can a lithium coin cell >source enough current to be of harm - i.e. heat, meltdown etc.? > > > >Thanks a million for any assistance people can provide. The micros look to >be just the ticket for many projects! > >Lewis >cobb@zeus.ee.unb.ca > > 1/ If brown out is enabled, then my guess will be yes, as the current is used by an internal comp of some type. Note that it is normally only required during the "RUN mode" as batteries can be considered as brown out free. See also the battery capacity and recovery curves. ie. Only have the "brown out" if you need it active when the processor is running (I don't know if this is possible on the PIC) Brown out may only be a problem if you are storing valuable data, as the rest of the code should be written in such a way that it is tolerant to this condition. This includes resetting the I/O ports and registers and doing some type of CRC check on the RAM area. Note that you should also remove any code that enters an infinite loop on the state of a pin, or state of a register. I know that this may be high lighting what you may already know. 2/ Use the RTCC pin as the input, this a schmitt input, check the current flow however, as the analogue operating area may cause effect. Use a port pin to provide the ground ref, thus the RTCC pin will be nominally be at battery voltage (This will remove the above) 3/ This is not a problem if the diode is big enough, coin cells, like all lithium batteries cannot deliver large dump currents, but capacity is high. 4/ The type of OSC used is important, as time and valuable battery power can be waisted during this period, look at using the RC option (Unless timing is critical). Also check the start-up time from wake up, and see if you are happy with it. 5/ If speed is not an issue, then perhaps look at the LP version. The 32KHz stuff runs on the smell of an oily rag, and you can leave it running! I hope that this helps a bit. Dennis