I2C and GPIO.

Mar 07, 2006 3 Replies

Hi All,



I am going to control a module that provides I2C and GPIO interface.



About 10 registers ( 8 bit per register ).



The most complex algorithm in this control code is


A / 1024 , or B / 8192 ...etc ( need fraction to 0.xxx ( 3 ) )



Question: I know how to implement it with I2C ( just feds register data)



but



for 3 GPIO control...does it mean I have to provide Clock by myself? and others?



Thank you very much for your advice!



Best regards, Boki.



On 07/03/2006 the venerable Boki etched in runes:

Boki,

You are talking in riddles again. Are you trying to implement I2C with 3 GPIO pins? If so, then yes it's easy. Have a look at avrfreaks.net, lots of good stuff there. Otherwise try Google.

John B Delete \'spam blocker\' to reply direct

pins? If so, then yes

try Google.

Yep, he needs an assistant (

formatting link
). Fortunately I'm not able to relocate for at least 6 months, and then spend 6 months in quarantine as a rabies suspect is not in my game plan

martin

Hi John,

Sorry.

The module provides I2C and GPIO interface both.

Due to I only know I2C control, if I have to use GPIO, I does it mean I have to use serial port?

so...I have many question here:

  1. The most of MCU provides UART interface, am I right? could you advice the speed.
  2. If I use I2C as interface, does it means I have to add another I2C chip?
  3. If I use GPIO as interface, does it means I just choose a MCU with UART?
  4. How default is that implement a I2C without I2C chip ( by GPIO directly ).

BR /Boki.

John B wrote:

pins? If so, then yes

try Google.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required