About microprocessor 8085..!!

Discussion in 'Programmer's Corner' started by RRITESH KAKKAR, Feb 24, 2011.

  1. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    Hi, i want to know why while programming uP 8085, we start memory location with 2000h??
    & why LXIH is used to save in HL pair, why not in other pair like BC??
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Are you talking about RAM or ROM here. Because if I not remember wrong the reset memory vector on the 8085 was 0000
     
    RRITESH KAKKAR likes this.
  3. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    Its a very old processor,I dont remember much and also I didnt work with it much but I think the your main program starts from 2000H because above that memory location its the interrupt vectors.
     
    RRITESH KAKKAR likes this.
  4. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89

    Hi, please tell why above this memory are interrupt vectors, and what the use of it??
     
  5. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    Hi, i am talking about 8085 training kit, please tell how to study good programming of this old processor??
     
  6. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    Its a big story,you need to know many things before learning interrupts.In short Interrupts are events both hardware (external device called) and software (user called).Think it as a routine(assembly sub routine or function),which could be called any time during the normal execution of your code and when it is called it stop the normal execution of the user program and executes the interrupts function or code and when its done it return backs to the program execution from where it was called.

    I remembered a bit more, I think the above memory not only contains the interrupt vector table but also 8085 used external memory and we use to map it in two part ROM and RAM and the ROM could be of 8K in size and that gives us the address from 0000H to 2000H.So your code starts from 2nd page i.e.. from 2000H in RAM.

    I am not very much sure about it, you should have a look at the datasheet.

    8085 is very old and as per me you should go for any other mcu.I started with PIC from Microchip but if you are looking something like 8085 go for 8051,8052,8053 arch.. from Atmel.

    Good luck
     
    RRITESH KAKKAR likes this.
  7. Papabravo

    Expert

    Feb 24, 2006
    10,137
    1,786
    Nonsense. The interrupt vectors for the 8085 are all in low memory and could be invoked by jamming an RST (RESTART(?)) instuction onto the databus. In addition to the RST 0 through RST 7 instuctions carried over from the 8080 there were three pins called RST7.5, RST6.5, and RST5.5 that when activated provided additional locations for interrupt service routines.

    The reason for putting user code at an address like 0x2000 is that the board probably has either data or code in low memory that serves as a monitor or bootloader. CPM/2.2 used to load programs at 0x0100 reserving page 0 for system stuff.
     
    RRITESH KAKKAR likes this.
  8. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89

    Hi, i have study some basic of it accumulator, registers,etc. but i want to go in deep in it.
    i don't know why interrupt are used like Trap, intr 7.5,6.5,5, etc?? and time cyle how it work??
     
  9. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    Does your school bother to teach the students anything? Don't you have course books?
     
    RRITESH KAKKAR likes this.
  10. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    Have, but i am not getting it clearly.
     
  11. bertus

    Administrator

    Apr 5, 2008
    15,647
    2,346
    RRITESH KAKKAR likes this.
  12. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    Nonsense I dont think so,as per my post it has been said that the interrupt vector table (IVT) is located above 2000H which is in page 00H of 8085 ,I think its in a low memory region.

    Here is a bit more on interrupts of 8085 the much I can remember.....

    Interrupts are two types Vectored and Non Vectored.
    Vectored are address of routines that are hardwired into the 8085 i.e.. the address location is known by 8085 for the interrupt service routine.

    Non Vectored ,these type are the address of the routine that are supplied by external device to 8085.

    Example the INTR input is a non vectored type interrupt and RTS 5.5 , RTS 7.5 ,RTS 6.5 are vectored type.

    And the vector address are contained from address 0000H to 00FFH at page 00H ,some of them I remember is when you call restart instruction
    like RST0 it jumps to memory location 0000H which is same as instruction "CALL 0000H" for RST1 it jumps to 0008H

    So I think all these address are in low memory region and nothing is nonsense about it......
     
  13. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    I have seen many PDF but i want to know exactly why memory starts from 2000H & why we interrupt the uP like trap,etc??
     
  14. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    This is a qualified guess. Due to the layout of the 8085 like reset vector at 0x0000h it was most practical to have the ROM. At the lower address range. Then some RAM at the higher addresses. It is the system designer who placed the RAM at address 0x2000. If your system is some sort of trainer. It will be very awkward to have user programs in the ROM. It will make programming a nightmare. I know as I have programmed embedded Z80 systems with EPROMS back in the days before flash. Therefor in your system the BIOS and other system related code is placed in the ROM starting from 0000. And the user RAM which can be used to entering user programs is placed at address 0x2000. Why the user RAM is placed at 0x2000 you must ask the system designer about. I have no idea.
     
    Last edited: Feb 25, 2011
    RRITESH KAKKAR likes this.
  15. Papabravo

    Expert

    Feb 24, 2006
    10,137
    1,786
    Those features can be used for a wide variety of tasks. In the simplest example I can think of imagine a program which has a list of task to perform. It moves from task to task on its list performing one after the other. When it gets to the end of the list it starts over again at the beginning.

    Now suppose there is some occurrence which requires the processors immediate attention. If the RST6.5 line is asserted then the processor will finish the current instruction and insert a subroutine call to the RST6.5 handler. This handler will perform some function and return to the "calling" program at the instruction that would have been executed it the interrupt had not occurred.

    Does that clear thing up for you a bit!!??
     
    RRITESH KAKKAR likes this.
  16. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    Hi, please put give some good practical examples for interrupt like all Trap,etc.

    thanks.
     
  17. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    You have to learn to crawl before you can walk, and walk before you can run. From your postings I have a feeling that you are still on the crawl level then it comes to the 8085. So my advice to you is allow yourself to have a learning curve. Start simple and then you are confident take a step up. Interrupts are not that difficult. But it is reason for that interrupts always are one of last topics in most CPU courses. Trying to learn all at once will only confuse you
     
    RRITESH KAKKAR likes this.
  18. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    Hi, then please tell what the diffeence in registers pair BC,DE,HL & why we prefer to store memory or data contents in HL pairs??
     
  19. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    Which textbooks do they assign you at your school? What grade or college level is this? Do you not discuss anything with your classmates about assignments?
     
  20. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89

    If you know please help.
     
Loading...