8085 weird problem

Discussion in 'Embedded Systems and Microcontrollers' started by prescott2006, Oct 7, 2009.

  1. prescott2006

    Thread Starter Active Member

    Nov 8, 2008
    72
    1
    we were requested to interface 8085 with memory and led,then a routine need to be written to make the led light up one at a time with delay 1 second.we have simulate the program and it run perfectly but when we test on the circuit we built it doesn't work.after a lot of trial and error,finally we found that answer,the 8085 does not recognize DCX,it only recognize DCR,so we only change the DCX in our original program to DCR to perform delay.do you guy know why the 8085 behave like this?simply does not recognize the DCX instruction.our lecturer also say never seen this before.
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    I don't remember a DCX instruction in the instruction set, but it is supposed to decrement a register pair. Maybe the assembler has an error or the chip is a counterfit. Check the opcodes
    Code ( (Unknown Language)):
    1.  
    2. [FONT=MS Mincho]|DCX B  |0B|-----| 6|Decrement BC            |BC=BC-1 |[/FONT]
    3. [FONT=MS Mincho]|DCX D  |1B|-----| 6|Decrement DE            |DE=DE-1 |[/FONT]
    4. [FONT=MS Mincho]|DCX H  |2B|-----| 6|Decrement HL            |HL=HL-1 |[/FONT]
    5. [FONT=MS Mincho]|DCX SP |3B|-----| 6|Decrement Stack Pointer |SP=SP-1 |[/FONT]
    6.  
     
    Last edited: Oct 7, 2009
Loading...