1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-17 06:08:05 +11:00

recipe/rc2014/sdcard: new recipe

This commit is contained in:
Virgil Dupras 2019-05-07 15:26:52 -04:00
parent ef11059382
commit e80888555f
12 changed files with 918 additions and 0 deletions

View File

@ -18,6 +18,13 @@ forget to set the A14 jumper to high because what is the A14 pin on the AT27
ROM module is the WE pin on the AT28! Setting the jumper high will keep is ROM module is the WE pin on the AT28! Setting the jumper high will keep is
disabled. disabled.
## Related recipes
This recipe is for installing a minimal Collapse OS system on the RC2014. There
are other recipes related to the RC2014:
* [Accessing a MicroSD card](sdcard/README.md)
## Goal ## Goal
Have the shell running and accessible through the Serial I/O. Have the shell running and accessible through the Serial I/O.

View File

@ -0,0 +1,9 @@
TARGETS = os.bin sdinit.bin
PARTS = ../../../parts/z80
.PHONY: all
all: $(TARGETS)
os.bin: glue.asm
sdinit.bin: sdinit.asm
$(TARGETS):
scas -o $@ -L map -I $(PARTS) $<

View File

@ -0,0 +1,96 @@
# Accessing a MicroSD card
**Status: work in progress.**
SD cards are great because they are accessible directly. No supporting IC is
necessary. The easiest way to access them is through the SPI protocol.
Due to the way IO works in z80, implementing SPI through it as a bit awkward:
You can't really keep pins high and low on an IO line. You need some kind of
intermediary between z80 IOs and SPI.
There are many ways to achieve this. This recipe explains how to build your own
hacked off SPI relay for the RC2014. It can then be used with `sdc.asm` to
drive a SD card.
## Goal
Read and write to a SD card from Collapse OS using a SPI relay of our own
design.
## Gathering parts
* A RC2014 with Collapse OS with these features:
* shell
* blockdev
* sdc
* A MicroSD breakout board. I use Adafruit's.
* A proto board + header pins with 39 positions so we can make a RC2014 card.
* Diodes, resistors and stuff
* 40106 (Inverter gates)
* 4011 (NAND gates)
* 74xx139 (Decoder)
* 74xx161 (Binary counter)
* 74xx165 (Parallel input shift register)
* 74xx595 (Shift register)
## Building the SPI relay
The [schematic][schematic] supplied with this recipe works well with `sdc.asm`.
Of course, it's not the only possible design that works, but I think it's one
of the most straighforwards.
The basic idea with this relay is to have one shift register used as input,
loaded in parallel mode from the z80 bus and a shift register that takes the
serial input from `MISO` and has its output wired to the z80 bus.
These two shift registers are clocked by a binary counter that clocks exactly
8 times whenever a write operation on port `4` occurs. Those 8 clocks send
data we've just received in the `74xx165` into `MOSI` and get `MISO` into the
`74xx595`.
The `74xx139` then takes care of activating the right ICs on the right
combinations of `IORQ/WR/RD/Axx`.
The rest of the ICs is fluff around this all.
My first idea was to implement the relay with an AVR microcontroller to
minimize the number of ICs, but it's too slow. We have to be able to respond
within 300ns! Following that, it became necessary to add a 595 and a 165, but
if we're going to add that, why not go the extra mile and get rid of the
microcontroller?
To that end, I was heavily inspired by [this design][inspiration].
This board uses port `4` for SPI data, port `5` to pull `CS` low and port `6`
to pull it high. Port `7` is unused but monopolized by the card.
Little advice: If you make your own design, double check propagation delays!
Some NAND gates, such as the 4093, are too slow to properly respond within
a 300ns limit. For example, in my own prototype, I use a 4093 because that's
what I have in inventory. For the `CS` flip-flop, the propagation delay doesn't
matter. However, it *does* matter for the `SELECT` line, so I don't follow my
own schematic with regards to the `M1` and `A2` lines and use two inverters
instead.
## Building the kernel
To be able to work with your SPI relay and communicate with the card, you
should have [glue code that looks like this](glue.asm).
Initially, when you don't know if things work well yet, you should comment out
the block creation part.
## Testing CD card initialization
To test that you can properly initialize a SD card, you can compile this [user
program](sdinit.asm) (see [Makefile](Makefile)) and then
[run it from memory][run-from-mem]. Success means the card is initialized.
## Create a block device from the SD card reader
TODO
[schematic]: spirelay/spirelay.pdf
[inspiration]: https://www.ecstaticlyrics.com/electronics/SPI/fast_z80_interface.html
[run-from-mem]: ../../../doc/load-run-code.md

