2018-04-17 07:53 AM
Hello,
I have a STEVAL-FKI868V1 based on a Nucleo L152RE board and i would like to connect a RS232 to my RX pin to get the information and then send it when i click on the button.
So my main problem is about the code to developp to get the information from the RX.
Is someone could help me, please.
Thx
2018-04-17 08:25 AM
RS232 specifically, using a level converter like a MAX3232? Or serial communications using a USART more generally?
The Nucleo board provides for a VCP (Virtual Serial Port) connection to the PC via the ST-LINK, one can open this up in a Terminal application in Windows/Linux
The Cube L1 libraries should have assorted examples for USART connectivity.
http://www.st.com/en/embedded-software/stm32cubel1.html
>>So my main problem is about the code to develop to get the information from the RX. Is someone could help me, please.
Sounds like a school or work assignment, generally you're expect to do that work yourself.
2018-04-17 10:44 AM
Thank you.
No i have a module from Precla Molen that communicate in RS232. So i will do in USART.
>>Sounds like a school or work assignment, generally you're expect to do that work yourself.
Yes usually but i have to do a quick proof of concept without spending that much time just to get information from sensors... I wanted to test this technology that i do not know.
I also have a pb IAR. I can only connect my device once. After that i have to delete everything and install it again, because i cannot rebuilt all.
2018-04-18 03:56 PM
The micro-controller will not accept RS232 level directly, you will need to interface to one of the available USART using a MAX3232 type device to convert the levels.
http://www.ti.com/lit/ds/symlink/max3232.pdf
2018-04-19 02:05 AM
Thank you.
So if I sum up the hardware part:
1. My sensor is connected to a box that gives me an output in RS232.
2. I connect the RX/TX from RS232 to a MAX3232
3. To do so, I just have to connect 4 connectors :
a. DOUT to TX (RS232)
b. RIN to RX (RS232)
c. Power to 3,3V or 5V to an external power
d. VCC to the ground (RS232)
4. Then I can connect the microcontroller :
a. DIN from MAX323 to the TX PA2 of the microcontroller
b. ROUT form MAX323 to the RX PA3 of the microcontroller
5. Depending on the voltage, I have to put 4 capacitors
Do I need a minimal current for the power supply dimension? Does the microcontroller have an output in 5v?
Thank you for helping
De : Clive One
Envoyé : mercredi 18 avril 2018 22:57
À : Marcellin Gros, Edwin (RC-FR EM TI)
Objet : Re: - Re: RS232 Communication
STMicroelectronics Community <https://community.st.com/?et=watches.email.thread>
Re: RS232 Communication
reply from Clive One<https://community.st.com/people/Turvey.Clive.002?et=watches.email.thread> in Interface and Connectivity ICs - View the full discussion<https://community.st.com/message/194315-re-rs232-communication?commentID=194315&et=watches.email.thread&sharpcomment-194315>