Show Posts
Pages: [1] 2 3 ... 10
1  Products / Arduino Due / Re: Is I2C working correctly on 1.5.5?? on: April 25, 2014, 12:09:33 am
I have not tried with sda1/scl1.
I only tried with sda/scl.
2  Products / Arduino Due / Re: Is I2C working correctly on 1.5.5?? on: April 24, 2014, 07:56:48 pm
Are you sure your bus is free?
3  Products / Arduino Due / Re: Is I2C working correctly on 1.5.5?? on: April 05, 2014, 10:06:17 am
Awesome!!!
Glad it worked out for you smiley
4  Products / Arduino Due / Re: Is I2C working correctly on 1.5.5?? on: February 15, 2014, 12:32:48 pm
Ok, I went ahead and took a jab at fixing this. I kind of needed it to work or my project would just end up down the toilet and I don't want this to happen after all the time, money and effort spent in developing prototypes and everything.
I only needed to modify the Wire.cpp file.
If anyone would kindly test it out to make sure it works, it would be great.
I was able to get Wire.available and Wire.endTransmission to behave as it was on the avr platform.
There may be other functions that can be improved too, but since I don't need them, they were not touched.
So, if you run the I2CScanner, it should work. Let me know if it doesn't.
Attached are the Wire.cpp and I2CScannerDue.ino that I used to test it.
5  Products / Arduino Due / Re: Is I2C working correctly on 1.5.5?? on: February 14, 2014, 01:45:33 pm
Cool. Thanks.
I guess it is still broken even after 1 year smiley-sad
Did you ever send a patch or merge request to the arduino team with your changes?
It would help a ton of people if the library was fixed once and for all.
I'll try to change my libs too if I can wrap my head around the low level code.
6  Products / Arduino Due / Re: Is I2C working correctly on 1.5.5?? on: February 14, 2014, 01:15:05 pm
Well, the endTransmission is the least of my problems... It's just something I found along the way of trying to find out why my code wasn't working...
So, here is the biggest issue I have:
Code:
#include <Wire.h>


int a;

void setup() {
  // put your setup code here, to run once:
  Wire.begin();
  Serial.begin(57600);
}

void loop() {
  // put your main code here, to run repeatedly:
  Wire.requestFrom(0X4d,2);
  if (Wire.available())
    Serial.println((Wire.read()<<8)+Wire.read());
  delay(100);
}
In this code, I get serial print all the time no matter if the chip is found or not.
It gets worse, if the chip is found, it correctly displays the results by reading the 2 incoming bytes, but if the chip is disconnected, it starts returning garbage. For example, it returns always 65321. If I connect and disconnect again, it returns a different number.
I scanned the bus and I can see the 2 bytes coming in when the device is plugged. See attachment.
But when the device is disconnected, I do see the correct response of the bus, which is exactly like the not found picture on the previous post.
So, the hardware is indeed responding correctly with a NACK, but the library is returning me garbage that I don't know where it came from. I think the problems really lies on the Wire.available() that is always returning true.
7  Products / Arduino Due / Re: Is I2C working correctly on 1.5.5?? on: February 14, 2014, 12:59:34 pm
Here is a simple code to test:
Code:
#include <Wire.h>


int a;

void setup() {
  // put your setup code here, to run once:
  Wire.begin();
  Serial.begin(57600);
}

void loop() {
  // put your main code here, to run repeatedly:
  Wire.beginTransmission(0X4d);
  Serial.println(Wire.endTransmission());
  delay(100);
}
You can change the I2C address to whatever chip you have available.
This example always returns 1 whether the chip is found or not....
1 means data too long to fit in transmit buffer
It should be 0 for found and 2 for not found.
Attached are some screenshots to confirm the chip is responding correctly for both not found and found.


8  Products / Arduino Due / Re: Is I2C working correctly on 1.5.5?? on: February 14, 2014, 12:34:19 pm
Does anyone have any comments?
All posts I read date back to 1 year ago and I couldn't get Wire library work correctly yet.
Is there any alternative for I2C on Due board?
9  Products / Arduino Due / Re: PROGMEM on Due on: February 13, 2014, 01:17:22 pm
Correct.
Static data.
Well, the code I'm using is not working.
I'm using array of progmem though.
I'll make a simple code to test the concept and post later.
Here are the declarations:
Code:
const prog_char MENU_1[] PROGMEM = "Menu 1";
const prog_char MENU_2[] PROGMEM = "Menu 2";
static PROGMEM const char *menu_items[] = {MENU_1,MENU_2};
And I was referring to them like this:
Code:
(char * )pgm_read_word(&(menu_items[0]))
10  Products / Arduino Due / PROGMEM on Due on: February 13, 2014, 12:41:33 pm
Hi,

Is it true I can't use PROGMEM on Due?
What are my other options?
Put everything in RAM?
It does have a hefty 96K RAM, but my code is already made to work on AVR and it would be much simpler if I could somehow not have to code 2 different storage system.

Thanks,
RI
11  Products / Arduino Due / Is I2C working correctly on 1.5.5?? on: February 12, 2014, 11:25:19 pm
Hi,

I can't seem to figure out what the problem is.
I can't seem to get correct results using the Wire library in 1.5.5
I've read something about being a problem back in 1.5.1.
Is it still broken?
I seem to always get true when I can Wire.available() and I seem to get always something other than zero on Wire.endTransmission() even though the device is in the bus.
Any help would be appreciated.

Thank you,
RI
12  Products / Arduino Due / Re: Write directly to Port C on: February 07, 2014, 04:28:04 pm
Thanks.
I actually found out the solution after reading the datasheet more carefully.
I was setting the wrong bits.
Code:
PIOC->PIO_OWDR = 0xFFFE0001;
PIOC->PIO_ODSR = H<<9 | L<<1;
13  Products / Arduino Due / Write directly to Port C on: February 07, 2014, 12:30:18 am
I'd like to write 16bits to port C in the shortest amount of cycles possible.
It would go into PC1 through PC16.
PC0 is used as external erase button.
How do I do that?
I'm trying to port from AVR code.
My function I used on AVR was like this:
Code:
void WriteBus(byte H,byte L)
{
PORTA=H;
PORTC=L;
}
Any help is appreciated.
Thank you in advance.
RI
14  Using Arduino / Project Guidance / Where can I download ThibaultTerminal?? on: January 21, 2014, 01:40:00 pm
Hi,

I used to download the android package apk from labs.arduino.cc
It's gone now... smiley-sad
Where can I find that package??

Thanks,
RI
15  Development / Other Software Development / Re: Running into issues when I compiled IDE on: January 07, 2014, 12:26:55 pm
I decided to not even bother and reverted back to the tag 1.5.5, which uses the old RXTX and things started working again.
I think it is related to the new JSSC that Frederico introduced.
I'll post a comment on github.
I was compiling on a windows machine.
Pages: [1] 2 3 ... 10