|
| 1 | +import Power from "generics/interfaces.ato" |
| 2 | +import I2C from "generics/interfaces.ato" |
| 3 | +import Resistor from "generics/passives.ato" |
| 4 | +import Capacitor from "generics/passives.ato" |
| 5 | + |
1 | 6 | component _TCA9548APWR:
|
2 | 7 | # component TCA9548APWR
|
3 | 8 | footprint = "TSSOP-24_L7.8-W4.4-P0.65-LS6.4-BL"
|
@@ -54,6 +59,45 @@ module TCA9548APWR:
|
54 | 59 | i2c.sda ~ ic.SDA
|
55 | 60 | i2c.scl ~ ic.SCL
|
56 | 61 |
|
| 62 | + # connect the power |
| 63 | + power.vcc ~ ic.VCC |
| 64 | + power.gnd ~ ic.GND |
| 65 | + |
| 66 | + #bypass caps |
| 67 | + c1 = new Capacitor |
| 68 | + c1.value = 100nF +/- 20% |
| 69 | + c1.footprint = "0402" |
| 70 | + |
| 71 | + c2 = new Capacitor |
| 72 | + c2.value = 2.2uF +/- 20% |
| 73 | + c2.footprint = "0603" |
| 74 | + |
| 75 | + # Address bits |
| 76 | + # +------+------+------+----------------+-----------------+ |
| 77 | + # | A2 | A1 | A0 | Decimal Output | Hexadecimal Out | |
| 78 | + # +------+------+------+----------------+-----------------+ |
| 79 | + # | L | L | L | 112 | 70 | |
| 80 | + # +------+------+------+----------------+-----------------+ |
| 81 | + # | L | L | H | 113 | 71 | |
| 82 | + # +------+------+------+----------------+-----------------+ |
| 83 | + # | L | H | L | 114 | 72 | |
| 84 | + # +------+------+------+----------------+-----------------+ |
| 85 | + # | L | H | H | 115 | 73 | |
| 86 | + # +------+------+------+----------------+-----------------+ |
| 87 | + # | H | L | L | 116 | 74 | |
| 88 | + # +------+------+------+----------------+-----------------+ |
| 89 | + # | H | L | H | 117 | 75 | |
| 90 | + # +------+------+------+----------------+-----------------+ |
| 91 | + # | H | H | L | 118 | 76 | |
| 92 | + # +------+------+------+----------------+-----------------+ |
| 93 | + # | H | H | H | 119 | 77 | |
| 94 | + # +------+------+------+----------------+-----------------+ |
| 95 | + |
| 96 | + # Set bits below: |
| 97 | + ic.A0 ~ power.gnd |
| 98 | + ic.A1 ~ power.gnd |
| 99 | + ic.A2 ~ power.gnd |
| 100 | + |
57 | 101 | i2c0 = new I2C
|
58 | 102 | i2c0.sda ~ ic.SD0
|
59 | 103 | i2c0.scl ~ ic.SC0
|
@@ -109,6 +153,3 @@ module TCA9548APWR:
|
109 | 153 | pullup7 = new i2c_pullup
|
110 | 154 | pullup7.i2c ~ i2c7
|
111 | 155 | pullup7.power ~ power
|
112 |
| - |
113 |
| - |
114 |
| - |
|
0 commit comments