Pages: 1 ... 3 4 [5]   Go Down
Author Topic: I2C read problems  (Read 5840 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
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
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

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
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
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

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: