Pages: 1 ... 3 4 [5]   Go Down
Author Topic: I2C read problems  (Read 6662 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 146
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

as before i changed the

#define BUFFER_LENGTH 128

into wire.h

and

  #define TWI_BUFFER_LENGTH 128

into twi.h

from 32 to 128
Logged

Global Moderator
Melbourne, Australia
Online Online
Brattain Member
*****
Karma: 511
Posts: 19339
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I changed both of those, and ran this sketch:

Code:
#include <Wire.h>

void setup ()
  {
  Wire.begin ();
  }

void loop () 
  {
  Wire.beginTransmission (25);
  Wire.write ("AbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789000987654321");
  Wire.endTransmission ();
  delay (1000);
  }

All the bytes were sent (I could see with the logic analyzer). I also had to recompile and re-upload the receiving Arduino as well.
Logged

http://www.gammon.com.au/electronics

Please post technical questions on the forum - not to me by personal message. Thanks a lot.

0
Offline Offline
Full Member
***
Karma: 0
Posts: 146
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

give me 4minutes
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 146
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

also the slave is a custom board
and i am using Arduino Pro at 8Mhz because Atmega328 on a breadboard isnt working any more on Arduino 1.0

Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 146
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



and after a while

Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 146
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
#include <Wire.h>

void setup ()
  {
  Wire.begin ();
  }

void loop () 
  {
  Wire.beginTransmission (25);
  Wire.write ("AbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789000987654321");
  Wire.endTransmission ();
  delay (1000);
  }

on the 8Mhz board

Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 146
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

also i get the same output from an atmega1280 at 16Mhz
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 146
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

and from an arduino uno board
Logged

Global Moderator
Melbourne, Australia
Online Online
Brattain Member
*****
Karma: 511
Posts: 19339
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

These pictures don't show much. They show about one byte, and you are trying to send around 72.
Logged

http://www.gammon.com.au/electronics

Please post technical questions on the forum - not to me by personal message. Thanks a lot.

0
Offline Offline
Full Member
***
Karma: 0
Posts: 146
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i dont have a logic analyzer yet

can you please send me your files to test

thanks a lot
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 146
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i made it

i re-downloded the arduino 1.0
unzip it in dekstop
change the files in dekstop
and then replace it in Programm files

thanks a lot
Logged

Pages: 1 ... 3 4 [5]   Go Up
Jump to: