Can I type a character in hyperterminal and let the MCU return me the ASCII equivalent?

Discussion created by Guest on Jan 21, 2009
Latest reply on Jan 23, 2009 by Guest
Hi. I'm using codewarrior v6.0 and MC9S08AW60. I'm able to get the MCU to send me characters through the serial port to my hyperterminal. I would like to know if I can type a character in hyperterminal and let the MCU return me the ASCII equivalent. For example, if I type 'a' in hyperterminal, the MCU will return me the ASCII decimal '97' or the hex '61'. Below is the link to an ASCII table and my working code to display '#' on my hyperterminal. Thx 
 
 
#include <hidef.h> /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */
void main(void)
     {
      PTFDD_PTFDD6=1; //RS485_PIN_MODE DD=Data Direction register
      PTFD_PTFD6=1; //RS485_TX_ENABLE D=Data register
      SCI1BD=0x001A;
      SCI1C1=0x00;
      SCI1C2=0x0C;     
     
      for(;:smileywink:
      {
       __RESET_WATCHDOG();
       SCI1D = 0x23;
       while(SCI1S1_TDRE == 0);
      }
     }

Outcomes