USBDemo, something to learn USB a little bit


Closed Thread
Results 1 to 40 of 279

Hybrid View

  1. #1
    Join Date
    Mar 2007
    Location
    West Hollywood, CA
    Posts
    38


    Did you find this post helpful? Yes | No

    Default

    More info:

    In the VB code, if I put the following line "BufferOut(2) = 145" in the WriteSomeData() function, I get "0" when reading on the device, however, If I put that same line in the Form_Load() function, it sends the data, so I think the Form is constantly reloading. How can this be?

    -Sterling

  2. #2
    Join Date
    Mar 2007
    Location
    West Hollywood, CA
    Posts
    38


    Did you find this post helpful? Yes | No

    Default

    I seem to be talking to myself here, but that's okay.

    I just wanted to say that I got it working. I don't know how. But, I ran the original USBDEMO.exe, and then everything started working with my modified version.

    Crazy, I know!

    -Sterling

  3. #3
    Join Date
    Mar 2007
    Location
    West Hollywood, CA
    Posts
    38


    Did you find this post helpful? Yes | No

    Smile

    Here I go again:

    The problem was that VB buffer(1) comes into the device as buffer[2]

  4. #4
    Join Date
    Dec 2003
    Location
    Storrs, Ct.
    Posts
    91


    Did you find this post helpful? Yes | No

    Default Thanks mister e

    Thanks for the inspiration Steve. My upgrade is complete, PBP2.47,EasyPic 4, PicFlash 7.03, a new laptop to stuff it all in and some 18f4550 samples.
    Thanks to Uncle Sam for a quick tax return also.


    Had some trouble with the USB stuff at first but this post solved my problems.
    http://www.picbasic.co.uk/forum/show...4&postcount=32

    Not sure what to do with the $20 I got left. Dinner at Denny's with my wife maybe?
    Then again I could use another USB cable...

    Thanks again Steve.

  5. #5
    Join Date
    Mar 2007
    Posts
    13


    Did you find this post helpful? Yes | No

    Default Files location issue?

    Dear all

    I am a newbie who's tying to do his first steps with UBS programming under PIC. My environment is PBP 2.47, Microcode Studio 3.0.0.0 and MPASM 5.03.

    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.

  6. #6
    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.

  7. #7
    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 16:03.

  8. #8
    Join Date
    Jan 2007
    Posts
    11


    Did you find this post helpful? Yes | No

    Default Same problem with a 18F2550

    Quote Originally Posted by Momboz View Post
    Dear all

    I am a newbie who's tying to do his first steps with UBS programming under PIC. My environment is PBP 2.47, Microcode Studio 3.0.0.0 and MPASM 5.03.

    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.

    I have the same problem as above but I am using a 18F2550. What am I missing or where did I go wrong?

    I am configured for a 18F2550 but the USBDEMO.MAC file is overwritten without the needed macros each time I try to compile.

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


    Did you find this post helpful? Yes | No

    Default

    O.K. the original code was for a 4550. You need to rebuild the project in EasyHid for a 2550. There's a load of needed files.

    I've uploaded the 2455 and 2550 stuff here. let me know what happen now. The 2550 have been tested... but i don't have any handy 2455.

    I've also uploaded the schematic, if some need it.

    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.
    Attached Images Attached Images
    Attached Files Attached Files
    Steve

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

  10. #10
    Join Date
    Sep 2006
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Momboz View Post
    Dear all

    I am a newbie who's tying to do his first steps with UBS programming under PIC. My environment is PBP 2.47, Microcode Studio 3.0.0.0 and MPASM 5.03.

    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.

    Hi.
    Momboz..

    Iam getting exactly same errors dear,

    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.

    How did you solve this problem?

    Plz Help me...

    Regards...

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


    Did you find this post helpful? Yes | No

    Default

    Which PIC are you using?

    You probably need a modified .bas file for that chip.

    If you are using a 2455, 2550 or 4550 then Steve has already provided the files. (see post 99)

    You may also need to modify the PBPUSB18.LIB file if your PBP installation is not in the default c:\PBP folder. As was the case with Momboz.
    <br>
    DT

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 : 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