Board Peripherals

A project log for Captain Lark Game Console

A retro video game built using LPC2148 and LCD 5110 display

Anand Mahadevan S SAnand Mahadevan S S 11/29/2017 at 03:260 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.