Menu

Is there a USB tutorial for use with PIC16F1459

2023-02-12
2023-03-22
  • David Briscoe

    David Briscoe - 2023-02-12

    Hi,
    I've noticed that there is a USB solution example in the Demo folder that uses the PIC16F1459. Is there a tutorial available on how to set up the PC side of the communication link? Is there a PC application (command line based or GUI based) available that can send and receive data to/from the demo? Or does the user have to write their own USB serial application? How did you test this example? Thanks.

     
  • Anobium

    Anobium - 2023-02-12

    Yes. In the demo folders (same files as on GitHub).

    The demo folders has as the code and sample USB applications.


    Also, I posted https://www.youtube.com/watch?v=9N2XnQ7gdkU and there may be others. I cannot remember.


    Also, if you get started then I will gladlt help you get this documented.

     

    Last edit: Anobium 2023-02-12
  • Willem

    Willem - 2023-03-21

    Hi, i have tried that DEMO code for a USB connection, but I only have a 18F4550, I did change the device in the code, but it does not seem to work, the USB Utility only say "USB not connected."
    Anobium, that link you gave David Briscoe is a You tube, and start off with the USB Utility all ready connected, very nice. is there not a beter explanation how to set up USB please?

     
  • Anobium

    Anobium - 2023-03-21

    Hello Willem.

    Does the PC ( Windows?) recognise the USB connection if terms of the device driver ? What is the Device ID and Name?

     
  • Willem

    Willem - 2023-03-22

    Hello Anobium,
    Thanks for the quick response, I'm using the program as is from Hugh & Evan, so id and name is as in the program. No, PC sees nothing, what is also worring is the compiler complains about the osc frequency, does not like 6 or 48 Mhz . According to the 18F4550 data sheet the ic's int Osc can run at both those Frequencies, if I read it right, English is not my best language. and also the keeping alive led just stays dead, looks like ic is not running.

     
    • Anobium

      Anobium - 2023-03-22

      I am Evan.


      See C:\GCstudio\GreatCowBasic\demos\USB_Solutions\GreatCowBASIC_Solutions\LIBWINUSB_Solutions\USB GCBlib demos 45k50.gcb I just compiled here. No issue for that chip - the 45K50. The 45K50 has an internal osc that supports the frequency.

      This worked in the past. We need to get the PC to recognise the USB/PIC device. So, your chip you will need and external clock and you will need to set the CONFIG to the correct settings for 48Mhz.

      See this thread for advice on setting the CONFIG - https://sourceforge.net/p/gcbasic/discussion/579126/thread/eacb47aa/

       
  • Willem

    Willem - 2023-03-22

    Thanks Evan will check it out, and let you know if there is more troubles

     

Log in to post a comment.