cancel
Showing results for 
Search instead for 
Did you mean: 

Easiest Interface to Use With a Windows PC.

lisa2
Associate II
Posted on November 13, 2012 at 14:37

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-port
20 REPLIES 20
Posted on November 13, 2012 at 16:29

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?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Andrew Neil
Evangelist
Posted on November 13, 2012 at 16:42

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.

John F.
Senior
Posted on November 13, 2012 at 17:27

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.

Andrew Neil
Evangelist
Posted on November 13, 2012 at 17:45

''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.

jj2
Associate II
Posted on November 13, 2012 at 17:54

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...

Posted on November 13, 2012 at 18:06

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.6K

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Andrew Neil
Evangelist
Posted on November 13, 2012 at 20:20

''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...

jj2
Associate II
Posted on November 13, 2012 at 22:07

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...

Andrew Neil
Evangelist
Posted on November 14, 2012 at 00:01

Interesting thought:

Using USB-to-Serial, the async connection could be of minimal length - so what is USB's noise immunity like...?