Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 18th June 2008, 08:17 PM   (permalink)
Wink Can i use two I2C device in 16F877A?

Hello Eric,
yes, I had the same thought. But I rejected it with reference to the slew rate requirements of the I2C signals. But I didn't check it.

Even if my hair ist raising, if it is a serious problem that must be solved, one can use a mini relay to switch. There is no problem with the load or voltage. There are relays which can be controlled directly by the MPU, but one can also use a transistor to drive it. In the net there are a lot of examples available. This solution needs a short delay for debouncing (some ms)between selection of the desired device and the call of the I2C - routine.

I hope, this could be a little help for Hesam.
With regards
Erhard
ESchemainda is offline   Reply With Quote
Old 19th June 2008, 07:03 AM   (permalink)
Default

hi Erhard,
The analog selectors can be used with Video signals, at +5V, my data shows switching times in the order of a few tens of nanoSecs.

Which 'slew rate' are you quoting.?? Look at the HEF series.

I know of other users that have connected analog selectors to PIC's/I2C with success.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline   Reply With Quote
Old 19th June 2008, 08:06 AM   (permalink)
Default

Quote:
Originally Posted by ESchemainda View Post
Hello Eric,
yes, I had the same thought. But I rejected it with reference to the slew rate requirements of the I2C signals. But I didn't check it.

Even if my hair ist raising, if it is a serious problem that must be solved, one can use a mini relay to switch. There is no problem with the load or voltage. There are relays which can be controlled directly by the MPU, but one can also use a transistor to drive it. In the net there are a lot of examples available. This solution needs a short delay for debouncing (some ms)between selection of the desired device and the call of the I2C - routine.
First off, why do you feel the need to do this?, do you have clashing I2C addresses?.

If you do, then simply use another pair of pins to create a second I2C bus, but generally if you've got a clash, it's because you've chosen your devices badly.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 19th June 2008, 08:53 AM   (permalink)
Default

The OP can put a DS1307 (add 0xD0) and a MCP9800 (add 0x90) on the same bus and have no clashes. Should he want to measure 8 different temperatures then he can use the MCP9801 (add 0b1001NNN0) and put 8 of them on the same bus as the 1307 without a clash. You cannot put two DS1307s on the same bus but why would you want two real time clocks in the same system!

If you wanted to measure 16 temperatures and have two real time clocks on your poor little PIC then you can do as Nigel says and implement a software bus. He even has the routines in his tutorial.

Mike.
Pommie is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
16f877A watzmann Micro Controllers 1 9th April 2008 09:41 PM
Two VSS & Two VDD in PIC 16F877A. Suraj143 Micro Controllers 15 22nd November 2007 08:22 AM
RTC with pic 16f877a fernandoagf General Electronics Chat 1 14th October 2007 11:12 PM
pwm and 16F877A williB Micro Controllers 15 12th September 2006 08:08 AM
16F877A help TKS Micro Controllers 9 17th March 2004 12:12 PM



All times are GMT. The time now is 11:18 PM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.