So armed with a new breadboard I started putting together my 8051 board design. You can find the schematics in Github link.
Plugging jumper wires into a breadboard is so easy and fast. If only soldering a board were this easy.
Double checked that all the connections accord with the schematic. (I find the practice of drawing a schematic first and following that to be good discipline.) Then tested the connections with a continuity meter. Found that the chips didn't seem to be connected to the power bus. Traced it a bit and realised that the power buses on the breadboard have two sections and if one wants to use a common power supply for both sections one has to jumper them. Looking closely at the breadboard, I see that the coloured lines next to the buses are in two sections, indicating this.
Programmed the EEPROM with the standard 1 Hz blink program. Powered up the circuit. Nothing happened. Well no smoke is a good start. 😊 Measured some voltages at pins. Nothing out of the ordinary.
Figured that this must be a rookie error so I go back to the computer and look at some 8051 board designs on the Internet. In particular I'm interested if I have interpreted correctly the semantics of the /EA, ALE, and /PSEN outputs from the MCU. There are slight variations in interpretation depending on whether the designer also activated /OE on the EEPROM, but I seem to have understood those signals correctly.
Do I have a faulty 74LS373? Put the chip in my EPROM burner which also has a logic chip test function. In good working order.
Then I looked closely at my latch circuit. Ahahahaha, stupid me. I'm supposed to latch the lower byte of the address, not the data. I'm supposed to leave to meet a friend in half an hour but I decided that it will only take me 5 minutes to swap around the low address bus and data bus with the breadboard jumpers so I that am not in suspense until I get home.
This time the LED lights up but doesn't blink at 1 Hz. Wait a moment, it just went off. Then on again. 5 seconds on, and 5 seconds off. Ahhhh, I must have the timing constant wrong. Look in the code. Sure enough, where I wanted a delay of 4 ms I programmed a count of 40000, 10 times as much. So the LED was blinking at 0.1 Hz. But I'm happy the circuit works so I decided to wait until I get home later to fix the code and correct the schematic.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.