Captain Lark Game Console

A retro video game built using LPC2148 and LCD 5110 display

Similar projects worth following
A retro video game built using LPC2148 and LCD 5110 display

The console is made using an LPC2148 Blueboard and an 84x48 LCD5110 screen. The console has three games to choose from. First one is the title game, Captain Lark. Other two games are bonus games. 

Captain Lark:

The backstory is that the Mystic Owl(!!) stole Captain Lark's eggs and have kept it inside the Magic Castle. Captain has to pass through a number of obstacles to reach the castle. 

Game play is similar to the popular game flappy bird. The player has to keep on jumping rhythmically, and obstacles can be of two types, either with a hole, or with a breakable gate. Holes can be at three different places. Similarly Gates. When the lark is facing a breakable gate, it has to shoot the gate in order to pass through. There is one button to shoot, one button to jump. Whenever you hit a wall, the game is over.


Pong is the classic pong game, where you play pong with the computer. When you miss 5 times, you lose.

Freaky falcon:

A watered-down version of the game space invaders. Instead of instant shooting, you have to plant a timed rocket and move away. You lose if at least one enemy ship reaches your base. 


Timer initialization and other functions. eg.delay()

C Source File - 1.15 kB - 11/29/2017 at 09:45



SPI library for the LCD 5110 screen

C Source File - 2.43 kB - 11/29/2017 at 09:45



Header file for the PCD8544.c

h - 1.18 kB - 11/29/2017 at 09:45



Main file to build

C Source File - 54.06 kB - 11/29/2017 at 09:45



Header file for timer.c

h - 294.00 bytes - 11/29/2017 at 09:45


View all 11 files

  • 1 × LPC2148 BlueBoard Microprocessors, Microcontrollers, DSPs / ARM, RISC-Based Microcontroller
  • 2 × Tactile push buttons Switches
  • 1 × LCD5110 Recycled display from old nokia phones
  • 1 × Jumper Wires

  • Board Peripherals

    Anand Mahadevan S S11/29/2017 at 03:26 0 comments

    Peripherals Used in the Board:

    Since the board already had a usable push button,char LCD and a piezo buzzer, we decided to make use of that too. 

    We have used SPI0 to interface the LCD screen to the board. For this, we had to write a library on our own. We referred the arduino library for the LCD5110 screen to obtain values for parameters like BIAS_VOLTAGE, OPERATING_VOLTAGE, TEMPERATURE_COEFFICIENT etc...

    To play game sounds, we thought of using the piezo buzzer, making use of PWM and the other timer.

    We wrote functions using the PWM in the LPC2148 to play a sound of definite frequency. After a lot of hit and trial, we found a frequency range where the notes were disctinct and clear. Then we coded an octave of notes into a library, and made random melodies using arrays and looped through them when we wanted to play the melody. This sounds like the NOKIA 3310 polyphonic ringtones!

    This was the chart used to write the octave macros. 

    The char LCD was mainly used for debugging, sometimes also to print welcome state and instructions.

  • LPC2148 library for LCD5110

    Anand Mahadevan S S11/18/2017 at 21:23 0 comments

    We will publish the library we wrote for the LCD 5110 display shortly, once it is optimized. We followed a from scratch approach by thoroughly going through the datasheet of the screen, and wrote the library to interface it with the SPI0 of LPC2148.

  • Finishing touches

    Anand Mahadevan S S11/18/2017 at 21:01 0 comments

    Project is almost done. It was a pain to get the appropriate library. We could not find one properly working, so we had to write a library from scratch. Finally we interfaced the LCD5110 to the SPI0 peripheral of the LPC2148. We are now working on a little more polishings on the library and some the functions we might require. The game logic is almost ready. Everything needs to be put in place now. Then will be the final debug. We are planning to use two tactile push buttons as external interrupts and also use the PWM interface of LPC2148 to use the built-in buzzer for game sounds to give the cool retro game polyphonic music. More updates on the way!

View all 3 project logs

  • 1
    A. Get the board ready

    We had taken the board with the third party USB boot-loader already inside. Also, we made a note of those jumpers which we could use as GPIO and special usage pins(SPI related pins). 

  • 2
    B. Decide on the display and make connections

    After considering many factors, we decided to use the nokia 5110 LCD display for our console. We managed to solder a male header to the display board and connected it to a breadboard. From there, we connected each pin from the display to these pins on the LPC2148 Blueboard:

    VCC -  3.3V pin on J9 (PIN 11;

    GND - GND pin on J9(PIN 1)

    BL - Shorted to VCC

    CS - SSEL0 pin on J9, but the pin is configured as a GPIO for better control

    D/C - MISO0 pin on J9, but configured as GPIO

    DIN - MOSI0 pin on J9

    CLK - SCK0 pin on J9

    RST - TXD1 pin on J6

  • 3
    C. Configure push buttons as external interrupts

    We used those jumpers where the EINT options were available, connecting two push buttons to EINT1 and EINT3, and using the push button on board for EINT2. A detailed connection schematic is included in the files.

View all 4 instructions

Enjoy this project?



Similar Projects

Does this project spark your interest?

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