This was a very instructive tutorial, although I have a question, why do you set TRIS for RX an TX both as inputs? Is it because the PIC is working on slave mode?
I'm working on a project now which uses I2C (your tutorial also very helpful!
) to read time from a RTC, and then send it via serial. I'm using USART default pins, but the serial communication didn't work until I set the TRIS as inputs as you did.
Now I have one more question, is it possible to use both I2C and USART in the same pic? I had them working separately, but now I've put them together they won't work at all.
I understand the BRG registers are different for each one so there shouldn't be any baud problem... Is there anything I'm missing here?
Thank you for your tutorials, and for your time!