On Wed, 4 Mar 1998 13:33:52 +0200 Pasi T Mustalahti writes: >PTM: If you have a project somewhat critical of pins, you could do >like >this: > > pic PA0 |-----res--| counter > PA1 |-----up---| > PA2 |--R/W-- |_______________________ > | | | |||||| > | | A0 A1..A15 > | | | |||||| > | -----------|-------- |||||| > | | | |||||| > PB0 |--D0/D4-----| 2x4bit |--D0/D4--| > PB1 |--D1/D5-----| tri-state |--D1/D5--| SRAM > PB2 |--D2/D6-----| buffer |--D2/D6--| > PB3 |--D3/D7-----| |--D3/D7--| > >You write and read the data hinible + lonyble. Counter gives you A0 to >select HI, LO. I assume the "tri-state buffer" is a 4-channel 1-2 analog multiplexer. I can see that reading would be no problem, but writing counts on one nibble's data staying in the capacitance of the lines while the other one is written. Also there is the problem of the RAM and PIC being in output mode at the same time, but analog multiplexers have enough on-resistance to limit the current in this case. Maybe the counter's clock line could also be used to enable the multiplexer only after the PIC's tris register had been set up. The sequence for writing would be: R/W high (read), output low nibble from PIC, pulse R/W low. The RAM writes XL, where X is unknown. Advance the counter, output high nibble, R/W still high. At this point, the RAM is reading XL. X may be contending with H if the multiplexer is still enabled, but L is being output to the unselected RAM pins. Now pulse R/W low, the RAM pins become inputs and accept the H nible from the PIC, and rewrite the L nibble that stays on the pins due to capacitance. This would likely work, but it seems rather iffy. If you don't need a lot of RAM, connect only some of the data lines and waste some space in the RAM chip. Too bad you can't buy 4-bit SRAMs any more (well, you can, but they cost much more than 8-bit ones). A certain chip maker really, really, needs to make a PIC with about 2Kbyte of RAM in it. Putting some extra logic with the PIC's parallel slave port so it could easily directly control DRAM would be really cool too. _____________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com Or call Juno at (800) 654-JUNO [654-5866]