8085 address question.....

t06afre

Joined May 11, 2009
5,934
How do you flash your LED. Do you have some sort IO circuit like the 8255 or do you just use a simple addressable data latch. I for my part have no clue what SOD is. A schematic would REALLY help. Also what is the SIM statement. Is it some directive to the simulator
 

Papabravo

Joined Feb 24, 2006
21,225
Who to do this and why??
The stack pointer (SP) should be initialized to 0x5FFF for absolute safety.
You have to do this because the stack poiter is decremented by a CALL instruction to save the return address. The code as you wrote it will push the return address into non-existant memory.
Rich (BB code):
    LXI,  H,5FFFh
    SPHL
Now the retrun address from the call to DELAY will go to 0x5FFE and 0x5FFD and the byte at 0x5FFF wil never be used.
 

Papabravo

Joined Feb 24, 2006
21,225
I have already post the code..
which clearly speak that it is Serial output at SOD pin...!!
I m not using any peripheral device.
It is a gentle hint that the 8085 will have a hard time driving the LED directly.

The IOL spec is 2 mA @0.45 volts for a low
The IOH spec is 400 uA @ 2.4 volts

If it lights at all it will be DIM. How DIM depends on how you hooked it up. That's why we need to see a schematic. Do you grok that?
 

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
Now the return address from the call to DELAY will go to 0x5FFE and 0x5FFD and the byte at 0x5FFF wil never be used.
for this reason i will change my code to 4000H to 4010H as my chip enable will be connected from y2 i.e. 4000h to 5FFFFH...
i think now its OK..!!
 

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
It is a gentle hint that the 8085 will have a hard time driving the LED directly.

The IOL spec is 2 mA @0.45 volts for a low
The IOH spec is 400 uA @ 2.4 volts
I have connected my LED directly to SOD using 56ohms between Gnd and LED.

and i am trying to make schematic on paper pls wait for that...i will do it soon.
 

Papabravo

Joined Feb 24, 2006
21,225
I have connected my LED directly to SOD using 56ohms between Gnd and LED.

and i am trying to make schematic on paper pls wait for that...i will do it soon.
As you can see from the specification you have chosen the worst way to connect an LED directly. Depending on the type of LED 400 uA @2.4 Volts may not be enough to turn the LED on. The forward voltage of a RED LED is in the neighborhood of 1.8V and usually requires 10 mA.

For best results with a direct connection go Vcc -> 56 Ohm Resistor -> LED Anode| LED Cathode -> SOD

With this connection you have 2 mA of drive capability before VOL starts to rise. You may need to recalculate the resistor 56 ohms seems a bit small,
 

Papabravo

Joined Feb 24, 2006
21,225
why..??
and i am ready to use a transistor( BC 558 or 547 or 3904) as an switch..!!
should I??
LOOK at the current specs
VOL = 0.45V @ 2 mA
VOH = 2.4 V @ 400 uA
The 8085 can sink more current than it can source. How many times do I have to go over the same point. If you use a transistor then you can go either way but remember there is an inversion going through a transistor.

For an NPN: a low into the base means the transistor will be off an the collector will be at VCC. A high into the base through a resistor will turn the transistor on making the collector very close to ground. This assumes the emitter is at ground.

For a PNP a low into the base through a resistor will turn the transistor on. A high into the base will allow it to turn off.
 

t06afre

Joined May 11, 2009
5,934
Your diode on pin 4 is backwards
You must use IO/M to qualify the address decoding. It should go to either G2A or G2B. Then the decoder outputs will only go low for memory access to ROM or RAM
I did not do any work on the 8085.I was more a Z80 man. But would it not be more easy for us and the OP if he stick with memory mapped IO for now. And perhaps also use buss driver circuits 74xx245 for the data buss. And maybe also use this circuit for the rest of the of the unlatched address buss. Since it is very prototype board friendly. All the inputs are on the same side. And all outputs on the other side.
 
Last edited:

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
Rich (BB code):
--------------------------------------------------
8085 DISASSEMBLER LISTING
Line   Addr Opcodes     Label   Instruction
--------------------------------------------------

0001   0000 21 10 40            LXI H,4010H
0002   0003 F9                  SPHL
0003   0004 3E C0       L0002:  MVI A,0C0H
0004   0006 30                  SIM
0005   0007 CD 13 00            CALL L0001
0006   000A 3E 40               MVI A,40H
0007   000C 30                  SIM
0008   000D CD 13 00            CALL L0001
0009   0010 C3 04 00            JMP L0002
0010   0013 3E 1F       L0001:  MVI A,1FH
0011   0015 47                  MOV B,A
0012   0016 3D          L0004:  DCR A
0013   0017 05          L0003:  DCR B
0014   0018 C2 17 00            JNZ L0003
0015   001B FE 00               CPI 00H
0016   001D C2 16 00            JNZ L0004
0017   0020 C9                  RET

---------------------------------------------
LIST OF LABELS
Sorted by address:      Sorted by name:
---------------------------------------------

L0002:  0004            L0001:  0013
L0001:  0013            L0002:  0004
L0004:  0016            L0003:  0017
L0003:  0017            L0004:  0016
 

t06afre

Joined May 11, 2009
5,934
As I understand you are a student on some university or technical school. Have you been to the library to check if they have any books about this. To me it looks like you are eager. But at this time do not have the breadth of technical competence. For this kind of project yet. That why I did recommend you using some microcontroller. As those are more easy to handle. And you will still learn every aspect of programming controller units by playing with them. But back to the library. Check if they deep down in the book cellar have some e books written by James W. Coffron. Look for the titles "Practical hardware details for 8080, 8085, Z80, and 6800 microprocessor systems" or "Getting started with 8080, 8085, Z80, and 6800 microprocessor systems" I have used both my self. And I actually have kept one of them. The Practical hardware details book. The other got lost some place.
 
Top