A simple bare-metal game on a FRDM KL25Z with two buttons and a TC1602C LCD Screen.
In order to set up this project the following steps are recommended:
- Download and install CodeWarrior
- Clone the repository on the directory of your choice.
- Open CodeWarrior, create a Workspace and go to File -> Import ... -> Existing Projects into Workspace.
- Browse to the folder of the repository and select the dodgemip project path. Import the project.
You may also generate the documentation using the appended doxyfile.
You should be ready to go!
You can modify the pinout file to change the default pin settings, which are depicted in the following image.
In the final design, buttons, +5V and GND are all connected to a small 80x30 mm PCB. The LCD is connected directly to the KL25Z. This step is left at the discretion of the reader.
Using the original design is somewhat discouraged, since I'm by no means an expert on the matter. It was fun to make, but it is very clunky. Check this for my designs.
Sources are split in a functional way.
- lcd.h abstracts the underlying hardware of the lcd screen and allows writing text with single simple function calls.
- input_button.h abstracts and implements input button operations. Last input is recorded in a global structure
inputStatus_t
; - game.h declares game functions and structures.
- main.c implements the game.