Table of contents
The RFzero BoardTest program can be used for checking your RFzero either after assembly or later on if you suspect that there may also be something wrong with your board.
Functionality
To test your RFzero using BoardTest requires the following peripheral devices connected
- A LCD with minimum two line and 16 characters. Only HD44780 LCD parallel interface is supported
- The USB port connected to the Serial Monitor or a similar terminal program
- A GPS antenna
- A frequency counter, oscilloscope or receiver able to detect the 10 MHz signal
The BoardTest welcome message.
The LCD shows the status during testing.
Pin check
BoardTest sets each of the A0-A5, D0-D9, D16-D21 pins active one by one for 250 ms before jumping to the next in a continuous loop. This can be verified using the on-board Test LED. The LCD shows which pin is currently active, P:xx. This verifies the connection to the various pins.
The LCD is connected to D10-D15 whereby those pins are also tested when writing to the LCD.
USB check
If data is received on the USB port the first eight characters are displayed on the LCD, U:xxxxxxxx. The data received is also echoed on the USB.
This verifies the USB connection both ways.
EEPROM check
A random value is written to the EEPROM and read back. The result is shown on the LCD as E:OK/No.
This verifies the I2C/Wire bus and the EEPROM connection.
GPS check
All default NMEA frames except the $GPGGA frame are are disabled.
GPS data is echoed on the USB port. The PPS LED will flash when the GPS receiver picks up a valid signal from the satellites.
This verifies the connection to the GPS both ways and the GPS receiver.
Si5351A check
The Si5351A will generate a 10 MHz carrier signal that can be heard in a receiver or shown on a frequency counter.
When the PPS LED flashes the crystal frequency of the Si5351A is measured and printed on the LCD, F:xxxxxxxx and on the USB too.
This verifies the I2C/Wire bus and the Si5351A connection and the Si5351A RF.
Really simple pin check
If you just want to perform a really simple pin check you can use this example where each pin, A0-D21, is active for 250 ms in a continuous loop.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
// RFzero include and object creation #include <RFzero.h> // MUST ALWAYS be included int pin; int lastTime = 0; void setup() { // Set output mode for A0 to D21 for (pin = 0; pin < 28; pin++) pinMode(pin, OUTPUT); // Turn D20 and D21 off but note they are active low, thus high to turn off digitalWrite(20, HIGH); digitalWrite(21, HIGH); pin = 0; // Start pin } void loop() { if (millis() - lastTime > 250) { // Switch old pin off if ((pin == 20) || (pin == 21)) digitalWrite(pin, HIGH); // D20 and D21 are active low else digitalWrite(pin, LOW); // Increment to next pin and loop if top is reached if (++pin == 28) pin = 0; // Switch new pin on if ((pin == 20) || (pin == 21)) digitalWrite(pin, LOW); else digitalWrite(pin, HIGH); lastTime = millis(); } } |