Loading ...
Sorry, an error occurred while loading the content.

Read and write Flash Program Memory

Expand Messages
  • pirulo_gomez_2004
    Hi. I m working with the C18 and I very new using this compiler. I m trying to read and write the program memory with a code like this: #include
    Message 1 of 2 , Jul 25, 2006
    View Source
    • 0 Attachment
      Hi. I'm working with the C18 and I very new using this compiler. I'm
      trying to read and write the program memory with a code like this:

      #include <p18F452>
      #include <stdlib>

      rom int v[5];

      main()
      {
      int i;
      int val;
      char buff[16];
      for (i=0;i<5;i++) // load values in to the array
      v[i] = 2*5;

      for (i=0;i<5;i++)
      {
      val = v[i];
      itoa(val, buff);
      print_lcd(buff); // With this function show the value in
      // LCD module.
      }
      }

      The problem is: Don't work!!!!!!!! The values in the array always
      are 0. Some one test somthing like this?

      Thank's for your time.

      Sergio
    • smt5211
      Hi, Sounds like you ve posted this to the wrong group. Regards, Shane Tolmie www.microchipC.com webmaster@microchipC.com
      Message 2 of 2 , Aug 21, 2006
      View Source
      • 0 Attachment
        Hi,

        Sounds like you've posted this to the wrong group.

        Regards,
        Shane Tolmie
        www.microchipC.com
        webmaster@...

        --- In microchipC_pic18Fx_bootloader@yahoogroups.com,
        "pirulo_gomez_2004" <pirulo_gomez_2004@...> wrote:
        >
        > Hi. I'm working with the C18 and I very new using this compiler. I'm
        > trying to read and write the program memory with a code like this:
        >
        > #include <p18F452>
        > #include <stdlib>
        >
        > rom int v[5];
        >
        > main()
        > {
        > int i;
        > int val;
        > char buff[16];
        > for (i=0;i<5;i++) // load values in to the array
        > v[i] = 2*5;
        >
        > for (i=0;i<5;i++)
        > {
        > val = v[i];
        > itoa(val, buff);
        > print_lcd(buff); // With this function show the value in
        > // LCD module.
        > }
        > }
        >
        > The problem is: Don't work!!!!!!!! The values in the array always
        > are 0. Some one test somthing like this?
        >
        > Thank's for your time.
        >
        > Sergio
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.