Perhaps you mean 16F877. Teorically, yes, and these are the SPBRG and BRGH values, with error percentages. For 20 Mhz: BRGH=1 BRGH=0 Brate 31250 31250 Focs 20000000 20000000 BRGH 16 64 SPBRG 39 9 CalcBRate 31250 31250 Error 0% 0% For 16Mhz: BRGH=1 BRGH=0 Brate 32250 32250 Focs 16000000 16000000 BRGH 16 64 SPBRG 30 6 CalcBRate 32258 35714 Error .02% 10.% CalcBRate is the actually value with SPBRG and BRGH calculated values. Regards, Dennis ----- Original Message ----- From: "faisal moro" To: Sent: Monday, May 26, 2003 2:05 PM Subject: [PIC]: set USART baudrate to 31.250K (MIDI) on a 16F877 > hi > > maybe it's a stupid qustion, but here it is: can i set the USART > baudrate of a 17F877 to 31.250K with at PIC running @ 20MHz? Or > should i use a 16MHz xtal instead? The FlashBasic compiler doesn't > accept such a USART baudrate @ 20MHz, and i don't know if it's its a > bug of the compiler or not. > > thanks in advance! > > Faisal > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu