Menu

#232 pic12f1822: I2C reads not working

None
closed-fixed
None
5
2017-10-15
2017-09-24
Remy Horton
No

If the LSB of the address given to SSP1BUF as part of an I2C read is set, the expected SSP1IF interrupt is never set. Even though the flags in SSP1CON2 & SSP1STAT indicate I2C is idle, doing further I2C operations such as RCEN=1 result in "I2C not idle" warnings.

I2C writes, where LSB of SSP1BUF is zero, work fine. See attached source file.

Using Subversion r2424.

1 Attachments

Discussion

  • Remy Horton

    Remy Horton - 2017-10-13

    Have attached a more complete example. On a physical PIC12F1822 (with a UMFT201 acting as slave) chip it will run to completion with a successful read & write, but under emulation with the attached .stc file it will hang as described previously. Looks like a clocking issue.

     
  • Roy Rankin

    Roy Rankin - 2017-10-15
    • status: open --> closed-fixed
    • assigned_to: Roy Rankin
    • Group: -->
     
  • Roy Rankin

    Roy Rankin - 2017-10-15

    Fixed timing issue with I2C

     

Anonymous
Anonymous

Add attachments
Cancel