USBDemo, something to learn USB a little bit


Closed Thread
Results 1 to 40 of 279

Hybrid View

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

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

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

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

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


    Did you find this post helpful? Yes | No

    Default

    yes, but i make the mr.e code and circuit to test
    ....and ...not stable too...i think my 5v from pc is not good

    pardon for the same question.
    Last edited by mpardinho; - 10th April 2007 at 18:48.

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

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


    Did you find this post helpful? Yes | No

    Default

    Out of curiosity... Anyone tried USBDemo with Windows Vista? Working?
    Steve

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

  8. #8
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    257


    Did you find this post helpful? Yes | No

    Default

    No, but I'll give it a go this weekend I can feel a backup coming on....

    BTW,

    I need a decent way to debounce a number of switch's connected to my pic.
    I'm using a dirty PAUSE 50 to do just that, but finding unless I put USBSERVICE everywhere (ie after checking the status of each switch), the switch's arent being sent to the pc (via usb).

    I borrowed the ASM timer interrupts from the usbdemo code, but that doesnt help either. I'm thinking that TMR interrupts aren't independent of PAUSE statements. Is this true?

    I don't want to use the BUTTON command.

    cheers
    Squib

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


    Did you find this post helpful? Yes | No

    Default

    If you're using ON INTERRUPT... yes PAUSE will screw up things. Using Darrel's interrupt + it's USBDemo code modification ( AKA POST 148), should solve it.
    http://www.picbasic.co.uk/forum/show...&postcount=148

    Depending how you implemented the interrupt debounce/read plah plah, it may work as well with ON INTERRUPT..
    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 : 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