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

Serial input voltage on P3.11

Hello,

We are trying to connect a GPS receiver module to a C167CR-LM on Phytec KitCon.
We use P3.11 (RxD0) with asynchronous serial input.
The GPS module send 0-5V messages 4800,8,N,1.
This is the configuration we use :
void main(void)
{ p311=0; // P3.11 dp311=0; //DP3.11 = 0

PSW=PSW&0x0FFF; PSW=PSW|0x0800;

S0RIC=0x0078; //ilvl=14; glvl=0 : PEC0 S0BG=0x81; //4800 bauds S0CON = 0x0011; // reception 8,N,1

PECC0=0x0300 | (size-1); //"size" is size of tab "T" SRCP0=(unsigned int) &S0RBUF; DSTP0=_sof_(T);

S0R=1;

do{ }while((PECC0&0x0011)!=0);

S0R=0;

while(1);
} By connecting GPS on P3.11 we have allways the same strange ascii in "T".
Someone has an idea about this problem please ?
Is it the input voltage on P3.11 (RxD0) ? Can we put -12V,+12V (RS232) on P3.11 ?
Is it from Keil compilator ?

Thanks a lot.

  • No, you can not send a +/- 12V signal to your processor.

    If your processor works with 5V logic depends on your processor. Your datasheet will tell what logic levels it is designed for.

    It is always good to test a serial port by adding a output signal and send a couple of characters to verify the baudrate. Then you know that it will also listen with the correct baudrate.

    I don't think too many people wants to read your code, since you did not read the posting instructions for source code. As posted, it is unreadable. Do read the description just above the input box when you write your next message.