I haven't tried this myself, but I will be doing trying it in a few days, if I get the time. If this works, you'll only need an inverter and 2 open collector [N]AND gates. You'll be able to better see the following bad attempt at ASCII art with a monospace type font (i.e. courier new) |--- SPI CLK -------| \ | |---------- SPI CLK +----| | | |---/ /\ / \ inverter ---- | |--- I/O PIN --+----| \ | |---------- I2C CLK I2C CLK -------| | |---/ If this does work, seting/reseting the i/o pin determines which clock is active at the time of your transfer. In case you're running low on i/o pins, you have the option of driving your lcd serially with the following http://www.allelectronics.com/spec/EDE-702.pdf which is actually a pic preprogrammed so that you can drive an lcd with just one i/o pin. Good luck. -Mario -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Paul van der Linden Sent: Saturday, July 02, 2005 10:35 AM To: Microcontroller discussion list - Public. Subject: [PIC] Multi SPI and I2C Hi, I'm trying to design a board while waiting for the ethernet chip to become available. The problem is the device are using SPI and I2C, how to connect this to a single PIC, and which PIC do you recommend (18F with enhance flash is preferable)? The problem is, I can only solder normal PDIP packages, no SMD parts. The following things must be connected to the PIC: - 1-8 x memory: 24FC512 (through I2C) - 1 x digital potentiometer: MCP42010 (through SPI) - 1 x ethernet: ENC28J60 (through SPI) - and there must still be enough I/O lines to connected a LCD display (datasheet: http://www.lcdchina.com/PDF/GDM1602A-5.pdf) Paul -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist