How can I measure source voltage using ATTINY804. #1081
-
Hello, I'm currently encountering a challenge in developing a program to monitor the supplied voltage in my circuit. The circuit features an ATTINY804 microcontroller and is powered by three AA type cells, resulting in an initial total voltage of 4.5V (1.5V per cell). Over time, the power level of the circuit gradually decreases, and I'm seeking a method to measure the voltage of the VCC. My objective is to implement an alarm system that triggers when the voltage drops below 3V. Could you kindly assist me in providing a code snippet that enables the ATTINY804 MCU to read the supplied voltage accurately? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This will print the actual VCC in the serial monitor.
|
Beta Was this translation helpful? Give feedback.
This will print the actual VCC in the serial monitor.