Using print statements with PIC32MKGPE100 Development Board?

Author
Edwardsan2
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2019/04/05 11:30:20
  • Location: 0
  • Status: offline
2019/04/16 08:23:49 (permalink)
0

Using print statements with PIC32MKGPE100 Development Board?

Hi all,I'm a total beginner to programming pic32's, and am trying to output ADC converter data to the console using the PIC32MKGPE100 Development Board. It looks like the chip doesnt support the DBPRINTF mentioned in other posts. Any ideas on how I can accomplish this to view the ADC data? I'm using XC-32 ver:2.15, and MPLAB X IDE ver:5.15. Thanks
#1

2 Replies Related Threads

    jg_ee
    Super Member
    • Total Posts : 142
    • Reward points : 0
    • Joined: 2015/04/30 10:54:52
    • Location: Colorado
    • Status: offline
    Re: Using print statements with PIC32MKGPE100 Development Board? 2019/04/17 07:37:49 (permalink)
    0
    You can use the simulator as your programmer, and in project properties you can glue one of the UART outputs to the console or a file.
     
    If you need to debug on real hardware I would loop a serial port back to the computer through a usb-serial converter if you need console output.  You could also view the data in the "Watch" windows as you debug, and save those data structures to file as well.
    #2
    JPortici
    Super Member
    • Total Posts : 622
    • Reward points : 0
    • Joined: 2012/11/17 06:27:45
    • Location: Grappaland
    • Status: online
    Re: Using print statements with PIC32MKGPE100 Development Board? 2019/04/17 08:19:55 (permalink)
    0
    it does support debug/printf/console, albeit not out of the box BECAUSE THE BSP WAS NEVER FINISHED. ONLY THE BUTTONS AND THE LEDS ARE THERE AND THEY ARE WRONG.
    I suggest you read the harmony documentation on how to enable the console (it's on the first PDF IIRC).
    Basically, you have first to set in the pin view the pins associated to an UART Peripheral. For this the UART-USB bridge on the devboard will come in handy, but i don't remember the pins and the associated UART (The schematic is in the devboard user guide)
    Then, you have to add an UART instance and set the uart number to that particular UART.
    Then, enable the debug and console services and tell the console to route printf to the UART instance.
     
    But it's all explained well in the harmony documentation..
    #3
    Jump to:
    © 2019 APG vNext Commercial Version 4.5