The RX111 can operate with a VCC of 1.8-3.6V, though high-speed operation may require a low end of 2.7V in order to operate at 32 MHz or 2.4V to run at 16 MHz. The RX111 provides a programmable Low-Voltage Detection circuit that raises an interrupt when the operating voltage drops below a certain level. The new Renesas Starter Kit for RX111 includes an example project that provides an opportunity to learn how that works.
The RX111’s Low-Voltage Detection circuit (LVDAa) monitors the voltage at the VCC pin using a program. One voltage detection circuit can select from 10 different voltage levels (Vdet1) using the voltage detection level register (LVDLVLR); a second detection circuit can select from between four different levels (Vdet2). When Vdet drops below VCC an interrupt is raised, at which point your code kicks in to initiate the appropriate response.
The Voltage Detect program is one of the two dozen or so example programs on the RX111 Starter Kit CD. The program demonstrates use of the voltage detection peripheral by indicating when the power supply voltage falls below a certain threshold (~3.0V). Examining the source code helps to understand how the circuit works—not to mention the fact that you can save a lot of work by incorporating the code into your next project.
The program runs the function getVoltageStatus() to check SYSTEM.LVD1SR.BIT.LVD1MON. If VCC > Vdet then that information is written to the display and the loop continues.
If on the other hand VCC < Vdet then LEDs0-2 are turned off, LED3 is left on, and an interrupt is generated.
Before you run the program you first need to power the board using an external power supply instead of the E1 debugger (though connect that, too, so you can download the code). I soldered pins to expansion header JA1 in order to supply 3.3V to pin 3 (VCC) and a ground to pin 4. Only then do you:
Four LEDs (LED0-3) were flashing in the best Blinky tradition. The LCD screen indicated “Voltage Detect” at the top of the screen and “VCC > Vdet” in the middle. The Description.txt file said that when you drop VCC to about 3.0V that LED0-2 would go out, LED3 would stay on continuously, and the screen would say “VCC < Vdet”—with the warning that “it may not be possible to see this as the low voltage will decrease the brightness of the display.”
Well, that certainly proved to be the case. The screen started dimming at 3.0V and was unreadable by 2.9V; but LED3 did stay lit up all the way down to 2.8V. In fact the RX111 stayed responsive all the way down to 1.5V—better than the specification.
For more information on the RX111’s Low-Voltage Detection circuit check out the RX111 Hardware Users Manual. But to really understand it get the RX111 Starter Kit and work with it yourself.