-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move components to vendor directory
- Loading branch information
1 parent
f3d1892
commit 1a94ebe
Showing
8 changed files
with
84 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"""MaxLinear RS-485 Transceiver.""" | ||
|
||
from "generics/interfaces.ato" import Power | ||
|
||
|
||
component Sp3485: | ||
""" | ||
SP3485 RS-485 Transceiver. | ||
|
||
3.3V Low Power Half-Duplex RS-485 Transceivers with 10Mbps Data Rate. | ||
|
||
# Reference | ||
|
||
* [SP3485 Datasheet](https://maxlinear-assets.azureedge.net/web/documents/sp3485.pdf) | ||
* [SP3485 Product page](https://www.maxlinear.com/product/interface/serial-transceivers/rs485-422/sp3485) | ||
""" | ||
footprint = "SOIC-8_3.9x4.9mm_P1.27mm" | ||
lcsc_id = "C916153" | ||
mpn = "C916153" # SP3485CN-L | ||
|
||
# power | ||
power = new Power | ||
signal gnd ~ power.gnd | ||
power.vcc ~ pin 8 # Vcc | ||
gnd ~ pin 5 # GND | ||
|
||
signal ro ~ pin 1 # RO; receiver output | ||
signal re ~ pin 2 # RE (active LOW); receiver output enable | ||
signal de ~ pin 3 # DE (active HIGH); driver output enable | ||
signal di ~ pin 4 # DI; driver input | ||
signal a ~ pin 6 # A; non-inverting driver output / receiver input | ||
signal b ~ pin 7 # B: inverting driver output / receiver input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
"""NXP SPI to UART protocol converters.""" | ||
|
||
|
||
from "generics/interfaces.ato" import Power, SPI, UART | ||
|
||
from "lib/capacitors.ato" import PowerDecouplingCap100nf | ||
from "lib/leds.ato" import LEDIndicatorUser | ||
from "lib/nxp/SC16IS752.ato" import SC16IS752 | ||
from "lib/oscillators.ato" import ABM8_14MHz7456Oscillator | ||
|
||
|
||
module SpiToUart: | ||
"""SPI to UART converter.""" | ||
power = new Power | ||
spi = new SPI | ||
uart_a = new UART | ||
uart_b = new UART | ||
|
||
converter = new SC16IS752 | ||
converter.spi ~ spi | ||
converter.power ~ power | ||
converter.interface_select ~ power.gnd | ||
|
||
# power decoupling capacitor | ||
power_cap = new PowerDecouplingCap100nf | ||
power_cap.power ~ power | ||
|
||
# configure interface as SPI | ||
converter.interface_select ~ power.gnd | ||
|
||
# oscillator | ||
converter_osc = new ABM8_14MHz7456Oscillator | ||
converter.xin ~ converter_osc.xin.io | ||
converter.xout ~ converter_osc.xout.io | ||
|
||
# UARTs | ||
uart_a ~ converter.uart_a | ||
uart_b ~ converter.uart_b | ||
|
||
# user LED indicator | ||
user_led_indicator = new LEDIndicatorUser | ||
user_led_indicator.v_in = 3.1V to 3.3V | ||
user_led_indicator.input ~ converter.gpio0.io | ||
user_led_indicator.gnd ~ power.gnd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters