The FAN5646 is a little blinking or “breathing” LED controller indicator. The internal programmable blink algorithm eliminates any need for continual system processor control from Great Cow BASIC. This means longer battery life for a hand-held system because the system processor is not awakened from sleep mode to blink an LED.
Very low dropout of 80 mV allows driving an LED without any inductors or switch capacitors. LED blink rate, rise and fall time, and CTRL line behavior can be programmed by a TinyWire single-wire digital interface. The on-time and time between pulses can be set for up to two different pulse widths. The LED turns on with the programmed rise time, then stays on as long as CTRL remains HIGH. When CTRL falls, the LED turns off at the programmed fall time. Or, when CTRL is HIGH continuously, the LED repeats the programmed pattern.
So, to get these little controllers working required reading the datasheet and a little coding, see code below.
The circuit is simple. Connect the microcontroller output to the CTRL on the LED controller. As shown here:
For the code. Define the microcontroller output, connect up and read table 11 in the datasheet for the timing, and, the section 'Programming Examples' in the datasheet.
To change the timings. You need to update the registers with updated values. The method TinyWireTX needs two parameter: The register and the new value. This is also explain in Table 9 of the datasheet.
Anyway, works here a treat! My little “breathing” LED indicator is working.
The FAN5646 is a little blinking or “breathing” LED controller indicator. The internal programmable blink algorithm eliminates any need for continual system processor control from Great Cow BASIC. This means longer battery life for a hand-held system because the system processor is not awakened from sleep mode to blink an LED.
Very low dropout of 80 mV allows driving an LED without any inductors or switch capacitors. LED blink rate, rise and fall time, and CTRL line behavior can be programmed by a TinyWire single-wire digital interface. The on-time and time between pulses can be set for up to two different pulse widths. The LED turns on with the programmed rise time, then stays on as long as CTRL remains HIGH. When CTRL falls, the LED turns off at the programmed fall time. Or, when CTRL is HIGH continuously, the LED repeats the programmed pattern.
So, to get these little controllers working required reading the datasheet and a little coding, see code below.
The circuit is simple. Connect the microcontroller output to the CTRL on the LED controller. As shown here:
For the code. Define the microcontroller output, connect up and read table 11 in the datasheet for the timing, and, the section 'Programming Examples' in the datasheet.
To change the timings. You need to update the registers with updated values. The method
TinyWireTXneeds two parameter: The register and the new value. This is also explain in Table 9 of the datasheet.Anyway, works here a treat! My little “breathing” LED indicator is working.
Enjoy
Last edit: Anobium 2019-08-17
A complete demo of the table 9, 10 and 11.
Enjoy