Hallo,
I am using Arduino UNO board(atmega:328) to see the I2C signal from LPC810(on bread board).
At first I tried with 2 Arduino UNO boars to send One character from Master and read it in Slave on "Serial Monitor ". Everything goes perfactely.
Actually, UNO master sends data to the address "0x08" by the command:
and UNO slave receive data from the address "0x08" by the command:
Wire.begin(0x08); //DataSheet:P-11: 0x08 (0x28) PORTC // join i2c bus with address #8
I followed the insturction from:
Now I want to do same thing But from LPC810(as master) to arduino UNO. I did everything correctly (switch matrix and others programming ) in LPC810.
As I understood, Both Microcontroller will join in same BUS(i2c) by getting boths address. And I have added the arduino address 0x08 in LPC810, But I did not add any "UNO header file" in my LPC810 prog. actually I did not find it.
So, as I did not add any UNO header file thats why, my LPC810 prog will not be able to join the BUS. coz, the address 0x08 woun't be define without header file.
now my question is:
how can I thransmit one character between this 2 Microcontroller ? could anyone can explain step by step ?
How do you connect the 5V Arduino with the 3.3V LPC810 ?
Do you use pullup resistors ? Pullup to what ? which value for the resistors ?
Which I2C library is used for the LPC810 ? When you use an Arduino Uno as Slave, it has clock stretching. The Master should allow clock stretching.
The Arduino uses a 7-bit shifted address for the I2C address (0...127). What kind of address does the LPC810 use for I2C ? The unshifted address or the shifted address ? Is there an i2c_scanner for the LPC810, like the i2c_scanner for the Uno ? ( Arduino Playground - I2cScanner ). Which development environment do you use for the LPC810 ?
Arduino and LPC810 both are connected with PC via USB. they are only sharing ground, scl, sda
no, I did not use any pull up registor for LPC810. Should I use pull up registor for both scl and sda in LPC810 ?
LPC810 has its own master prog for I2C, I used in LPCExpresso. And Arduino has own slave prog(its 100% ok) in arduino IDE.
Clocking stretching for LPC810 ? I really don't know about it. How to do it ?
I tried with Arduino scanner prog(in Slave to detect Master I2C), But it cant detect Master I2c, even it cant detect Arduino UNO Master to Arduino UNO slave. I thnik scanner prog is wrong.
You are connecting 5 volt level to 3.3. volt level signals to each other.
Did you check you can do that without destroying something before you connected and powered up ?
And if not, what you can do to get rid of that problem ?
That must be the reason why Koepel is asking you whether you used resistors or not.
Did you read Nick Gammon's tutorial on I2C (which is without any doubt excellent) ?
A Master has no I2C address, only a Slave has a I2C address and only a Slave can be detected.
The I2C library for the LPC810 does have clock stretching or it doesn't. Not much you can do about that. The clock stretching is not needed for sensors, only when an Arduino is set as a Slave (because the Arduino I2C is part hardware and part software, the software requires some extra time).
You should not connect the SDA and SCL from the UNO to a 3.3V device. If you add 4k7 pullup resistors to 3.3V, you might be in luck and it will probably work. However, I think you better use a level shifter. Most level shifters have also pullup resistors.
I don't know the LPC810, but since you have still a few hurdles to take, I doubt if it is even possible to make it work. Is there another way to achieve your goal ?