Recent Changes - Search:

Introduction to Microcontroller Programming

About PICmicro Chips

Clocking Your PICmicro Devices

E-Blocks

Flowcode Step By Step

PICmicro Projects

Labs

Seeing ASCII

<^< ASCII | Course Index | Getting a Phone Number >^>

  1. In your previous program alter the Keypad Component Macro to use the 'GetKeypadASCII' macro rather than the 'GetKeypadNumber' macro. This will put an ASCII number into the variable 'key'.
  2. Run your program again. You will notice that the ASCII for the key '1' is decimal 49, '2' is 50 etc. No key pressed still returns value 255.
  3. In the LCD Component macro alter the macro 'PrintNumber' to 'PrintASCII'.
  4. Run the program again. You will see that the display once again displays the numbers '1' to '9', '*' and '#'. The no key pressed displays a 'y' with an umlaut - the LCD characters set includes many characters other than just ASCII - see the LCD datasheet for full details.

So the interesting thing here is that the ASCII system allows you to store numbers as the ASCII equivalent and then display then as the number equivalent. Here is a standard we can use for storing both numbers and letters at the same time.

What we need to do next is implement a system that allows us to gather a string of numbers from the keypad.

<^< ASCII | Course index | Getting a Phone Number >^>

Print - Search - Login

Page last modified on May 03, 2013, at 08:22 AM