Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Multiplexing 8951

Status
Not open for further replies.

JeffreyPeter

New Member
There are only four ports plus one serial port available with 8951 but I need to connect nearly six peripherals like LCD(parallel), Real time clock(serial), EEPROM(parallel/serial), R232(serial), transmitter(serial).....

Is this connection possible with 8951 if so pls list out the methods or components required :confused:
 
Any 8051 can be used. And the external buss can be used to drive memory AND external hardware. However, you have to know how to assign the different hardware to different address blocks. This is done with the use of a 74HC138, which reads the MSBs of the address and sets 1 of is 8 pins low to drive active low chip enable (CE) lines. This breaks the data memory address block of 0x0000-0xFFFF into 8 different "banks" -

Y0 Low/Bank 0 - 0x0000-0x1FFF
Y1 Low/Bank 1 - 0x2000-0x3FFF
Y2 Low/Bank 2 - 0x4000-0x5FFF
Y3 Low/Bank 3 - 0x6000-0x7FFF
Y4 Low/Bank 4 - 0x8000-0x9FFF
Y5 Low/Bank 5 - 0xA000-0xBFFF
Y6 Low/Bank 6 - 0xC000-0xDFFF
Y7 Low/Bank 7 - 0xE000- 0xFFFF

The CE pin of the external memory is driven by Y0 on the 74HC138. This locks the external memory into bank 0. We then use output Y1 on the 138 to drive the input of a NOR gate. The gate "masks" the write strobe from the LCD as long as Y1 is high. You can then use the "movx" instruction to read from or write to your external hardware that is on the bus.

Shown below is the schematic that shows how to interface the LCD to the bus. The 74HC138 locks the 8K memory chip to address block 0x0000-0x1FFF while locking the LCD display to the 0x2000-0x3FFF address block. movx instructions executed on even numbered addresses in the address block of 0x2000-0x3FFF will write instructions to the LCD while movx instructions executed on odd numbered addresses in the address block of 0x2000-0x3FFF will write data to the LCD. The 74HC02 NOR gate "masks" the write pulse "WR" if CS0 from the HC138 is high. CS0 is high unless address the 0x2000-0x3FFF address block.


**broken link removed**
 
Last edited:
So the limit of multiplexing is limited to 8 peripherals ?
THen what software should I use draw schematic similar to yours..... :)
 
Limited to 8 peripherals unless you use a 1-in-16 decoder chip to break the memory banks into smaller address blocks. ;)

But think about it this way...without using the bus or multiplexing you'd be limited to 4 ports anyway. 8 peripherals driven by 2 ports...not a bad deal.

That schematic was drawn in Eagle Layout Editor. You can download the Lite version from http://www.cadsoftusa.com
 
Last edited:
Yes....But nothing else can go on the AD bus unless you control the decoder from another pin.

The Idea of parallel memory is great... faster... but it comes with a larger footprint.. decoder... address latch.

The trade off with serial is, slower access but with a much smaller footprint.

Once you have software I2C you can then use up to 127 devices (theoretically... ) <- most I've seen is about 8 at a time..
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top