Hello Sylvian. Please clarify what you want to send and what data are being send on the reality. >From the other hand I sure you know RS232 message structure. First low bit is START with following 8 bits of data LSB first and finishing with 1/1.5/2 STOP bit period. Looks like you want to get meandr on TX line. For this purpose you should send 0x55 byte. In this case you will see ...0101010101... First bit is always 0 because it is START bit. The following bits are 0x55 data with LSB first. And final bit is STOP (1 clock period). I havn't plenty of time but second idea is that you have a problem with BRGH=1 flag. Try to use UART module with BRGH=0. For 4MHz clocking I offer you 4800 baudrate i.e. 4E6/64/13=4807 , SPBRG=12. WBR Dmitry. Sylvain Bilanger wrote: > > Hi everybody i got a little problem i'm triing to send a simple caracter > like 'U' with a 16C74A using the USART synchrone mode. An yes i got a > max 232 between Com1 and my PIC... But what is happening is that the PIC > is always sending the same caracter, it's a square. (0x255)... but i'm > really sending 0x55. Can somebody help me y really need to do this > simple thing. > > Here is a look at my source in HighTech C compiler: > > #include > #include > > #define BaudRate 103 // 9600 = 4MHz / 4(X+1) > > void initialise(); > > void main() > { > initialise(); > TXREG = 36; > while(1) > { > if(TRMT = 1) > { > DelayMs(250); > TXREG = 36; > } > } > } > > void initialise() > { > GIE = 0; /* Disable les interruptions */ > > TRISA = 0x00; // 0000 0000 porta en output > TRISB = 0x00; // 0000 0000 portb en output. > TRISC = 0xC0; // 1100 0000 portc en 7:6 TX/RX > > /* configuration du USART pour un master synchrone */ > SPBRG = BaudRate; > TXSTA = 0x94; // 1001 0100 ... Mode Master, USART synchrone, > // Baudrate synchrone > RCSTA = 0x80; // 1000 0000 ... Enable le Port serie > TXIE = 0; // Disable the USART transmit interrupt > TXEN = 1; // Enbable la transmission... > > GIE = 1; // Enable les interruptions > } > > Thanks for the help!! > > Sylvain. > Val d'Or > Quebec > > ______________________________________________________ > Get Your Private, Free Email at http://www.hotmail.com