![]() I2C is a multi-master and multi-slave serial communication protocol means that we have the freedom to attach multiple IC at a time with the same bus. The I2C is the short form of Inter-Integrated Circuit, is a type of bus, which designed and developed by Philips in 1980 for inter-chip communication.I2C is adopted by a lot of vendor companies for the chip to chip communication. Similar to the I2C protocol, SPI and UART also used for the chip to chip communication. So let’s begin the post with an introduction to the I2C protocol.Īn I2C protocol is one of the serial communication protocols that is used for the chip to chip communication. I will also explain the terms which frequently used in the I2C protocol. You have to set MST=0 to generate a stop condition.In this blog post, you will learn about the I2C communication protocol, the working of the I2C protocol, hardware bus configuration, and how data is transferred in I2C communication with its uses in chip-to-chip communication. How are you enabling the transmitter, and when in your oscilloscope sequence? Are you programming it to "send idles"? It might be sending "frames of idles" and can only start sending the character you want to transmit when the previous send or idle has finished.Īs for the I2C problems, it looks like you're not generating the STOP condition. Either your code is taking a variable time between those two operations, or the UART is taking a variable time to start. You're getting a variable time between those two writes to the GPIO and when the UART start transmitting. So you must be using a GPIO pin to enable the transceiver (and a different one to turn the LED on) and then write to the UART to send data. But according to your oscilloscope trace, using +-3V or so. So you must be using a serial protocol that has multiple devices sharing a single wire, like LIN. However, you're not using the UART to just transmit and receive data as the oscilloscope trace is showing three levels. We now know that's not what you're doing. I have no idea how you can emulate GPIO, or maybe he meant using timed code and the GPIOs to emulate a UART. ![]() Hui Ma has given a confusing response as he has used the words 'GPIO emulation code". This UART communicates with a kinetis MKL03Z16.Īny ideas of what are my problems? Thanks for the help and for your attention ! Have a nice day ! The problem is : My communication start is too long : it is 3 bits longs to high level before the communication starts, given that there is 2 frames, i have 3 bits instead of 1 on the middle of my communication. On my UART frame i succeed to generate a frame with exactly the good data that i need, but, what i try to imitate isn't a single frame, it's 2 frames who take turns. It has to be like this :Īnd, on my generated frame,the stop condition is wrong. ![]() as you can see, there is a problem between frames : the "end of trame" is not here on my generation, and more important, my end of transmission isn't good. The objective of the IIC is a transmission only : the Coldfire MCF51CN128 transmit this data to a TCA6424A without any return. I apologize for the poor quality of my records. On my IIC frame, i succeed to imitate the initial frame with the SDA (data), but, the SCL (clock) is not exactly the same : ![]() My objective is to imitate an IIC and an UART frame, and on both, i have problems : I work on Codewarrior 10.4 with a PE multilink universal on a coldfire MCF51CN128. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |