18F87J50 message question


Closed Thread
Results 1 to 12 of 12
  1. #1
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default 18F87J50 message question

    Can someone give me the cliff notes version of what this means when I compile my program:

    Code:
    SFRs REFOCON, ODCON1, ODCON2, ODCON3, PADCFG1, MEMCON, ANCON1,
    ANCON0, and CVRCON should be accessed in alternate memory space
    with names REFOCON_ALT, ODCON1_ALT, ODCON2_ALT, ODCON3_ALT,
    PADCFG1_ALT, MEMCON_ALT, ANCON1_ALT, ANCON0_ALT, and CVRCON_ALT.
    Do I need to rename some things in my code? It's just a message but not sure to what extent something won't work later on down the road when I start adding lots of code.

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,557


    Did you find this post helpful? Yes | No

    Default Re: 18F87J50 message question

    Hi,
    From the datasheet, section 5.3.5.1:
    In several locations in the SFR bank, a single address is used to access two different hardware registers. In these cases, a “legacy” register of the standard PIC18 SFR set (such as OSCCON, T1CON, etc.) shares its address with an alternate register. These alternate registers are associated with enhanced configuration options for peripherals, or with new device features not included in the standard PIC18 SFR map. A complete list of shared register addresses and the registers associated with them is provided in Table 5-4.
    My guess is that PBP handles this sharing/multiplexing of SFR adresses for you as long you use the _ALT designator when accessing the SFRs mentionend in the warning - but that's just a guess. If you're not actually using any of the SFRs mentioned in the warning there's obviously nothing to worry about.

    /Henrik.

  3. #3
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: 18F87J50 message question

    Thanks for the reply Henrik. These aren't warnings, they're messages. The program runs fine, with the exception I can't get it to enumerate via USB, but it may be due to some other settings I have to change.

  4. #4
    Join Date
    Sep 2009
    Posts
    748


    Did you find this post helpful? Yes | No

    Default Re: 18F87J50 message question

    Maybe this will help you:
    http://www.picbasic.co.uk/forum/showthread.php?t=15322
    And here is example that worked for me with 8MHz crystal.
    http://www.picbasic.co.uk/forum/show...812#post106812
    And I use this for shared sfr:
    Code:
    @ Bsf WDTCON,ADSHR; Enable write/read to the shared SFR
    ANCON0_ALT =255
    ANCON1_ALT =%11011111
    @ Bcf WDTCON,ADSHR ; Disable write/read to the shared SFR

  5. #5
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: 18F87J50 message question

    @ Pedja - Thanks. Your program worked just fine. My PBP portion of the code works fine but I can't get it to enumerate. It won't even make the sound like it tried. When a USB device won't enumerate, what is the most common problem?

  6. #6
    Join Date
    Sep 2009
    Posts
    748


    Did you find this post helpful? Yes | No

    Default Re: 18F87J50 message question

    I don't know... It could be any thing...
    Did you try to use DT HID?

  7. #7
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: 18F87J50 message question

    Quote Originally Posted by pedja089 View Post
    I don't know... It could be any thing...
    Did you try to use DT HID?
    You mean to write my code? No. I used it to verify my code is an issue.

  8. #8
    Join Date
    Sep 2009
    Posts
    748


    Did you find this post helpful? Yes | No

    Default Re: 18F87J50 message question

    Then try it

  9. #9
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: 18F87J50 message question

    I did before. If there was an error, VB would freeze and the program would close. Do you have that problem?

  10. #10
    Join Date
    Sep 2009
    Posts
    748


    Did you find this post helpful? Yes | No

    Default Re: 18F87J50 message question

    I think that is same for pc app if you are using DT HID, or something else.
    Probably you have bug in your vb6 app.
    You have my app and code, try it... And from that buildup your code on both side.

  11. #11
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: 18F87J50 message question

    I have four other VB6 programs that I made with the same version and they don't freeze up like this. When you are are programming and testing the VB6 software, what happens if you hit play and then about 5 seconds later hit stop? Does it stop and allow you to edit or will it freeze and crash?

  12. #12
    Join Date
    Sep 2009
    Posts
    748


    Did you find this post helpful? Yes | No

    Default Re: 18F87J50 message question

    I don't have board right now to try it...
    I think it freezes, but that doesn't have anything with DT HID.

Similar Threads

  1. HID USB on 18F87J50
    By pedja089 in forum USB
    Replies: 56
    Last Post: - 25th August 2011, 09:24
  2. Serout and 18F87J50
    By Glenn_Webber in forum Serial
    Replies: 8
    Last Post: - 20th November 2009, 14:26
  3. message 306
    By chip_select in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 16th March 2008, 19:45
  4. 18F87J50 Success
    By GeoJoe in forum General
    Replies: 0
    Last Post: - 28th October 2007, 01:52
  5. SMS message
    By angelika in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th June 2005, 14:47

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