New Mecanique USB HID maker


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default New Mecanique USB HID maker

    Hi all,

    For those who work with USB stuff and loose their hair, you should have a look to the new HID maker of Mecanique

    and it's totally free
    http://www.mecanique.co.uk/products/usb/easyhid.html

    and i didn't see many little character at the bottom of the screen
    Last edited by mister_e; - 19th June 2005 at 10:13.
    Steve

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

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,596


    Did you find this post helpful? Yes | No

    Default

    I've looked around for new commands for PIC BASIC Pro and haven't seen any. I assume that this new feature is to help us with the 'initialization' routines associated with USB communication. It looks like the existing USBIN and USBOUT commands are still used for the I/O operations. I'm just wondering about USBINIT, that would logically be the part facilitated by this wizard.

    Does that sound right?

    (I haven't used any USB interfacing yet)

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,596


    Did you find this post helpful? Yes | No

    Default

    I tried the Generator and got this as a sample PIC program:

    USBService is not in the PIC BASIC Pro manual? I wonder how we're supposed to get this instruction? A patch to our compiler?

    Robert



    DEFINE OSC 48
    DEFINE LOADER_USED 1

    USBBufferSizeMax con 8 ' maximum buffer size
    USBBufferSizeTX con 8 ' input
    USBBufferSizeRX con 8 ' output

    ' the USB buffer...
    USBBuffer Var Byte[USBBufferSizeMax]
    USBBufferCount Var Byte

    ' ************************************************** **********
    ' * main program loop - remember, you must keep the USB *
    ' * connection alive with a call to USBService every couple *
    ' * of milliseconds or so... *
    ' ************************************************** **********
    usbinit ' initialise USB...
    ProgramStart:
    gosub DoUSBIn
    gosub DoUSBOut
    goto ProgramStart

    ' ************************************************** **********
    ' * receive data from the USB bus *
    ' ************************************************** **********
    DoUSBIn:
    USBBufferCount = USBBufferSizeRX ' RX buffer size
    USBService ' keep connection alive
    USBIn 1, USBBuffer, USBBufferCount, DoUSBIn ' read data, if available
    return

    ' ************************************************** **********
    ' * wait for USB interface to attach *
    ' ************************************************** **********
    DoUSBOut:
    USBBufferCount = USBBufferSizeTX ' TX buffer size
    USBService ' keep connection alive
    USBOut 1, USBBuffer, USBBufferCount, DoUSBOut ' if bus available, transmit data
    return
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  4. #4
    Join Date
    Feb 2005
    Location
    Saltburn by the Sea
    Posts
    23


    Did you find this post helpful? Yes | No

    Default

    > USBService is not in the PIC BASIC Pro manual? I wonder
    > how we're supposed to get this instruction? A patch to
    > our compiler?

    USBService is available with the latest version of PBP (2.46)

  5. #5


    Did you find this post helpful? Yes | No

    Default Assembler errors

    I have downloaded MPASM 4.01 as directed by MELabs.

    When I try to program the PIC4550 from MCS+ I get three errors:

    Error[173]c:\progra~1\mecani~1\easyhid\test\picbas~1\test.as m77: Source file path exceeds 62 characters (C:\PROGRAMFILES\MECANIQUE\EASYHID\TEST\PICBASICPR O\USBDESC.ASM)

    The other two messages are the same but end in \DESCTEST.ASM and \USB18MEM.ASM

    Ideas anyone?

    I am using XP pro, PBP 2.46, MCS+ 2.1.08.

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    MPASM chokes if the file path is too long. Just create a directory like say
    C:\PBP\MYUSB and place your USB project files in there to get rid of this error.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  7. #7


    Did you find this post helpful? Yes | No

    Smile Source file path too long

    Thanks for your reply Bruce.

    You have confirmed that the error messages were in fact meaningful and I now understand that a shorter path must be acheived to remain within the parameters of MPASM.

    As to the suggested fix, you should remember that you are so far ahead of me in all of this that you are almost over the horizon! I can create a folder as you suggest and maybe even put the correct files into it but in doing so I would be stepping out of the cosseted realm of my IDE.

    I want to write my code and then click the compile & program button achieving the result with no manual intervention.

    The long path that is defeating MPASM comes from my slavish following of instructions. What I now need are some new instructions on how to modify my setup to automatically yield a path of acceptable length.

    Thanks again & regards,

    Brian.

  8. #8
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Hi Brian,

    With EasyHID, on the 4th screen, just edit the location for all files to be deposited in.

    I just loaded a complete ready to install software application on our website with all PBP/asm files. I've included the .hex file for folks that may not yet have PBP v2.46 so thay can experiment with it.
    http://www.picbasic.co.uk/forum/showthread.php?t=2073

    You do not need VB. The software is ready to install & run. Just wire up an 18F4550 as shown in the EasyHID schematic, and hookup a pot to RA0 to use it.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. USB CDC Communications for Dummies!
    By Squibcakes in forum USB
    Replies: 104
    Last Post: - 15th January 2014, 13:43
  2. USB hid maker help please.
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 3rd April 2013, 14:49
  3. Simple USB Comms Problem
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th January 2010, 20:17
  4. USB MSD with HID code ?
    By Chris Barron in forum USB
    Replies: 1
    Last Post: - 11th November 2009, 17:33
  5. Replies: 0
    Last Post: - 6th March 2009, 07:52

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts