[VB6][SOFT][CODE] Smiley's USB Thingie and VB6

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As many of you know, Smiley (in collaboration with Jesper) has produced what I've been calling the USB Thingie based on the FTDI FT232R chip. Smiley has written a book on its use, and the book, Thingie, and parts kit are available on his website. Currently the Thingie is $20 IIRC.

The Thingie is fundamentally a USB virtual com port, but to me that's a pretty boring use for it. Unless you need a com port, of course.

What I find more interesting is that it has 12 general purpose I/O bits available in "bit banging" mode. 8 of those are (very) high speed, and 4 are byte by byte. The Thingie also puts out 3.3 and 5 volts, and clock signals of 6, 12, 24, and 48 MHz. It lives on a DIP header and seems an ideal way to make quick self powered breadboard apps with a PC interface. The drivers are free and can be redistributed (as I understand it). Plus, to borrow a phrase, it's "cute as a puppy."

Smiley's book extensively covers using it in C# and VB.net, but since I'm an old, old dog I'm still a VB6 kind of guy. Consequently I've put together a VB6 program and API declarations (mostly plagiarized from FTDI) for playing with the bit banging modes. It's simple but works.

The code is free to use in any way you see fit, but of course with no guarantees. It should be easy to modify and/or extend the ideas shown. Included in the zip file is the complete VB6 project, a short writeup on the program, and some musings in general about what I found out about the FT232R chip. You'll need the D2XX.dll file and the driver from the FTDI website.

Attachment(s): 

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I love this site!
You have already finished what I wish to try next, as I ordered Smiley's USB Thingie to lean and experiment with the FTDI's high speed bit banging.

Thanks so much Chuck!!!!
John

PS:
I just received my Thingie! Now; could I borrow your ‘"Pause-The-World” button thingie' allowing me to pause the world so I can put off the 48 hours of work I have to finish by Wed so I can try your program sooner?

Resistance is futile…… You will be compiled!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Chuck,

I'm not really a VB kinda person so I thought I'd convert this to BCX/C. Do you have an executable that I could test to be sure I have it right?

Thanks,
Mike

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here's a copy!

Cheers,
John

CirMicro wrote:
Hi Chuck,

I'm not really a VB kinda person so I thought I'd convert this to BCX/C. Do you have an executable that I could test to be sure I have it right?

Thanks,
Mike

Attachment(s): 

Resistance is futile…… You will be compiled!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sure - VB6 installation packages are notoriously large because of the runtime support, but here 'tis. You'll need to get the .dll from the FTDI site.

Well, too large for a single attachment here, it turns out. Unzip everything from the real zip file, then rename the other one to Smiley2.cab and run the setup program.

Let me know if it doesn't work.

John, that'll work if he already has all the VB stuff installed, otherwise he'll need the full (1.4 MB or so) installation.

Attachment(s): 

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks guys! I actually have VB Express 2008, but it gives a bunch of errors and warnings because of changes that were apparently made in the newest version.

It looks like I've got it right though, I'll post the results here if like? I would include the BCX files and the C file which should compile with pretty much any C/C++ compiler made for windows.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sure, post away. I'd say the more the better (and merrier).

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have not fully tested, if you find any problems let me know.

Attachment(s):