circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

Issue 133 August 2001
MSP430 News Flash:

Recognizing the Flexibility of Reprogramming


by Jeff Bachiochi

Start MSP430F1121Comparatively Speaking Battery MonitorDynamic Inputs RC To The RescueE(OR I)IN It's Only The BeginningSources & PDF

BATTERY MONITOR
Because the MSP430 devices are designed for battery operation, it only makes sense that you may want to pay attention to the battery voltage and indicate when the battery needs replacing. This is the simplest operation for the onboard comparator. Configure a connection between the internal voltage reference and the comparator’s (–) input. Connect the comparator’s (+) input to external pin P2.3. Externally add a simple resistive voltage divider from VCC to P2.3 to ground. Size the resistors such that a minimum VCC will apply a voltage less than the reference voltage of 0.550 V. The comparator’s output will change state as the system VCC drops to the point where the analog voltage on P2.3 is lower than the internal reference voltage (doesn’t change with VCC). In this example, there are no unknowns. Operation is predetermined by the choice of external components. We are only interested in the fact that the analog input dropped below a predetermined point. But what happens when you want to measure the exact voltage as opposed to a relative one?

2108002Fig3.gif (7310 bytes)
Figure 3—Analog input (P2.3) monitors the charging of RC when P2.0 is set to logic 1 (VCC) and the discharging of RC when P2.0 is set to logic 0 (Gnd).