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

    Of course I took your excellent example and tore it all apart to modify it into something completely useless to me.

    I'm not getting data from USBbufferin on the device. I am kind of curious about a line in the VB side:

    "hidWriteEx VendorID, ProductID, BufferOut(0) ' send it"

    Doesn't that just send the first element of the array? On the device I am trying to read USBbufferin[2] but get nothing. I should point out that my version has this as a normal BYTE, not the LSB of another number or whatever you had.


    -Sterling
    Last edited by SterlingY; - 16th March 2007 at 02:33.

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

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

  4. #4
    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]

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

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

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

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

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