There is no USPS pickup on Monday Feb 15th, 2016 because of President's Day. USPS orders placed after 11am EST Fri February 12th will go out Tuesday February 16. UPS orders will ship as normal.

WebIDE Pi I2C "Error accessing..."
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Please be positive and constructive with your questions and comments.

WebIDE Pi I2C "Error accessing..."

by teachop on Sun Feb 10, 2013 7:26 am

If talking to an AVR from the Raspberry Pi and you see that error message, read this:
http://elinux.org/BCM2835_datasheet_errata#p35_I2C_clock_stretching
Last edited by teachop on Mon Feb 18, 2013 6:11 pm, edited 1 time in total.
teachop
 
Posts: 25
Joined: Sun Feb 10, 2013 7:10 am

Re: WebIDE Pi I2C "Error accessing..."

by teachop on Mon Feb 11, 2013 8:10 pm

See...
Last edited by teachop on Mon Feb 18, 2013 6:12 pm, edited 2 times in total.
teachop
 
Posts: 25
Joined: Sun Feb 10, 2013 7:10 am

Re: WebIDE Pi I2C "Error accessing..."

by teachop on Mon Feb 11, 2013 8:32 pm

Below...
Last edited by teachop on Mon Feb 18, 2013 6:13 pm, edited 2 times in total.
teachop
 
Posts: 25
Joined: Sun Feb 10, 2013 7:10 am

Re: WebIDE Pi I2C "Error accessing..."

by teachop on Thu Feb 14, 2013 5:46 pm

Even though the problem is actually with the Pi I2C hardware, it can be worked around. This is a changed to the slave CPU, not the Pi. Putting a time delay in the Wire library twi.c allows talking to Arduino-likes from the Raspberry Pi on I2C. My atmega328p CPU is @ 8 MHz so perhaps this needs to be tweaked for 16 MHz cases (normal Arduino). Anyway, this bandaid completely stopped the problem (twi.c, in SIGNAL(TWI_vect) routine):
Code: Select all | TOGGLE FULL SIZE
    // Slave Receiver
    case TW_SR_SLA_ACK:   // addressed, returned ack
    case TW_SR_GCALL_ACK: // addressed generally, returned ack
      delayMicroseconds(3);
teachop
 
Posts: 25
Joined: Sun Feb 10, 2013 7:10 am

Please be positive and constructive with your questions and comments.