2012-11-13 05:37 AM
Hi,
I am using the MCBSTM32E evaluation board to control some motors. I want to use my PC (Windows XP) to drive/record test data. Does anyone have an opinion on which interface is easiest to set up for communicating with a Windows PC? (e.g. USART, CAN, USB, etc.) Thanks for any info! #weakest-link #use-a-com-port2012-11-13 07:29 AM
Serial is pretty easy to access from a user space application. USB can be, unless you need to create a custom drivers, ie pick a method that has built in support. For example you could record data to a flash card, then access it via USB MSC.
CAN? You have an existing board/driver supporting this?2012-11-13 07:42 AM
I would definitely second the use of a COM port - whether a genuine RS232 connection to the PC, or via an RS232-to-USB converter.
This keeps you clear of any involvement at all with USB at either the target or the host end.2012-11-13 08:27 AM
If asynchronous serial is fast enough (115200 baud works well usually) or you can buffer the data use the serial port. For a simple terminal and data logging to file I'd recommend Tera Term Version 4.75 is current.
2012-11-13 08:45 AM
''If asynchronous serial is fast enough (115200 baud works well usually)''
I have successfully used FTDI USB-to-Serial adaptors for years at speeds up to 921600 baud.
2012-11-13 08:54 AM
And are you recommending that - as a regular, suggested practice? Had you run proper/thorough BER (bit error rate) test - over prolonged period?
Remainder of devices w/in that connection may be less robust - especially over time, temperature, and lot-run. Keep in mind - top speed is always limited to the ''slowest'' device w/in the connection scheme/connection. Suggest that 115K should be adequate - and far more practical/achievable...2012-11-13 09:06 AM
I think it was offered as an achievable rate, given it doesn't use our Grandma's 8250 UART card with a 1.8432 MHz crystal.
Async serial, at all rates, is prone to undetectable errors or framing issues, you'd typically layer a protocol on top to address that, like X/Y-Modem and variations which are certainly viable at 460.8K or 921.6K2012-11-13 11:20 AM
''I think it was offered as an achievable rate''
Correct.
''you'd typically layer a protocol on top to address that, like X/Y-Modem and variations which are certainly viable at 460.8K or 921.6K''
Yes, XMODEM was used.And, of course, it does require careful design of the whole chain; eg, not all RS232 transceivers are suitable for that speed, and you wouldn't want to be using long and/or cheap cables...
2012-11-13 01:07 PM
Poster stated she seeks to drive/control, ''some motors'' and record key test data. So along with the valid points you two have made wrt appropriate line drivers and cables - we must add likely noise spikes to our mix.
Thus - imho - less than, ''Full Throttle'' seems wisest choice. (i.e. past stated 115K or slower) Real world has nasty habit of ''intruding'' upon our best hopes/theories...2012-11-13 03:01 PM
Interesting thought:
Using USB-to-Serial, the async connection could be of minimal length - so what is USB's noise immunity like...?