You are here
JAL Library for the nRF905 transceiver module
The JAL library for the nRF905 supports all features of the nRF905 transceiver module, offering an easy to use API. The module is controlled via an SPI interface and operates on a power supply of 3.3 Volt. If your PIC is connected to 5 Volt you need a bidirectional level shifter to connect to the module.
Two sample programs are provided with the library. The sample program 16f1825_nrf905.jal sends the message ‘Hello World 1!’ to a specific address, after which it switches to another address, sending ‘Hello World 2!’. When using the second sample program 16f1823_nrf905.jal and setting the correct receiver address, this program will add the text ‘Reply: ‘ to the received message and sends it back to the transmitter of that message. This replied message is then sent by the 16f1825_nrf905.jal program via an RS232 interface to a computer where it can be read using a terminal emulation program.
With various settings the library can be configured. These settings are:
• Setting the size of the receive buffer
• Using a hardware SPI interface or a software SPI interface. The default setting is using the hardware SPI interface
• Making use of the power pin of the transceiver module. If this is not needed, the power pin of the module must be connected to the VCC of the module. This also saves one pin on the PIC.
• Using the library on an interrupt basis. This feature will copy the received data to the receive buffer immediately after it is received. This gives the main program more time before it is able to process the received data. In most cases – where the main program is regularly checking if new data is available - this feature is not needed.
A video is available that shows the library in action: https://youtu.be/qVjPRgwLWbM
The video shows the following:
• On the right side the sample program 16f1825_nrf905.jal sends the ‘Hello World x!’ (x = 1 or 2) message to the two devices on the left. These devices run the sample program 16f1823_nrf905.jal, each with a different receiver address.
• Whenever a message is received by the devices on the left, a LED will blink and the message is copied including a ‘Reply: ’ text, which is then sent send back to the device on the right.
• The message received by the right device is sent to the RS232 (USART) interface and shown on the computer screen.
In the video the top left breadboard use a PIC and an nRF905 module on 3.3. Volt. The other boards have a PIC on 5 Volt so a bidirectional level shifter is used to connect the PIC to the nRF905 which operates on 3.3 Volt.