TBLRD instruction PIC18
-
Hi, I am trying to read program flash on a pic18f67k22. From the datasheet... "The TBLRD instruction is used to retrieve data from program memory and places it into data RAM" example in ASM... TBLRD*+ How do I execute "TBLRD*+" in 'C'? - Thanks
“If I had asked people what they wanted, they would have said faster horses.” ― Henry Ford
-
Hi, I am trying to read program flash on a pic18f67k22. From the datasheet... "The TBLRD instruction is used to retrieve data from program memory and places it into data RAM" example in ASM... TBLRD*+ How do I execute "TBLRD*+" in 'C'? - Thanks
“If I had asked people what they wanted, they would have said faster horses.” ― Henry Ford
Check out the documentation of the compiler you are using, possibly it provides a builtin function for this very purpose (for instance, the
C30
compiler, forPIC24
devices, has something like that). As an alternative method you may always use inline assembly instructions in theC
code (as far as I know all thePIC
compilers support inline assembly). In any case, read carefully the compiler's documentation.THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite
-
Check out the documentation of the compiler you are using, possibly it provides a builtin function for this very purpose (for instance, the
C30
compiler, forPIC24
devices, has something like that). As an alternative method you may always use inline assembly instructions in theC
code (as far as I know all thePIC
compilers support inline assembly). In any case, read carefully the compiler's documentation.THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite
-
Hi, I am trying to read program flash on a pic18f67k22. From the datasheet... "The TBLRD instruction is used to retrieve data from program memory and places it into data RAM" example in ASM... TBLRD*+ How do I execute "TBLRD*+" in 'C'? - Thanks
“If I had asked people what they wanted, they would have said faster horses.” ― Henry Ford
Perhaps use inline assembler, employing the _asm and _endasm directives?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
-
Thanks CP.
“If I had asked people what they wanted, they would have said faster horses.” ― Henry Ford
You are welcome.
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite