
Originally Posted by
Fredrick
Hi
Anyone having any tips of what I can do to reduce the power consumption more with that hardware?
And one more question, when i put the PIC into sleep it consume about 3mA and I believe that it could be lowered in some way, but I have not been able figured out that yet.
I will advise you to use the sleep mode exclusively without any modifications to the existing hardware. To use this board, you need to
Code:
1. configure your 8 keys as a 4x2 matrix using RB4..7 (IOC pins) and any other 2 lines.
2. Set 4 matrix lines RB4..7 high and program for interrupt on change
3. Set the other 2 matrix lines low
4. Now, clear the IOC interrupt and sleep (GIE, RBIE). You do not need to have an ISR for this to work
5. When a key is pressed, the IOC interrupt will put the MCU out of sleep and continue after the sleep command Clear INTCON
6. Turn both matrix lines which were low to high and scan which key is pressed
7. Do remote transmit function
8. Back to 3
To get the lowest current draw in sleep, you need to disable all functions that you will not use on the chip. I am too lazy to look it up now, but, if you don't need the feature, disable it to save current. Remove the power led LD1; that wastes power all the time. Before sleep, turn off LD2 and LD3 to minimize current wastage.
Your typical sleep state current should be in the order of 20-100uAmps. Anything more and you can be sure something is draining the current somewhere; double check.
I have used similar tricks and get close to the shelf life of the batteries in my product; so, go ahead and give it a try.
Bookmarks