1
\$\begingroup\$

I am new to microcontroller programming, and am about to lay hands on the 8051 AT89C51.

I want to do some basic things like flashing LEDs, microcontroller to microcontroller data exchange etc.

I have no intention to use external memory or things like that. So, I have no work with the ALE or PSEN pins. I have learnt that in this case I have to connect the EA pin to VCC.

Now my question is, what do I do with the PSEN and ALE pin connections. Do I leave them unconnected, ground, or connect them to VCC?

\$\endgroup\$
12
  • 1
    \$\begingroup\$ You haven’t told us exactly which 8051 chip you’re using - there’s quite a few. Assuming the chip you’re using has internal flash, then psen and ale can be left unconnected. As to why you’d start with the 8051 in this day and age is beyond me. 20 years too late! \$\endgroup\$
    – Kartman
    Commented Oct 3, 2021 at 11:26
  • \$\begingroup\$ Sorry, i forgot to mention, edited the question. I'll be using AT89C51. It has flash EPROM. \$\endgroup\$
    – shafik
    Commented Oct 3, 2021 at 12:45
  • \$\begingroup\$ I actually had previous knowledge of the intel x86 syntax. Seems like the 8051 is still used, and I wanted to stick to the CISC and as far as I had known, 8051 and all those intel things are CISC. Learning the 8051 seemed much easier and simpler to me, don't know about others. I wanted to know though, and actually, did some investigation, which would be better, 8051 or AVR. I would never do PIC. But did not get any significant clue as to which I should choose and why. \$\endgroup\$
    – shafik
    Commented Oct 3, 2021 at 12:54
  • 1
    \$\begingroup\$ I wouldn’t get too hung up in on CISC vs RISC - its sort of meaningless once you get to ARM as it has way more instructions than the 8051. Just thought of another compelling reason against 8051 - no onchip debug. At least not on the chip you’ve mentioned. \$\endgroup\$
    – Kartman
    Commented Oct 3, 2021 at 20:09
  • 1
    \$\begingroup\$ Don't listen to them. Many modern devices still use 8051 derivatives, and the architecture is easy to understand which makes it a good MCU to learn about. \$\endgroup\$ Commented Oct 3, 2021 at 22:20

1 Answer 1

2
\$\begingroup\$

Now my question is, what do I do with the PSEN and ALE pin connections. Do I leave them unconnected, ground, or connect them to VCC?

Download the datasheet for the particular AT89C51 variant you have, and study it carefully. This should tell you everything you need to know.

PSEN and ALE are outputs, so connecting them to ground or Vcc would be a bad idea. ALE can be set to output at 1/6 the oscillator frequency, which you might find useful. It may also be used as the program pulse input (/PROG) during Flash programming - another reason not to tie it to a supply rail.

\$\endgroup\$
3
  • \$\begingroup\$ Yeah, I did that. But maybe grounding would also be almost same. Maybe connecting to VCC would also not make a difference. It's output anyway. And yeah, the 1/6 clock is a good thing. Anyway, for now I have no business with the PSEN and ALE pins, and the MC is working as desired and expected with the pins unconnected. So I am happy with them unconnected. \$\endgroup\$
    – shafik
    Commented Oct 5, 2021 at 16:09
  • \$\begingroup\$ However, I did not find anything significant in the AT89C51 datasheet concerning the ALE and PSEN pin connections when not used. They just seemed to present that they are basically output pins. So, left them unconnected as the first suggestion comes to mind and as suggested here. It worked out fine, so, not concerned with the other options anymore for now. \$\endgroup\$
    – shafik
    Commented Oct 5, 2021 at 16:14
  • \$\begingroup\$ Anyway, thanks. \$\endgroup\$
    – shafik
    Commented Oct 5, 2021 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.