USBDemo, something to learn USB a little bit


Closed Thread
Results 1 to 40 of 279

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Atwoz, only USB PIC will work!
    Steve

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

  2. #2
    Join Date
    Dec 2007
    Location
    Denmark
    Posts
    28


    Did you find this post helpful? Yes | No

    Default

    Ok Thanks Steve! Looks like I will have to buy some 18f4550 .

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


    Did you find this post helpful? Yes | No

    Default

    Well, one in the list... 18F4550, 2550,2455, 4455 they all works.

    As you'll see, it's fun to have it's first working USB project....even if you're aware of post #7 and #8
    Steve

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

  4. #4
    Join Date
    Oct 2007
    Posts
    26


    Did you find this post helpful? Yes | No

    Default

    Hopefully this Topic is still alive as I am really keen to do some experimenting with USB.

    I have looked at all the posts and haven't found any refering to my problem.

    I am using the 18F4550 pic, Picbasic Pro 2.50 and MicroCode Studio Plus 3.0.0.5

    When I compile it stops on Line 81

    Line 81: UCFG var byte EXT ' include UCFG register... Yeah Melabs didn't (
    Line 82: ucfg = %00010100 ' enable internal USB pull-up, Full speed USB

    With the following Error Message:

    ERROR Line 81: Redefinition of VAR. (USBDemo.pbp)

    I notice that when I paste the code from mister-e's zip file into MicroCode Studio it changes the case of line 82:

    Line 81: UCFG var byte EXT ' include UCFG register... Yeah Melabs didn't (
    Line 82: UCFG = %00010100 ' enable internal USB pull-up, Full speed USB

    the ucfg is now in Capitals, I don't know if this has anything to do with it?

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Previous versions of PBP didn't have the UCFG register defined in the include files. And usbdemo was written at that time.

    PBP 2.50 does have the UCFG register, so defining it in the main program causes a "re-definition" error.

    Just comment out the UCFG var byte EXT line and the error should go away.

    hth,
    DT

  6. #6
    Join Date
    Oct 2007
    Posts
    26


    Did you find this post helpful? Yes | No

    Default

    I am using the 18F4550 pic, Picbasic Pro 2.50 and MicroCode Studio Plus 3.0.0.5

    When I compile it gives the following errors.

    Error[118] c:\progr~1\mecani~1\mcs\usbdemo.asm 87 : Overwriting previous address contents (0000)
    Error[118] c:\progr~1\mecani~1\mcs\usbdemo.asm 87 : Overwriting previous address contents (0001)
    Error[118] c:\progr~1\mecani~1\mcs\usbdemo.asm 93 : Overwriting previous address contents (0000)
    Error[118] c:\progr~1\mecani~1\mcs\usbdemo.asm 93 : Overwriting previous address contents (0001)
    Error[118] c:\progr~1\mecani~1\mcs\usbdemo.asm 98 : Overwriting previous address contents (0002)
    Error[118] c:\progr~1\mecani~1\mcs\usbdemo.asm 98 : Overwriting previous address contents (0003)
    Error[118] c:\progr~1\mecani~1\mcs\usbdemo.asm 99 : Overwriting previous address contents (0004)
    Error[118] c:\progr~1\mecani~1\mcs\usbdemo.asm 99 : Overwriting previous address contents (0005)
    Error[118] c:\progr~1\mecani~1\mcs\usbdemo.asm 100 : Overwriting previous address contents (0006)
    Error[118] c:\progr~1\mecani~1\mcs\usbdemo.asm 100 : Overwriting previous address contents (0007)

    Are these errors anything to be concerned with?

    Also out of interest, I am using a 4Mhz Resonator but in the code it is: DEFINE OSC 48

    What is that about?

    However, I seem to be making progress because when I plug it into the USB of the computer. I get the message found new hardware "USB Demo" but then it gives a message There were problems ........ etc etc.

    The VB Application is not picking it up yet.

  7. #7
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by kiwipiper View Post
    When I compile it gives the following errors.

    Error[118] c:\progr~1\mecani~1\mcs\usbdemo.asm 87 : Overwriting previous address contents (0000)
    ...
    What to do if i get "overwriting previous address content" error message?
    http://www.picbasic.co.uk/forum/showthread.php?p=6775

    Also out of interest, I am using a 4Mhz Resonator but in the code it is: DEFINE OSC 48

    What is that about?
    The 18F/USB PIC's have an amazing oscillator/PLL structure.

    With the proper CONFIG settings, You can use any crystal that's a multiple of 4mhz (4,8,12,16,20) and still have a system clock of 48mhz.

    If the timing doesn't work well with your program, you can also have 48mhz going to the USB module, and 4/8/12/16/20/24/32 mhz going to the system clock.

    It all depends on the CONFIG's.
    <br>
    DT

  8. #8
    semiuniversal's Avatar
    semiuniversal Guest


    Did you find this post helpful? Yes | No

    Default Astoundingly good demo

    Hi mister_e & all who have contributed. I am quite new to PBP and this is my first post to this list. I just found this demo a week ago, read the thread, ordered the parts, assembled a proto board on Saturday and - (insert Windows USB Device da-dink! sound) it worked FLAWLESSLY, the first time. I am either lucky standing on the shoulders of giants - but oh, my, what a good feeling.

    I have been tinkering incessantly since then.
    Thank you for giving me super powers.

  9. #9
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Thumbs up

    Quote Originally Posted by semiuniversal View Post
    Hi mister_e & all who have contributed. I am quite new to PBP and this is my first post to this list. I just found this demo a week ago, read the thread, ordered the parts, assembled a proto board on Saturday and - (insert Windows USB Device da-dink! sound) it worked FLAWLESSLY, the first time. I am either lucky standing on the shoulders of giants - but oh, my, what a good feeling.

    I have been tinkering incessantly since then.
    Thank you for giving me super powers.
    Take my advice...Give out while you still can...
    I have lost countless hours of sleep playing with USB and that demo, spent untold amounts of money, not to mention ticked off the wife numerous times...

    Seriously though...Good game...
    I wish other Noobs would take that as an example...especially the part about 'reading the thread'....

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


    Did you find this post helpful? Yes | No

    Default Using USBDemo with LONG variable (PBPL)

    NOTE: If your 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.

    If you're using PIC18F4550, you MUST copy the 18F4550.BAL file in your source code directory.

    @Darrel.. is this possible to paste it in the first post as well as the other source code (or link) for the other PICs (post 99 http://www.picbasic.co.uk/forum/show...8&postcount=99) ?
    Last edited by mister_e; - 4th April 2008 at 20:21.
    Steve

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

  11. #11
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Done! &nbsp;
    DT

  12. #12
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    Done! &nbsp;
    $20 says a dozen people miss the 18Fxxxx.BAL note...

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 08: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, 11:38
  3. Replies: 9
    Last Post: - 31st July 2008, 09:56
  4. PICBasic newbie problem
    By ELCouz in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 12th February 2008, 01:55
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 02:07

Members who have read this thread : 1

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