Close
0%
0%

Morse keyboard

Using ARM LPC2148 implemented a Morse code keyboard

Similar projects worth following
136 views
The aim of this project is to design a keyboard which takes morse code as input and then print the respective character on PC.
We achieved this by transmitting the Morse code through butttons on ARM LPC2148,
and then interfacing it with the PC to print the desired output.

LPC2148 is the widely used IC from ARM-7 family. It is manufactured by Philips and it is pre-loaded with many inbuilt peripherals making it more efficient and a reliable option for the beginners as well as high end application developer.

First we need to convert our ARM LPC 2148 processor into a HID device. To achieve this various changes have to be made in the USB Descriptor.

USB devices report their attributes using descriptors, which are data structures with a defined format. Each descriptor begins with a byte-wide field containing the total number of bytes in the descriptor followed by a byte-wide field identifying the descriptor type.

When an USB device is attached to the USB bus, the host uses a process known as bus enumeration to identify and configure the device. The USB Host sends setup requests as soon as the device has joined the USB network. The device will be instructed to select a configuration and an interface to match the needs of the application running on the USB Host. Once a configuration and an interface have been selected, the device must service the active endpoints to exchange data with the USB Host.

Human Interface Device (HID) does not require any special USB driver, since the HID support is already built into Windows 2000 and Windows XP. Therefore HID devices can be directly connected to the computer. 

The USB Device encodes the Morse code into a specific format and then maps it to its corresponding Key code.

For ex:- The Morse code for letter D is   '  -..  ' . Most Morse characters only contain up to 5 marks (dashes or dots). We need 5 bits to represent such character. Inside the microcontroller eight bits are reserved for each character, so we have 3 unused bits. We used these to encode the length of each character. This makes the BInary Morse code data for letter D(0x61) = 0x 011 00001 .  

The bits 5-7 are used to indicate the length of the Morse character: the binary 011 (decimal number 3). They indicate that our Morse character contains 3 marks: bits 0,1 and 2.

type.h

Has the type definitions

plain - 517.00 bytes - 11/27/2018 at 09:40

Download

usbuser.c

Contains the endpoints changed to send data through USB

plain - 6.26 kB - 11/27/2018 at 09:39

Download

plain - 1.27 kB - 11/27/2018 at 09:39

Download

Portable Network Graphics (PNG) - 269.81 kB - 11/27/2018 at 09:38

Preview
Download

Portable Network Graphics (PNG) - 280.07 kB - 11/27/2018 at 09:38

Preview
Download

View all 8 files

  • 1 × ARM LPC2148 Microcontroller

  • 1
    Using Mirocontroller as an HID Complient Keyboard

    Configuring the various USB desciptors to use LPC as a Keyboard.

  • 2
    Morse code detection

    Detecting the morse code entered by the user via the switch buttons of Microcontroller.

  • 3
    Morse code to QWERTY key code conversion

    The obtained Morse code is then converted into its corresponding Key code and the printed onto the PC.

View all 3 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates