cancel
Showing results for 
Search instead for 
Did you mean: 

communication with PC via UART

karoui
Associate II
Posted on March 18, 2013 at 22:55

Hi,

I am a beginner  in programming with stm32 and i want to know how can i pass data from the accelerometer MEMS to PC via serial part using UART 

thanks for you help in advance 

#basic #foundation #prerequisite
15 REPLIES 15
Posted on March 19, 2013 at 20:08

You can avoid RS232 by using something like this:

http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm

It gives a direct logic-level connection to the UART, and USB to the PC.

Appears as a COM port to PC apps.

Simples.

karoui
Associate II
Posted on March 19, 2013 at 20:41

thanks clive1 for your response :)

neil.andrew can you explain more about virtual port com: how can i configure it  and if you have example it will be better  for more clarification 

Posted on March 19, 2013 at 21:57

From an STM32F4 perspective there really is no difference, you connect the USART  Tx and Rx pins to this USB-to-CMOS Serial converter. As most computers these days don't have a built in serial port this can make a lot of sense. Serial communications is used a lot in some embedded applications due to it's simplicity, robustness and cost.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 19, 2013 at 23:40

''neil.andrew can you explain more about virtual port com: how can i configure it''

 

Have you never used a serial-to-USB adaptor??

You just plug it into your PC, and a COM port appears. Simples!

(the very first time, as for any USB device, you may need to go through the usual driver install process - the documentation for the particular product you choose will explain the process)
karoui
Associate II
Posted on March 20, 2013 at 00:07

No i didn't use  any serial to USB adapter . Can i use a simple connector USB micro A or B instead of

 The USB TTL Serial cables as shown in this video 

http://www.youtube.com/watch?v=kP6iamT-ocI

Posted on March 20, 2013 at 07:46

''I am a beginner  in programming with stm32''

OK, so it's becoming clear that it's not just the STM32 that's new to you?

Have you ever done any form of programming before?

Have you ever done any microcontroller programming before?

http://bit.ly/T6pTIA

''Can i use a simple connector USB micro A or B instead of

 The USB TTL Serial cables''

 

No.

''as shown in this video 

http://www.youtube.com/watch?v=kP6iamT-ocI

 ''

 

That video is using the STM32 itself to implement the USB protocol.

Implementing the USB protocol is (at least) an order of magnitude more complex than just using a UART - you really need to start with the basics!