writecode - problem - 18F6720


Closed Thread
Results 1 to 4 of 4
  1. #1
    Tomasm's Avatar
    Tomasm Guest

    Default writecode - problem - 18F6720

    Hi,

    I use PBP Pro 2.45, MPLAB 6.4, and Pic 18F6720. I want to write and read from code memory. But my small sample program doesnt work:

    x var word

    ERASECODE $5000
    Pause 20

    x=123
    WRITECODE $5000, x
    Pause 20

    READCODE $5000, x

    hserout [hex x]

    hserout puts out "65535" but it should put out "123". When I read with readcode a word from the program- codespace the right content will
    be displayed.

    I disabled all protect- configurationbits.

    Any ideas where my mistake is?

  2. #2
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Tomasm,

    Check this link out..

    Melanie did a wonderful job with examples

    http://www.picbasic.co.uk/forum/show...ight=writecode

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  3. #3
    Tomasm's Avatar
    Tomasm Guest


    Did you find this post helpful? Yes | No

    Default

    Hello Dwayne,

    i know Melanies answer in this thread, but I cant use the PBP mnemonics, because I work with a 18F6720, so I have to use MPASM.

    And the writecode example from Melanie doesnt work with my 18F6720!

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Dear Tomasm, you can use PBP to do your code. MPASM will only translate your .bas file into an .hex file to be place into your PIC.


    better for you to update MPLAB to new version 6.6x

    after that you have to do EXACTLY the following instruction to include PBP into MPLAB. This will work

    http://www.melabs.com/support/mplab.htm

    don't forget to reboot !!!

    many regards.

    Last edited by mister_e; - 3rd November 2004 at 15:54.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. problem using GOSUB under interrupt
    By fobya71 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 5th March 2010, 19:52
  2. WRITECODE stores wrong 14-bit word values in FlashMEM
    By BobPigford in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 26th June 2009, 04:35
  3. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  4. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59
  5. weird 12F629/675 problem
    By peterdeco1 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 7th October 2004, 01:08

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts