Connect with us

Reading from Memory

Discussion in 'Microcontrollers, Programming and IoT' started by electronicsLearner77, Mar 12, 2017.

Scroll to continue with content
  1. electronicsLearner77

    electronicsLearner77

    73
    1
    Jul 2, 2015
    Code:
    #define value_p  (uint16_t *)(0x1002);
    int DataExtract(void)
    {
        uint16_t l_localvalue_u16=0;
        l_localvalue_u16 = *value_p;
        return l_localvalue_u16;
    }
    
    I have written some test code as above. I want to read from program memory at address 0x1002. But I have not specified that 0x1002 is program memory. Will the compiler understands this and gives me data from program memory? My understanding is that compiler knows the complete memory map of a particular micro. I am programming for micro chip dspic family.
     
  2. Amar Dhore

    Amar Dhore

    129
    12
    Dec 2, 2015
    You can check yourself

    try in MPLAB, Window --> PIC Memory Views --> Program Memory
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-