Has anyone used writecode with 18F ??


Closed Thread
Results 1 to 2 of 2
  1. #1
    Marten's Avatar
    Marten Guest

    Default Has anyone used writecode with 18F ??

    Please help me a little.
    Many people seem to read my messages, but no comments ?
    Melanie, anyone, heeelp .. :=)

    I dont know how to write 8 bytes in a block with writecode
    i'm perhaps stupid, but i'm not getting any smarter without some help either, give me a hint atleast ..

    Marten
    Last edited by Marten; - 1st March 2005 at 09:34.

  2. #2
    Marten's Avatar
    Marten Guest


    Did you find this post helpful? Yes | No

    Talking I found a solution @ piclist ! (Thanks Bruce!)

    this actually works:

    This code snippet copies a bunch of bytes to a different location in codespace.

    simple, when you know...

    '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@

    I var byte ' Loop count
    D var word ' Data
    A var word ' Address
    Y var word
    x var byte

    Y=$0000 'Location to copy data from
    A=$04F0 ' Location to copy data to

    main
    For x = 0 to 9
    Lcdout $fe,1,"Copying Data ! "
    For I = 0 To 14 ' Loop 14 times
    Readcode Y,D ' Read Data and copy it to new location
    Writecode A,D ' Send value in D to code space location A
    A = A + 1 ' Increment Address
    y = Y + 1
    pause 10
    Next I
    Pause 1
    Next x

    goto showme

    showme:

    A= $04F0

    For I = 0 To 72 ' Loop 72 times
    Readcode A,D ' Get data in location A
    Lcdout $fe,1,"Data:",hex A,":",hex D ' Display the location and data
    Pause 1000
    A = A + 1 ' Increment Address
    Next

    End

    goto main

Similar Threads

  1. Bootloader For 18F4520
    By isaac in forum mel PIC BASIC Pro
    Replies: 36
    Last Post: - 24th March 2010, 17:56
  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. Can anyone help me to use Writecode for pic18f458 ?
    By dip1 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 28th June 2006, 22:29
  4. I need help with writecode
    By Marten in forum General
    Replies: 2
    Last Post: - 2nd March 2005, 22:15

Members who have read this thread : 1

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