Subj : Re: USB ports To : borland.public.cpp.borlandcpp From : Jeff Baker Date : Sat Jun 12 2004 01:22 pm Hi Al, I'm currently writing USB software (my first Win32 API program) and if your already familiar with RS-232 programming then you might be in luck. Most of the major manufacturers of USB controller chips offer a VCP (Virtual Com Port) driver for their chips. This means that your learning curve is severally reduced. The VCP driver will let your software communicate with a device connected to the USB port by using a redirected a comport address. So your program will have that same internal look and feel to it as any other RS-232 device except that comport settings don't really matter because everything will run at the speed the controller chip is set to and error-checking (if needed and depending on the mode) is included in the communication packet. I've purchased both "USB Complete" and "USB Design by Example". Both are good sources of information for learning the ins and outs of USB and both help you decide exactly which communication mode to use (there are four modes and most of those have three speeds to chose from). Both have useful source code examples but they tend to favor VB instead of VC. I wouldn't count on them for a complete understanding for host software (especially if your not going to use the VCP driver). Both books spend a lot of time talking about the controller and writing firmware for it. This is all well and good but most controller chips come preprogrammed. Only if your going to do something outside the norm would this be a concern. Not to mention that you'll need to purchase firmware programming equipment (gets expensive) and be very comfortable with assembly code programming. While it's true that you can write your own controller firmware from scratch using C or C++ (quite an undertaking) almost all factory supplied firmware is in assembly. You would also have to write your own or at least make changes to the existing driver should you decide to change this firmware (again, something I would avoid if I could). Starting from scratch (hardware, firmware, software) will require more then just yourself (to get it done this year) so I would suggest changing as little as possible. Stating that, I would recommend looking at the manufacturers of USB controller chips to see who offers the most support for your programming/development needs. Some have really good VC++ examples and documentation while others seem to put more effort into VB support. Some offer to help with hardware design while others will charge for that. Most have development boards (an absolute must when your just starting out) that are preprogrammed and have some type of usefulness to work with (temperature sensor or LEDs to flash). Others have plug in solutions meaning chips that would plug right into an existing design and work with "very little" (is there every really very little to do?) effort or changes to an existing design. The best source of information ultimately comes from www.usb.org which brings me to telling you to make sure that your controller chip manufacturer offers to share it's PID otherwise you'll have to get your own from WWW.USB.ORG for the bargain price of $2,500 (something like that). While usb.org is a great source for information they don't hesitate to charge you where ever and when ever they can. If your going to market your design then USB and Microsoft really cut into you just so you can put those two little stickers on your product. Sorry, I didn't mean to ramble so much and all the above is just my opinion, I could be wrong... - Jeff Bottom line (in my opinion), do your research first! see who offers the support your going to need. "A Davis" wrote in message news:40c85898@newsgroups.borland.com... > Hello All > > I program in BC++5.02, Win98, and have written applications which use serial > RS232 comms ports. > > But nowadays there is a natural requirement to move on to USB ports. > Please could anyone advise about programming USB ports? > > Regards Al > > .