UART to I2C master(s) converter, targetting to emulate SC18IM700(NXP) chip

Dependencies:   mbed

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

LPC1768

LPC11U35

Quote:

LPC11U35 implement requires importing USBDevice library to use USBSerial class

visit https://github.com/K4zuki/tinyI2C for more information

Committer:
k4zuki
Date:
Tue Aug 30 16:30:55 2016 +0000
Revision:
36:ffbd9829c8d1
Parent:
0:b597ed665b76
Child:
78:434514b8d383
add headers and settings.h to switch 11U3x/824/1768; 11U3x requires to add USBSerial library in project

Who changed what in which revision?

UserRevisionLine numberNew contents of line
k4zuki 36:ffbd9829c8d1 1 /*
k4zuki 36:ffbd9829c8d1 2 settings.h
k4zuki 36:ffbd9829c8d1 3 */
k4zuki 36:ffbd9829c8d1 4
k4zuki 36:ffbd9829c8d1 5 // #define isI2C1 // unused(always enabled)
k4zuki 36:ffbd9829c8d1 6 // #define isGPIO0 // unused(always enabled)
k4zuki 36:ffbd9829c8d1 7
k4zuki 36:ffbd9829c8d1 8 enum chipID_e {
k4zuki 36:ffbd9829c8d1 9 ID_LPC824 = '0',
k4zuki 36:ffbd9829c8d1 10 ID_LPC1768 = '1',
k4zuki 36:ffbd9829c8d1 11 ID_LPC11UXX = '2',
k4zuki 36:ffbd9829c8d1 12 };
k4zuki 36:ffbd9829c8d1 13
k4zuki 36:ffbd9829c8d1 14 #if defined(TARGET_SSCI824) || defined(TARGET_LPC824)
k4zuki 36:ffbd9829c8d1 15 #warning "tinyI2C_824.h"
k4zuki 36:ffbd9829c8d1 16 #include "tinyI2C_824.h"
k4zuki 36:ffbd9829c8d1 17
k4zuki 36:ffbd9829c8d1 18 #elif defined(TARGET_LPC11U35_501) || defined(TARGET_LPC11U35_401)
k4zuki 36:ffbd9829c8d1 19
k4zuki 36:ffbd9829c8d1 20 #warning "import USBDevice library"
k4zuki 36:ffbd9829c8d1 21 #include "tinyI2C_11U3x.h"
k4zuki 36:ffbd9829c8d1 22
k4zuki 36:ffbd9829c8d1 23 #elif defined(TARGET_LPC1768)
k4zuki 36:ffbd9829c8d1 24
k4zuki 36:ffbd9829c8d1 25 #warning "tinyI2C_1768.h"
k4zuki 36:ffbd9829c8d1 26 #include "tinyI2C_1768.h"
k4zuki 36:ffbd9829c8d1 27
k4zuki 36:ffbd9829c8d1 28 #endif