Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Arduino I2C pin inputs
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Adrienne Humblet  
View profile  
 More options Mar 20 2012, 9:00 pm
From: Adrienne Humblet <amhumb...@gmail.com>
Date: Tue, 20 Mar 2012 18:00:07 -0700 (PDT)
Local: Tues, Mar 20 2012 9:00 pm
Subject: Arduino I2C pin inputs
Hi,

I'm trying to hook up a DS1307 RTC chip to an Arduino Uno. The DS1307
uses the I2C bus which requires 2 connection to the Arduino. The
Wire.h library (which is what the Arduino uses for I2C protocol)
expects the SDA (serial data) and SCK (serial clock) connections in
the Analog 4 and Analog 5 pins of the Arduino.

Does anyone know how to make it such that the Wire library expects SDA
and SCK in other pins? Pins A4 and A5 are already taken up by other
non I2C devices.

Does anyone know what I'm talking about?

I thought it would be easy, but when I look in Wire.h I don't see any
pin assignments.

Thanks!
-Adrienne


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
katzm...@aol.com  
View profile  
 More options Mar 20 2012, 9:25 pm
From: katzm...@aol.com
Date: Tue, 20 Mar 2012 21:25:13 -0400
Local: Tues, Mar 20 2012 9:25 pm
Subject: Re: [NYCR:Microcontrollers] Arduino I2C pin inputs
I don't think you can it has something to do with internal timers on the chip I would recommend using a arduino mega because it has multiple i2c connections if you look up the datasheets on the chip i think it only lists one i2c port you can try looking for a software based one but that's a bit risky but it depends on the code that's running

Sent from my iPhone

On Mar 20, 2012, at 9:00 PM, Adrienne Humblet <amhumb...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Clearfield  
View profile  
 More options Mar 20 2012, 9:43 pm
From: Chris Clearfield <chris.clearfi...@gmail.com>
Date: Tue, 20 Mar 2012 21:43:13 -0400
Local: Tues, Mar 20 2012 9:43 pm
Subject: Re: [NYCR:Microcontrollers] Arduino I2C pin inputs
Not sure of this is on point, but I used the OneWire library to hookup a temperature sensor to arbitrary pins on the arduino. If I recall I instantiated the pins as part of the class.

I'm guessing that this is different, though.
C

On Mar 20, 2012, at 21:00, Adrienne Humblet <amhumb...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Guan Yang  
View profile  
 More options Mar 20 2012, 10:11 pm
From: Guan Yang <g...@yang.dk>
Date: Tue, 20 Mar 2012 22:11:52 -0400
Local: Tues, Mar 20 2012 10:11 pm
Subject: Re: [NYCR:Microcontrollers] Arduino I2C pin inputs

I am pretty sure Wire uses hardware support for I2C that requires those particular pins. In theory you could implement I2C like SoftwareSerial for async serial, that would run on any pin (or any pin with an interrupt), but I haven't seen such an implementation.

What's on those pins? Can you move it?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joel Murphy  
View profile  
 More options Mar 20 2012, 11:18 pm
From: Joel Murphy <j...@joelmurphy.net>
Date: Tue, 20 Mar 2012 23:18:46 -0400
Local: Tues, Mar 20 2012 11:18 pm
Subject: Re: [NYCR:Microcontrollers] Arduino I2C pin inputs

I2C is implemented in hardware on arduino pins A4 and A5. A whole pile of control registers make it easy to run the protocol with internal flags and interrupts. Its fairly complex The back and forth -ness of it, with acknowledge bits flying (or not flying) every where and changing pin MODE statesWire library mucks about in those control registers, so it's not possible to run Wire on anyy other pins.
Your next recourse software. There's plenty of I2C waveform data out there and in the datasheet for the DS1307 to make it doable. The bits and bytes commands in arduino make the code easy to debug.

Making the world safe for robots
-----------
Any noise in the prior signal has been inserted by the iThing

On Mar 20, 2012, at 10:11 PM, Guan Yang <g...@yang.dk> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joel Murphy  
View profile  
 More options Mar 20 2012, 11:33 pm
From: Joel Murphy <j...@joelmurphy.net>
Date: Tue, 20 Mar 2012 23:33:39 -0400
Local: Tues, Mar 20 2012 11:33 pm
Subject: Re: [NYCR:Microcontrollers] Arduino I2C pin inputs

Meant to add the only other issue is timing. datasheets will have a good starting point for trial and error to get a workable clock with delays. Longer transmission streams, longer tweeking.... But totally doable. I wrote a software I2C in PICBasic years ago.

Making the world safe for robots
-----------
Any noise in the prior signal has been inserted by the iThing

On Mar 20, 2012, at 11:18 PM, Joel Murphy <j...@joelmurphy.net> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
derek enos  
View profile  
 More options Mar 21 2012, 12:04 pm
From: derek enos <derek.e...@gmail.com>
Date: Wed, 21 Mar 2012 12:04:36 -0400
Local: Wed, Mar 21 2012 12:04 pm
Subject: Re: [NYCR:Microcontrollers] Arduino I2C pin inputs

Sparkfun's ADNS2620 Arduino
Library<http://www.sparkfun.com/datasheets/Widgets/ADNS2620.zip>
serves
as an example of a software I2C-esque implementation that allows for
arbitrary SDA/SCL pin assignment.  It's a good starting point, but will
require modification to communicate with the DS1307.  For example, the
ADNS2620 does not support multiple slave devices, so its protocol doesn't
include a 'slave address' field, which the DS1307 requires.

If your application can afford to sit idle and wait for each transaction to
complete, bit-banging (implementing in software) a synchronous protocol
like I2C is relatively straightforward.  There's information to be found on
the subject by searching for things like "bit-banging I2C", "bit-banging
serial", etc.

If you decide to attempt it, the "I2C Data Bus" section of the DS1307
datasheet <http://datasheets.maxim-ic.com/en/ds/DS1307.pdf> describes the
DS1307's I2C protocol and the "AC Electrical Characteristics" section lists
the SDA/SCL timing requirements.

Derek

On Tue, Mar 20, 2012 at 9:00 PM, Adrienne Humblet <amhumb...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Guan Yang  
View profile  
 More options Mar 21 2012, 12:12 pm
From: Guan Yang <g...@yang.dk>
Date: Wed, 21 Mar 2012 12:12:38 -0400
Local: Wed, Mar 21 2012 12:12 pm
Subject: Re: [NYCR:Microcontrollers] Arduino I2C pin inputs
Here's a more ridiculous idea that might be easier: Get a second Arduino (or just a bare ATmega328P, much cheaper) and have that talk I2C to the device. Talk to it with whatever pin you have left, SPI or pin 0/1 UART or SoftwareSerial on an arbitrary pin.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
doug brantner  
View profile  
 More options Mar 21 2012, 1:39 pm
From: doug brantner <doug.brant...@gmail.com>
Date: Wed, 21 Mar 2012 13:39:58 -0400
Local: Wed, Mar 21 2012 1:39 pm
Subject: Re: [NYCR:Microcontrollers] Arduino I2C pin inputs
If you need the analog pins for analog inputs, couldn't you get an
external Analog-To-Digital Converter to add inputs to  the arduino
somehow?

On 3/21/12, Guan Yang <g...@yang.dk> wrote:

--
Sent from my mobile device

Doug Brantner
doug.brant...@gmail.com
pretendtodiy.blogspot.com project blog


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »