USBDemo, something to learn USB a little bit


Results 1 to 40 of 279

Threaded View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default USBDemo, something to learn USB a little bit

    Hi all,
    Since the USB stuff is coming more and more popular, and as we see more and more questions, i decided to post my little contribution.

    OK OK You already asked... but i'm in a good moon today, so let me believe it never been asked before

    The whole thing will use a PIC18F4550 and a 4MHz crystal + few Leds, 2 trim pot... you should be able to figure this out easy.

    There we go, here's the PC interface,

    <img SRC="http://www.mister-e.org/Pics/USBDemo.JPG">

    Sounds good eh?

    With this you can
    1. play with both CCP (PWM) duty cycle and show it on 2 leds attach to your PIC CCP i/o (PORTC.1, PORTC.2)
    2. modify each PORTB bits status as you wish.

    You can also
    1. see the results of AN<1:0> ADC results in the progress bars
    2. monitor the status of those push-buttons attach to PORTA<5:2> inputs (with pull-down resistors)
    3. receive text string
    4. Display your VendorName and ProductName.
    So almost everything EASY will be covered in both code.

    I tried to stay away of the cryptic-fashioned coding but i couldn't resist to use some macro etc etc. Eh, maybe you'll learn from it? Who knows?

    In attachment, you'll find ALL FILES. PBP source code and VB6 source code AND a ready to run USBDemo.exe file. Everything is hardly commented so, read it carefully... it won't hurt!

    The original folder was c:\PBP_PROG\USBDemo but it shouldn't cause any problem... well i guess. If so, you know where to send them.

    NOTE: If you're going to use LONG variables, you MUST copy the PIC18Xxxxx.BAL file in your source directory as well, unless you'll receive some compilation errors.

    The .BAL file is located in \PBP\USB18 directory.

    Those who want to use PIC18F2455, 18F2550, have a look at post 99.
    http://www.picbasic.co.uk/forum/show...8&postcount=99


    Enjoy!
    Attached Files Attached Files
    Last edited by mister_e; - 31st December 2006 at 01:21.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. How to receive stream of bytes using PIC USART
    By unifoxz in forum mel PIC BASIC Pro
    Replies: 34
    Last Post: - 20th June 2009, 10:38
  3. Replies: 9
    Last Post: - 31st July 2008, 08:56
  4. PICBasic newbie problem
    By ELCouz in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 12th February 2008, 00:55
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07

Members who have read this thread : 4

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts