wackazong Posted September 30, 2008 Report Share Posted September 30, 2008 Hi!Yesterday I had everything, now nothing.... My IIC stopped working, and I cannot find out why. I made a debug routine which just sends a MIOS_IIC_Start and then a MIOS_IIC_Stop about every second to the IIC bus. Am I right that both SDA and SCL should change from about 5V (after issuing Stop) to about 0V (after issuing start) in that interval? My SDA changes from 0V (after Start) to 4.8V (after Stop) in the said interval, with nothing attached but the pullup resistors. That seems ok. (4.8 V is the supply voltage of the core, the pullup resistors are connected to 5V, because I use a schottky diode in front of the PIC power supplay for other reasons (in-circuit programming adapter))MY SCL (also with pullup) changes from 4.8V after Stop (the supply voltage of the PIC) to 5V after Start (the supply voltage of the rest of the board). That seems strange to me, shouldn't the line be low then? But maybe the pullup resistors play a role, and whether the PICs Pin is draining power or not. But I have no idea...Do you have any hints for troubleshooting IIC connections? I have an Oscilloscope, but do not really know how to use it for debugging IIC.I use IIC to drive some PCA9635 LED chips (datasheet attached).Please remember: The whole configuration worked beautifully without a flaw yesterday, and then suddenly IIC stopped working. Therefore the basic setup should be ok, I just have no idea what I changed.Any help really appreciated,ALEXander.PCA9635.pdfPCA9635.pdf Quote Link to comment Share on other sites More sharing options...
stryd_one Posted September 30, 2008 Report Share Posted September 30, 2008 Maybe your PCA died...Tried w/ a bankstick? You could make a quick app that lets you enter some data to some address, or read data from some address, then you can test to see if it's reading and writing OK. Not sharing your PCA driver? :( Quote Link to comment Share on other sites More sharing options...
wackazong Posted September 30, 2008 Author Report Share Posted September 30, 2008 Its actually three PCAs connected to the bus, and each one of them worked perfectly... I took all three of them out, soldered in another one, connected them to another core, nothing works....One question I have: How can I see whether the slave sends an ACK or not? MIOS_IIC_ByteSend gives back 0 when the slave sends a NAK, but the description does not say if not 0 means "ACK received".Regarding the driver: I am happy to share it, I did not so far because there are some features left I want to implement (group brightness for example). But I will, don't worry. I thought about making an assembler module, but its really not wort it since its only a bunch of IIC commands. BTW, its posted here already: http://www.midibox.org/forum/index.php/topic,12257.0.html Quote Link to comment Share on other sites More sharing options...
wackazong Posted September 30, 2008 Author Report Share Posted September 30, 2008 Wohooo! I shredded one of my four-layer prototype boards, but now it works again, with another core. I have absolutely no idea why.... But I am happy again....stryd, therefore looking forward to you looking at how to accelerate my code :) and thanks for the tips.look at the nice colorfade. actually, when I press the buttons, the corresponding led flashes briefly in blue, but the camera cannot really capture it :)46MERPmsIWQALEXander. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.