Hardware requirements
Mini USB cable
TWR-KM34Z75M board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
Basic Testing The demo performs basic testing on the SLCD first. All numbers and icons are displayed, one-by-one, on the screen.
Guess the number game
Next, the demo asks the user to play a number guessing game.
The user can input a number (0-9999) in the console and the number is displayed on the SLCD screen. In the example below, if the number is 6396, it took the user four guesses before choosing the correct number.
---------- Start basic SLCD test -------------
-------------- SLCD Guess Num Game --------------
The number input and final number are shown on the SLCD.
Check SLCD for these numbers.
Let's play:
Please Guess the number I want(0 - 9999), Press 'enter' to end:
The input number 5000 is smaller than what I want. Guess again! Guess the number I want(0 - 9999), Press ‘enter’ to end: 7500 The input number 7500 is bigger than what I want. Guess again! Guess the number I want(0 - 9999), Press ‘enter’ to end: 6125 The input number 6125 is smaller than what I want. Guess again! Guess the number I want(0 - 9999), Press ‘enter’ to end: 6396 Great, 6396, you have GOT it! Play again? Input ‘Y’ or ‘N’. N