Notes from May 2004 Meeting

Morning Session

USB Links - Kevin Appert

I'm told by a guy on the SwiftForth mailing list that you just talk to most USB devices through the driver as a disk drive, mike, printer, etc. For example, a USB Flash Memory is addressed with the Open/Close/Read/Write calls like any disk drive. I guess we all knew that, but I thought there were other lower-level hooks to talk to.

That leaves us with the issue of the Driver (PC Host/Controller side) and the target-side firmware required for building a widget with a USB interface.

I ran across these guys - tools to build the driver for the PC side.

These guys have information on USB, Embedded Ethernet, Ye olde seriale and parallelle portals and so on, lots of utilities and links.

Herman Griffin says: "A program by the name of "port talk" on BeyondLogic is of interest to a person wanting to write USB drivers!".

Microsoft provides Device Driver Kits for all of it's operating systems which includes example USB device drivers. Buy a CD or register on MSDN (not free either way) MicroSoft Developer Network pricelist here.

If I were going to build some sort of peripheral which used USB to communicate with it's host, I would probably just buy a solution.

1) embed an USB->RS232 or USB->Parallel (naughty bits) interface (for onsies-twosies things) like USBMicro or B&B Electronics or

2) use a chip like the Cypress parts shown here:

E Z-USB FX2 Programmable MCU - Fully-integrated, single-chip solution for Hi-Speed USB peripherals

EZ-USB SX2 Intelligent SIE core automatically handles the low-level USB protocol, shortening the USB learning curve

EZ-USB TX2 Hi-Speed UTMI-compliant transceiver

EZ-USB AT2 Fourth Generation Hi-Speed Mass Storage Fixed-Function Bridge supporting ATA-6 hard drives

ISD-300LP Low-Power Mass-storage fixed-function device designed for bus-powered applications like CompactFlash card readers, MP3/PVR players or portable 2.5" hard-drives.

The FX2 is an 8051 with a USB interface, example code and a development kit (around $500, comes with "evaluation" C compiler)

Intro to USB
Debugging USB
USB Design by Example
Windows API and USB
Windows API and USB
Port Talk - A Windows NT I/O Port Device Driver

USB Complete: Everything You Need to Develop Custom USB Peripherals by Jan Axelson

Win NT/2000/XP Driver for DeVaSys USBLPTPD11(D) USB Development Boards

LaFarr Stuart - download programs

ADULT - Adulterate Characters
<i-file ADULT from-to-pairs>o-file
Copyright 2002 July 22.  LaFarr Stuart (408)946-8517

AN - Integer-Arithmetic
<i*file IA [ /userdef-file][ print-file]>o-file
Copyright 2004 March 7.  LaFarr Stuart (928)927-6517
 2004 March 7 change Use _[ to Push Block of entire Stack _] Un-Blocks it.
    . Modify (Hex in Decimal out)   $ Square Root, $Enter shows .
    , Start new value,at 0          ! Factorial, !Enter shows all
    & Duplicate Top                 | M-things, taken N at a time
    [ Copy 2nd to Top               User. Define with .` see _`
    ' Delete Top                    @ Push Count of last digits
    " Delete 2nd                    ; Continue to next Line
    ] Delete 3rd                    ( Start Looping
    > To Alt-Stack                  ) End Looping
    < From Alt-Stack                = Display Top in Decimal
    ~ Increment Alt-Stack Top       # like = with blocked groups
    \ Decrement Top                 : Display Top in Hex
    + Add. Top+2nd=New              % 1.193 MHz Ticks since Midnight
    - Subtract. 2nd-Top=New         { Output to PRN/file
    * Multiply. Top*2nd=New         } Just Output to CRT
    / Divide. 2nd/Top=Rem,Quot      ? Help, or Output following
    ^ Power. 2nd^Top=New            _ Decimal Coded Digits (. Input)
>< <> Copy to/from Alt-Stack        .= .. Change Out/In number base
Horizontal output with _= _# or _:  _Enter. Kills stack display
    .' Empty Alt-Stack              _) Loop Top Not Zero
    .- 2's Complement               _} Infinite Loop
    .< .> Double/Half shifts        .) Loop on Keyboard non-graphic
    _& Push 80-bit Float of top     .; Wait on each line
    .@  Count of stack values       .# Block size and symbol for #

PAN - Phone Alpha to Numbers

SW - Swap Words
<i-file SW>o-file
Copyright 2004 April 2.  LaFarr Stuart (408)946-8517

WX - Word eXchange
<i*file WX pf>o-file
Copyright 2004 April 21.  LaFarr Stuart (408)946-8517
I have used WX to exchange Homophones. You can see the effect on something you should recognize at: WX takes a parameter which is a table.

Afternoon Session

Glen Haydon will accept old Forth Dimensions and other material for re-sale.

Oscilloscope module for PDA