wackazong Posted February 15, 2008 Report Share Posted February 15, 2008 Hello,I would like to control something like 40 PCA9635 (16 Channel LED PWM drivers with I2C interface) from MBHP. I know there is the IIC module, but that one allows only four slaves. My data rate on the I2C bus would be rather low, only a couple of LEDs to change from time to time, so overload should be no issue, I think. Still, I do not know how to connect the I2C bus to a MBHP core, who will act as the I2C master. I could either use a MBHP core that is already being used for a MIDIBox128, or use a dedicated MBHP core. The adressing needs seven bits, and I do not know how to handle that from MBHP.What do you think? Quote Link to comment Share on other sites More sharing options...
stryd_one Posted February 15, 2008 Report Share Posted February 15, 2008 I think you should google for the datasheet so I don't have to ;) Quote Link to comment Share on other sites More sharing options...
wackazong Posted February 15, 2008 Author Report Share Posted February 15, 2008 Well, I did look for the datasheets for the PICs and the PCA6935. I know that this is possible, but I wanted to know how easy it would be to adapt MIOS to do that. Sorry if I did not formulate my question very clearly...Best, ALEXander. Quote Link to comment Share on other sites More sharing options...
bill Posted February 15, 2008 Report Share Posted February 15, 2008 I wanted to know how easy it would be to adapt MIOS to do that.You dont have to, MIOS is adapted to that.Use C.I know there is the IIC module, but that one allows only four slaves.There is no "IIC module", i guess you're talking about "IIC MIDI module" ?The theorical IIC slaves number is 128 (or maybe 126).I guess it's possible to drive 40 of your chips, if the data rate is not too high.I would like to try and help you, but i dont have such chips.http://www.nxp.com/acrobat_download/datasheets/PCA9635_5.pdfHave a look at page 21-22I did some IIC experiments, look at the user projects for code samples.I strongly suggest that you use a dedicated core to do it.Good luck ! Quote Link to comment Share on other sites More sharing options...
stryd_one Posted February 15, 2008 Report Share Posted February 15, 2008 Well, I did look for the datasheets for the PICs and the PCA6935. I know that this is possible, but I wanted to know how easy it would be to adapt MIOS to do that. Sorry if I did not formulate my question very clearly...No, your question was formed well :) But, I don't know the datasheet for the PCA chip from memory... So I'd need to read it, to know how it works, to give you advice on how to use it with MIOS/MBHP. Think about it ;) Bill has covered it now, anyway :) Quote Link to comment Share on other sites More sharing options...
wackazong Posted February 16, 2008 Author Report Share Posted February 16, 2008 Well, ok, there you have it. I think I will manage, I just hope the I2C Bus really supports that many devices, and that it is not too sensitive to the pwm going on all around it. Quote Link to comment Share on other sites More sharing options...
stryd_one Posted February 16, 2008 Report Share Posted February 16, 2008 OK obviously I thought that was funnier than you did ;DIt really does :) Interference should not be a problem, but I'd probably put it on a PCB to be sure... There've been threads about termination lately too, that could be of interest. Quote Link to comment Share on other sites More sharing options...
wackazong Posted February 16, 2008 Author Report Share Posted February 16, 2008 Well, I was slightly amused ;)But thanks, I am now really at the point of making the PCB with everything on it.Has anybody ever made an SMD PCB for the core module? Cheers, ALEXander. Quote Link to comment Share on other sites More sharing options...
TK. Posted February 16, 2008 Report Share Posted February 16, 2008 This is a programming example for sending data over IIC:http://www.ucapps.de/cmios_fun.html#MIOS_IIC_ByteSendThe IIC slaves have to be connected to J4 of the core moduleBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
wackazong Posted February 16, 2008 Author Report Share Posted February 16, 2008 Perfect, thanks! I will keep you posted about progress, but at the moment there is not much to show.Best, ALEXander. 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.