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_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;