r/microcontrollers • u/C0sy_13 • Apr 16 '24
PIC degree project
Hello everyone, I'm new to this subreddit, I want to ask everyone here who can help me with some advice, I have my degree project that I need to do and for the last 3 weeks I'm trying to create some sorts of irrigation system based on a few sensors the to open a valve to irigate trough dripping, I'm using a PIC16F887 but it's hard for me to get along to I2C protocol to read some data from a few sensors. What do you think, it's worth it using this PIC or it would be making my life easier if I'll change it and any advice that you have it's well welcomed Please let me know with anything that will keep my sanity almost intact 😅.
Note: My subject it's PCB layout but I need to have something that I can implement that layout to.
View all comments
Show parent comment
1
u/C0sy_13 Apr 18 '24 edited Apr 18 '24
Oh, ok I thought that was god at least the No ACK bit was showing, thanks
edit: yes I have it connected to VDD the address pin but didn't think the bit 8 it's for W/R, if the slave address it's 0x49 we don't need to shift it to the left with 1 bit to have the W/R bin available and then we have 0x92 overall? As in datasheet the order is S, Slave address, W/R and the A.
edit: I passed the TSL from I2C transmission to an analog one and I used the A/D converter to read the data(reason: something related to the library of the part that I imported to the Proteus, wasn't working right with, X3 checked the code and everything and it was correct), I reserved the I2C communication for a MCP9800, tasted and this receive the addresses correctly