Skip to content

Commit a4272bc

Browse files
committed
initial commit
1 parent a837fbd commit a4272bc

File tree

1 file changed

+44
-3
lines changed

1 file changed

+44
-3
lines changed

elec/src/tca9548apwr.ato

+44-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
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+
16
component _TCA9548APWR:
27
# component TCA9548APWR
38
footprint = "TSSOP-24_L7.8-W4.4-P0.65-LS6.4-BL"
@@ -54,6 +59,45 @@ module TCA9548APWR:
5459
i2c.sda ~ ic.SDA
5560
i2c.scl ~ ic.SCL
5661

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+
57101
i2c0 = new I2C
58102
i2c0.sda ~ ic.SD0
59103
i2c0.scl ~ ic.SC0
@@ -109,6 +153,3 @@ module TCA9548APWR:
109153
pullup7 = new i2c_pullup
110154
pullup7.i2c ~ i2c7
111155
pullup7.power ~ power
112-
113-
114-

0 commit comments

Comments
 (0)