Interfacing with the Pmod
UART/Pmod Interface
The PmodBT2 communicates with the host board via the UART protocol. By default, the UART interface uses a baud rate of 115.2 kbps, 8 data bits, no parity, and a single stop bit. The startup baud rate may be customized to predefined rates or set to a specific user-customized baud rate ranging from 1200 bps to 921 kbps.
The reset pin (RST) on J1 is active low. If the RST pin is toggled, the device will undergo a hard reset. This hard reset performs similarly to a power cycling of the device. The second interface besides the standard UART signals is the STATUS pin also on J1. The STATUS pin directly reflects the connection status of the device. STATUS is driven high by the device when connected and is driven low otherwise.
Jumpers
The PmodBT2 has several settings that are configurable via jumper blocks JP1 through JP4. These jumpers are all sampled in the first 500 ms of operation and configure the RN-42 module's behavior whether they are shorted are un-shorted when the PmodBT2 is powered up.
JP1 restores the device to factory default settings after three transitions of the jumper setting (short-to-open or open-to-short). This only works if JP1 was initially shorted before the Pmod BT2 was powered on. Also, each transition must be separated by a 1-second pause. If done correctly, the LED on the Pmod BT2 will blink rapidly.
JP2 enables pairing with a special device class defined by the user in software. This may be used so that the Pmod BT2 operates as a substitute for an RS232 cable. JP3 enables auto-connect to a stored address defined by the user. Finally, JP4 chooses whether to operate at the stored baud rate (115.2kbps default) or a baud rate of 9600 regardless of the software selected rate when shorted.
Physical Dimensions
The pins on the pin header are spaced 100 mil apart. The PCB is 1.5 inches (3.81 cm) long on the sides parallel to the pins on the pin header and 0.8 inches (2.032 cm) long on the sides perpendicular to the pin header. The PCB on the RN-42 module extends the length of the PCB from 1.5 inches to 1.75 inches (4.445 cm).