# RS 232 - 4th pin purpose

I have been using the schematic of MCB1700 Evaluation board in my customized ARM Powered board. I planned to use RS 232 communication on my board. When I go through the schematic, I am stuck with the #4 pin of DB9 connector which is a DTR Pin for RS 232. My confusion is, that #4 pin is connected to NPN transistor as given in the image. Why is that pin used there? Thanks in advance for the help!

• Just a quick glance suggests the following: There is an RST jumper available. If that jumper is in place and if the DTR line is then driven positive, the reset line (RST) will go low. Allows external forcing of a reset. Don't know what else is in the circuit, but that's not an uncommon circuit item to see. – jonk Mar 10 '18 at 6:38
• what is the purpose of the RST jumper? .... btw: that is not 4th pin ... it is pin #4 (pin number 4)(or pin 4) ... there is a difference between the two statements – jsotola Mar 10 '18 at 6:39
• @jonk, which means asserting DTR pin #4 while communication, will reset the controller or else I can reset the controller using a push button...is that correct? – Dhans Mar 10 '18 at 6:57
• @Dhans Yeah. I see the button there, too. So yes, the button will do that as well. – jonk Mar 10 '18 at 7:08
• @Dhans Yes, but that hardware is probably controlled by some software. And some of that software may require that functionality. And again, I wouldn't know. When I see something like this it simply tells me what I already told you -- that some software, connected to COM0 (and possibly also COM1), needs that functionality to reset the device, either for causing a special kind of restart accessing special software on the device or else permitting the download of new code onto the device. It's a VERY COMMON feature. But I can't say you actually need the feature. Only you can work that out. – jonk Mar 12 '18 at 5:15

The other answers have explained what dtr is doing with that transistor. I'll explain why you would want to use dtr to reset your procesor.

You can often run a serial connection without using dtr/rts. In those cases, you can use the dtr to send a reset to the processor.

This can be handy if other side of the RS232 connection can recognize error states in your processor. Say, fir example, your processor should be reporting data once a second, but stops because it got hung up. The system at the other end of the RS232 could recognize that no data was coming and assert dtr to reset your processor and get it going again.

Another reason to do this is when your code includes a boot loader that is active for just a short time on boot. When you want to change the firmware, you assert dtr, then send the bootloader a command to get ready to change the firmware.

The Arduino bootloader works that way. When you activate the serial connection, you have to wait a couple of seconds for the bootloader to exit before you can communicate with your own code on the Arduino.

I expect other bootloaders do something similar. After all, the Arduino folks didn't invent the idea. They used a known method when implementing their bootloader.

9-pin RS-232 pin 4 is defined as DTR (Data Terminal Ready).

The little 2-pin header will accept a jumper (shunt) that shorts the two pins together. If this jumper is installed, your application program that drives the RS-232 signal has the ability to force a reset on the board simply by placing the DTR line in the appropriate state.

This can be useful.

• As you said, if that is the purpose of that connection, then why the board get reset before the data comes into the controller? – Dhans Mar 10 '18 at 6:59