Questions:
I am using a PIC16f87x microcontroller and i program from MPLAB using assembly codes. I am facing difficulty with configuring and interfacing the MSSP modulefor Master (receive /transmit)I2C serial communications.A beginner, I have followed the guidelines in their AN735 appln note and PIC16f87x datasheet. I need to communicate with other PICs but for a start I am trying to write data to a serial EEPROM. I get the interrupt after SEN bit set and I can write the control byte to EEPROM. But I cant see the serial clock even and data write is not successful.I have configured the following correctly 1. SSPADD : writes a value for 10 MHz clock and 100 KBpS data rate 2. sets SSPCONvalue to "3E"h 3. have followed the steps they give in their datasheet. 4. are not checking for write collision or bus collision. 5. checking the acknowlege flag, ACKSTAT after each byte write and will write next byte only if it is not set. 6. write protect of EEPROM is grounded 7. control byte of eeprom is correct 8. SCL and SDA pins of PIC are pulled up through external resistors. 9. direction of C port lines needed is correct ie as inputs 10. am setting SSPIE interrupt bit and GIE too. infact i get the interrupt after SEN bit set too. i wish to know the following. 1. is the BRG same for UART and I2C communication. 2. if i use UART for serial communication with PC aswell, will it make any problem in I2C communication? i need to use it and i have got the routines and codes for UART right already 3. any positve suggestions coming out of your experience? i would like to hear as early as possible please Achyuthan+
Questions Pages: