I created these notes to help better understand the role of the components we are soldering on the MAKERbuino. They also contribute towards an understanding of the schematic. Please feel free to suggest changes.
Female 6-Pin Angle Header (JP2, Serial Programmer)
I’m not sure why this is called JP2. I believe JP usually refers to a jumper but this is a connector.
The connector is for the serial programmer, which we are told is a UART programmer.
UART stands for Universal Asynchronous Receiver Transmitter and it refers to a physical circuit whose main purpose it is to transmit and receive serial data to/from another UART. It is simple to implement because it has two lines (transmit and receive) and doesn’t need a clock signal. The only configuration required is that both UARTs need to be using the same rate (in lieu of a clock) and data structure. Because it is universal (not specialised) it is nice to have on a programmable device so that you can communicate with a host of other devices, including a computer: you can get UART USB connectors which allow you to turn your USB port into a UART to communicate with other UARTs.
In our case the UART (the logic) is in the microcontroller. The serial connectors transmit and receive lines (SERIAL_PORT_TX and SERIAL_PORT_RX) simply connect to pins 2 and 3 of the microcontroller which are the transmit and receive pins of its two-wire serial interface (refer to the datasheet).
But there are 4 other pins on the connecter. What are they for?
Well there are two power pins, which is useful for giving or receiving power (in case one of the UARTs doesn’t have its own power).
That leaves us with two pins: DTR and CTS. In serial communication discourse, these acronyms have the following specific meanings:
- DTR: Data Terminal Ready
- CTS: Clear To Send
Data Terminal Ready
This is a line used to send a request to connect. Normally one device will use this line to request the other device to connect to the data lines and begin communicating. Therefore this line is used to initiate communication and not actually send data. Such a line is called a ‘control’ line (vs a ‘data’ line).
It’s curious then that this is connected to the RESET pin of the microcontroller via a capacitor. Let’s think about this for a moment. This connector is being used for the purposes of programming the microcontroller. So communication needs to take place when the microcontroller is in a programmable state and not in its running state. Well it turns out that such a state is achieve directly after reset (when the bootloader is running). So when the UART wants to request the microntroller to connect to the line it actually wants it to enter programming mode. And so it is appropriate to connect the DTR line to the RESET pin of the microcontroller.
The capacitor is inserted into the line so that, regardless of how long the DTR signal goes low for, the RESET line only experiences a pulse. This is achieved because a capacitor only allows current to flow ‘through’ it for as long as it is charging. When it is fully charged, no more current will flow. This is necessary because in serial communication the DTR pin stays low (it does not pulse). So the capacitor turns that long (constant) low into a very short (momentary) low.
Clear To Send
This is a reciprocal line where the connected device (which received the DTR signal) sends back a signal to say that communication can take place - it is ready to receive data. With our microcontroller there is no reason why this should ever be inactive so it is wired into it’s active-low state by being connected to ground.