View File

@ -0,0 +1,55 @@
; classic RC2014 setup (8K ROM + 32K RAM) and a stock Serial I/O module
; The RAM module is selected on A15, so it has the range 0x8000-0xffff
RAMSTART .equ 0x8000
RAMEND .equ 0xffff
ACIA_CTL .equ 0x80 ; Control and status. RS off.
ACIA_IO .equ 0x81 ; Transmit. RS on.
jr init
; *** JUMP TABLE ***
; Why not use this unused space between 0x02 and 0x28 for a jump table?
jp printstr
jp printHex
jp sdcWakeUp
jp sdcSendRecv
jp sdcWaitResp
jp sdcCmd
jp sdcCmdR1
jp sdcCmdR7
; interrupt hook
.fill 0x38-$
jp aciaInt
init:
di
; setup stack
ld hl, RAMEND
ld sp, hl
im 1
call aciaInit
call shellInit
; TODO - block device creation
ei
jp shellLoop
#include "core.asm"
ACIA_RAMSTART .equ RAMSTART
#include "acia.asm"
.define STDIO_GETC call aciaGetC
.define STDIO_PUTC call aciaPutC
STDIO_RAMSTART .equ ACIA_RAMEND
#include "stdio.asm"
SHELL_RAMSTART .equ STDIO_RAMEND
.define SHELL_IO_GETC call aciaGetC
.define SHELL_IO_PUTC call aciaPutC
SHELL_EXTRA_CMD_COUNT .equ 0
#include "shell.asm"
.equ SDC_PORT_CSHIGH 6
.equ SDC_PORT_CSLOW 5
.equ SDC_PORT_SPI 4
#include "sdc.asm"

View File

@ -0,0 +1,9 @@
JUMP_PRINTSTR .equ 0x03
JUMP_PRINTHEX .equ 0x06
JUMP_SDCWAKEUP .equ 0x09
JUMP_SDCSENDRECV .equ 0x0c
JUMP_SDCWAITRESP .equ 0x0f
JUMP_SDCCMD .equ 0x12
JUMP_SDCCMDR1 .equ 0x15
JUMP_SDCCMDR7 .equ 0x18

View File

@ -0,0 +1,18 @@
#include "jumptable.inc"
.org 0x9000
call JUMP_SDCWAKEUP
ld a, 0b01000000 ; CMD0
ld hl, 0
ld de, 0
ld c, 0x95
call JUMP_SDCCMDR1
call JUMP_PRINTHEX
ld a, 0b01001000 ; CMD8
ld hl, 0
ld de, 0x01aa
ld c, 0x87
call JUMP_SDCCMDR7
call JUMP_PRINTHEX
ret

View File

@ -0,0 +1,7 @@
EESchema-DOCLIB Version 2.0
#
$CMP Z80BUS
F ~
$ENDCMP
#
#End Doc Library

View File

