Hello, I have problems recieving serial communication with PIC16F88. I'm using PICC compiler for MPlab. I have another PIC of the same series transmitting some stuff, and that reciever PIC can't register any incomming signal. This is the source file for the tranciever: ######################################## #include void send(char letter) { while (!TRMT) { // Delay until sent } TXREG = letter; } void main(void) { char x; OSCCON = 112; //4Mhz TRISB = 4; //RB2 - in, RB5 - out PORTB = 0; TXSTA = 32; //async mode RCSTA = 128; //usart enable SPBRG = 2; //19.2 kbps x = 0; TXREG = x; RB0 = 0; while(1) { x++; send(x); RB0 = 0; } } ######################################## This is working, becouse I can see a signal on the wire between two PICs. Here is the code for the reciever. I've made several kinds of debug info - writing recieved input to data eeprom, and pulling high some of the PORTA bits: ######################################## #include char ee_count = 0; char tmp; void main(void) { OSCCON = 112; //4Mhz //I was not sure if I will need interrupts, and some other version of the same code tried to use interrupts, but it didn't happen neither GIE = 1; PEIE = 1; RCIE = 1; ANSEL = 0; TRISA = 0; TRISB = 4; //RB2 - in, RB5 - out PORTB = 0; TXSTA = 32; //async mode RCSTA = 128; //usart enable SPBRG = 2; //19.2 kbps RA3 = 0; while(1) { RA3 = 1; if (RCIF){ RA0 = 1; ee_count++; //write on which address in eeprom EEADR = ee_count; tmp = RCREG; EEDATA = tmp; EECON1 = 4; //write eeprom - this is taken from the pic16 documentation and it is working #asm movlw 0x55 movwf 0x18d movlw 0xAA movwf 0x18d bsf 0x18c,1 #endasm while (EECON1 & 2){ //eeprom write finished #asm nop #endasm } RA0 = 0; }// if RCIF RA3 = 0; } //main loop } ######################################## -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist