Shop OBEX P1 Docs P2 Docs Learn Events
BASIC2 and USB — Parallax Forums

BASIC2 and USB

ArchiverArchiver Posts: 46,084
edited 2000-05-21 19:24 in General Discussion
I'm working on a project that I want to connect to the PC/Mac via the
USB. As i understand it the serial out of the BS2 is'nt fast enough
to emulate USB. Is there a chip available that I can connect the BS2
too to will achieve this?

Thanks in advance


Grant McPherson

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-05-20 06:30
    At 01:47 AM 5/20/00 +0000, mcpherson@o... promulgated:
    >I'm working on a project that I want to connect to the PC/Mac via the
    >USB. As i understand it the serial out of the BS2 is'nt fast enough
    >to emulate USB. Is there a chip available that I can connect the BS2
    >too to will achieve this?
    >
    >Thanks in advance
    >
    >
    >Grant McPherson

    Grant -

    The best source of USB information I've found to date is Jan Axelson's
    website [noparse][[/noparse] www.lvr.com ]. There is reference there to another of her
    excellent books.

    Regards,

    Bruce
  • ArchiverArchiver Posts: 46,084
    edited 2000-05-21 19:24
    There are several ways to design a device with a USB interface:

    1. Use a microcontroller that has USB built in. You could use I/O lines on the
    microcontroller to communicate with a Stamp, but since you'll need to write
    code to control the USB chip anyway, you may as well also program the USB chip
    to do whatever it is you were going to do in the Stamp, and skip the Stamp.
    There are many controllers available, but I don't know of any that you can
    program in Basic.

    2. Use a USB controller chip that connects to an external microcontroller. The
    external microcontroller has to store USB configuration information, write data
    to be sent on the USB to the USB controller, and read USB data from the
    controller as it arrives. The Stamp I and II don't have the speed or resources
    to handle this.

    I haven't looked into it in detail, but it's possible that the Scenix Stamp
    could exchange USB data at low rates with a connection to National Semi's 9603
    chip, which has both USB and Microwire interfaces. But the 9603 is a 28-pin SMT
    chip, which complicates circuit construction. The advantage would be the
    ability to program entirely in Basic, but as I said, I'm not sure if it's
    feasible.

    Every USB device also requires a low-level device driver on the PC/Mac to
    provide a link between the system's bus drivers and applications that want to
    talk to the device. For the above two options, Windows and the Mac include
    human-interface device (HID) drivers that are useful for transfers of up to 64
    kbytes/sec. Under Windows, applications can use API calls to communicate with
    the drivers.

    3. Use a USB protoboard. If you just want to control some outputs and read some
    inputs, check out the Activewire-USB, which has PC, Mac, and other drivers that
    enable you to do I/O from applications you write. You could connect the I/O
    pins to a Stamp, which would give you the ability to send commands and read
    data from a Stamp over the USB. It's not the cheapest solution, but it does
    provide a way to hook a Stamp to the USB. The USBSimm is another proto board
    with more flexibility for user programming (in assembler or C).

    4. Buy a USB/RS-232 converter and use the Stamp's Serin and Serout. The Stamp
    will look like an RS-232 device to applications. The converters can't handle
    any unusual handshaking schemes. I haven't tried this.

    My website's USB page has links to USB info:

    http://www.lvr.com/usb.htm

    Jan Axelson
    http://www.lvr.com
    jan@l...
Sign In or Register to comment.