How does 8032 execute program

microcontroller

I have been studying the 8032 microcontroller. It is mentioned that 8032 doesn't have internal ROM. Now there are few questions I have

  • Do we need an external ROM to execute programs necessarily? Can't we use the 256 byte internal RAM?

  • Suppose I am using the 8032 microcontroller with an external ROM2732 and also using a latch for storing the address (lower order) of port P0.(which may transfer address/data). Now after enabling EA and connecting the PSEN how does 8032 execute the program? What happens if I turn on the system ?(How does the program counter of 8032 microcontroller executes intructions? From which address of external memory the program should be read ?

I have read these manuals-
Intel 8032H Keil , Atmel 80C32E.

Best Answer

If you look at a typical 80(C)32 circuit below (from here):

enter image description here

You can see that the 8032 talks to external EPROM, RAM and EEPROM via a bus - 8 bit data and 16 bit address. The latter is latched and thus demultiplexed with the HCT573. There were some chips with the latch built in designed to be used with the 8031/8032 but the above was the more common configuration- using low-cost standard memory chips. There's also a bit of "glue" logic to decode the addresses and to generate the proper signals for the memories (the HCT138 and the quad NAND).

It is vital that the glue logic is designed such that the EPROM resides at address 0 because after a reset, execution always begins by the 8032 fetching the first byte of the instruction from that address. This is a function of hardware in the 8032 and cannot be changed. Typically the instruction is a 3-byte LJMP instruction that jumps to the beginning of the program. We call that the "RESET VECTOR". Other vectors occupy the bytes immediately above the reset vector- for the external interrupt service routine and timer interrupt service routine.

In those days, the EPROM would be programmed (written to) by a separate programmer outside of the circuit and then typically plugged into a socket. No in-circuit programming in those days. The RAM and EEPROM could be written by the micro, but the program would have to be loaded into the EPROM before any of that was possible.