Hi all and Thanks in advance
I’m using RCM6700 with dev board
I try to read 6 bytes from serial Port C with a ext. circuit MAX485.
I connected the RO of MAX485 to PE3 of RCM6700, and it is checked that the RO have the serial data.
It always returns 0x0000 from serCgetc.
I have tried to connect PE3 to GND or 3.3V. It still returns 0x0000.
Is there any idea which goes wrong??
Many Many Thanks
My sample problem as
#define CINBUFSIZE 63
#define COUTBUFSIZE 15
void main(void)
{
char cmd[10];
int i,j,ch,ChRy;
serCopen(9600L);
serCrdFlush();
i = 0;
while (1)
{
ChRy = serCpeek();
if (ChRy != -1)
{
ch = serCgetc();
cmd[i] = ch;
++i;
}
if (i == 10)
{
for (j=0;j < 10; j++)
{
printf(" %04x:",cmd[j]);
}
i = 0;
printf("
");
}
}
}