To have the configs in the source, look at the end of the device include file (P16F87.INC). There is a cut-n-pasteable example there. > Well, what I meant is that my own custom include file, does actually > include the MPLAB include file, so it does end up in the final file. But if so, why do you have lines like these in your source : ???? > rcsta equ 18h > txreg equ 19h > txsta equ 98h ; my own definitions of some key USART locations > spbrg equ 99h They are already defined in P16F87.INC. Don't you get any warnings about "multiply defined symbols" Have you disabled "case sensitivity" in MPALB. Recomended, IMHO... > Also, I am very unsure about > setting up the baud rate - in the 16F87 datasheet, it does have a lot > of tables and forulae to work out what number to use, but this totally > baffled me. One thing you *definitly* have to know, is the speed your PIC is running at. Knowing that, you can calculate the value for the baud rate register as described in the data sheet. > I looked at the tables, and used the high speeed baud rate mode, for > the INTRC 8MHz table, and it said to use 51 for 9600. Note that the values i the tabes i the data sheet are in *decimal*. If you use them as-is, make sure that you specify them as decimal constants, not hexadecimal. (As far as I can see, that is not any problem in your code, but anyway...) Jan-Erik. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist