• AVR Freaks

Hot!Error when accessing ports.

Author
Hawks
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2019/09/01 10:52:17
  • Location: 0
  • Status: offline
2019/11/11 12:49:48 (permalink)
0

Error when accessing ports.

This is a Harmony v2_06 USB HID project generated with no BSP, no port support, with interrupt and timer support. I generate the code for my chip PIC230F256B and copy over the USB code and delete the BSP items. Fix a couple of things and it compiles and successfully enumerates. When I attempt to use LATBbits.LATB7 (my LED) & the associated other IO & TRIS etc.. i get  unexpected token errors for both LATBbits and LATB7 & the others. I have done this same process several times successfully, the only things I am adding this time (from harmony) are Interrupt, clock and timer services.
Thanks for your help.
 
 
post edited by Hawks - 2019/11/11 13:02:39
#1

2 Replies Related Threads

    ric
    Super Member
    • Total Posts : 24605
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: Error when accessing ports. 2019/11/11 14:20:22 (permalink)
    0
    Hawks
    ...
    I generate the code for my chip PIC230F256B

    I assume you mean a PIC32MX230F256B
    It's easier to help if you give the real part number.
     
    If you are #including xc.h then it will be dragging in .\pic32mx\include\lega-c\proc\p32mx230f256b.h which DOES have a definition for LATBbits.LATB7
    Are you sure you have the correct PIC device selected in the project properties?
     
     
     
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    Hawks
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2019/09/01 10:52:17
    • Location: 0
    • Status: offline
    Re: Error when accessing ports. 2019/11/11 15:26:30 (permalink)
    0
    You are correct the part number is PIC32MX230F256B. I was able to regenerate the Harmony code again with an entirely new project and have it working now but without the timers. Not sure if that is the problem or how it could be but changing the files without full understanding could also have been the culprit. Clock Services is also very confusing does it overwrite the XT clock source? If I don't turn on clock services then I get an error with SYS_CLK_SystemFrequencyGet(). I guess I have to go and check the clock bits in system config.
    Thanks for your help.
     
    post edited by Hawks - 2019/11/11 16:31:54
    #3
    Jump to:
    © 2019 APG vNext Commercial Version 4.5