Readcode problems


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Location
    UK-Midlands
    Posts
    84

    Default Readcode problems

    Hi,

    Have been experimenting with putting ASCII data in to code space and it didn't work as I expected. Hopefully someone will point out my stupid mistakes!!

    Using a PIC18F2525 with PicBasicPro 2.50 (has been tested with 2.60)
    Here is what I have found already;

    1. ASCII Code is written to the PIC correctly at program time.
    2. ASCII Code will read and display correctly if reading in same 8k memory page.
    3. If memory location is set outside the 8k page it will only return zeros.

    Have checked manual and can find no mention of limitations to using 'READCODE'. Have I missed something?

    I have attached the test program and the asm file with the ASCII data.

    Thanks,
    Bob
    Attached Files Attached Files

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Readcode problems

    Your program works fine here on an 18F4525.
    I don't have a 2525, but they are pretty much the same except for the number of pins.

    I can put the data anywhere in program memory and it still works.

    What do your CONFIG's look like?
    If you have any "Table Reads" protected it could explain it.

    You should have these as your configs ...
    Code:
            __CONFIG    _CONFIG1H, _OSC_HS_1H
            __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
            __CONFIG    _CONFIG3H, _PBADEN_OFF_3H
            __CONFIG    _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
    DT

  3. #3
    Join Date
    Mar 2004
    Location
    UK-Midlands
    Posts
    84


    Did you find this post helpful? Yes | No

    Default Re: Readcode problems

    Hi Darrel,

    Many thanks for your reply. Once again another valuable reply, you were spot on.

    I spent hours looking for what I was doing wrong. 2 min after reading your post it now works. I just changed the fuse settings on the programmer.

    Many thanks again,
    Bob

Similar Threads

  1. Erasecode,Writecode,Readcode - again
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 4th May 2012, 23:10
  2. Readcode
    By cncmachineguy in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th March 2011, 10:54
  3. READCODE and WRITECODE for a PIC16F727
    By rsocor01 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th June 2010, 03:57
  4. Readcode in asm
    By joeri in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 27th January 2008, 13:25
  5. readcode on 16F737
    By joeri in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th July 2006, 16:01

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