11/29/2017 at 03:26 •
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.
11/18/2017 at 21:23 •
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.
11/18/2017 at 21:01 •
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!