NEW PRODUCT – Adafruit LTC4316 I2C Handle Translator – Stemma QT / Qwiic « Adafruit Industries – Makers, hackers, artists, designers and engineers!

[ad_1]

5914 iso ORIG 2024 03

NEW PRODUCT – Adafruit LTC4316 I2C Handle Translator – Stemma QT / Qwiic

Adafruit has a whole lot of designs that use I2C – a two-wire protocol that may allow you to shortly join sensors, OLEDs, GPIO expanders, and extra. People love I2C as a result of you may merely join 4 wires for energy and information, and even higher, share these wires with a number of gadgets!

One issues people don’t like about I2C is that every gadget requires it’s personal distinctive ‘deal with’. You possibly can solely have one gadget with a 0x20 deal with, for instance, so whereas in idea you can have as much as 127 gadget, every for the 7-bits of deal with area obtainable, in actuality you’ll shortly stumble upon two sensors with the identical deal with. Many I2C parts have jumpers or switches that enable altering the deal with, however not all. And a few solely allow you to choose between two values. One resolution is to make use of an I2C multiplexer,  and these work fairly effectively, however they require some noodling in your code to arrange the ‘plexer after which change between the gadgets being plexed.

5914 demo ORIG 2024 03

5914 top 02 ORIG 2024 03

The Adafruit LTC4316 I2C Handle Translator is one other resolution, with some magic sprinkled inside. This chip does on the fly deal with translation. There’s an ‘enter I2C’ half, and an ‘output I2C’ half. And any gadgets on the ‘output’ half will routinely have their addresses translated from the enter half. Particularly, every gadget could have bit A6 flipped  (most-significant-bit of the deal with) after which bits A4 and A5 may also be flipped or stored the identical, with the 2 DIP switches on board. To find out the translated deal with, we use XOR bitwise math.

OK that’s just a little complicated so let’s work by means of an instance. Say we now have an AHT20 related on the output facet of this breakout. The AHT20 doesn’t have an adjustable I2C deal with: it’s mounted at 0x38. If each DIP switches are ON, then solely A6 is flipped. Meaning the I2C controller on the enter facet will see 0x38 XOR 0x40 = 0x78 deal with. If we flip the A5 change off, now will probably be 0x38 XOR 0x60 = 0x58 and if each switches are off, now bits A4, A5 and A6 might be flipped, so 0x38 XOR 0x70 = 0x48. So far as the AHT20 is anxious, it would fortunately nonetheless see I2C writes and reads on 0x38, however from the I2C controller’s perspective, the gadget is responding on the brand new deal with.

5914 kit ORIG 2024 03

In case you want greater than 4 deal with translation choices (two switches provide you with 4 choices) we even have a spot the place you may solder an XOR_LOW resistor for setting the ‘backside’ 3 bits by soldering in a resistor worth in line with the datasheet. It may possibly get complicated shortly so we positively advocate utilizing an I2C scanner to debug. Observe additionally that it’s a must to reset the LTC when you change the interpretation deal with with resistors or the DIP switches: the interpretation worth is picked up on chip boot and isn’t on-the-fly adjustable and not using a toggle of the Allow pin.

Whereas this chip is magical, there’s just a few issues to observe for: it doesn’t appear to assist clock-stretching so not for funky chips like BNO055. Simply because you may change the deal with on the fly, doesn’t imply the drive helps it! Some firmware is anticipating a particular deal with and it will not be trivial to vary the deal with. Verify the driving force to be sure you know find out how to change the deal with, to the brand new worth.

To get you going quick, we spun up a custom-made PCB within the STEMMA QT kind issue, making it simple to interface. The STEMMA QT connectors on both facet are suitable with the SparkFun Qwiic I2C connectors. This lets you make solderless connections between your growth board and the LTC4316 or to chain it with a variety of different sensors and equipment utilizing a suitable cableQT Cable will not be included, however we now have a spread within the store.

In inventory and transport now!

5914 quarter ORIG 2024 03

Adafruit publishes a variety of writing and video content material, together with interviews and reporting on the maker market and the broader know-how world. Our requirements web page is meant as a information to finest practices that Adafruit makes use of, in addition to a top level view of the moral requirements Adafruit aspires to. Whereas Adafruit will not be an impartial journalistic establishment, Adafruit strives to be a good, informative, and constructive voice throughout the group – test it out right here: adafruit.com/editorialstandards

Join Adafruit on Mastodon

Adafruit is on Mastodon, take part! adafruit.com/mastodon

Cease breadboarding and soldering – begin making instantly! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and extra. Construct initiatives with Circuit Playground in a couple of minutes with the drag-and-drop MakeCode programming website, be taught laptop science utilizing the CS Discoveries class on code.org, leap into CircuitPython to be taught Python and {hardware} collectively, TinyGO, and even use the Arduino IDE. Circuit Playground Categorical is the most recent and finest Circuit Playground board, with assist for CircuitPython, MakeCode, and Arduino. It has a strong processor, 10 NeoPixels, mini speaker, InfraRed obtain and transmit, two buttons, a change, 14 alligator clip pads, and plenty of sensors: capacitive contact, IR proximity, temperature, mild, movement and sound. An entire huge world of electronics and coding is ready for you, and it suits within the palm of your hand.

Have a tremendous mission to share? The Electronics Present and Inform is each Wednesday at 7pm ET! To hitch, head over to YouTube and take a look at the present’s dwell chat – we’ll publish the hyperlink there.

Be part of us each Wednesday evening at 8pm ET for Ask an Engineer!

Be part of over 36,000+ makers on Adafruit’s Discord channels and be a part of the group! http://adafru.it/discord

CircuitPython – The simplest technique to program microcontrollers – CircuitPython.org

Get the one spam-free day by day publication about wearables, operating a “maker enterprise”, digital ideas and extra! Subscribe at AdafruitDaily.com !

No feedback but.

Adafruit has a “be wonderful to one another” remark coverage. Assist us maintain the group right here constructive and useful. Stick with the subject, be respectful of makers of all ages and talent ranges. Be form, and do not spam – Thanks!

[ad_2]

Supply hyperlink

Realme C65’s launch date, design, and colours revealed

Study to code in Swift with new Apple tutorial guides