We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, I have a delay function that for some reason every time I included in my project it causes the micro controller to use extra power. With out the function I read 20 micro amps in total power down mode, but with the function I read 4.4 miliamps in the same mode. I use this delay function to energize a relay for about 50 miliseconds. Is there any other method I could use to replace this function with? Or even better, why is this function "I assume" causing the micro to concume so much power. Thanks. void delay (int x) small reentrant { //0 to 4,294,967,295 int i; for (i = 0; i < x; i++) { ; } }
How could the relay consume so much power 4mA @ 5V is 20mW. That is VERY little power for a relay. Erik Ps how is the port pin driving the relay configured (should be OC) Erik
Erik it is not 5 volts, it's 3 v. (LPC932). I am powering the circuit with 2 AA, which will not last very long if the whole circuit is getting 4.25 ma 24/7. The pin driving the relay is configured as push-pull. What does OC mean? Thanks
OC: Open Collector?
Andy what configuration is the one for Open Collector. Thanks
what configuration is the one for Open Collector OK it is called Open Drain and very well described in the user manual Erik
Thank you!
Got it. Thank you!