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
russdx
Associate II
Posted on November 14, 2012 at 01:13

may as well use the built in usb stack, using the cdc example floating around with libusb you could have data running back and forth in no time :)

jj2
Associate II
Posted on November 14, 2012 at 04:15

Russel: ''You could have data running back and forth in no time!''

and

Gen. Custer: ''Indians are not known to gather @ the Little Big Horn!''

''famous last words'' - somehow comes to mind...

lisa2
Associate II
Posted on November 14, 2012 at 12:52

Yea, the MCBSTM32E evaluation board has a CAN interface on it and comes with some sample code to run it with supporting libraries.

Seems complicated though to set up on the PC end so will probably go with the USART connection.

Thanks very much,

Lisa

Andrew Neil
Evangelist III
Posted on November 14, 2012 at 15:29

''Yea, the MCBSTM32E evaluation board has a CAN interface on it''

I think the question/surprise was more that you had a PC with CAN interface & drivers?

jj2
Associate II
Posted on November 14, 2012 at 15:38

''question/surprise was more that you had a PC with CAN''

 

Wager 100 pounds sterling that she does not!

Andrew Neil
Evangelist III
Posted on November 14, 2012 at 18:28

''Wager 100 pounds sterling that she does not!''

Hence the surprise!

lisa2
Associate II
Posted on November 15, 2012 at 12:38

Sorry, my misunderstanding - yes, you win £100; I do NOT have a CAN interface on my PC. :)

Lisa

russdx
Associate II
Posted on November 17, 2012 at 15:11

'

''famous last words'' - somehow comes to mind...

'

hehe, in my defence i was able to have my stm32f4 talking to libusb in a few minutes using the cdc example found here, once you get it working you just tailor it to do what you want :)

stm code

http://dl.dropbox.com/u/56124886/stm32f4-discovery/stm32f4-discovery-usb-cdc-example.zip

pc libusb code

http://dl.dropbox.com/u/56124886/stm32f4-discovery/usbTest.zip

in your case you will have to make a few other changes as your using a different stm32 chip.
lisa2
Associate II
Posted on May 24, 2013 at 10:14

Hi All,

Although a little late, I just wanted to follow up: I did use the serial port with a serial to USB adapter and the Hyperterminal feature in Windows. As Clive, Neil, and John all wisely advised, it was pretty painless and worked fine.

Thanks everyone,

Lisa

embedelektrik
Associate II
Posted on June 10, 2015 at 08:47

Could you please share that code. Because old links are non relevant now. Tnx.