OneWire #1231
Replies: 4 comments 4 replies
|
OneWire, you might need to use the fixed version of that library - see the supported libraries page in the documentation for a link, unless they finally updated the version of OneWire library to support modern AVRs (the change was trivial - I remember porting one, putting in the pull request for the fix, and watching it be ignored for years by the author). OneWire carries out communication via a single bidirectional pin. As the communication is bitbanged, it doesn't rely on specific hardware capabilities of the pin, and any normal I/O pin can be used. |
|
Thanks for the comment, input, I have been fiddling around the "bit-banged" solutions... however, looking to overleap the pin counts, extra components and use the DS2484 and start with the i2c end, since I am already having the i2c going for other devices... The solution I am currently looking at is: tiny(1) "master" uC -> i2c -> DS2484 -> one wire <- (one wire port config on uC as one wire) "slave" tiny(2) While the above solution may be ok I am wondering, if this is the same board, for example, why the DS2484 could not as well 'act' as a slave? In this case, the i2c would be used, which is already on the board. So far I did not spot the "i2c one wire driver" to conceptualise the one wire "slaves". Which is obviously found for the "bit-banged solutions" such as the DS2480B ? Anyway, have only spotted the "master" on i2c, I guess, because, for example, the new at tiny's have the port one wire configuration on the USART... In addition, the the above thinking, how would someone protect the one wire? Essentially it is directly connected to the "port" of the uC on the 'slave'? This may be dangerous for the uC? Hope I am thinking in the right directions, and that I am not way off. Any comments, suggestions how to tackle this are more than welcome! |
|
Ok, tested the DS2484 with the DS1218B20 sensor on ATTINY1626 via this core and works! Before I start looking around how to fix this, a bit new for me, wondering, if we have a more recent "tiny slave library" ready that could be used? Looking forward to any ideas , comments! Best. PS it compiles well for Arduino UNO |
|
What's wrong with the version of the other library that I hacked up? The only thing different between classic and modern parts from the perspective of a one-wire driver going to be direct pin I/O, which while not the same is closely analogous. Onewirehub's code would be easy to adapt, I think, but what error are you getting on compile? For OWI, I suspect the library is compatible, or could be made so with very little effort; what I'm having trouble with is finding where the substantive code is in there. Can you find it? It's either compatible but for something somewhere that says it's compatible with the "avr" architecture, or it needs simple changes made. OneWire, unless you're doing wacky stuff, . I looked at half a dozen files, and didn't see a single register name - somewhere they've got to have some low level code right? Probably just simple pin i/o stuff that's cookbook to apply. But, I can't find where on that OWI repo the jewlery is hidden... The main reason nobody updates the libraries isthat they aren't interested in and don't use modern AVRs, which is a shame. But they don't havr any, are happy with what they are using and would these freaks (us, or at least me) using whackjob processors would just stick to 328P's and stop bothering them about wierd parts they'll never use. |
Uh oh!
There was an error while loading. Please reload this page.
Hello All,
Put together the hw for the oneWire, as given by the maxim, etc.
However, I am not sure what library to use to interface and interact between two tiny3216? Currently looking at this lib: https://www.pjrc.com/teensy/td_libs_OneWire.html
However, I am not sure what is meant by OneWire myWire(pin) ?
For testing purposes I am looking to use only the TX on one tiny and RX on the other tiny. So, is the general TXD and RXD pins used in this case? Such as PB2 and PB3 ? Do I got that right?
Best.
All reactions