This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Trying to transmit with interrupt in XC164CS

Hi everybody,
I am learning to program with MCUs and now i have got the SK-XC164 board.I am trying to transmit via ASC0 a message. This message has 6 equal bytes and I must do it with transmit interrupt. Has anyone a simple program to practise??. The message I would like to see the message through Hyperterminal on PC. Thanks to everyone.

Parents
  •   ASC1_CON       =  0x0011;      // load ASC1 control register
      ASC1_BG        =  0x0011;      // load ASC1 baud rate time reload register
      ASC1_TXFCON    =  0x0100;      // load ASC1 transmit FIFO control register
      ASC1_RXFCON    =  0x0100;      // load ASC1 receive FIFO control register
      ALTSEL0P3     |=  0x0020;      // select alternate output function
      P3   |= 0x0020;    //set data register
      DP3  |= 0x0020;    //set direction register
      ///  -----------------------------------------------------------------------
      ///  Configuration of the used ASC1 Interrupts:
      ///  -----------------------------------------------------------------------
      ///  TxBuffer service request node configuration:
      ///  - TxBuffer interrupt priority level (ILVL) = 14
      ///  - TxBuffer interrupt group level (GLVL) = 1
      ///  - TxBuffer group priority extension (GPX) = 0
    
      ASC1_TBIC      =  0x0079;
    
      ///  Rx service request node configuration:
      ///  - Rx interrupt priority level (ILVL) = 15
      ///  - Rx interrupt group level (GLVL) = 1
      ///  - Rx group priority extension (GPX) = 0
    
      ASC1_RIC       =  0x007D;
      ASC1_CON      |=  0x8000;      // enable baud rate generator
    

Reply
  •   ASC1_CON       =  0x0011;      // load ASC1 control register
      ASC1_BG        =  0x0011;      // load ASC1 baud rate time reload register
      ASC1_TXFCON    =  0x0100;      // load ASC1 transmit FIFO control register
      ASC1_RXFCON    =  0x0100;      // load ASC1 receive FIFO control register
      ALTSEL0P3     |=  0x0020;      // select alternate output function
      P3   |= 0x0020;    //set data register
      DP3  |= 0x0020;    //set direction register
      ///  -----------------------------------------------------------------------
      ///  Configuration of the used ASC1 Interrupts:
      ///  -----------------------------------------------------------------------
      ///  TxBuffer service request node configuration:
      ///  - TxBuffer interrupt priority level (ILVL) = 14
      ///  - TxBuffer interrupt group level (GLVL) = 1
      ///  - TxBuffer group priority extension (GPX) = 0
    
      ASC1_TBIC      =  0x0079;
    
      ///  Rx service request node configuration:
      ///  - Rx interrupt priority level (ILVL) = 15
      ///  - Rx interrupt group level (GLVL) = 1
      ///  - Rx group priority extension (GPX) = 0
    
      ASC1_RIC       =  0x007D;
      ASC1_CON      |=  0x8000;      // enable baud rate generator
    

Children