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 18, 2013 at 23:32

Perhaps you might start by look at some USART, and other examples, in the firmware library for your specific board? Does your board for instance have a serial port connection, and if so to what pins, etc?

Got any experience with other embedded programming, or electronics?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
karoui
Associate II
Posted on March 19, 2013 at 00:12

no i haven't experience in other embedded programming .

I just want to pass data from accelerometer to uart then to pc through the usb port 

Posted on March 19, 2013 at 00:57

Any C programming? What tool chain, or development system, are you using?

What board and chips are we talking about, ST make several dozen?

How do you want to send the data, as binary, as ASCII, formatted in some way?

Is this a homework project? Work related?

Sorry for all the questions, just trying to extract some salient details.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
karoui
Associate II
Posted on March 19, 2013 at 10:45

It's not a homework project,am trying to start my first project on embedded systems

it consists on setting up a road's driving assistant which detect

abnormalities and tremors on the road!But i need at the first time to set my 

threshold which will be chosen through different experiences but i didn't know how to 

pass the mesures i took from the MEMS accelerometer of  stm32F4 to the computer.

i use IAR workbench  as a developpement environment and i have been programming  with c .

thanks for help :)

Posted on March 19, 2013 at 11:42

''It's not a homework project''

 

So is it for your work, or just your ''hobby''?

''trying to start my first project on embedded systems''

Again, do you have any experience with programming in any other field?

Specifically, are you experienced in 'C'?

Do you have at least a basic understanding of electronics?

http://bit.ly/T6pTIA

 

karoui
Associate II
Posted on March 19, 2013 at 12:24

yes  i am exprienced in c and  i have basic electonics skills

Posted on March 19, 2013 at 13:11

So where's the problem?

Think about how you'd design  a program in whatever other field(s) you're familiar with - by breaking it down into manageable chunks...

frankmeyer9
Associate II
Posted on March 19, 2013 at 13:56

To be a little more specific:

There are nice STM32 discovery boards with MEMS sensors, and evaluation boards with RS232. Get the example software for boards you find appropriate, use it as a template, and construct your own application from it. That should get you started quickly.

Posted on March 19, 2013 at 18:35

If you are using an STM32F4-Discovery board, you'll need to start by wiring up a serial port. For an RS232 connection, you'll need a signal level conversion IC like a MAX232. Not sure how to do this, review some schematics for other boards utilizing the chip, and external connectors.

I have posted several serial port code examples for the STM32F4-Discovery.

In order to be successful with your project YOU will need to read the documentation for the board and chips you plan to be using.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..