8051 has four ports for I/O .Therefore four peripherals can be connected to it at a time . My question is why doesn't it use the address bus to activate a specific peripheral ...and then use the data bus for input or output ...then we can connect 2^16 different peripherals to our MCU and have any one activated at a single time Of course we'll have different read and write signals for external memory and peripherals . This is how it works in 8085 processor. Using 32 different pins seems like a waste .
-
2\$\begingroup\$ maybe the waste is in the use of additional components \$\endgroup\$– jsotolaCommented Sep 8, 2020 at 6:26
-
1\$\begingroup\$ mcus are a system on a chip, kinda the whole point not to expose the bus outside, keep the system inside. The 8085 processor, the whole point is to keep everything but the processor outside. \$\endgroup\$– old_timerCommented Sep 8, 2020 at 7:08
-
2\$\begingroup\$ Actually, you can use the 8051 in bus mode, too. Quite common as there was no affordable approach for internal program storage for low quantity projects - the EPROM parts cost a premium (OTP was cheaper) and mask ROM required quantity and permanence, so lots ran with a 27xxx external EPROM. If you wanted to, you could have decoded bus peripherals, too. \$\endgroup\$– Chris StrattonCommented Sep 8, 2020 at 7:56
-
\$\begingroup\$ Are you sure it's 4 separate 8-bit ports, and not 1 32-bit port which they had to split up into 4 in order to make it work with an 8-bit processor? Or 32 1-bit ports which they grouped together to make them work with an 8-bit processor? \$\endgroup\$– user20574Commented Sep 8, 2020 at 13:39
3 Answers
One is a processor the other is a microcontroller, two different problems being solved here, in order to do what you can do with the 8051 you need to use a lot logic and an even bigger board to hold the extra chips (from that era, or at least one from this era), very very inefficient.
While configured as four ports from a labeling perspective and in some ways in logic, it can be used as many ports one to a few pins at a time. And often mcus multiplex the pins to allow for different internal peripherals to be possibly used based on the application, even more logic and an even bigger board if you wanted to emulate that with an 8085.
Why cant my compact car haul a cord of wood like a pick up truck can? Just because they have four wheels and a seat doesn't mean they all can do the same thing. Just because they have processors inside and start with an 8 doesn't mean they can be used in the same way. One is for one job, the other is for another, you can by adding more stuff on get one to kinda do the other (add a small trailer, and hope you dont burn out the transmission or engine).
My question is why doesn't it use the address bus to activate a specific peripheral ...and then use the data bus for input or output ...then we can connect 2^16 different peripherals to our MCU and have any one activated at a single time
The 8051 has peripherals built in. If you don't need more than 32 I/O pins then you can build a complete controller with just the 8051 and a crystal. To do the same job with an 8085 you also need external ROM, RAM, address decoding and I/O chips. This will be much more expensive, and might not even fit in the target device.
However unlike many other MCUs the 8051 can also expose its address and data bus for up to 64k of external ROM and another 64k of RAM, while still having 14 dedicated I/O pins. The external RAM space can be used for I/O expansion. However external RAM access is slower and program code cannot be executed from it.
The 8085 is more suited to general purpose computing applications because code can be loaded into and executed from RAM at full speed. The 80C85 was most famously used in the NEC PC 8201 and Tandy TRS-80 Model 100 portable computers.
It looks like there was a need for a minimum parts-count embedded microcontroller and so the 8051 came about - with built in RAM/ROM and more and peripheral interface.
The product line started with the 8085 microprocessor that would need additional chips e.g. RAM, RAM, Address latch, address decoder and a peripheral interface.
So cost-wise, 8051 wins for smallest configurations i.e. 24 I/O's that can directly interface to (input) signal buffers and (output) optical isolators.
i hope this helps.