/* ***************************************************************************** * * File Name - echo.c * Function - Demonstrates serial input bu echoing a modified version of * characters typed on a terminal emulator. * * You will need: * (1) uFlash & CCS PIC C Compiler (PCM/PCW) * (2) PC Terminal emulator (such as Hyperterm) * * Instructions: * (1) Compile & downloading to the uFlash * (2) Setup Hyprterm for 57K6 Baud,8 bits, no parity, no echo, no handshaking * (3) Remove the Pgrm Jumper from the uFlash (this stops Hyperterm from * holding the uFlash in reset). * (4) Run Hyperterm * (5) Type characters on the keyboard, note that the character printed is * the character following the one you typed in the ASCII table * ***************************************************************************** */ #include void main(void) { BYTE ch; // the character typed while(TRUE) // loop forever { putc(getc()+1); // get a character & print modified version } }