On demand post, for my dear juniors 😛 .
This blog post consist of using two software for programming ATMEL AT28C256 ROM for INTEL 8085 based project, namely
1. 8085 simulator that came up in CD with book Microprocessor Architecture, Programming and Applications with the 8085 and
2. unipro programmer for burning code to ROM.
Here is a sample program that is like blink led of 8085, we will burn this to test send bits from SID to SOD.
.ORG 0000H LXI SP,0FFFFH NEXT: RIM ANI 80H ORI 40H SIM JMP NEXT .END
Below is a PDF that contains the steps to code in assembly and thus generating MASM listing and hex file. This generated hex is need to be uploaded to ROM via unipro programmer.
Here is the output file in hex format 8085_programming_sid_sod_compiled.tar .
Some common errors/precautions while working on 8085 project.
SID SOD Test not working (Assuming a push button on SID pin and an Led on SOD pin):
1) Make sure 8085, EEPROM, address latch and address decoder for EEPROM are connected and the Vcc and Gnd pins have a drop of approximately 5V across them.
2) If using ZIF socket, check the pins of ZIF are not bent during insertion. It’d be better to remove ZIF and confirm this, rather than testing for continuity via multimeter. The multimeter may beep even on a feeble connection.
3) Check pin 37(clock out) of 8085. It must show a voltage of approximately 2.5V if powered by a 5V supply. The waveform obtained should be a square wave of half the frequency of the crystal.
4) The capacitor used with the crystal must be 22pF. The crystal with frequency 4MHz or less works fine.
5) Check that logic at pin 5(SID pin) of 8085 toggles when pressed. Check that same happens at pin 4(SOD pin). If both are confirmed, then check if the SOD led is connected in the right polarity.
NOTE: The check for continuity (shorting) via multimeter must always be done with power off.
6) If none of these work, open schematic and check all the connections of 8085, EEPROM, address latch and address decoder for EEPROM are complete. The schematic and board must be consistent. Switch to board and deselect all layers except unrouted. Check if any connection remains unrouted.
7) Lastly, try replacing all the four components one by one making sure they are connected in the right polarity.
Output Latch not working:
1) If using seven segment displays, check if they are common anode or common cathode and OUT the corresponding values.
2) If female berg strips are used as socket for 7 segment, try applying a little pressure on the display as these tend to be loose
3) Correct address for output ports must be entered after OUT command (if IO mapped) and check if they are memory or IO mapped.
Common errors during code:
1) .ORG is missing or pointing to wrong location
2) The stack pointer is not initialised
3) Attempting to write in ROM during runtime. For example if you have 32KB RAM and 32KB ROM(and assuming ROM occupies upper set of memory locations), the following set of instructions are invalid:
LXI H, 2000H
MOV M, A
Writing in memory (during execution) is only possible after 0FFFFH memory location (beginning of RAM).
LXI H, 8000H
MOV M, A
This works fine.
4) A zero has to be prefixed if the hexadecimal number starts with an alphabet. For example, C0H is invalid. 0C0H works fine and the code will assemble.
5) Make sure to select “Generate hex file also” to get the hex file in the Oshon software.
6) When uploading a code in Unipro, if a diagram of programmer’s ZIF appears, showing some red locations, then either the legs of EEPROM is not inserted properly or EEPROM is damaged. Consider changing EEPROM.
7) The “Communication Error” can usually be dealt with by closing and reopening the Unipro.
I urge others who have had experience with 8085 to share any additional things they would like to suggest and probable errors they made, in comments below.
लो करलो अयेश (टू माय डिअर जूनियर्स ) 😉