@ -0,0 +1,50 @@
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# Z80BUS
#
DEF Z80BUS J 0 20 Y Y 1 F N
F0 "J" 0 1750 50 H V C CNN
F1 "Z80BUS" 250 50 50 V V C CNN
F2 "" 0 50 50 H I C CNN
F3 "" 0 50 50 H I C CNN
DRAW
S -150 -1750 150 1650 0 1 10 f
X D5 32 -300 -1500 150 R 50 50 0 0 P
X D6 33 -300 -1600 150 R 50 50 0 0 P
X D7 34 -300 -1700 150 R 50 50 0 0 P
X A15 1 -300 1600 150 R 50 50 1 1 P
X A6 10 -300 700 150 R 50 50 1 1 P
X A5 11 -300 600 150 R 50 50 1 1 P
X A4 12 -300 500 150 R 50 50 1 1 P
X A3 13 -300 400 150 R 50 50 1 1 P
X A2 14 -300 300 150 R 50 50 1 1 P
X A1 15 -300 200 150 R 50 50 1 1 P
X A0 16 -300 100 150 R 50 50 1 1 P
X GND 17 -300 0 150 R 50 50 1 1 P
X 5V 18 -300 -100 150 R 50 50 1 1 P
X M1 19 -300 -200 150 R 50 50 1 1 P
X A14 2 -300 1500 150 R 50 50 1 1 P
X RESET 20 -300 -300 150 R 50 50 1 1 P
X CLK 21 -300 -400 150 R 50 50 1 1 P
X INT 22 -300 -500 150 R 50 50 1 1 P
X MREQ 23 -300 -600 150 R 50 50 1 1 P
X WR 24 -300 -700 150 R 50 50 1 1 P
X RD 25 -300 -800 150 R 50 50 1 1 P
X IORQ 26 -300 -900 150 R 50 50 1 1 P
X D0 27 -300 -1000 150 R 50 50 1 1 P
X D1 28 -300 -1100 150 R 50 50 1 1 P
X D2 29 -300 -1200 150 R 50 50 1 1 P
X A13 3 -300 1400 150 R 50 50 1 1 P
X D3 30 -300 -1300 150 R 50 50 1 1 P
X D4 31 -300 -1400 150 R 50 50 1 1 P
X A12 4 -300 1300 150 R 50 50 1 1 P
X A11 5 -300 1200 150 R 50 50 1 1 P
X A10 6 -300 1100 150 R 50 50 1 1 P
X A9 7 -300 1000 150 R 50 50 1 1 P
X A8 8 -300 900 150 R 50 50 1 1 P
X A7 9 -300 800 150 R 50 50 1 1 P
ENDDRAW
ENDDEF
#
#End Library

Binary file not shown.

View File

@ -0,0 +1,43 @@
update=Tue 07 May 2019 03:02:22 PM EDT
version=1
last_client=kicad
[general]
version=1
RootSch=
BoardNm=
[pcbnew]
version=1
LastNetListRead=
UseCmpFile=1
PadDrill=0.600000000000
PadDrillOvalY=0.600000000000
PadSizeH=1.500000000000
PadSizeV=1.500000000000
PcbTextSizeV=1.500000000000
PcbTextSizeH=1.500000000000
PcbTextThickness=0.300000000000
ModuleTextSizeV=1.000000000000
ModuleTextSizeH=1.000000000000
ModuleTextSizeThickness=0.150000000000
SolderMaskClearance=0.000000000000
SolderMaskMinWidth=0.000000000000
DrawSegmentWidth=0.200000000000
BoardOutlineThickness=0.100000000000
ModuleOutlineThickness=0.150000000000
[cvpcb]
version=1
NetIExt=net
[eeschema]
version=1
LibDir=
[eeschema/libraries]
[schematic_editor]
version=1
PageLayoutDescrFile=
PlotDirectoryName=./
SubpartIdSeparator=0
SubpartFirstId=65
NetFmtName=
SpiceAjustPassiveValues=0
LabSize=50
ERC_TestSimilarLabels=1

View File

