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)
demo_patterns.h@20:a266fa588bd8, 2012-10-26 (annotated)
- Committer:
- nxp_ip
- Date:
- Fri Oct 26 05:59:55 2012 +0000
- Revision:
- 20:a266fa588bd8
demo code ported on latest library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nxp_ip | 20:a266fa588bd8 | 1 | #define N_LED_PER_BOARD 15 |
nxp_ip | 20:a266fa588bd8 | 2 | #define N_OF_LED_BOARD 8 |
nxp_ip | 20:a266fa588bd8 | 3 | #define N_OF_LEDS (N_LED_PER_BOARD * N_OF_LED_BOARD) |
nxp_ip | 20:a266fa588bd8 | 4 | |
nxp_ip | 20:a266fa588bd8 | 5 | /** @def PWM_INIT / IREF_INIT |
nxp_ip | 20:a266fa588bd8 | 6 | * |
nxp_ip | 20:a266fa588bd8 | 7 | * Initial value for the PWMn and IREFn registers |
nxp_ip | 20:a266fa588bd8 | 8 | */ |
nxp_ip | 20:a266fa588bd8 | 9 | #define PWM_INIT 0x00 |
nxp_ip | 20:a266fa588bd8 | 10 | #define IREF_INIT 0xFF |
nxp_ip | 20:a266fa588bd8 | 11 | |
nxp_ip | 20:a266fa588bd8 | 12 | extern char gLEDs[ N_OF_LEDS ]; |
nxp_ip | 20:a266fa588bd8 | 13 | extern int gCount; |
nxp_ip | 20:a266fa588bd8 | 14 | |
nxp_ip | 20:a266fa588bd8 | 15 | void pattern_update( int count ); |
nxp_ip | 20:a266fa588bd8 | 16 | |
nxp_ip | 20:a266fa588bd8 | 17 | void ramp_all_PCA9629( void ); |
nxp_ip | 20:a266fa588bd8 | 18 | void vib_all_PCA9629( void ); |
nxp_ip | 20:a266fa588bd8 | 19 | void start_all_PCA9629( void ); |
nxp_ip | 20:a266fa588bd8 | 20 | void stop_all_PCA9629( void ); |
nxp_ip | 20:a266fa588bd8 | 21 | void align_all_PCA9629( void ); |