demo sample to drive PCU9955 and PCA9629
Dependencies: mbed I2C_slaves PCU9669 parallel_bus
Fork of mini_board_PCU9669 by
What is this?
This is a sample code to operate PCU9955 (16ch constant-current LED controller) and PCA9629 (intelligent stepper motor controller) through PCU9669 (3 channels (UltraFast mode * 2ch, FastModePlus *1ch) I2C bus controller).
This demo is written based on mini_board_PCU9669 sample code library and its API.
http://mbed.org/users/nxp_ip/code/mini_board_PCU9669/
Demo will shows how the LED controllers and stepper motor controllers works.
It uses a mini_board_PCU9669 board with mbed, 8 of PCU9955s and 5 PCA9629s.
Demo setup
(left-top: PCU9955 boards, left-bottom: mini-board PCU9669 with mbed, right: PCA9629 x5 board)
Board connections and device addresses
Reference:
User manual of PCU9669 demo board: Mini board PCU9669
http://www.nxp.com/documents/user_manual/UM10580.pdf
sample code : mbed programs
Import programmini_board_PCU9669
mini board PCU9669 (and PCA9665) sample code
Import programPCA9955_Hello
PCA9955 16 channel current drive(sink) LED driver sample code
Import programPCA9955_simple
very simple sample code for PCA9955 (16 channel current control LED driver)
Import programPCA9629_Hello
Sample code for PCA9629 operation
device infomation
PCU9669 (Parallel bus to 1 channel Fm+ and 2 channel UFm I2C-bus controller)
PCU9955 (16-channel UFm I²C-bus 57 mA constant current LED driver)
PCA9955 (16-channel Fm+ I²C-bus 57 mA constant current LED driver)
PCU9629 (Fm+ I2C-bus stepper motor controller)
Diff: main_PCU9669.c
- Revision:
- 5:57c345099873
- Parent:
- 4:c50d5596cb47
- Child:
- 6:1fc6a640d320
--- a/main_PCU9669.c Wed Mar 21 05:47:54 2012 +0000 +++ b/main_PCU9669.c Mon Mar 26 06:17:23 2012 +0000 @@ -37,10 +37,9 @@ */ #include "config.h" - +#include "hardware_abs.h" #include "transfer_manager.h" // abstracting the access of PCU9669 internal buffer #include "PCU9669_access.h" // PCU9669 chip access interface -#include "hardware_abs.h" // to use install_ISR() and wait_sec() functions #include "PCx9955_reg.h" // slave specific definitions #include "PCA9629_reg.h" #include "utility.h" // @@ -56,6 +55,9 @@ #define TARGET_CHIP_ID PCA9663_ID #endif +#define RESET_PULSE_WIDTH_US 10 // Minimum pulse width is 4us for PCU9669 +#define RESET_RECOVERY_US 1000 + /** * register settings for PCx9955 */ @@ -104,7 +106,7 @@ // printf( "\r\nPCU9669 simple demo program on mbed\r\n build : %s (UTC), %s \r\n\r\n", __TIME__, __DATE__ ); hardware_initialize(); // initializing bit-banging parallel port - reset(); // assert hardware /RESET sgnal + reset( RESET_PULSE_WIDTH_US, RESET_RECOVERY_US ); // assert hardware /RESET sgnal if ( start_bus_controller( TARGET_CHIP_ID ) ) // wait the bus controller ready and check chip ID return 1;