i2c bus occasionally losing data packets
hi!
i have created i2c bus 1 arduino uno r3 master communicate 2 colorduino slaves. of time communication fine, lose packet. timing appears random. i2c bus @ 400khz , pull-up resistors 10k, have tried 4.7k , 2.2k. power supplied 5v, 1200mah power supply.
i have no idea problem be, have idea start looking?
details
i added diagram (i2c_bus.png) of current setup. in diagram 2 uno's on right colorduino's.
the master has following code: https://gist.github.com/anonymous/efdc5af748162f268428b6b60485f58a
the slaves have following code (one of them has i2c address 2, other 3):
https://gist.github.com/anonymous/760480d0618efcd9d7f9bfc5b895b6d2
the master receives commands pc via serial port, serial_rgb_command, master reply serial_ack_command when receives serial_rgb_command pc. way can check if commands received , processed master, in cases are, therefore seems me problem not in serial communication between master , pc.
upon receiving serial_rgb_command (with including 8x8 array of rgb led data) master sends 3 packets on i2c, 1 8x8 red packet, 1 8x8 green packet , 1 8x8 blue packet. have set serial connection between slave , pc check if packets arrive (by serial.println upon receiving r, g or b packet). , notice 1 of these r, g, or b packets not received (it not printed serial port).
tldr
upon receiving serial serial_rgb_command packet pc, master generates 3 i2c packets, 1 of these i2c packets lost. of time works, failures seem random.
--
i hope included everything, if there information missing please let me know!

i have created i2c bus 1 arduino uno r3 master communicate 2 colorduino slaves. of time communication fine, lose packet. timing appears random. i2c bus @ 400khz , pull-up resistors 10k, have tried 4.7k , 2.2k. power supplied 5v, 1200mah power supply.
i have no idea problem be, have idea start looking?
details
i added diagram (i2c_bus.png) of current setup. in diagram 2 uno's on right colorduino's.
the master has following code: https://gist.github.com/anonymous/efdc5af748162f268428b6b60485f58a
the slaves have following code (one of them has i2c address 2, other 3):
https://gist.github.com/anonymous/760480d0618efcd9d7f9bfc5b895b6d2
the master receives commands pc via serial port, serial_rgb_command, master reply serial_ack_command when receives serial_rgb_command pc. way can check if commands received , processed master, in cases are, therefore seems me problem not in serial communication between master , pc.
upon receiving serial_rgb_command (with including 8x8 array of rgb led data) master sends 3 packets on i2c, 1 8x8 red packet, 1 8x8 green packet , 1 8x8 blue packet. have set serial connection between slave , pc check if packets arrive (by serial.println upon receiving r, g or b packet). , notice 1 of these r, g, or b packets not received (it not printed serial port).
tldr
upon receiving serial serial_rgb_command packet pc, master generates 3 i2c packets, 1 of these i2c packets lost. of time works, failures seem random.
--
i hope included everything, if there information missing please let me know!

quote
does have idea start looking?the "diagram" shows arduinos 1/2" apart. really?
Arduino Forum > Using Arduino > Networking, Protocols, and Devices (Moderator: fabioc84) > i2c bus occasionally losing data packets
arduino
Comments
Post a Comment