• AVR Freaks

Hot![REPOSTED IN CORRECT FORUM] PIC24 Sending integer over USB with MCC source files

Author
dsPICable_me
Starting Member
  • Total Posts : 64
  • Reward points : 0
  • Joined: 2019/11/26 12:12:42
  • Location: Kansas City
  • Status: offline
2020/02/04 14:38:46 (permalink)
0

[REPOSTED IN CORRECT FORUM] PIC24 Sending integer over USB with MCC source files

I used MCC to configure the PIC24FJ32GB002 for USB communication to PC. I can send strings to a PuTTY session using the various putUSBUSART function calls as found in usb_device_cdc.c ( e.g. ' putrsUSBUSART("battery voltage = ") ;' ) but I have not found an elegant way of sending an integer. None of the functions in the source file support integers as part of the argument. I have attempted to use itoa first, but it is not supported. I had also hoped that sending a USART command like printf might be put on the USB stack magically, but no. I'm sure I'm missing something simple and I am happy to comb the proper document, but I don't know which one I should be referencing. Section 27 "USB-OTG" for the PIC24 family has nothing and I've searched the forum to no avail. My thanks in advance!
post edited by DanielPLongo - 2020/03/25 07:51:39
#1

2 Replies Related Threads

    dsPICable_me
    Starting Member
    • Total Posts : 64
    • Reward points : 0
    • Joined: 2019/11/26 12:12:42
    • Location: Kansas City
    • Status: offline
    Re: PIC24 Sending integer over USB with MCC source files 2020/02/04 14:41:40 (permalink)
    0
    Wrong forum, sorry.
    #2
    ric
    Super Member
    • Total Posts : 27977
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: PIC24 Sending integer over USB with MCC source files 2020/02/04 16:56:20 (permalink)
    +1 (1)

    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!
    #3
    Jump to:
    © 2020 APG vNext Commercial Version 4.5