AnsweredAssumed Answered

How to establish Serial Communication between DEVKIT-S12G128 with PC?

Question asked by Lukman Kurniawan on Jul 26, 2018
Latest reply on Aug 1, 2018 by Lukman Kurniawan

Hello All,

 

I just try using DEVKIT-S12G128. On the example that I found, I just got SCI between TXD0 with RXD0 example which is local uart communication. After I check the board, the pins that connect to USBtoSerial is TXD1 & RXD1. So I try changing the PIN number on Processor Expert with the same baudrate and modified the code as well as below, but it still didn't work. The hyperterminal on PC didn't receive any data. What is the problem?

 

void SCI_Send(char *pSendBuff)
{ 
int ptr = 0;

while(pSendBuff[ptr]!='\0')

   {

 

    SCI1DRL = pSendBuff[ptr]; 
     while(!SCI1SR1_TC);

 

    ptr++;
   }
}

 

unsigned char SCI_Read(void)

{

    if(SCI1SR1_RDRF)

   {
     return SCI1DRL;
   }
}

 

 

I appreciate your help.

Best Regards,

 

Lukman

Outcomes