adm34 / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

Wire library drops %50 of the packets #335

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Open Wire examples Master Writer and Slave Receiver
2.Remove delays from master code and add delayMicrosecond to slave receiver 
code.
3.You will see that you dropped %50 of packets on slave terminal.

What is the expected output? What do you see instead?
On slave terminal you will see only even numbers OR only odd ones. You needed 
to see every numbers on slave terminal.

What version of the Arduino software are you using? On what operating
system?  Which Arduino board are you using?
0018 Duemilanove as master and at my breadboard ATmega168 arduino as a slave. 
OpenSuSE 11.3

Please provide any additional information below.
Example codes attached.

Original issue reported on code.google.com by erdem...@gmail.com on 23 Aug 2010 at 12:10

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed the issue. Just added twi_stop() before entering user defined function 
and after releasing with twi_releaseBus(). Removed twi_reply and state lines 
since releaseBus() executes exactly same code but it's better to read this 
code. There is no packet loss anymore. diff and resulting file attached.

Original comment by erdem...@gmail.com on 23 Aug 2010 at 1:41

Attachments:

GoogleCodeExporter commented 9 years ago
r1092

Original comment by dmel...@gmail.com on 16 Sep 2010 at 1:22