If You are interested in LED driving through RF, this article would be interesting for you. I tested own PCA9634 breakout board for this chip and wrote simple low level driver for IQRF TR-52D module. Next week, I am going to publish PC application for comfortable operation with that.
About PCA9634 (from datasheet)
The PCA9634 is an I2C-bus controlled 8-bit LED driver optimized for Red/Green/Blue/Amber (RGBA) color mixing applications. Each LED output has its own 8-bit resolution (256 steps) fixed frequency Individual PWM controller that operates at 97 kHz with a duty cycle that is adjustable from 0 % to 99.6 % to allow the LED to be set to a specific brightness value. An additional 8-bit resolution (256 steps) Group PWM controller has both a fixed frequency of 190 Hz and an adjustable frequency between 24 Hz to once every 10.73 seconds with a duty cycle that is adjustable from 0 % to 99.6 % that is used to either dim or blink all LEDs with the same value.
Each LED output can be off, on (no PWM control), set at its Individual PWM controller value or at both Individual and Group PWM controller values. The LED output driver is programmed to be either open-drain with a 25 mA current sink capability at 5 V or totem-pole with a 25 mA sink, 10 mA source capability at 5 V. The PCA9634 operates with a supply voltage range of 2.3 V to 5.5 V and the outputs are 5.5 V tolerant. LEDs can be directly connected to the LED output (up to 25 mA, 5.5 V) or controlled with external drivers and a minimum amount of discrete components for larger current or higher voltage LEDs..
PCA9634 Breakout Board
Breakout board is based around PCA9634. Full schematic is below. There are only PCA9634, pull-ups, pull-downs for SDA, SCL, OE lines and address lines, and connectors for I2C and outputs. There are also LED and resistor for power supply indication.
Breakout board is made on two side PCB. Gerber files are available at the end of post.
TR module code
TR module code is partly based on my previous post Remote controller with PCA9535. I used I2C library from this project. Please check IC datasheed at page 10. There is list of registers. Don´t forget to clear SLEEP bit in MODE1 register. Otherwise, no output drivers will works.
There is initial sequence from attached source code:
// set normal mode PCA9634_WriteReg(PCA9634_REG_MODE1,0); // set all LED for individual PWM PCA9634_WriteReg(PCA9634_REG_LEDOUT0,PCA9634_ALL_LED_TO_PWM); PCA9634_WriteReg(PCA9634_REG_LEDOUT1,PCA9634_ALL_LED_TO_PWM); // set LED0 PWM to 50pct PCA9634_WriteReg(PCA9634_REG_PWM0,128); // set LED1 PWM to 25pct PCA9634_WriteReg(PCA9634_REG_PWM1,64);
Attached source code set LED0 output as PWM output with 50% duty cycle and LED1 output as PWM output with 25% duty cycle. If you want to change settings, you can send new register content from another TR module. Control packet has this structure:
0x12, 0x23, ‘R’, REG_ADDR, REG_DATA (DLEN = 5)
The first two bytes are TR module address. This address is fixed in source code (0x1234). Next byte ‘R’ is command (Register) and nex two bytes represents register address and written data. You can use serial terminal and UART-LINK example for tests, or IQRF IDE and CK-USB-04 with inserted TR and uploaded SPI E03-TR example.
Breakout board and DK-EVAL-04 interconnection
Following table shows interconnection between DK-EVAL-04 and BreakoutBoard. Don’t forget to solder LDO-OUT jumper.