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
settings.h@78:434514b8d383, 2016-09-03 (annotated)
- Committer:
- K4zuki
- Date:
- Sat Sep 03 00:47:37 2016 +0900
- Revision:
- 78:434514b8d383
- Parent:
- 36:ffbd9829c8d1
remove force-LF attribute
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
K4zuki |
78:434514b8d383 | 1 | /* |
K4zuki |
78:434514b8d383 | 2 | settings.h |
K4zuki |
78:434514b8d383 | 3 | */ |
K4zuki |
78:434514b8d383 | 4 | |
K4zuki |
78:434514b8d383 | 5 | // #define isI2C1 // unused(always enabled) |
K4zuki |
78:434514b8d383 | 6 | // #define isGPIO0 // unused(always enabled) |
K4zuki |
78:434514b8d383 | 7 | |
K4zuki |
78:434514b8d383 | 8 | enum chipID_e { |
K4zuki |
78:434514b8d383 | 9 | ID_LPC824 = '0', |
K4zuki |
78:434514b8d383 | 10 | ID_LPC1768 = '1', |
K4zuki |
78:434514b8d383 | 11 | ID_LPC11UXX = '2', |
K4zuki |
78:434514b8d383 | 12 | }; |
K4zuki |
78:434514b8d383 | 13 | |
K4zuki |
78:434514b8d383 | 14 | #if defined(TARGET_SSCI824) || defined(TARGET_LPC824) |
K4zuki |
78:434514b8d383 | 15 | #warning "tinyI2C_824.h" |
K4zuki |
78:434514b8d383 | 16 | #include "tinyI2C_824.h" |
K4zuki |
78:434514b8d383 | 17 | |
K4zuki |
78:434514b8d383 | 18 | #elif defined(TARGET_LPC11U35_501) || defined(TARGET_LPC11U35_401) |
K4zuki |
78:434514b8d383 | 19 | |
K4zuki |
78:434514b8d383 | 20 | #warning "import USBDevice library" |
K4zuki |
78:434514b8d383 | 21 | #include "tinyI2C_11U3x.h" |
K4zuki |
78:434514b8d383 | 22 | |
K4zuki |
78:434514b8d383 | 23 | #elif defined(TARGET_LPC1768) |
K4zuki |
78:434514b8d383 | 24 | |
K4zuki |
78:434514b8d383 | 25 | #warning "tinyI2C_1768.h" |
K4zuki |
78:434514b8d383 | 26 | #include "tinyI2C_1768.h" |
K4zuki |
78:434514b8d383 | 27 | |
K4zuki |
78:434514b8d383 | 28 | #endif |