![]() ![]()
Each device can be a transmitter, a receiver or both. All I2C master and slave devices are connected with only those two wires. #Bit and work clock used in digital communication serial#The I2C bus uses two wires: serial data (SDA) and serial clock (SCL). This is exactly what I2C bus specifications define. A bus means specification for the connections, protocol, formats, addresses and procedures that define the rules on the bus. To satisfy these requirements a serial bus is needed. The system must be designed in such a way that slower devices can communicate with the system without slowing down faster ones. The complexity and the cost of connecting all those devices together must be kept to a minimum. You have to set MST=0 to generate a stop condition.A typical embedded system consists of one or more microcontrollers and peripheral devices like memories, converters, I/O expanders, LCD drivers, sensors, matrix switches, etc. 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. #Bit and work clock used in digital communication code#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. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |