Hi all,
I am learning how to use a datasheet but it is hard going! I have just learnt ADCON1=15 switches all the A/D conversion off and makes all pins digital. Great. I understand controlling port direction with TRIS register and how to disable A/D. Very useful in the Pic world as I now understand it!
What I want to know is when I use the PICs designated pins for SDA and SCL do I need to disable the hardware feature of I2C because as I understand it I2C comms is handled in software in PBP.
I read in the datasheet that SDA pin can affect the baud rate generator on reset. I have a problem with garbage coming out of TX pin when I ICSP my chip since I have hooked up SDA/SCL to EEPROM. Then HSEROUT behaves erratically for the first couple of uses. Very unpredictable. Do I need to set anything in SSPEN? Would it be better to use different pins if I2C is handled in software?
So in summary, I have made the pins digital with ADCON1=15. I have TRISB=%0000001 as I believe SCL is an output but what do I set SDA to as it is bi-directional? Is there anything else I need to do?
I must go to bed, this is too exciting and it's 3.30AM!!
Thanks
Rich
Bookmarks