Search found 11 matches

by mreiter
Sat Feb 18, 2017 1:35 pm
Forum: PIC Microcontrollers - Software and Hardware
Topic: PIC I2C using Colour sensor
Replies: 4
Views: 1986

Re: PIC I2C using Colour sensor

Hello Bill, Sorry for the delay in getting back to you, times have been crazy at school. Thanks for the correction, I believe that Ive sorted out the addressing. I have having some issues however with reading the data from this sensor - when I look to get data from my colour sensors, I notice that m...
by mreiter
Tue Feb 14, 2017 3:16 pm
Forum: PIC Microcontrollers - Software and Hardware
Topic: PIC18 Addressing Multiple Slaves over I2C
Replies: 9
Views: 1401

Re: PIC18 Addressing Multiple Slaves over I2C

Getting that part will be easy, thanks. I think ill first try a regular mux though :dance:

Matthew
by mreiter
Tue Feb 14, 2017 3:13 pm
Forum: PIC Microcontrollers - Software and Hardware
Topic: PIC I2C using Colour sensor
Replies: 4
Views: 1986

PIC I2C using Colour sensor

Hello! I have a colour sensor that I need to communicate with using I2C. I've written the following I2C code based off of this Arduino example (https://github.com/adafruit/Adafruit_TCS34725/blob/master/Adafruit_TCS34725.cpp) but I am not having much luck getting data. If you code give my code a look...
by mreiter
Tue Feb 14, 2017 2:42 pm
Forum: PIC Microcontrollers - Software and Hardware
Topic: PIC18 Addressing Multiple Slaves over I2C
Replies: 9
Views: 1401

Re: PIC18 Addressing Multiple Slaves over I2C

I have not yet tried this mind you, but I was planning on connecting the SDA pins of the two color sensors to the input of the of a two to one multiplexer, with the output connected to the SDA pin of the PIC.

You mentioned "open drain" as if that would prevent this?

Matthew
by mreiter
Tue Feb 14, 2017 1:08 pm
Forum: PIC Microcontrollers - Software and Hardware
Topic: PIC18 Addressing Multiple Slaves over I2C
Replies: 9
Views: 1401

Re: PIC18 Addressing Multiple Slaves over I2C

Alright thanks for the clarification. I think the first thing that i will try in my lab today is simply multiplexing the inputs

Thanks

Matthew
by mreiter
Mon Feb 13, 2017 9:31 pm
Forum: PIC Microcontrollers - Software and Hardware
Topic: PIC18 Addressing Multiple Slaves over I2C
Replies: 9
Views: 1401

Re: PIC18 Addressing Multiple Slaves over I2C

As always, thanks for the quality response. I genuinely am impressed at how dedicated you are to help. I will definitely look into using the TCS34721, unfortunately I have not been able to come across one. The LTC4317 seems like a quite order away, and definitely sounds promising. But in terms of "b...
by mreiter
Sun Feb 12, 2017 7:28 pm
Forum: PIC Microcontrollers - Software and Hardware
Topic: PIC18F Setting RTC
Replies: 3
Views: 921

Re: PIC18F Setting RTC

Hello Bill It seems that I was a bit careless on my setup, changed the SSPSTAT configuration to "10000000", and in general covered up my exposed pins (I was leaving them floating, and this was not something the I2C pins enjoyed very much). Thanks for showing interest and helping me out on these last...
by mreiter
Sun Feb 12, 2017 5:25 pm
Forum: PIC Microcontrollers - Software and Hardware
Topic: PIC18 Addressing Multiple Slaves over I2C
Replies: 9
Views: 1401

PIC18 Addressing Multiple Slaves over I2C

Hello! It seems I have been posting here a lot recently, but I am making progress! As of now, if you've been following my recents posts, I have gotten I2C unconditionally working for my RTC. Now I am moving onto incorporating other slave devices, of which, I particularly need to get two of these col...
by mreiter
Fri Feb 10, 2017 9:41 pm
Forum: PIC Microcontrollers - Software and Hardware
Topic: PIC18F Setting RTC
Replies: 3
Views: 921

PIC18F Setting RTC

Hello, I just recently made a post here regarding an issue that I previously had with my SSPIF bit not being set during I2C (resulting in an infinite loop on start-up). I've since resolved that issue, and am no longer hanging on the start of i2c, but am still having trouble actually setting/reading ...
by mreiter
Fri Feb 10, 2017 4:15 pm
Forum: PIC Microcontrollers - Software and Hardware
Topic: PIC18 I2C SSPIF not set
Replies: 3
Views: 1074

Re: PIC18 I2C SSPIF not set

Hi, thanks for your reply! I've checked the WCOL bit of SSPCON1, and sure enough it is currently set high. According to the datasheet, this means " A write to the SSPBUF register was attempted while the I2C conditions were not valid for a transmission to be started (must be cleared in software)". Im...
by mreiter
Thu Feb 09, 2017 11:06 pm
Forum: PIC Microcontrollers - Software and Hardware
Topic: PIC18 I2C SSPIF not set
Replies: 3
Views: 1074

PIC18 I2C SSPIF not set

Hello, I have been trying for some time now to get the I2C to play nicely with my RTC. The issue that I am having is that SSPIF is not getting set, and as a result I am getting stuck in an infinite loop when i try to start I2C. I will post the code that I am using for I2C below. Any help would be gr...