09-13-2018 01:22 PM
Hi all,
It's my first time posting on the forum. I am working on having a teensy 3.2 as a slave and myRIO as a master to transmit 24 bytes (6 float numbers) of data over. I got the labview real-time code to work and it is able to execute at 1000Hz rate which is attached as "I2C labview rt (working).vi". Now I am trying to implement the same code in FPGA but I am having a lot of trouble getting it to work. I kind of had it working but it's taking 3ms to execute and I think it's because of my wait function inbetween data transfer. However, if I take out the wait function my I2C bus line crashes. I have been trying to use an oscilloscope to observe what's happening but when I modify my "I2C read byte" it crashes my I2C bus and I had to power reset the myRIO to get it back to working. My working fpga code is attached below. Please let me know if I missed any details for my problem and thank you in advance. Here are the screenshots for both codes.
Working I2C in RT
Semi-functional I2C in FPGA
I2C bit write subVI
I2C bit write ack subVI
I2C float read subVI
I2C bit read subVI
I2C bit read ack subVI
09-18-2018 12:32 PM
Hey hhsu24,
Do you have any updates on this? Could you give some more information about what's going on in your code?