SX to PC via USB
Well I'm really starting to get into this whole micro thing and enjoying it a lot.· My ultimate aim is to build an inertia dyno to test and tune RC car engines and my SX project will do the data acquisition and a bit of servo control.
I've done a fair bit of searching on the forum now and haven't yet found a clear solution to the SX to PC communications using USB.· As I only have laptops with USB ports I'd like to find a solution that enables me to communicate using USB without the need to use a USB to RS232 type of device.· Ultimately I'd like a device that has a USB recepticle that I can plug into the bread board area of my SX Tech Board that then allows me to address it directly using my SX.
Does anybody know if there is such a beast in existence and if not then any suggestions on how best to do this?
·
I've done a fair bit of searching on the forum now and haven't yet found a clear solution to the SX to PC communications using USB.· As I only have laptops with USB ports I'd like to find a solution that enables me to communicate using USB without the need to use a USB to RS232 type of device.· Ultimately I'd like a device that has a USB recepticle that I can plug into the bread board area of my SX Tech Board that then allows me to address it directly using my SX.
Does anybody know if there is such a beast in existence and if not then any suggestions on how best to do this?
·
Comments
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?
www.iElectronicDesigns.com
·
http://www.dlpdesign.com/usb/usb232.shtml
http://www.dlpdesign.com/usb/txrx.shtml
Best Regards,
Robert
Bear in mind that all the solutions being offered are essentially USB serial ports in chip form. You're still doing a USB to Serial conversion within the chip/driver combo, but you're doing it with a chip on your board instead of in an adapter. It could be argued that it's cheaper to buy a single serial adapter rather than keep putting USB chips on each board, depending on the number of boards you end up making. Also, you can get away with talking to a serial port without using a full blown level converter such as a MAX-232, so you wouldn't necessarily add that cost to each board.
Just something to think about...
Thanks,
PeterM
It's only a one-off project (at this stage) but I'm still undecided as to which route to take - USB2SER or the USB to Serial adaptor.
PJMonty, from your comments, I assume if I use the USB to Serial adaptor then I won't need to do anything more than connect directly to the DB9 plug?· If that is the case then I might be able to have my cake and eat it too if I just hard wire the USB to Serial adaptor to my board.
Thanks for your input.
Chris I.
As far as sharing the line there are certainly ways to do it is you are careful. The RX signal can go to multiple devices easily. A few things to consider is the fan out so that you are not trying to drive more devices than the driving device can handle. If you need more you may need a driver to buffer the signal so it can drive more things. In this case it may be more like a Party line so all the devices hear the signal. This is fine if you are using something like the AppMod style protocol so it will only respond to data sent to the particular device. You may also want to use some selection logic so that only one device at a time hears what is coming down the Serial line. If you get a chance to read the April 2008 issue of SERVO I did something like this for my BOB robot project.
For the multiple devices sharing the TX line you can either use some extra logic as a MUX so that only one can use the line at a time. Another option is to use an "open-collector" as the TTL TX on all your devices and have a pull-up resistor on the line. This way any of the devices can talk without shorting anything out. Of course they should be well-bahaved and not all try to talk at once. Again, the AppMod protocol is useful here since the target device is typically asked for information and only that particular device would respond.
If you are using a USB adapter I would certainly look at sharing the logic level serial line with several devices and look at all the examples that use the AppMod protocol. Parallax already has many well documented and several are done with SX/B on the SX chips. Projects like that are one example where the SX processor is an excellent choice.
Hope this helps,
Robert
Full duplex RS-485 will allow longer distances, but RS-232 is okay for 50 feet. So again, why bother with adding layers of hardware and technology.
If you really want a complex RS-485 network, CANbus - which has 8 byte packets - will allow multiple masters and multiple slaves. But since you say that you are just getting started, I would recommend avoiding such complexities until you really need them.
Mostly, the simpler the solution, the better. You will likely be needing or wanting ADC chips to accumulate data. Each channel can sample and hold data until read. By reading in a round robin fashion, one ADC chip can provide 8 channels of useful data that is sent to the PC as one packet of 16 bytes [noparse][[/noparse]each sample is 12bits or longer, so 2 bytes are required].
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
I tie RL245RL by way of experiment and :.
Though I was expecting that I become a parallel port
The device driver of WIN2000 is a serial port.
Is there a method of compulsion to a parallel port?
The latest driver of FTDI 2.04.06 is announced.
http://www.ftdichip.com/Drivers/D2XX.htm
nonnno
Kramer, thanks for your suggestions and to answer your first question - no I really don't have any serial ports on my laptops - I have two X-series ThinkPads which are strictly USB and firewire.· I don't even have CD drives in these things - but I do have an SD card reader and PCMCIA.
On the PC it acts like a serial port, but on the other side the FT245RL acts like a parallel port.
Whereas the FT232RL acts like a serial port on both sides.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?
www.iElectronicDesigns.com
·
For instance, when "SX/KEY" is operated by way of USB, isn't it
difficult to specify "Port"?
In which is there an advantage when connecting it with "fluffy" with the cereal in parallel though
it comes off from the basis for a moment?