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

Revision:
78:434514b8d383
Parent:
36:ffbd9829c8d1
Child:
81:886b32eed2bb
--- a/tinyI2C_1768.h	Wed Aug 31 04:19:38 2016 +0900
+++ b/tinyI2C_1768.h	Sat Sep 03 00:47:37 2016 +0900
@@ -1,42 +1,42 @@
-/*
-tinyI2C_1768.h
-*/
-
-static const uint8_t chip_id = ID_LPC1768;
-
-#define isI2C1  // unused(always enabled)
-I2C dev1( p9, p10 );
-
-#define isI2C2
-I2C dev2(p28, p27);
-#undef isI2C3
-#undef isI2C4
-
-#define isUART
-#undef isUSBUART
-Serial pc(USBTX,USBRX);
-
-#define isHWSPI
-#undef isSWSPI
-SPI _spi(p5, p6, p7); // mosi, miso, sclk
-DigitalOut _cs(p8); // CS
-
-#define isGPIO0 // unused(always enabled)
-DigitalInOut _GPIO00(p11);
-DigitalInOut _GPIO01(p12);
-DigitalInOut _GPIO02(p13);
-DigitalInOut _GPIO03(p14);
-DigitalInOut _GPIO04(p15);
-DigitalInOut _GPIO05(p16);
-DigitalInOut _GPIO06(p17);
-DigitalInOut _GPIO07(p18);
-
-#define isGPIO1
-DigitalInOut _GPIO10(p19);
-DigitalInOut _GPIO11(p20);
-DigitalInOut _GPIO12(p21);
-DigitalInOut _GPIO13(p22);
-DigitalInOut _GPIO14(p23);
-DigitalInOut _GPIO15(p24);
-DigitalInOut _GPIO16(p25);
-DigitalInOut _GPIO17(p26);
+/*
+tinyI2C_1768.h
+*/
+
+static const uint8_t chip_id = ID_LPC1768;
+
+#define isI2C1  // unused(always enabled)
+I2C dev1( p9, p10 );
+
+#define isI2C2
+I2C dev2(p28, p27);
+#undef isI2C3
+#undef isI2C4
+
+#define isUART
+#undef isUSBUART
+Serial pc(USBTX,USBRX);
+
+#define isHWSPI
+#undef isSWSPI
+SPI _spi(p5, p6, p7); // mosi, miso, sclk
+DigitalOut _cs(p8); // CS
+
+#define isGPIO0 // unused(always enabled)
+DigitalInOut _GPIO00(p11);
+DigitalInOut _GPIO01(p12);
+DigitalInOut _GPIO02(p13);
+DigitalInOut _GPIO03(p14);
+DigitalInOut _GPIO04(p15);
+DigitalInOut _GPIO05(p16);
+DigitalInOut _GPIO06(p17);
+DigitalInOut _GPIO07(p18);
+
+#define isGPIO1
+DigitalInOut _GPIO10(p19);
+DigitalInOut _GPIO11(p20);
+DigitalInOut _GPIO12(p21);
+DigitalInOut _GPIO13(p22);
+DigitalInOut _GPIO14(p23);
+DigitalInOut _GPIO15(p24);
+DigitalInOut _GPIO16(p25);
+DigitalInOut _GPIO17(p26);