Communicate (FDTI- TTL) UART (Without MAX232 Chip) directly with ARM MCU
Moderator: Benj
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Communicate (FDTI- TTL) UART (Without MAX232 Chip) directly with ARM MCU
Hi LeighM,
Thank you very much for your fast reply. Now I changed into the new topic. Also, I need another help. How to communicate the ARM MCU's UART port component directly through FDTI TTL UART adaptor (without using MAX232 IC)? I have tried to communicate but FDTI receives wrong Data. If MCU sends string "1" computer received 0A in Hex. Please guide me on how to communicate the MCU directly without any inverter IC(MAX232).
In our product, there is no Max232 inverter IC circuit populated and our product FW directly communicates through UART (TTL) through FDTI chip. For testing the ADC value (I will develop the FW through Flowcode and communicate through FDTI), I need to use the same TTL method in our Functional Tester.
Thanks in advance.
Karthick
Thank you very much for your fast reply. Now I changed into the new topic. Also, I need another help. How to communicate the ARM MCU's UART port component directly through FDTI TTL UART adaptor (without using MAX232 IC)? I have tried to communicate but FDTI receives wrong Data. If MCU sends string "1" computer received 0A in Hex. Please guide me on how to communicate the MCU directly without any inverter IC(MAX232).
In our product, there is no Max232 inverter IC circuit populated and our product FW directly communicates through UART (TTL) through FDTI chip. For testing the ADC value (I will develop the FW through Flowcode and communicate through FDTI), I need to use the same TTL method in our Functional Tester.
Thanks in advance.
Karthick
- Attachments
-
- uart.PNG (965.78 KiB) Viewed 3475 times
-
- test uart.fcfx
- (10.1 KiB) Downloaded 129 times
-
- Posts: 143
- Joined: Mon Aug 20, 2018 11:04 am
- Has thanked: 42 times
- Been thanked: 41 times
- Contact:
Re: Communicate (FDTI- TTL) UART (Without MAX232 Chip) directly with ARM MCU
Hi Karthick
I have used a stm32 + FTDI successfully. I use termite 3.4 software but I think anything else is fine
Check that the speed and settings of the com port are identical both on flowocode and on the program you use to communicate.
usually the ftdi cards allow to go both at 3.3v and at 5v. The voltage must be identical to that of the microcontroller
If the microcontroller uses a lower voltage, a level shifter will be necessary
I have used a stm32 + FTDI successfully. I use termite 3.4 software but I think anything else is fine
Check that the speed and settings of the com port are identical both on flowocode and on the program you use to communicate.
usually the ftdi cards allow to go both at 3.3v and at 5v. The voltage must be identical to that of the microcontroller
If the microcontroller uses a lower voltage, a level shifter will be necessary
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: Communicate (FDTI- TTL) UART (Without MAX232 Chip) directly with ARM MCU
Hi Alkaline,
Thanks. I also used Termite 3.4 and i get the junk characters. I 'm not getting what I expected. Can you please review the attached code and advice where I have made the mistake? I guess we need to invert the RX-TX signal through MAX232.
Now I just increase the count for every 500ms and I'm getting junk characters instead of digits. I'm using the STM Nucleo-F446ZE Discovery board with FDTI and communicate through Termite 3.4. Thanks.
Karthick
Thanks. I also used Termite 3.4 and i get the junk characters. I 'm not getting what I expected. Can you please review the attached code and advice where I have made the mistake? I guess we need to invert the RX-TX signal through MAX232.
Now I just increase the count for every 500ms and I'm getting junk characters instead of digits. I'm using the STM Nucleo-F446ZE Discovery board with FDTI and communicate through Termite 3.4. Thanks.
Karthick
- Attachments
-
- test uart.fcfx
- (9.92 KiB) Downloaded 136 times
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: Communicate (FDTI- TTL) UART (Without MAX232 Chip) directly with ARM MCU
Hi Alkaline/LeighM,
Attaches is the response from STM32 MCU's UART port. I get some junk characters instead of numerical data.
I have tried to build using USART2 port, but there is some error if I choose pre-configured USART or UART ports directly. If I choose software mode and I define the RX and TX pin manually then there is no error during compile. Below are some examples of pictures. Please help.
Karthick.
Attaches is the response from STM32 MCU's UART port. I get some junk characters instead of numerical data.
I have tried to build using USART2 port, but there is some error if I choose pre-configured USART or UART ports directly. If I choose software mode and I define the RX and TX pin manually then there is no error during compile. Below are some examples of pictures. Please help.
Karthick.
- Attachments
-
- test uart.fcfx
- (9.9 KiB) Downloaded 134 times
-
- Error if choose USART2 directly.PNG (238.04 KiB) Viewed 3459 times
-
- UART response from MCU.PNG (191.41 KiB) Viewed 3459 times
-
- Posts: 143
- Joined: Mon Aug 20, 2018 11:04 am
- Has thanked: 42 times
- Been thanked: 41 times
- Contact:
Re: Communicate (FDTI- TTL) UART (Without MAX232 Chip) directly with ARM MCU
Hi Karthick
i'm using the following hardware
MCU stm32f030RC
usb <-> uart LC234X
I modified the project to adapt it to my pcb and everything works perfectly even at different speeds 19200 and 115200
have you checked that the pins are connected correctly?
GND <-> GND
RX (MCU) <-> TX (FTDI)
TX (MCU) <-> RX (FTDI)
i'm using the following hardware
MCU stm32f030RC
usb <-> uart LC234X
I modified the project to adapt it to my pcb and everything works perfectly even at different speeds 19200 and 115200
have you checked that the pins are connected correctly?
GND <-> GND
RX (MCU) <-> TX (FTDI)
TX (MCU) <-> RX (FTDI)
- Attachments
-
- uart_debug.jpg (47.71 KiB) Viewed 3454 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Communicate (FDTI- TTL) UART (Without MAX232 Chip) directly with ARM MCU
In the attached project you had not selected the Rx/Tx pins? ...I have tried to build using USART2 port, but there is some error if I choose pre-configured USART or UART ports directly.
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: Communicate (FDTI- TTL) UART (Without MAX232 Chip) directly with ARM MCU
HI LeighM,
Thanks Again. Yes, you are right. I forget to select the port. I thought when I select the Channel 2 -USART2, Flowcode define the pins automatically.
After defining the PD5 for Tx and PD6 for Rx and now working fine. But it is not working with software mode and manual define ports.
Thanks.
Karthick.
Thanks Again. Yes, you are right. I forget to select the port. I thought when I select the Channel 2 -USART2, Flowcode define the pins automatically.
After defining the PD5 for Tx and PD6 for Rx and now working fine. But it is not working with software mode and manual define ports.
Thanks.
Karthick.
- Attachments
-
- WORKING.PNG (225.64 KiB) Viewed 3451 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Communicate (FDTI- TTL) UART (Without MAX232 Chip) directly with ARM MCU
Glad to hear you now have it working,
I noticed it is set to 16MHz
Is the Flowcode project "clock" speed correct for the crystal on your hardware?But it is not working with software mode and manual define ports.
I noticed it is set to 16MHz
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: Communicate (FDTI- TTL) UART (Without MAX232 Chip) directly with ARM MCU
Actually there is no external OSC present in the STM32F446 Nucleo board. As per datasheet, the STM32F446ZET6 chip has the internal oscillator (Internal 16 MHz factory-trimmed RC (1% accuracy)) and that is 16Mhz. So I choose 16Mhz.
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Communicate (FDTI- TTL) UART (Without MAX232 Chip) directly with ARM MCU
When you try software mode, do you get anything at all? or do you get garbage, i.e. wrong characters?
Software mode will only work (be accurate enough) at lower baud rates.
Software mode will only work (be accurate enough) at lower baud rates.