Bill Stoddart wrote 2012-03-23 00:03: > Hello, > This feels like a simple question but I've had very little luck finding a= ny > answers. > > I have an 18F4550 on the PICDEM FSUSB board. It has a 20Mhz crystal. I am > trying to send data out over rs232. I have gotten everything working at > 9600 baud but this is just barely able to keep up with my data source > (clocked in from an FPGA). > > I have been programming with the hi-tech compiler and MPLAB. > > Code for the usart: > OpenUSART(USART_TX_INT_OFF& USART_RX_INT_OFF& USART_ASYNCH_MODE& > USART_EIGHT_BIT& USART_CONT_RX& USART_BRGH_LOW, 78); > > Header code: > #define _XTAL_FREQ 20000000 // (20 MHz crystal on PICDEM FS USB board) > > #pragma config PLLDIV =3D 5 > #pragma config CPUDIV =3D OSC1_PLL2 > #pragma config USBDIV =3D 2 > #pragma config FOSC =3D HSPLL_HS > > I would appreciate any help calculating out the numbers for a higher spee= d. > I have been shooting for 115200 with out any luck. I've gone through the > datasheet but i'm lost. > Thanks in advance. > Bill Can you get it working with some simple assembler code? Should just take 10-15 lines to make a short USART test to send something out. Then, with the params worked out, one can/could translate them into whatever high-level language one is using. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .