Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] How to configure PIC16F as I2C Slave

Status
Not open for further replies.

ProminentRD

Newbie
Newbie level 3
Joined
May 8, 2021
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
20
I'm on a project with dspic30f as Master and pic16f1705 as slave. The master is not receiving Acknowledgement from slave. I configured Master myself and used 'MCC' for generating Salve's code. Master is sending clock and data, however the the acknowledgement bit stays high. I have uploaded both the codes. Please help if someone knows to solve the problem
 

Attachments

  • TEMP_SLAVE.X.rar
    419.8 KB · Views: 140
  • TEMPPMaster.X.rar
    37.1 KB · Views: 108

I'd check correct I2C unit configuration and reaction to incoming I2C communication on the slave side with in-circuit debugger.
Thanks bro, did the same and I figured it out. It was a simple address mismatch. The MCC generated code shifted a bit to left side (<<1). I just removed that.
In the datasheet it was said that the LSB was neglected so had to do it accordingly
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top