Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. TBLRD instruction PIC18

TBLRD instruction PIC18

Scheduled Pinned Locked Moved C / C++ / MFC
questionadobeperformancetutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • _ Offline
    _ Offline
    __John_
    wrote on last edited by
    #1

    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

    C J 2 Replies Last reply
    0
    • _ __John_

      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

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      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, for PIC24 devices, has something like that). As an alternative method you may always use inline assembly instructions in the C code (as far as I know all the PIC 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

      _ 1 Reply Last reply
      0
      • C CPallini

        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, for PIC24 devices, has something like that). As an alternative method you may always use inline assembly instructions in the C code (as far as I know all the PIC 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

        _ Offline
        _ Offline
        __John_
        wrote on last edited by
        #3

        Thanks CP.

        “If I had asked people what they wanted, they would have said faster horses.” ― Henry Ford

        C 1 Reply Last reply
        0
        • _ __John_

          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

          J Offline
          J Offline
          jeron1
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • _ __John_

            Thanks CP.

            “If I had asked people what they wanted, they would have said faster horses.” ― Henry Ford

            C Offline
            C Offline
            CPallini
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups