0

My application requires 8051 with external RAM 32K(62256) I plan to use one chip(62256) to address 32k, and I want to use the other 32K to access GPIO like higher 32k goes to RAM & lower 32k to keypad and other GPIO peripherals is this possible to do so?

  • I’m voting to close this question because it really belongs on the [EE Stack Exchange](https://electronics.stackexchange.com/) – Jerry Coffin Apr 13 '22 at 04:28
  • @JerryCoffin Why do you close vote and answer at the same time? If a question is off-topic, then why do you answer it? – Lundin Apr 13 '22 at 06:34
  • Also I'm not sure if questions about 8051 belong on electrical engineering or https://retrocomputing.stackexchange.com/. It's certainly not good electrical engineering to use 8051 in new projects. – Lundin Apr 13 '22 at 06:40
  • @Lundin its just simple project read keypad data, set ADC value(mcp4821) display that value read temp. I choose at89s52/8253 because I had them lying around and then work with 5 V just like the mcp4821 not worth putting 3.3v buck converter and all for this. – varun_koganti Apr 13 '22 at 08:15
  • Pretty much all modern MCUs are 3-5V tolerant though. – Lundin Apr 13 '22 at 10:15
  • @Lundin yes they are, the project is a temperature controlled soldering iron. I have 24V DC step down to 5V using a linear regulator (horrible!!!! I know. "Should use a SMPS"). AT89S52/8253 is just a processor i had lying around and it was collecting dust. So why not? This is a simple project & 33MHz is more than enough. Does not need > 120MHz of newer processors. Its just there & I want to use it, I kinda miss not doing memory maps of 8051s. did it last in 2017. – varun_koganti Apr 13 '22 at 14:14
  • For hobbyist projects, just use any junk you have lying around, obviously. I'm speaking of professional use. The main problem with 8051 is that it's so incredible antique and obscure, even by 8-bit MCU standards. All 8-bitters in general are needlessly slow and needlessly complicated to use, they come with tons of subtle crap like weird addressing modes, implicit promotion bugs, horrible arithmetic and so on. People ran out of arguments for using 8051 somewhere around 1995 and arguments for using 8-bitters somewhere around 2010. And yes your linear regulator will get very hot... – Lundin Apr 13 '22 at 14:22
  • @Lundin: because if/when it gets moved where it belongs, the answer should be moved with it. – Jerry Coffin Apr 13 '22 at 17:00

1 Answers1

0

Yes, it's possible. In this particular case, it's even pretty simple/easy.

You're splitting the address space in half. When you address the lower half of the address space, A15 will be low. When you address the upper half, A15 will be high.

The 62256 has an active low chip-enable pin (CE#), meaning the chip is enabled only when CE# is low. You want to enable the 62256 only when A15 is high, so you'll connect A15 on the 8051 to an inverter, and from there to CE# on the 62256.

Although you haven't described the other chips in any real detail, the same basic idea applies with them--you wire up logic that enables each chip if and only if the address is in the correct range. For example, let's say you have some peripheral that looks to the processor like 256 bytes of memory. To keep things really simple, let's assume this peripheral has an AD0 through AD7 that it uses for addresses and data, and uses the same bus cycles as an 8051.

Since you want the CPU to see that chip in the first 256 bytes of the address space, that means it should be active only when all the higher address lines (A8 through A15) are low. So, we feed them into an 8-input OR gate, so its output is high if any of its inputs are high.

So, as a starting point, your decoding circuitry would look vaguely like this:

enter image description here

This is just a sketch though. Just for example, you'll also need circuitry for the OE# pin on the 62256, which will be activated by the WR# pin on the 8051, and unless the bus cycles for the other chips happen to match perfectly with those for the 8051, you'll end up with (for example) some buffers to hold data coming from one until it's time to send it to the other.

Jerry Coffin
  • 476,176
  • 80
  • 629
  • 1,111