nRF51 SDK: Cherry8x16 Keyboard Application

| nRF51 SDK

- Home
- Related Pages
- API Reference
- Data Structures

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Cherry8x16 Keyboard Application

The Cherry 8x16 Keyboard Example demonstrates how to use the Cherry 8x16 keyboard to transmit ascii letters over uart to any COM listener, using the hardware delivered in the nRF51822 Development Kit.

It detect the characters by scanning the matrix for any state change (key(s) press or release). If any changes from the previous state is identified, then the received key codes are converted from hid to ascii which are transmitted over uart and can be listened to by any COM listener like example:PUTTY (this is default behavior). However commenting out USE_UART can be done to output modifier key presses to LEDs through GPIOs.

The application starts with configuring the uart and the pins used for the keyboard. The main loop sends a new ascii value through the uart if there is a new packet from the keyboard.

The source code and project file can be found in the `<InstallFolder>\Nordic\nrf51822\Board\nrf6310\ext_sensors\cherry8x16_example` folder.

# Setup

Instructions on how to set up the nRFgo Motherboard: nRFgo Motherboard Setup (nRF6310).

The UART pins are differently connected for this example since the keyboard uses the three first ports. The alternative pin setup is:

- TXD should be connected to PIN 24 (P3.0)
- RXD should be connected to PIN 25 (P3.1)

This example is meant to be used with the nRF6423 board. Connections between the two boards:

- nRF6423 - nRF6310
- (column lower) P3 - P0
- (column higher) P4 - P1
- (rows) P2 - P2

This example can also be used with other keyboards, in which case row and column mapping have to be changed.

# Testing

The Cherry 8x16 Keyboard Example Application can be tested as follows:

1. Compile and program the application.
2. Start a COM listener like PUTTY and connect to the used COM port at 38400 baud rate.
3. Typing on the keyboard should show the pressed letters on the PUTTY window.