@ -0,0 +1,621 @@
EESchema Schematic File Version 4
LIBS:spirelay-cache
EELAYER 29 0
EELAYER END
$Descr USLetter 11000 8500
encoding utf-8
Sheet 1 1
Title "SPI relay"
Date ""
Rev ""
Comp ""
Comment1 "Wire all SCK connections to jumpers for easy SPI polarity adjustments"
Comment2 "SCK is wired to SPI mode 0"
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L local:Z80BUS J1
U 1 1 5CC2DD7B
P 2300 3400
F 0 "J1" H 2300 5200 50 0000 C CNN
F 1 "Z80BUS" H 2300 5100 50 0000 C CNN
F 2 "" H 2300 3450 50 0001 C CNN
F 3 " ~" H 2300 3450 50 0001 C CNN
1 2300 3400
-1 0 0 -1
$EndComp
$Comp
L Device:D D2
U 1 1 5CC3715D
P 2900 2450
F 0 "D2" V 2854 2371 50 0000 R CNN
F 1 "D" V 2945 2371 50 0000 R CNN
F 2 "" H 2900 2450 50 0001 C CNN
F 3 "~" H 2900 2450 50 0001 C CNN
1 2900 2450
0 -1 1 0
$EndComp
$Comp
L Device:D D3
U 1 1 5CC37D3A
P 3150 2450
F 0 "D3" V 3104 2371 50 0000 R CNN
F 1 "D" V 3195 2371 50 0000 R CNN
F 2 "" H 3150 2450 50 0001 C CNN
F 3 "~" H 3150 2450 50 0001 C CNN
1 3150 2450
0 -1 1 0
$EndComp
$Comp
L Device:D D4
U 1 1 5CC37F17
P 3400 2450
F 0 "D4" V 3354 2371 50 0000 R CNN
F 1 "D" V 3445 2371 50 0000 R CNN
F 2 "" H 3400 2450 50 0001 C CNN
F 3 "~" H 3400 2450 50 0001 C CNN
1 3400 2450
0 -1 1 0
$EndComp
$Comp
L Device:D D5
U 1 1 5CC39EE8
P 3650 2450
F 0 "D5" V 3604 2371 50 0000 R CNN
F 1 "D" V 3695 2371 50 0000 R CNN
F 2 "" H 3650 2450 50 0001 C CNN
F 3 "~" H 3650 2450 50 0001 C CNN
1 3650 2450
0 -1 1 0
$EndComp
$Comp
L Device:D D6
U 1 1 5CC3A0E2
P 3900 2450
F 0 "D6" V 3854 2371 50 0000 R CNN
F 1 "D" V 3945 2371 50 0000 R CNN
F 2 "" H 3900 2450 50 0001 C CNN
F 3 "~" H 3900 2450 50 0001 C CNN
1 3900 2450
0 -1 1 0
$EndComp
Wire Wire Line
2600 2600 2900 2600
Wire Wire Line
2600 2700 3150 2700
Wire Wire Line
3150 2700 3150 2600
Wire Wire Line
2600 2800 3400 2800
Wire Wire Line
3400 2800 3400 2600
Wire Wire Line
2600 2900 3650 2900
Wire Wire Line
3650 2900 3650 2600
Wire Wire Line
2600 3000 3900 3000
Wire Wire Line
3900 3000 3900 2600
Wire Wire Line
2900 2300 3150 2300
Connection ~ 3150 2300
Wire Wire Line
3150 2300 3400 2300
Connection ~ 3400 2300
Wire Wire Line
3400 2300 3650 2300
Connection ~ 3650 2300
Wire Wire Line
3650 2300 3900 2300
Connection ~ 3900 2300
Text Label 2600 3100 0 50 ~ 0
A2
Text Label 2600 3400 0 50 ~ 0
GND
Text Label 2600 3500 0 50 ~ 0
VCC
NoConn ~ 2600 1800
NoConn ~ 2600 1900
NoConn ~ 2600 2000
NoConn ~ 2600 2100
NoConn ~ 2600 2200
NoConn ~ 2600 2300
NoConn ~ 2600 2400
NoConn ~ 2600 2500
Text Label 3650 2050 0 50 ~ 0
A2
NoConn ~ 2600 3700
NoConn ~ 2600 3900
NoConn ~ 2600 4000
$Comp
L Device:D D1
U 1 1 5CC44D92
P 2900 2150
F 0 "D1" V 2854 2071 50 0000 R CNN
F 1 "D" V 2945 2071 50 0000 R CNN
F 2 "" H 2900 2150 50 0001 C CNN
F 3 "~" H 2900 2150 50 0001 C CNN
1 2900 2150
0 -1 -1 0
$EndComp
Text Label 2600 4300 0 50 ~ 0
IORQ
Text Label 2900 2000 0 50 ~ 0
IORQ
$Comp
L power:+5V #PWR02
U 1 1 5CC5F918
P 10000 1000
F 0 "#PWR02" H 10000 850 50 0001 C CNN
F 1 "+5V" H 10015 1173 50 0000 C CNN
F 2 "" H 10000 1000 50 0001 C CNN
F 3 "" H 10000 1000 50 0001 C CNN
1 10000 1000
1 0 0 -1
$EndComp
Text Label 10000 1100 0 50 ~ 0
VCC
Wire Wire Line
10000 1100 10000 1000
$Comp
L power:GND #PWR01
U 1 1 5CC60F2C
P 9700 1000
F 0 "#PWR01" H 9700 750 50 0001 C CNN
F 1 "GND" H 9705 827 50 0000 C CNN
F 2 "" H 9700 1000 50 0001 C CNN
F 3 "" H 9700 1000 50 0001 C CNN
1 9700 1000
1 0 0 -1
$EndComp
Text Label 9700 1000 0 50 ~ 0
GND
$Comp
L Device:R R1
U 1 1 5CC61617
P 4600 1900
F 0 "R1" H 4670 1946 50 0000 L CNN
F 1 "10K" H 4670 1855 50 0000 L CNN
F 2 "" V 4530 1900 50 0001 C CNN
F 3 "~" H 4600 1900 50 0001 C CNN
1 4600 1900
1 0 0 -1
$EndComp
Text Label 4600 1750 0 50 ~ 0
GND
Entry Wire Line
2650 4400 2750 4500
Entry Wire Line
2650 4500 2750 4600
Entry Wire Line
2650 4600 2750 4700
Entry Wire Line
2650 4700 2750 4800
Entry Wire Line
2650 4800 2750 4900
Entry Wire Line
2650 4900 2750 5000
Entry Wire Line
2650 5000 2750 5100
Entry Wire Line
2650 5100 2750 5200
Wire Wire Line
2600 4400 2650 4400
Wire Wire Line
2600 4500 2650 4500
Wire Wire Line
2600 4600 2650 4600
Wire Wire Line
2600 4700 2650 4700
Wire Wire Line
2600 4800 2650 4800
Wire Wire Line
2600 4900 2650 4900
Wire Wire Line
2600 5000 2650 5000
Wire Wire Line
2600 5100 2650 5100
$Comp
L 74xx:74HC595 U1
U 1 1 5CC7725A
P 3350 5000
F 0 "U1" H 3350 5781 50 0000 C CNN
F 1 "74HC595" H 3350 5690 50 0000 C CNN
F 2 "" H 3350 5000 50 0001 C CNN
F 3 "http://www.ti.com/lit/ds/symlink/sn74hc595.pdf" H 3350 5000 50 0001 C CNN
1 3350 5000
-1 0 0 -1
$EndComp
$Comp
L 74xx:74LS165 U3
U 1 1 5CC79C4A
P 4950 5050
F 0 "U3" H 4950 6131 50 0000 C CNN
F 1 "74LS165" H 4950 6040 50 0000 C CNN
F 2 "" H 4950 5050 50 0001 C CNN
F 3 "http://www.ti.com/lit/gpn/sn74LS165" H 4950 5050 50 0001 C CNN
1 4950 5050
-1 0 0 -1
$EndComp
Wire Bus Line
2750 6450 5750 6450
Entry Wire Line
5650 4550 5750 4650
Entry Wire Line
5650 4650 5750 4750
Entry Wire Line
5650 4750 5750 4850
Entry Wire Line
5650 4850 5750 4950
Entry Wire Line
5650 4950 5750 5050
Entry Wire Line
5650 5050 5750 5150
Entry Wire Line
5650 5150 5750 5250
Entry Wire Line
5650 5250 5750 5350
Wire Wire Line
5650 4550 5450 4550
Wire Wire Line
5450 4650 5650 4650
Wire Wire Line
5650 4750 5450 4750
Wire Wire Line
5650 4850 5450 4850
Wire Wire Line
5650 4950 5450 4950
Wire Wire Line
5650 5050 5450 5050
Wire Wire Line
5650 5150 5450 5150
Wire Wire Line
5650 5250 5450 5250
Entry Wire Line
2750 4500 2850 4600
Entry Wire Line
2750 4600 2850 4700
Entry Wire Line
2750 4700 2850 4800
Entry Wire Line
2750 4800 2850 4900
Entry Wire Line
2750 4900 2850 5000
Entry Wire Line
2750 5000 2850 5100
Entry Wire Line
2750 5100 2850 5200
Entry Wire Line
2750 5200 2850 5300
Wire Wire Line
2850 4600 2950 4600
Wire Wire Line
2950 4700 2850 4700
Wire Wire Line
2850 4800 2950 4800
Wire Wire Line
2950 4900 2850 4900
Wire Wire Line
2850 5000 2950 5000
Wire Wire Line
2950 5100 2850 5100
Wire Wire Line
2850 5200 2950 5200
Wire Wire Line
2950 5300 2850 5300
Text Label 2600 3800 0 50 ~ 0
CLK
Text Label 6250 5250 0 50 ~ 0
CLK
Text Label 6250 5450 0 50 ~ 0
~SWR
Text Label 7400 4450 0 50 ~ 0
SCK
Text Label 3750 4600 0 50 ~ 0
MISO
NoConn ~ 3750 4900
Text Label 3750 4800 0 50 ~ 0
SCK
Text Label 2600 4100 0 50 ~ 0
~WR
Text Label 5450 5650 0 50 ~ 0
~SCK
NoConn ~ 4450 4550
Text Label 4300 4450 0 50 ~ 0
MOSI
Wire Wire Line
4300 4450 4450 4450
Text Label 4950 6050 0 50 ~ 0
GND
Text Label 3350 5700 0 50 ~ 0
GND
Text Label 6900 5750 0 50 ~ 0
GND
Text Label 4950 4150 0 50 ~ 0
VCC
Text Label 6900 4150 0 50 ~ 0
VCC
Text Label 3350 4400 0 50 ~ 0
VCC
NoConn ~ 2950 5500
Connection ~ 2900 2300
Wire Wire Line
3750 2050 3650 2050
Text Label 2600 4200 0 50 ~ 0
~RD
Text Label 5450 5450 0 50 ~ 0
RUNNING
Text Label 3750 5200 0 50 ~ 0
~SRD
$Comp
L 74xx:74LS161 U5
U 1 1 5CC8C610
P 6900 4950
F 0 "U5" H 6900 5931 50 0000 C CNN
F 1 "74LS161" H 6900 5840 50 0000 C CNN
F 2 "" H 6900 4950 50 0001 C CNN
F 3 "http://www.ti.com/lit/gpn/sn74LS161" H 6900 4950 50 0001 C CNN
1 6900 4950
1 0 0 -1
$EndComp
Wire Wire Line
6250 5450 6400 5450
NoConn ~ 6400 4450
NoConn ~ 6400 4550
NoConn ~ 6400 4650
NoConn ~ 6400 4750
Text Label 6250 4950 0 50 ~ 0
VCC
Wire Wire Line
6250 4950 6400 4950
Text Label 6050 5050 0 50 ~ 0
RUNNING
Wire Wire Line
6050 5050 6400 5050
Wire Wire Line
6250 5250 6400 5250
NoConn ~ 7400 4550
NoConn ~ 7400 4650
NoConn ~ 7400 4750
$Comp
L 4xxx:40106 U6
U 2 1 5CCB00F9
P 8100 4950
F 0 "U6" H 8100 5267 50 0000 C CNN
F 1 "40106" H 8100 5176 50 0000 C CNN
F 2 "" H 8100 4950 50 0001 C CNN
F 3 "http://www.nxp.com/documents/data_sheet/HEF40106B.pdf" H 8100 4950 50 0001 C CNN
2 8100 4950
1 0 0 -1
$EndComp
Text Label 8400 4950 0 50 ~ 0
RUNNING
Text Label 5400 2300 0 50 ~ 0
~SELECT
Text Label 5450 5750 0 50 ~ 0
~RUNNING
Text Label 2600 3600 0 50 ~ 0
~M1
Text Label 3650 1850 0 50 ~ 0
~M1
Wire Wire Line
3650 1850 3750 1850
Text Label 6250 5150 0 50 ~ 0
VCC
Wire Wire Line
6250 5150 6400 5150
Text Label 7400 4950 0 50 ~ 0
~RUNNING
Wire Wire Line
7400 4950 7800 4950
Text Label 3750 5100 0 50 ~ 0
SRD
$Comp
L 4xxx:40106 U6
U 1 1 5CCB36F0
P 8100 4450
F 0 "U6" H 8100 4767 50 0000 C CNN
F 1 "40106" H 8100 4676 50 0000 C CNN
F 2 "" H 8100 4450 50 0001 C CNN
F 3 "http://www.nxp.com/documents/data_sheet/HEF40106B.pdf" H 8100 4450 50 0001 C CNN
1 8100 4450
1 0 0 -1
$EndComp
Wire Wire Line
7400 4450 7800 4450
Text Label 8400 4450 0 50 ~ 0
~SCK
Text Label 2600 3300 0 50 ~ 0
A0
Wire Wire Line
9650 3950 9800 3950
Text Label 9650 3950 0 50 ~ 0
~SS
Wire Wire Line
9650 3750 9800 3750
Wire Wire Line
9650 3650 9800 3650
Text Label 9650 3850 0 50 ~ 0
MISO
Text Label 9650 3750 0 50 ~ 0
MOSI
Text Label 9650 3650 0 50 ~ 0
SCK
$Comp
L Connector:Conn_01x04_Female J2
U 1 1 5CC93445
P 10000 3750
F 0 "J2" H 10028 3726 50 0000 L CNN
F 1 "SPI" H 10028 3635 50 0000 L CNN
F 2 "" H 10000 3750 50 0001 C CNN
F 3 "~" H 10000 3750 50 0001 C CNN
1 10000 3750
1 0 0 -1
$EndComp
Text Label 9050 3850 1 50 ~ 0
VCC
$Comp
L Device:R R2
U 1 1 5CCF7173
P 9200 3850
F 0 "R2" H 9270 3896 50 0000 L CNN
F 1 "10K" H 9270 3805 50 0000 L CNN
F 2 "" V 9130 3850 50 0001 C CNN
F 3 "~" H 9200 3850 50 0001 C CNN
1 9200 3850
0 -1 -1 0
$EndComp
Text Label 7900 1800 0 50 ~ 0
~SWR
Text Label 6700 2200 0 50 ~ 0
~SRD
Text Label 5550 2100 0 50 ~ 0
~RD
$Comp
L 74xx:74LS139 U4
U 2 1 5CD24CDF
P 7400 1900
F 0 "U4" H 7400 2267 50 0000 C CNN
F 1 "74LS139" H 7400 2176 50 0000 C CNN
F 2 "" H 7400 1900 50 0001 C CNN
F 3 "http://www.ti.com/lit/gpn/sn74LS139" H 7400 1900 50 0001 C CNN
2 7400 1900
1 0 0 -1
$EndComp
Text Label 6800 1900 0 50 ~ 0
A0
Wire Wire Line
6800 1900 6900 1900
NoConn ~ 7900 2100
Wire Wire Line
7900 1900 8150 1900
Wire Wire Line
8150 1900 8150 1650
Wire Wire Line
8150 1650 8600 1650
Wire Wire Line
7900 2000 8250 2000
Wire Wire Line
8250 2000 8250 2500
Wire Wire Line
8250 2500 8600 2500
Wire Wire Line
8600 1850 8600 1950
Wire Wire Line
8600 1950 9100 1950
Wire Wire Line
9100 1950 9100 2250
Wire Wire Line
9100 2250 9200 2250
Wire Wire Line
9200 2250 9200 2400
Text Label 9400 1750 0 50 ~ 0
~SS
Wire Wire Line
9200 1750 9400 1750
$Comp
L 74xx:74LS139 U4
U 1 1 5CD5E273
P 6200 2100
F 0 "U4" H 6200 2467 50 0000 C CNN
F 1 "74LS139" H 6200 2376 50 0000 C CNN
F 2 "" H 6200 2100 50 0001 C CNN
F 3 "http://www.ti.com/lit/gpn/sn74LS139" H 6200 2100 50 0001 C CNN
1 6200 2100
1 0 0 -1
$EndComp
Text Label 5550 2000 0 50 ~ 0
~WR
Wire Wire Line
5550 2000 5700 2000
Wire Wire Line
5550 2100 5700 2100
NoConn ~ 6700 2300
Wire Wire Line
6800 1800 6900 1800
Text Label 6800 1800 0 50 ~ 0
A1
Text Label 2600 3200 0 50 ~ 0
A1
Wire Wire Line
4350 2300 4600 2300
Connection ~ 4350 2300
Wire Wire Line
4600 2050 4600 2300
Connection ~ 4600 2300
Wire Wire Line
4600 2300 5700 2300
Wire Wire Line
3900 2300 4350 2300
$Comp
L 4xxx:4011 U2
U 1 1 5CD8A75D
P 8900 1750
F 0 "U2" H 8900 2075 50 0000 C CNN
F 1 "4011" H 8900 1984 50 0000 C CNN
F 2 "" H 8900 1750 50 0001 C CNN
F 3 "http://www.intersil.com/content/dam/Intersil/documents/cd40/cd4011bms-12bms-23bms.pdf" H 8900 1750 50 0001 C CNN
1 8900 1750
1 0 0 -1
$EndComp
$Comp
L 4xxx:4011 U2
U 2 1 5CD8BFFB
P 8900 2400
F 0 "U2" H 8900 2725 50 0000 C CNN
F 1 "4011" H 8900 2634 50 0000 C CNN
F 2 "" H 8900 2400 50 0001 C CNN
F 3 "http://www.intersil.com/content/dam/Intersil/documents/cd40/cd4011bms-12bms-23bms.pdf" H 8900 2400 50 0001 C CNN
2 8900 2400
1 0 0 -1
$EndComp
Wire Wire Line
9350 3850 9800 3850
Wire Wire Line
8600 2000 9200 2000
Wire Wire Line
9200 2000 9200 1750
Connection ~ 9200 1750
Wire Wire Line
8600 2000 8600 2300
$Comp
L 4xxx:4011 U2
U 3 1 5CCF97CB
P 4050 1950
F 0 "U2" H 4050 2275 50 0000 C CNN
F 1 "4011" H 4050 2184 50 0000 C CNN
F 2 "" H 4050 1950 50 0001 C CNN
F 3 "http://www.intersil.com/content/dam/Intersil/documents/cd40/cd4011bms-12bms-23bms.pdf" H 4050 1950 50 0001 C CNN
3 4050 1950
1 0 0 -1
$EndComp
Wire Wire Line
4350 1950 4350 2300
NoConn ~ 6700 2000
Wire Wire Line
6700 2100 6900 2100
NoConn ~ 5450 4450
$Comp
L 4xxx:40106 U?
U 2 1 5CD09E16
P 7250 2650
F 0 "U?" H 7250 2967 50 0000 C CNN
F 1 "40106" H 7250 2876 50 0000 C CNN
F 2 "" H 7250 2650 50 0001 C CNN
F 3 "http://www.nxp.com/documents/data_sheet/HEF40106B.pdf" H 7250 2650 50 0001 C CNN
2 7250 2650
1 0 0 -1
$EndComp
Wire Wire Line
6950 2650 6950 2200
Wire Wire Line
6950 2200 6700 2200
Wire Bus Line
2750 4500 2750 6450
Wire Bus Line
5750 4650 5750 6450
Text Label 7550 2650 0 50 ~ 0
SRD
$EndSCHEMATC

View File

@ -0,0 +1,3 @@
(sym_lib_table
(lib (name local)(type Legacy)(uri ${KIPRJMOD}/local.lib)(options "")(descr ""))
)