Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

use adc and i2c simultanously in mega 8

Status
Not open for further replies.

khatarat

Member level 1
Joined
Mar 2, 2009
Messages
41
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,545
i want write a program to first read adc and then read i2c data and reapet this but the pin of adc and i2c is same how should i create circuit and write program for this purpos?
 

Hi,
I2C pins are RC4 and RC5, while ADC pins are RC0, RC1, RC2, RC3, RC4 and RC5. So, since you are using I2C, you need RC4 and RC5 for I2C, then use either RC0, RC1, RC2 or RC3 for ADC, what's the problem?

Hope this helps.
Tahmid.
 

i want to use all of adc.
its means i want to use six adc inputs and i2c as well
 

Hi,
In that case, you have to use software I2C. In the compiler that I use, mikroBASIC, there are in-built library functions for using Software I2C modules.

Hope this helps.
Tahmid.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top