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

    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.

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

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

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

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

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

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

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

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


    Did you find this post helpful? Yes | No

    Default

    Ok Great I'll have to try it. Good to know there could be a work around.

    BTW I tried running usbdemo on Vista, but I need the mchid.dll, which I have on floppy disk but can't get it on to the laptop running vista.

    Don't supose you can upload it on to the website so I can download it straight onto my laptop eh?

    Cheers
    squib

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    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..
    Hi Steve,

    Thanks for the tip, it works a treat!

    I rekkon melabs should incorporate DTs instant interrupts into their next version of pbp and do away with ON INTERRUPT altogether......

    Cheers buddy.

    Squib

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