wackazong Posted February 19, 2008 Report Share Posted February 19, 2008 Hi!Maybe its a stupid question, but I did not find the answer here: Why does MIOS not use the built-in I2C support of the PIC 18F4685? Pins RC3 and RC4 are used for that, but at the moment they are used for J6 and J10. If I build a MidiBox 128, then theoretically I could use these pins for a full I2C implementation, with multiple master support, couldn't I? But that, of course, means extending MIOS, and I am not sure whether I will be able to do that...Best, ALEXander. Quote Link to comment Share on other sites More sharing options...
TK. Posted February 19, 2008 Report Share Posted February 19, 2008 Using the bitbanging method was a design decition, which cannot be changed anymore. However, why do you need multi master support?Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
wackazong Posted February 19, 2008 Author Report Share Posted February 19, 2008 Hi Thorsten, uh, I have no definite idea yet, I was just thinking about different ways to connect different cores.... And maybe the control of my PCA6935 would be safer with the internal I2C.But you are right, the normal linking concepts should be enough.ALEXander. Quote Link to comment Share on other sites More sharing options...
TK. Posted February 19, 2008 Report Share Posted February 19, 2008 But the MIOS based IIC access methods are working very stable since years, why should the internal peripheral work better? There are several reasons, why I'm not using it (also historic reasons...) - one reason is, that the I2C pins can change between PIC derivatives, and mostly allocated by other useful functions. So, I don't see any reason,w hy using the înternal SPI!Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
wackazong Posted February 19, 2008 Author Report Share Posted February 19, 2008 Ok, sounds fair enough.Best, ALEXander. Quote Link to comment Share on other sites More sharing options...
wackazong Posted February 20, 2008 Author Report Share Posted February 20, 2008 But: Now I have the problem that I would like to drive two I2C Buses, for the simple reason that I want to be able to adress my LED-matrix' rows and columns with subadresses. Because I need a subadress for each row, column and color, there are a lot of adresses pretty fast. Is it possible to use two I2C buses from one core, or should I use two cores? What do you think?Thanks, ALEXander. Quote Link to comment Share on other sites More sharing options...
TK. Posted February 20, 2008 Report Share Posted February 20, 2008 Well, thats the big advantage of the bit-banging method, because you can copy the MIOS_IIC* routines into your application, (rename the functions and variables to avoid label collisions), and assign different pins to SDA and SCLSee also the source code http://svnmios.midibox.org/trunk/mios/mios_iic.incYou will notice, that the code is very small, biggest part of the file is the documentation ;)The number of IIC busses is only limited by the number of free pins - the integrated peripheral doesn't provide such a flexibility (thats another reason why I ommited it...)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
wackazong Posted February 20, 2008 Author Report Share Posted February 20, 2008 Now it all makes sense to me :)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.