# RCM6700, read serial Port C, serCgetc always gets 0x000

**URL:** <https://forums.digi.com/t/rcm6700-read-serial-port-c-sercgetc-always-gets-0x000/9468>\
**Category:** Rabbit\
**Created:** [November 7, 2011, 6:01am UTC](https://forums.digi.com/t/rcm6700-read-serial-port-c-sercgetc-always-gets-0x000/9468 "2011-11-07T06:01:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacobsun.gmail](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@jacobsun.gmail](https://forums.digi.com/u/jacobsun.gmail)\
**Post date:** [November 7, 2011, 6:01am UTC](https://forums.digi.com/t/rcm6700-read-serial-port-c-sercgetc-always-gets-0x000/9468/1 "2011-11-07T06:01:29Z")

</div>

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 &lt; 10; j++)
     {
        printf(" %04x:",cmd[j]);
     }
     i = 0;
     printf("

```

");  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![jacobsun.gmail](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@jacobsun.gmail](https://forums.digi.com/u/jacobsun.gmail)\
**Post date:** [November 8, 2011, 7:18am UTC](https://forums.digi.com/t/rcm6700-read-serial-port-c-sercgetc-always-gets-0x000/9468/2 "2011-11-08T07:18:43Z")

</div>

Solved I missed these settings

#define SERF\_TXPORT PEDR  
#define SERF\_RXPORT PEDR
