and I probably have some of this confused with one wire(ds18b20s) which I've also been working with also. I guess we would have to load the pins with maybe 10k to ground to test for any pullups with the scope, and maybe having a device that worked connected to the pins too.įirst, I'm certainly not a hardware guy so I probably have this all wrong. They might have those weak pullups on those pins so maybe that's not enough for most applications. Or maybe it varies with the number of devices connected? Did anyone try 10k resistors? I thought that spec was 10k for each though. The ARM data sheet shows two external resistors to be added for pullups and these resistors are said to have to "conform to the I2C specification". What would you want to check with the scope, to see if there are any internal pullups or something? MorganS - will have to try that! I'm not totally clear on exactly how to make it work with libraries that use wire but sounds great! Do you have any examples? Do you code it I2C.begin? Thanks for the suggestion! Will definitely have to try that! Wouldn't it be great if somebody with a scope could check theseībx10node - VERY WELL SAID! I used #ifdef AVR (for uno) and #else for DUE so the UNO code would continue to work.now that I'm thinking about it there has to be a better way. The libraries that use wire would have to be changed to use wire1 if you use sda1/scl1 but no software or hardware changes should be required if you use 20/21 instead. MrAl - bbx10node said it very well - the 2.2k resistors are needed on Due SDA1/SCL1 but the built in 1.5ks on sda/scl 20/21 seem fine. Although I have not yet gone back and done that because I was trying to use a shield in addition to other i2c.Īlso I was initially trying to hook up all of my i2c devices at once and reverted back to the one at a time approach. In retrospect it probably would have been easier for me to move the hardware around (pin locations to 20/21) then to figure out all of the software changes. I think this would be much more straight forward for the DUE designers to have used the same sda/scl pin locations as the Uno rather than move them and add sda1/scl1 in the same place as the old sda/scl.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |