read memory values

Discussion in 'Embedded Systems and Microcontrollers' started by smee, May 21, 2011.

  1. smee

    Thread Starter New Member

    May 18, 2011
    2
    0
    hello,

    how can we read the values stored in memory locations of RAM like the accumulator,B,bank 0 ,bank 1,bank2, bank 3, SCON, TCON,etc. in microcontroller AT89s51 after burning the program into it.
    I have to use c language for it.
    Can anyone please tell me how can you read and display the values of registers, in the output of the program with an example.
    Thank you.
     
  2. madhusudan.pigeonsembs

    New Member

    Mar 17, 2011
    23
    2
    Will you please clarify more ?
    Actually what you want ?
    You can read the registers directly.
    Each register is having its memory address & some of them will be addressed by their name.
    So what value you want to display , just write the program in that way...
    Or you can take help of internet. Download any Embedded C Book & follow that.
     
  3. smee

    Thread Starter New Member

    May 18, 2011
    2
    0
    i am doing a project for that i need to read the values inside RAM and eprom in the serial window of hyperterminal and using keil for writing program.
    i am done with serial communication and also got how to read values of sfr registers,now i want to read values of eprom but not getting it how to do it.
    like for eg:if we enter a display command D

    we will get output as range of all values inside 00-7F
    or if we write D <00 > <4F >
    we get output as values for a particular range we enter .
     
  4. madhusudan.pigeonsembs

    New Member

    Mar 17, 2011
    23
    2
    You are using AT89s51. But it has no inbuilt EEPROM. So you have to connect the EEPROM externally(via I2C protocol). For reading the data from RAM you can use memory address directly. But for EEPROM , you have to use I2C protocol for data reading or writing if the EEPROM is a serial I2C EEPROM. Make different subroutines for each. Read the data from memory(RAM or EEPROM). Display them on hyper-terminal.
     
Loading...