Hello everyone, Thank you, Ken, for the calculator, I tested the values with your Excel spreadsheet and indeed the value is 25. But I think it wouldn't be such a problem if the value is not so precise, because I think only the error level would be greater, but the transmission would still function. Is it correct ? Now, having set the correct baud rate, the program still doesn't want to function. Please give me a hint of what is wrong. The code is: Initialisation of USART: unsigned char sci_Init(unsigned long int baud, unsigned char ninebits) { BRGH = 1; /* high baud rate */ SPBRG = 0x19; /* set the baud rate */ SYNC = 0; /* asynchronous */ SPEN = 1; /* enable serial port pins */ CREN = 1; /* enable reception */ SREN = 0; /* no effect */ TXIE = 0; /* disable tx interrupts */ RCIE = 1; /* enable rx interrupts */ TX9 = ninebits?1:0; /* 8- or 9-bit transmission */ RX9 = ninebits?1:0; /* 8- or 9-bit reception */ TXEN = 1; /* enable the transmitter */ return 0; } plus PIR1 = 0; /* clear any pending interrupts */ PEIE = 1; /* enable perhipheral interrupts */ T0IE = 1; // Enable the Timer0 interrupt GIE = 1; // Enable interrupts RCIE = 1; /* enable receiver interrupt */ in main init stuff. ISR: if(RCIF) { led2_on(); receivebuffer[RecvBufferPos] = RCREG; /* RXD9 and FERR are gone now */ if ((++RecvBufferPos)==MAXRECEIVEBUFFER) RecvBufferPos = 0; led2_off(); } if(TXIF && TXIE) { led1_on(); TXREG = sendbuffer[SendBufferPos]; if ((++SendBufferPos)==MAXSENDBUFFER) SendBufferPos=0; led1_off(); } sci_CheckOERR(); I will try as Jan-Erik said to simplify the code and test it until it runs. The led procedures are correct, because I test them at the beginning of the program. I use procedures because I need to modify some bits in a status byte too. Do you guys see any mistake in this code ? Or any omission ? I am sure that if it is, you will see it long before me ;-) Lucian PS: It seems that the interrupts are not functioning and the ISR is not sending and receiving the data when checked RCIF and TXIF. I believe this because when i test sendbufferfull in ISR instead of TXIF & TXIE, it sends the data, but it isn't received, though Rx is connected to Tx. Why might this happen ? Lucian ---- Home, no matter how far... http://www.home.ro -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads