I'm working on a board with a MAX3221. I chose this device because you can disable the DOUT-RS232 output and the RIN-RS232 input which is very important, and critical, for my application.
In order to achieve this, the MAX3221 /FORCEOFF input shall be LOW to disable the DOUT-RS232 output and /EN input shall be HIGH to disable the RIN-RS232 input. I know that the microcontroller I'll use to drive the MAX3221 has pull-up and pull-down resistors on the outputs but:
- The GPIO pins are configured as INPUTs on reset (floating).
- The Pull-up or Pull-down is not enabled on reset.
- I have to configure the pull-up and pull-down I need in software and that doesn't happen instantaneously on boot.
Therefore, I need a hardware solution using external pull-up and pull-down resistors directly on the MAX3221 pins since I need the DOUT-RS232 output and RIN-RS232 input disabled the moment I power up the board.
I have no issues with the pull-up resistor and there is plenty of information about that, but I'm struggling to know how to calculate an appropriate pull-down for the /FORCEOFF input. There are quite a few answers on this exchange but all of them explain where and why to use pull-downs but not how to calculate them.
As a starting point, I know that any reasonably value resistor I put in the input will pull down the pin. The problem I have is what value is the best for when I need to send a "1" to the pin.
Given the three initial conditions on the input pins stated above, I decided to configure the output pins as push-pull which by the way is the default configuration for an output pin. So I have the following circuit for sending a "1" to the /FORCEOFF pin:
I'm trying to calculate the resistor so I only draw 5ma from the pin while maintaining 3v to ensure the MAX3221 sees a "1" in the input pin. The MAX3221 datasheet doesn't contain any input current value for /FORCEOFF and only mentions an input leakage current of 0.05ua TYP to 1ua max so I assume it is negligible for the calculation.
It seems pretty straightforward, but I'm not sure if I'm doing this right.