USBDemo, something to learn USB a little bit


Closed Thread
Results 1 to 40 of 279

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Momboz View Post
    I am using microsontroller PIC 18F2450.

    The issue is: when trying to compile and assemble the source file USBDemo.PBP from Steeve I get the following error messages:

    ERROR: Macro USBINIT? not found in macro file.
    ERROR: Macro USBSERVICE? not found in macro file.
    ERROR: Macro USBIN?CBBL not found in macro file.
    ERROR: Macro USBOUT?CBBL not found in macro file.

    I did make any change to the original files as posted on this forum.

    Could any one be of help to me?

    My file locations are as follows:
    MPASM D:\Program Files\PBP\MPASM
    PBP D:\Program Files\PBP

    When loading the USBDemo.HEX file in my microcontroller (18F4450 and 18F2450) it works fine with the PC application from Steeve.

    In advance many thanks for your help.
    As far as I know, PBP doesn't support USB on the 2450/4450. Yes, those chips are USB chips. Yes, PBP does support those chips, just not using the USB, at the website doesn't specifically say it supports them that way. The only chips I see that PBP directly supports with USB are the PIC18F2455, 2550, 4455, and 4550, and the 16C745, 765.

  2. #2
    Join Date
    Mar 2007
    Posts
    13


    Did you find this post helpful? Yes | No

    Default RE: Files location issue?

    Quote Originally Posted by skimask View Post
    As far as I know, PBP doesn't support USB on the 2450/4450. Yes, those chips are USB chips. Yes, PBP does support those chips, just not using the USB, at the website doesn't specifically say it supports them that way. The only chips I see that PBP directly supports with USB are the PIC18F2455, 2550, 4455, and 4550, and the 16C745, 765.
    Hi skimask.

    First, many thanks for your help.

    Second, I know from Melabs, that they support 2450/4450 in the USB modes.

    My issue again is: I was not trying to use any other PIC, but 4550. I am not that far in the process. What I was trying to do is just to compile the USBDemo.PBP for the 4550 in my environment.

    And this doesn't compile because of some missing macros.

    Any suggestion?

    Thx
    Last edited by Momboz; - 5th April 2007 at 17:03.

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


    Did you find this post helpful? Yes | No

    Default

    shouldn't be a problem IF ALL files i've provided are located in the same folder unless i miss something obvious.
    Steve

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

  4. #4


    Did you find this post helpful? Yes | No

    Default USB Host Controller

    Ok, so there are plenty USB host controllers, any to recommend? it would be great if it is NOT surface mountable,

    Thanks

  5. #5
    Join Date
    Mar 2007
    Posts
    13


    Did you find this post helpful? Yes | No

    Default RE: Files location issue?

    Quote Originally Posted by mister_e View Post
    shouldn't be a problem IF ALL files i've provided are located in the same folder unless i miss something obvious.
    Many thanks Steeve

    I have copied all the files in the folder where I have PBP 2.47 installed and I tried to compile again. The errors are the same.

    I have been surprised by the way you did programm your application (the PIC configuration is written in assembler and is in your source code. Why not) and it's the only example that does recognize the USB interface when plugged in. The other examples from Melabs (UBMouse, UBSJadem and USBCDC) do not recognize when plugged in but they compile without errors.

    I am not asking what is the best :-)

    I will still investigate the issue and try to find out what's wrong with my configuration. I am very very patient and I have plenty of time to spend on the subject. This is just as a hobby. No boss is expecting any results from me in this case.

    Thanks again for your help.

  6. #6
    Join Date
    Mar 2007
    Posts
    13


    Did you find this post helpful? Yes | No

    Default Feedback on USBDemo

    Quote Originally Posted by mister_e View Post
    shouldn't be a problem IF ALL files i've provided are located in the same folder unless i miss something obvious.
    Dear Steve

    I would like to give you feedback on 3 points:

    1st, there is a typing error in your example USBDemo.pbp source file. Line 39 in your file should say "_FCMEM_OFF_1H" and not "_FCMEN_OFF_1H", i.e. the letter N should read M.

    2nd, your example compile perfectly if it located in the USB18 folder (or if you copy the UBS18 folder files in yours).

    3nd, you are redefining the PIC CONFIG register and this is also done in the so called INC file from Melabs for that PIC. This generates errors and the user has to choose where to configure these registers to avoid duplication of definition.

    I take this opportunity to thank you very much for the example first and then for your kind help.

    Bye

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Momboz View Post
    1st, there is a typing error in your example USBDemo.pbp source file. Line 39 in your file should say "_FCMEM_OFF_1H" and not "_FCMEN_OFF_1H", i.e. the letter N should read M.
    Yes and no, it have been discussed before, it's down to your MPASM version. The latest version use FCMEN, while older use FCMEM
    http://www.picbasic.co.uk/forum/show...t=3251&page=30 Post 149 and +

    3nd, you are redefining the PIC CONFIG register and this is also done in the so called INC file from Melabs for that PIC. This generates errors and the user has to choose where to configure these registers to avoid duplication of definition.
    Yes, you are right, but it's usual to comment the default one. At least, i always do it. see bellow..
    http://www.picbasic.co.uk/forum/showthread.php?t=543 Post 5 and +++
    Steve

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

  8. #8
    Join Date
    Sep 2006
    Location
    Venezuela - Caracas
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    Mister E,
    the code work,
    but AN0 and AN1 not stable
    leds not stable off....same time is on or off....+- 5 seconds...push-buttons is off
    than push-button = on, led stable ......on...off

    i use 18F4550
    470 nf in Vusb / Vss
    .1 uf ceramic in Vcc/Vss
    4k7 in MCLR / Vcc
    resonator 4mhz


    * pardom for my english

  9. #9
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mpardinho View Post
    Mister E,
    the code work,
    but AN0 and AN1 not stable
    leds not stable off....same time is on or off....+- 5 seconds...push-buttons is off
    than push-button = on, led stable ......on...off

    i use 18F4550
    470 nf in Vusb / Vss
    .1 uf ceramic in Vcc/Vss
    4k7 in MCLR / Vcc
    resonator 4mhz


    * pardom for my english
    You unstable just like the other post in the Communications->USB section?

  10. #10
    Join Date
    Feb 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mpardinho View Post
    i use 18F4550
    470 nf in Vusb / Vss
    .1 uf ceramic in Vcc/Vss
    4k7 in MCLR / Vcc
    resonator 4mhz
    I've used
    220nF Vusb / Vss
    .1 uF ceramic too
    10k MCLR/Vcc
    USB B type Connector
    and it works fine now ;-)

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