UART to I2C master(s) converter, targetting to emulate SC18IM700(NXP) chip
UART to I2C master(s) converter, targetting to emulate SC18IM700(NXP) chip
Features
up to 4x I2C master
- for LPC824 implement, we can use up to 4 channels of I2C masters
- 1x Fm+ and 3x Fm I2C channels
- for LPC1768 implement, we can use up to 2 channels of I2C masters
- 2x Fm I2C channels
- for LPC11U35 implement, only one channel for I2C master,
but program uses USB CDC class for UART communication (means no external USB-Serial converter chip)
- 1x Fm+ I2C channels
1x SPI master
up to 2x 8bit GPIO
Tested Platforms
LPC824
- https://developer.mbed.org/platforms/Switch-Science-mbed-LPC824/
- https://developer.mbed.org/platforms/LPCXpresso824-MAX/
LPC1768
LPC11U35
Quote:
LPC11U35 implement requires importing USBDevice library to use USBSerial class
visit https://github.com/K4zuki/tinyI2C for more information
Diff: main.cpp
- Revision:
- 3:519893d7f038
- Parent:
- 2:feca9fa9a018
- Child:
- 36:ffbd9829c8d1
--- a/main.cpp Fri Oct 17 20:48:15 2014 +0000 +++ b/main.cpp Tue Oct 21 03:55:14 2014 +0000 @@ -1,5 +1,21 @@ +<<<<<<< 085beae13fa74cf6ba82492d6cb0b9b1af8ebfc9 /** uart_i2c_conv for LPC824 */ +======= +#include "mbed.h" +//#define isuse_USB_SERIAL + +#ifdef isuse_USB_SERIAL +#include "USBSerial.h" +USBSerial pc; +#else +Serial pc(USBTX,USBRX); +#endif +I2C dev1(p9,p10); +I2C dev2(p28,p27); +I2C* dev=&dev1; +BusOut bus(LED1,LED2); +>>>>>>> removed unused variables; fixed coding format; commented out unused code #include "mbed.h" #include "settings.h"