mini board PCU9669 (and PCA9665) sample code
Dependencies: mbed PCU9669 utility PCA9665 I2C_slaves parallel_bus
Fork of mini_board_PCU9669_old by
Sample code for PCU9669 (PCU9661, PCA9663, PCA9661 and PCA9665) evaluation board.
PCU9669 evaluation board: Mini board PCU9669
User manual is available -> http://www.nxp.com/documents/user_manual/UM10580.pdf
Diff: main_PCA9665.c
- Revision:
- 5:57c345099873
- Parent:
- 4:c50d5596cb47
- Child:
- 6:1fc6a640d320
--- a/main_PCA9665.c Wed Mar 21 05:47:54 2012 +0000 +++ b/main_PCA9665.c Mon Mar 26 06:17:23 2012 +0000 @@ -29,16 +29,19 @@ #include "config.h" +#include "hardware_abs.h" #include "PCA9665_access.h" #include "PCx9955_reg.h" #include "PCA9629_reg.h" -#include "hardware_abs.h" // to use install_ISR() and wait_sec() functions #include "utility.h" #include "mbed.h" // this header is required only when printf() is used. #ifdef CODE_FOR_PCA9665 +#define RESET_PULSE_WIDTH_US 100 +#define RESET_RECOVERY_US 100 + char PCx9955_reg_data[] = { 0x80, // Strat register address with AutoIncrement bit 0x00, 0x05, // MODE1, MODE2 @@ -57,7 +60,7 @@ char PCx9955_reg_read_start_address = 0x80; -char read_buffer[ 46 ]; +char read_buffer[ 41 ]; int main() { @@ -68,6 +71,7 @@ printf( "\r\nPCU9665 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( RESET_PULSE_WIDTH_US, RESET_RECOVERY_US ); PCA9665_init(); // set_speed_mode( SPEED_STD_MODE );