Pullups are on the SDA and SCL and are 10K, which has worked well before on
other designs. This is my first attempt at using I2C with AVR GCC.
I can see the SCL bus initially go low then high and then this clock appears
immediately after.
My init sets the TWBR to 152 with a prescale of 1. This, with a 16Mhz osc,
gives me a 50Khz bus speed which is what I need for this device.
I single step the following line of code and then this clock appears after
it:
TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
and then it hangs at this call:
// wait until transmission completed
while(!(TWCR & (1<<TWINT)));
I am only using ADC0 and ADC1 for analog input on the same bus but in
another email, John Samperi said that you can do this? The digital IO is
only disabled on PC0 and PC1
-----Original Message-----
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Jim Wagner
Sent: 19 May 2013 22:00
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] Strange issue with I2C master
Do you have external pullup resistors? Internal pull-ups are around 25K
(IIRC) but desired value is under 1.5K.
Jim WagnerMessage
RE: [AVR-Chat] Strange issue with I2C master
2013-05-19 by Dave McLaughlin
Attachments
- No local attachments were found for this message.