Timeline for PIC16F877A I2C MSSP not sending data
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 8, 2020 at 12:05 | comment | added | Chris Knudsen | Just enabling the interrupts will not change your results at all. You need to either poll SSPIF to determine that the transaction is complete, or turn on and use interrupts and write an interrupt routine to handle SSPIF (which gets set when the transaction is complete). BTW interrupt code will be much cleaner in the long run. | |
Jun 6, 2020 at 9:40 | comment | added | Ilya |
Enabled global interrupts and peripheral interrupts, INTCONbits.GIE = 1; INTCONbits.PEIE = 1; no change in behavior
|
|
Jun 6, 2020 at 8:10 | comment | added | Ilya | Thank you for summary. I know how I2C functions on protocol level, I made sure I knew that before trying to implement it. In theory, I could even bitbang it, but I don't think it's worth time and effort in my specific application (to make I2C running). The only new thing for me that wasn't covered in Microchip's lecture on I2C and other vids were the interrupts.I'm not sure my problem is with the interrupts, since my SDA/SCL behave as if no single bit is transferred. But I still wouldn't know how to incorporate them in I2C as of now. And why others don't need them implemented manually. but thx | |
Jun 5, 2020 at 16:08 | history | edited | Chris Knudsen | CC BY-SA 4.0 |
added 78 characters in body
|
Jun 5, 2020 at 16:03 | history | answered | Chris Knudsen | CC BY-SA 4.0 |