FTDI RS232 breakout board connection with AVR

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi everyone,

 

I am having trouble wrapping my brain around this. I have this generic FT232RL USB to UART Serial Adapter. Want to test my bootloader for loading firmware but have few questions.

 

 

Q.1 The DTR pin on these modules are suppose to be open drain and they are not connected to any pull up or pull down resistors (I checked). So according to my understanding open drain means the pin can only be in two states, ground or floating. So why pin is at 5V when I connect the module to PC?

 

Also connected a led to DTR pin it blinks as I toggle the pin from PC. This leads to my another question.

 

Q.2 So apparently DTR pin has 5V from the PC. The AVR is being powered from external 5V. Both devices ground are connected. To reset the AVR, we connect DTR pin to our AVR reset pin which is pulled up by a 10k resistor. So two different 5V sources will be connected to each other, won't this be a problem?

 

Q.3 The Tx and Rx lines, do they need any in series or pull up resistors? Considering the reset stage. 

 

I am not using VCC and CTS pin of the module for any purpose.

 

Thank you.

This topic has a solution.
Last Edited: Sun. Apr 25, 2021 - 07:06 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Greetings -

 

No help with Q1 but here are the other two...

 

Q2. I strongly suggest tying Vccio of the FT232R to the Vcc of the micro. This way, the logic levels, in and out, of the FT232R will be exactly the same as the micro. As for the reset pin, it is NOT connected to MCU's Vcc. It is pulled up with a 10K resistor. The only real consequence is to add a little supply current when the reset (DTR) is low.

 

Q3. No resistors needed. One very common gotcha - you need to tie MCU Tx to FT232R Rx and MCU Rx to FT232R Tx. So in each case, you connect a logic output to a logic input.

 

Hope this helps

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
As for the reset pin, it is NOT connected to MCU's Vcc. It is pulled up with a 10K resistor.

Ah, I see. This clears up a lot. Thank you Jim.

ka7ehk wrote:
I strongly suggest tying Vccio of the FT232R to the Vcc of the micro. This way, the logic levels, in and out, of the FT232R will be exactly the same as the micro.

On this module the VCCIO and VCC of FT232R is tied together with a jumper. Removed the jumper now I can connect MCU's VCC to VCCIO. Great info.

Thanks.

Last Edited: Sat. Apr 24, 2021 - 10:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The DTR pin on these modules are suppose to be open drain

The ft232rl datasheet says nothing about DTR output pin being open drain (or collector).   Hence, expect it to be high or low.

 

also

Table 3.4 UART Interface and CUSB Group (see note 3) Notes:  3. When used in Input Mode, the input pins are pulled to VCCIO via internal 200kΩ resistors. These pins can be programmed to gently pull low during USB suspend (PWREN# = “1”) by setting an option in the internal EEPROM.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DTR is normally connected to reset via a series capacitor. Have a look at a few Arduino schematics to see how.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:
The ft232rl datasheet says nothing about DTR output pin being open drain (or collector).

I was following this stackexchange thread where the person said it's open drain. But like you said datasheet says it's not and my testing also shows it's not.

 

Brian Fairchild wrote:
DTR is normally connected to reset via a series capacitor.

I never really understood that series capacitor.

 

 

I mean the DTR pin is normally high, we can cleanly generate a low pulse for 0.5ms to 1ms, it will go back high and the micro will reset, why add capacitor? I guess it's to prevent that unwanted low pulse when you open the COM port on PC for the very first time after the module has been plugged in. Maybe not, I don't know.

 

 

Last Edited: Sun. Apr 25, 2021 - 07:29 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Heisen wrote:

I never really understood that series capacitor.

 

It means that you can use any software to reset your AVR, normally to enter a bootloader. A simple high to low transition on DTR will cause a pulse on reset which will then go high as the capacitor charges with no need to set DTR back to a logic 1.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."