FreeCalypso > hg > freecalypso-schem2
annotate venus/src/periph/audio_hso.v @ 63:4a7db02ddd3e
buzzer circuit implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 01 Dec 2021 20:22:47 +0000 |
parents | 229f0b2dd1bf |
children |
rev | line source |
---|---|
58
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * This Verilog module encapsulates our secondary headset audio channel, |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * connected to Iota headset interface. |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 */ |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 module audio_hso (GND, Vio, HSMICBIAS, HSMICP, HSO, Detect); |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 input GND, Vio; |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 input HSO, HSMICBIAS; |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 output HSMICP, Detect; |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 /* internal wires */ |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 wire EAR_jack, MIC_jack; |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 /* instantiate the jack */ |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 trrs_jack jack (.T(GND), |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 .R(MIC_jack), |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 .R2(EAR_jack), |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 .S(GND), |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 .T_sw(Detect), |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 .R_sw() /* not used */ |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 ); |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 /* output path */ |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 capacitor HSO_cap (HSO, EAR_jack); |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 /* microphone input circuit */ |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 capacitor C37 (HSMICBIAS, GND); |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 resistor R19 (HSMICBIAS, MIC_jack); |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 capacitor C38 (MIC_jack, GND); |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 capacitor C23 (MIC_jack, HSMICP); |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 capacitor C22 (HSMICP, GND); |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 /* Detect pull-up resistor */ |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 resistor Detect_pullup (Detect, Vio); |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 |
229f0b2dd1bf
HSO audio channel implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 endmodule |