meta data for this page
Differences
This shows you the differences between two versions of the page.
| sensor:tca9548a [2025/11/22 18:20] – created vamsan | sensor:tca9548a [2025/11/22 18:48] (current) – [I²C topics on lamaPLC] vamsan | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| {{: | {{: | ||
| - | **Technical data** | + | ===== Technical data ===== |
| + | * 1-to-8 Bidirectional translating switches | ||
| + | * [[com: | ||
| + | * Active-low reset input | ||
| + | * Three address pins, allowing up to eight TCA9548A devices on the I²C bus | ||
| + | * Channel selection through an I2C Bus, in any combination | ||
| + | * Power up with all switch channels deselected | ||
| + | * Low RON switches | ||
| + | * Allows voltage-level translation between 1.8V, 2.5V, 3.3V, and 5V buses | ||
| + | * No glitch on power up | ||
| + | * Supports hot insertion | ||
| + | * Low standby current | ||
| + | * Operating power-supply voltage range of **1.65 to 5.5 V** | ||
| + | * 5-V Tolerant inputs | ||
| + | | ||
| + | | ||
| + | ===== Device Address ===== | ||
| + | {{: | ||
| + | The last bit of the target address defines the operation (read or write) to be performed. When it is high (1), a read | ||
| + | is selected, while a low (0) selects a write operation. Shows the TCA9548A address reference: | ||
| + | {{: | ||
| + | ===== Arduino ===== | ||
| + | To call the module, you only need the " | ||
| + | <code c> | ||
| + | /** | ||
| + | * TCA9548 I2CScanner.ino -- I2C bus scanner for Arduino | ||
| + | * | ||
| + | * Based on https:// | ||
| + | * | ||
| + | */ | ||
| + | #include " | ||
| + | |||
| + | #define TCAADDR 0x70 | ||
| + | |||
| + | void tcaselect(uint8_t i) { | ||
| + | if (i > 7) return; | ||
| + | |||
| + | Wire.beginTransmission(TCAADDR); | ||
| + | Wire.write(1 << i); | ||
| + | Wire.endTransmission(); | ||
| + | } | ||
| + | |||
| + | |||
| + | // standard Arduino setup() | ||
| + | void setup() | ||
| + | { | ||
| + | while (!Serial); | ||
| + | delay(1000); | ||
| + | |||
| + | Wire.begin(); | ||
| + | | ||
| + | Serial.begin(115200); | ||
| + | Serial.println(" | ||
| + | | ||
| + | for (uint8_t t=0; t<8; t++) { | ||
| + | tcaselect(t); | ||
| + | Serial.print(" | ||
| + | |||
| + | for (uint8_t addr = 0; addr< | ||
| + | if (addr == TCAADDR) continue; | ||
| + | |||
| + | Wire.beginTransmission(addr); | ||
| + | if (!Wire.endTransmission()) { | ||
| + | Serial.print(" | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | Serial.println(" | ||
| + | } | ||
| + | |||
| + | void loop() | ||
| + | { | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | More codes on the Adafruit website: | ||
| + | https:// | ||
| ====== Source ====== | ====== Source ====== | ||
| https:// | https:// | ||
| Line 20: | Line 96: | ||
| \\ | \\ | ||
| \\ | \\ | ||
| - | {{tag>CJMCU-164 SN74HC164D 8-bit_Shift_Register SN74HC164D | + | {{tag>TCA9548A HW617 I2C switch |
| \\ | \\ | ||
| This page has been accessed for: Today: {{counter|today}}, | This page has been accessed for: Today: {{counter|today}}, | ||