1
\$\begingroup\$

I'm trying to get into embedded system design and have been hung up on what hardware is required to use a USB connection to communicate with the microcontroller (and therefore, flash it). Here's what I have so far.

I will be using an ATMEGA164 (data sheet)

I want to program the microcontroller via a USB so I will use a USB to UART bridge, specifically the FT231XS-U (data sheet)

The data sheet for the FTS231 has a diagram for USB to RS485. USB to RS485

Here's where I start to get confused. I'm presuming that the TXD and RXD pins of the FT231 (after the RS 485 level converter) connect to the RDX and TXD pins of the microcontroller (respectively). Is that correct? Also, the FT231 says that its IO pins (in this configuration) are 3.3V and that 3.63V is the maximum but the microcontroller will be powered by the 5V from the USB so will I need a logic level converter? When I look for a RS485 logic level converter I don't find anything that matches what I'm thinking of which leads me to believe that I'm misunderstanding something.

Am I on the right track or am I misunderstanding something else entirely?

Edit: I intend to use a bootloader, perhaps Optiboot.

\$\endgroup\$
3
  • \$\begingroup\$ Will you be using a bootloader? \$\endgroup\$ Commented Jul 11, 2022 at 1:08
  • \$\begingroup\$ Yes, I'm thinking of using Optiboot. \$\endgroup\$
    – hunter3216
    Commented Jul 11, 2022 at 1:51
  • 1
    \$\begingroup\$ TX and RX from the FTDI can go directly to the ATMEGA if VCCIO is at the right voltage. \$\endgroup\$
    – Jeroen3
    Commented Jul 11, 2022 at 6:21

1 Answer 1

1
\$\begingroup\$

You cannot program this microcontroller with UART According to the datasheet, you can program the microcontroller either with JTAG interface or ISP (in-system programming which uses SPI protocol) if you wanted to program this microcontroller with UART, then you have to have a bootloader code that makes this feature possible

\$\endgroup\$
2
  • \$\begingroup\$ So if I used a bootloader like Optiboot I would be able to use this configuration? \$\endgroup\$
    – hunter3216
    Commented Jul 11, 2022 at 1:59
  • \$\begingroup\$ You can try Optiboot. It's written that ATmega164A/P is supported. \$\endgroup\$ Commented Jul 11, 2022 at 2:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.