>-----Original Message----- >From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] >Sent: 02 February 2005 20:14 >To: piclist@mit.edu >Subject: Re: [PIC]: using I2C and SPI at the same time? > > >worse case scenario, you can use a couple of AND + 1 inverter >gates and an extra I/O pin to do both as the following crude >ascii picture shows > > > ---- > +----| \ > | | |------ Clock for i/2c > +----------| / > | | ---- > | | ---- > | A --+----| \ > | | |------ Clock for spi >B ----+--|>o-----| / > ---- > >where A is connected to the pic pin that has the shared >i2c/spi clock lines and B is connected to another pic pin >which control which clock line is valie at the output of the >AND gates, depending on its logic state. > >Of course that this has the down side of using a pin from the >just for the purpose of controling i2c/spi clock lines. Further to my last comment, this system would not support any slave that implements clock stretching. An analog switch or just a MOSFET would however. Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist