├── .gitignore ├── README.md ├── VNA ├── VNA.h ├── VNA.ino ├── complex.cpp ├── complex.h ├── consoleio.cpp ├── consoleio.h ├── debugmsg.cpp ├── debugmsg.h ├── flashstruct.cpp ├── flashstruct.h ├── jogwheel.cpp ├── jogwheel.h ├── mini-printf.c ├── mini-printf.h ├── structconf.cpp ├── structconf.h ├── tinycl.cpp ├── tinycl.h ├── touchscreen.cpp └── touchscreen.h ├── board-smt ├── AMS1117-3V3.dcm ├── AMS1117-3V3.lib ├── VNA ├── VNA BOM.ods ├── VNA Schematics.pdf ├── VNA board.png ├── VNA-BOM.xlsx ├── VNA-cache.lib ├── VNA-top.xlsx ├── VNA.kicad_pcb ├── VNA.pretty │ ├── Amphenol_RF_SMA_132289.kicad_mod │ ├── BLUEPILL.kicad_mod │ ├── GCT-MEM2055-00-190-01-A.kicad_mod │ ├── GCT-MEM2055-00-190-01-A.wrl │ ├── PAD_DEFAULT_CLOSED.kicad_mod │ ├── PAD_DEFAULT_OPEN.kicad_mod │ └── VNAOMizer.kicad_mod ├── VNA.pro ├── VNA.sch ├── VNA2.sch ├── bluepill.dcm ├── bluepill.lib ├── cn3052.dcm ├── cn3052.lib ├── conn_rf │ ├── bnc_90_1-1337543-0.wings │ ├── bnc_90_1-1337543-0.wrl │ ├── bnc_straight_1-1337541-0.wings │ ├── bnc_straight_1-1337541-0.wrl │ ├── coaxial_u.fl-r-smt-1.wings │ ├── coaxial_u.fl-r-smt-1.wrl │ ├── lemo_epb00250ntn.wings │ ├── lemo_epb00250ntn.wrl │ ├── sma_90_r300.124.403.wings │ ├── sma_90_r300.124.403.wrl │ ├── sma_smd_73251-135x.wings │ ├── sma_smd_73251-135x.wrl │ ├── sma_straight_32k101-400l5.wings │ └── sma_straight_32k101-400l5.wrl ├── fp-lib-table ├── gerber │ ├── VNA-B.Cu.gbr │ ├── VNA-B.Mask.gbr │ ├── VNA-B.SilkS.gbr │ ├── VNA-Edge.Cuts.gbr │ ├── VNA-F.Cu.gbr │ ├── VNA-F.Mask.gbr │ ├── VNA-F.SilkS.gbr │ ├── VNA-NPTH.drl │ ├── VNA-bottom.pos │ ├── VNA-top.pos │ └── VNA.drl ├── microsd_spi_cd.dcm ├── microsd_spi_cd.lib ├── mt3608.dcm ├── mt3608.lib ├── sa612.dcm ├── sa612.lib ├── si5351a.dcm ├── si5351a.lib ├── stm32f103c8t6.lib ├── w_conn_rf.mod └── w_conn_rf.pretty │ ├── Amphenol_RF_SMA_132289.kicad_mod │ ├── bnc_90_1-1337543-0.kicad_mod │ ├── bnc_straight_1-1337541-0.kicad_mod │ ├── coaxial_u.fl-r-smt-1.kicad_mod │ ├── lemo_epb00250ntn.kicad_mod │ ├── sma_90_r300.124.403.kicad_mod │ ├── sma_smd_73251-135x.kicad_mod │ └── sma_straight_32k101-400l5.kicad_mod ├── board ├── VNA ├── VNA BOM.ods ├── VNA Schematics.pdf ├── VNA board.png ├── VNA-cache.lib ├── VNA.kicad_pcb ├── VNA.pretty │ ├── BLUEPILL.kicad_mod │ ├── GCT-MEM2055-00-190-01-A.kicad_mod │ ├── GCT-MEM2055-00-190-01-A.wrl │ └── VNAOMizer.kicad_mod ├── VNA.pro ├── VNA.sch ├── VNA2.sch ├── bluepill.dcm ├── bluepill.lib ├── conn_rf │ ├── bnc_90_1-1337543-0.wings │ ├── bnc_90_1-1337543-0.wrl │ ├── bnc_straight_1-1337541-0.wings │ ├── bnc_straight_1-1337541-0.wrl │ ├── coaxial_u.fl-r-smt-1.wings │ ├── coaxial_u.fl-r-smt-1.wrl │ ├── lemo_epb00250ntn.wings │ ├── lemo_epb00250ntn.wrl │ ├── sma_90_r300.124.403.wings │ ├── sma_90_r300.124.403.wrl │ ├── sma_smd_73251-135x.wings │ ├── sma_smd_73251-135x.wrl │ ├── sma_straight_32k101-400l5.wings │ └── sma_straight_32k101-400l5.wrl ├── fp-lib-table ├── gerber │ ├── VNA-B.Cu.gbr │ ├── VNA-B.Mask.gbr │ ├── VNA-B.SilkS.gbr │ ├── VNA-Edge.Cuts.gbr │ ├── VNA-F.Cu.gbr │ ├── VNA-F.Mask.gbr │ ├── VNA-F.SilkS.gbr │ ├── VNA-NPTH.drl │ └── VNA.drl ├── microsd_spi_cd.lib ├── sa612.dcm ├── sa612.lib ├── si5351a.dcm ├── si5351a.lib ├── w_conn_rf.mod └── w_conn_rf.pretty │ ├── bnc_90_1-1337543-0.kicad_mod │ ├── bnc_straight_1-1337541-0.kicad_mod │ ├── coaxial_u.fl-r-smt-1.kicad_mod │ ├── lemo_epb00250ntn.kicad_mod │ ├── sma_90_r300.124.403.kicad_mod │ ├── sma_smd_73251-135x.kicad_mod │ └── sma_straight_32k101-400l5.kicad_mod ├── daughterboard ├── LCD-Daughterboard-Schematic.pdf ├── alps_rotary_encoder_switch.dcm ├── alps_rotary_encoder_switch.lib ├── daughterboard-cache.lib ├── daughterboard.kicad_pcb ├── daughterboard.png ├── daughterboard.pretty │ ├── RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm.kicad_mod │ ├── RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm_CircularMountingHoles.kicad_mod │ ├── RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm_altered.kicad_mod │ ├── RotaryEncoder_Alps_EC11E_Vertical_H20mm.kicad_mod │ ├── RotaryEncoder_Alps_EC11E_Vertical_H20mm_CircularMountingHoles.kicad_mod │ ├── RotaryEncoder_Alps_EC12E-Switch_Vertical_H20mm.kicad_mod │ ├── RotaryEncoder_Alps_EC12E-Switch_Vertical_H20mm_CircularMountingHoles.kicad_mod │ ├── RotaryEncoder_Alps_EC12E_Vertical_H20mm.kicad_mod │ └── RotaryEncoder_Alps_EC12E_Vertical_H20mm_CircularMountingHoles.kicad_mod ├── daughterboard.pro ├── daughterboard.sch ├── fp-lib-table ├── gerber │ ├── daughterboard-B.Cu.gbr │ ├── daughterboard-B.Mask.gbr │ ├── daughterboard-B.SilkS.gbr │ ├── daughterboard-Edge.Cuts.gbr │ ├── daughterboard-F.Cu.gbr │ ├── daughterboard-F.Mask.gbr │ ├── daughterboard-F.SilkS.gbr │ └── daughterboard.drl ├── ilidisplay.dcm └── ilidisplay.lib ├── doc ├── VNA calibration method 2.odt ├── VNA calibration method 2.pdf ├── VNA calibration method.odt ├── VNA calibration method.pdf ├── vna-assembled-board.jpg ├── vna-commands.txt ├── vna-impedance-display.jpg ├── vna-main-screen.jpg ├── vna-s11-display.jpg ├── vna-smith-chart-1.jpg ├── vna-smith-chart-2.jpg └── vna-swr-display.jpg ├── firmware └── VNA.ino.generic_stm32f103c.bin ├── fixture ├── fixture-cache.lib ├── fixture-schematic.pdf ├── fixture.kicad_pcb ├── fixture.png ├── fixture.pretty │ ├── AirHole.kicad_mod │ ├── Amphenol_RF_SMA_132289.kicad_mod │ ├── VNAOMizer.kicad_mod │ ├── ZIFSocket16pin.kicad_mod │ └── bnc_90_1-1337543-0.kicad_mod ├── fixture.pro ├── fixture.sch ├── fp-lib-table └── gerber │ ├── fixture-B.Cu.gbr │ ├── fixture-B.Mask.gbr │ ├── fixture-B.SilkS.gbr │ ├── fixture-Edge.Cuts.gbr │ ├── fixture-F.Cu.gbr │ ├── fixture-F.Mask.gbr │ ├── fixture-F.SilkS.gbr │ ├── fixture-NPTH.drl │ └── fixture.drl └── libraries ├── Adafruit_GFX ├── .gitignore ├── .travis.yml ├── Adafruit_GFX.cpp ├── Adafruit_GFX.h ├── Adafruit_SPITFT.cpp ├── Adafruit_SPITFT.h ├── Adafruit_SPITFT_Macros.h ├── Fonts │ ├── FreeMono12pt7b.h │ ├── FreeMono18pt7b.h │ ├── FreeMono24pt7b.h │ ├── FreeMono9pt7b.h │ ├── FreeMonoBold12pt7b.h │ ├── FreeMonoBold18pt7b.h │ ├── FreeMonoBold24pt7b.h │ ├── FreeMonoBold9pt7b.h │ ├── FreeMonoBoldOblique12pt7b.h │ ├── FreeMonoBoldOblique18pt7b.h │ ├── FreeMonoBoldOblique24pt7b.h │ ├── FreeMonoBoldOblique9pt7b.h │ ├── FreeMonoOblique12pt7b.h │ ├── FreeMonoOblique18pt7b.h │ ├── FreeMonoOblique24pt7b.h │ ├── FreeMonoOblique9pt7b.h │ ├── FreeSans12pt7b.h │ ├── FreeSans18pt7b.h │ ├── FreeSans24pt7b.h │ ├── FreeSans9pt7b.h │ ├── FreeSansBold12pt7b.h │ ├── FreeSansBold18pt7b.h │ ├── FreeSansBold24pt7b.h │ ├── FreeSansBold9pt7b.h │ ├── FreeSansBoldOblique12pt7b.h │ ├── FreeSansBoldOblique18pt7b.h │ ├── FreeSansBoldOblique24pt7b.h │ ├── FreeSansBoldOblique9pt7b.h │ ├── FreeSansOblique12pt7b.h │ ├── FreeSansOblique18pt7b.h │ ├── FreeSansOblique24pt7b.h │ ├── FreeSansOblique9pt7b.h │ ├── FreeSerif12pt7b.h │ ├── FreeSerif18pt7b.h │ ├── FreeSerif24pt7b.h │ ├── FreeSerif9pt7b.h │ ├── FreeSerifBold12pt7b.h │ ├── FreeSerifBold18pt7b.h │ ├── FreeSerifBold24pt7b.h │ ├── FreeSerifBold9pt7b.h │ ├── FreeSerifBoldItalic12pt7b.h │ ├── FreeSerifBoldItalic18pt7b.h │ ├── FreeSerifBoldItalic24pt7b.h │ ├── FreeSerifBoldItalic9pt7b.h │ ├── FreeSerifItalic12pt7b.h │ ├── FreeSerifItalic18pt7b.h │ ├── FreeSerifItalic24pt7b.h │ ├── FreeSerifItalic9pt7b.h │ ├── Org_01.h │ ├── Picopixel.h │ ├── Tiny3x3a2pt7b.h │ └── TomThumb.h ├── README.md ├── examples │ └── mock_ili9341 │ │ └── mock_ili9341.ino ├── fontconvert │ ├── Makefile │ ├── fontconvert.c │ ├── fontconvert_win.md │ └── makefonts.sh ├── gfxfont.h ├── glcdfont.c ├── library.properties └── license.txt ├── Adafruit_GFX_AS ├── Adafruit_GFX_AS.cpp ├── Adafruit_GFX_AS.h ├── Font16.c ├── Font16.h ├── Font32.c ├── Font32.h ├── Font64.c ├── Font64.h ├── Font7s.c ├── Font7s.h ├── Load_fonts.h ├── README.txt ├── glcdfont.c └── license.txt ├── Adafruit_ILI9341_STM ├── Adafruit_ILI9341_STM.cpp ├── Adafruit_ILI9341_STM.h ├── License.h ├── README.txt └── examples │ ├── TFT_Clock_Digital_ILI9341 │ └── TFT_Clock_Digital_ILI9341.ino │ ├── TFT_Clock_ILI9341 │ └── TFT_Clock_ILI9341.ino │ ├── TFT_Rainbow_ILI9341 │ └── TFT_Rainbow_ILI9341.ino │ ├── TFT_Show_Font_ILI9341 │ └── TFT_Show_Font_ILI9341.ino │ ├── breakouttouchpaint │ └── breakouttouchpaint.ino │ ├── graphicstest │ └── graphicstest.ino │ ├── onoffbutton │ └── onoffbutton.ino │ ├── onoffbutton_breakout │ └── onoffbutton_breakout.ino │ ├── spitftbitmap │ └── spitftbitmap.ino │ ├── stm32_graphicstest │ └── stm32_graphicstest.ino │ └── touchpaint │ └── touchpaint.ino ├── ElmChanFatFs ├── diskio.h ├── ff.c ├── ff.h ├── ffSTM32F100.h ├── ffconf.h ├── ffsystem.c ├── ffunicode.c ├── mmc_stm32f1_spi.c ├── rtc_stm32f1.c └── rtc_stm32f1.h ├── USBComposite ├── AbsMouse.cpp ├── Consumer.cpp ├── HIDReports.cpp ├── Joystick.cpp ├── Keyboard.cpp ├── LICENSE ├── MidiSpecs.h ├── MinSysex.c ├── MinSysex.h ├── Mouse.cpp ├── README.md ├── UPGRADING-TO-0.90.txt ├── USBComposite.cpp ├── USBComposite.h ├── USBCompositeSerial.cpp ├── USBCompositeSerial.h ├── USBHID.cpp ├── USBHID.h ├── USBMIDI.cpp ├── USBMIDI.h ├── USBMassStorage.cpp ├── USBMassStorage.h ├── USBXBox360.cpp ├── USBXBox360.h ├── examples │ ├── BootKeyboard │ │ └── BootKeyboard.ino │ ├── absmouse │ │ └── absmouse.ino │ ├── consumer │ │ └── consumer.ino │ ├── jigglemouse │ │ └── jigglemouse.ino │ ├── keyboardMouse │ │ └── keyboardMouse.ino │ ├── keyboardwithleds │ │ └── keyboardwithleds.ino │ ├── mass │ │ ├── image.h │ │ └── mass.ino │ ├── midiin │ │ └── midiin.ino │ ├── midiout │ │ └── midiout.ino │ ├── rawhid │ │ ├── rawhid.ino │ │ └── send.py │ ├── sdreader │ │ └── sdreader.ino │ ├── simplejoystick │ │ └── simplejoystick.ino │ ├── simplekeyboard │ │ └── simplekeyboard.ino │ ├── softjoystick │ │ ├── send.py │ │ └── softjoystick.ino │ ├── twojoysticks │ │ └── twojoysticks.ino │ └── x360 │ │ └── x360.ino ├── keywords.txt ├── library.properties ├── scripts │ ├── midi_table.py │ ├── send.py │ └── showhids.py ├── usb_composite_serial.c ├── usb_composite_serial.h ├── usb_generic.c ├── usb_generic.h ├── usb_hid.c ├── usb_hid.h ├── usb_mass.c ├── usb_mass.h ├── usb_mass_internal.h ├── usb_mass_mal.c ├── usb_mass_mal.h ├── usb_midi_device.c ├── usb_midi_device.h ├── usb_scsi.c ├── usb_scsi.h ├── usb_scsi_data.c ├── usb_setup.cpp ├── usb_x360.c └── usb_x360.h ├── XPT2046_Touchscreen ├── README.md ├── XPT2046_Touchscreen.cpp ├── XPT2046_Touchscreen.h ├── doc │ └── ILI9431Test.jpg ├── docs │ └── issue_template.md ├── examples │ ├── ILI9341Test │ │ └── ILI9341Test.ino │ ├── TouchTest │ │ └── TouchTest.ino │ └── TouchTestIRQ │ │ └── TouchTestIRQ.ino ├── keywords.txt ├── library.json └── library.properties └── si5351 ├── si5351.cpp └── si5351.h /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.a 3 | *.zip 4 | Ignore/ 5 | 6 | # Temporary files 7 | *.000 8 | *.bak 9 | *.bck 10 | *.kicad_pcb-bak 11 | *~ 12 | _autosave-* 13 | *.tmp 14 | *-rescue.lib 15 | *-save.pro 16 | *-save.kicad_pcb 17 | 18 | # Netlist files (exported from Eeschema) 19 | *.net 20 | 21 | # Autorouter files (exported from Pcbnew) 22 | *.dsn 23 | *.ses 24 | 25 | # Exported BOM files 26 | *.xml 27 | *.csv 28 | 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This a project to create a Vector Network Analyzer based on the EU1KY antenna tuner that can be reconfigured for different needs. This material is copyrighted by Daniel Marks (KW4TI) and licensed under the Creative Commons License CC-BY-SA 4.0. The software is licensed under the zlib license. These are open source licenses that permit commercial use, modification and redistribution with attribution, and require licensees to assume all risk for using the copyrighted materials. 2 | 3 | Currently what is on this github are the Kicad files for the VNA and the software. The software uses the "stm32duino" extension to the Arduino IDE. The Arduino IDE can be downloaded from 4 | 5 | https://www.arduino.cc/en/Main/Software 6 | 7 | The stm32duino software can be installed using the instructions on the stm32duino web site 8 | 9 | https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/Installation 10 | 11 | which involves (at this time) downloading the git archive for the stm32duino and placing it under the "hardware" folder in your Arduino folder. 12 | 13 | There are several Arduino libraries that are required for the SI5351A frequency synthesizer chip, ILI9341 TFT display module, and XPT2046 touchscreen controller. These are provided for your use under the "libraries" directory of this archive, but may not be the most recent versions. You could copy these directories into the "libraries" folder in your Arduino directory. 14 | 15 | --------------------------------- 16 | 17 | The VNA may be used with or without a touchscreen. If a touchscreen it used, it should be compiled with the "VNA_TOUCHSCREEN" defined in VNA.h. If you do not have a touchscreen, you can ground the pin PB13 and it will start up without a touchscreen, only appearing a USB CDC serial port device. You can then type "HELP" to see the list of commands. 18 | 19 | The touchscreen used is a 2.8" touchscreen with a SPI interface to the ILI9341 and XPT2046. These are commonly available at a low price. To connect it to the SPI interface connector header "J1" on the board, use a 14 pin IDC ribbon cable. 20 | -------------------------------------------------------------------------------- /VNA/complex.h: -------------------------------------------------------------------------------- 1 | #ifndef _COMPLEX_H 2 | #define _COMPLEX_H 3 | /* 4 | Limited complex number class 5 | */ 6 | 7 | /* 8 | * Copyright (c) 2018 Daniel Marks 9 | 10 | This software is provided 'as-is', without any express or implied 11 | warranty. In no event will the authors be held liable for any damages 12 | arising from the use of this software. 13 | 14 | Permission is granted to anyone to use this software for any purpose, 15 | including commercial applications, and to alter it and redistribute it 16 | freely, subject to the following restrictions: 17 | 18 | 1. The origin of this software must not be misrepresented; you must not 19 | claim that you wrote the original software. If you use this software 20 | in a product, an acknowledgment in the product documentation would be 21 | appreciated but is not required. 22 | 2. Altered source versions must be plainly marked as such, and must not be 23 | misrepresented as being the original software. 24 | 3. This notice may not be removed or altered from any source distribution. 25 | */ 26 | 27 | #include 28 | 29 | #define DEG2RAD(x) ((x)*(0.0174532925199f)) 30 | #define RAD2DEG(x) ((x)*(57.2957795131f)) 31 | 32 | class Complex 33 | { 34 | public: 35 | 36 | float real, imag; 37 | 38 | Complex(); 39 | Complex(float pReal); 40 | Complex(float pReal, float pImag); 41 | Complex(const Complex &cmplx); 42 | float re(); 43 | float im(); 44 | float absq(); 45 | void polar(float modulus, float phase); 46 | void polar(float phase); 47 | float arg(); 48 | float absv(); 49 | Complex recip() const; 50 | Complex conj() const; 51 | Complex parallel(const Complex &cmplx) const; 52 | Complex bilinear(const Complex &val) const; 53 | Complex bilinear(float val) const; 54 | 55 | Complex operator+(const Complex &val) const; 56 | Complex operator-(const Complex &val) const; 57 | Complex operator-() const; 58 | Complex operator*(const Complex &val) const; 59 | Complex operator/(const Complex &val) const; 60 | Complex operator+(float val) const; 61 | Complex operator-(float val) const; 62 | Complex operator*(float val) const; 63 | Complex operator/(float val) const; 64 | bool operator==(const Complex &val); 65 | bool operator!=(const Complex &val); 66 | }; 67 | 68 | #endif /* _COMPLEX_H */ 69 | -------------------------------------------------------------------------------- /VNA/consoleio.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Daniel Marks 3 | 4 | This software is provided 'as-is', without any express or implied 5 | warranty. In no event will the authors be held liable for any damages 6 | arising from the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely, subject to the following restrictions: 11 | 12 | 1. The origin of this software must not be misrepresented; you must not 13 | claim that you wrote the original software. If you use this software 14 | in a product, an acknowledgment in the product documentation would be 15 | appreciated but is not required. 16 | 2. Altered source versions must be plainly marked as such, and must not be 17 | misrepresented as being the original software. 18 | 3. This notice may not be removed or altered from any source distribution. 19 | */ 20 | 21 | #include 22 | #include 23 | #include "consoleio.h" 24 | #include "mini-printf.h" 25 | 26 | Stream *mainSerial = NULL; 27 | Stream *externalSerial = NULL; 28 | 29 | void console_setMainSerial(Stream *serialDevice) 30 | { 31 | mainSerial = serialDevice; 32 | } 33 | 34 | void console_setExternalSerial(Stream *serialDevice) 35 | { 36 | externalSerial = serialDevice; 37 | } 38 | 39 | void console_printchar(const char c) 40 | { 41 | if (mainSerial != NULL) mainSerial->print(c); 42 | if (externalSerial != NULL) externalSerial->print(c); 43 | } 44 | 45 | int console_inchar(void) 46 | { 47 | if ((mainSerial != NULL) && (mainSerial->available())) return mainSerial->read(); 48 | if ((externalSerial != NULL) && (externalSerial->available())) return externalSerial->read(); 49 | return -1; 50 | } 51 | 52 | void console_printcrlf(void) 53 | { 54 | console_printchar('\r'); 55 | console_printchar('\n'); 56 | } 57 | 58 | void console_print(const char *c) 59 | { 60 | while (*c) console_printchar(*c++); 61 | } 62 | 63 | void console_println(const char *c) 64 | { 65 | console_print(c); 66 | console_printcrlf(); 67 | } 68 | 69 | void console_print(int n) 70 | { 71 | char s[20]; 72 | mini_itoa(n, 10, 0, 0, s, 0); 73 | console_print(s); 74 | } 75 | 76 | void console_print(unsigned int n) 77 | { 78 | char s[20]; 79 | mini_itoa(n, 10, 0, 1, s, 0); 80 | console_print(s); 81 | } 82 | void console_println(int n) 83 | { 84 | console_print(n); 85 | console_printcrlf(); 86 | } 87 | 88 | void console_println(unsigned int n) 89 | { 90 | console_print(n); 91 | console_printcrlf(); 92 | } 93 | -------------------------------------------------------------------------------- /VNA/consoleio.h: -------------------------------------------------------------------------------- 1 | #ifndef _CONSOLEIO_H 2 | #define _CONSOLEIO_H 3 | 4 | /* 5 | * Copyright (c) 2018 Daniel Marks 6 | 7 | This software is provided 'as-is', without any express or implied 8 | warranty. In no event will the authors be held liable for any damages 9 | arising from the use of this software. 10 | 11 | Permission is granted to anyone to use this software for any purpose, 12 | including commercial applications, and to alter it and redistribute it 13 | freely, subject to the following restrictions: 14 | 15 | 1. The origin of this software must not be misrepresented; you must not 16 | claim that you wrote the original software. If you use this software 17 | in a product, an acknowledgment in the product documentation would be 18 | appreciated but is not required. 19 | 2. Altered source versions must be plainly marked as such, and must not be 20 | misrepresented as being the original software. 21 | 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | void console_printchar(const char c); 25 | void console_print(const char *c); 26 | void console_println(const char *c); 27 | void console_print(int n); 28 | void console_print(unsigned int n); 29 | void console_println(int n); 30 | void console_println(unsigned int n); 31 | int console_inchar(void); 32 | 33 | void console_setMainSerial(Stream *serialDevice); 34 | void console_setExternalSerial(Stream *serialDevice); 35 | 36 | #endif /* _CONSOLEIO_H */ 37 | -------------------------------------------------------------------------------- /VNA/debugmsg.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Daniel Marks 3 | 4 | This software is provided 'as-is', without any express or implied 5 | warranty. In no event will the authors be held liable for any damages 6 | arising from the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely, subject to the following restrictions: 11 | 12 | 1. The origin of this software must not be misrepresented; you must not 13 | claim that you wrote the original software. If you use this software 14 | in a product, an acknowledgment in the product documentation would be 15 | appreciated but is not required. 16 | 2. Altered source versions must be plainly marked as such, and must not be 17 | misrepresented as being the original software. 18 | 3. This notice may not be removed or altered from any source distribution. 19 | */ 20 | 21 | #include "Arduino.h" 22 | #include 23 | #include "debugmsg.h" 24 | #include "consoleio.h" 25 | 26 | #define USE_MINIPRINTF 27 | 28 | #ifdef USE_MINIPRINTF 29 | #include "mini-printf.h" 30 | #endif 31 | 32 | #ifdef DEBUGM 33 | 34 | unsigned char debugmsg_state = 0; 35 | 36 | void setDebugMsgMode(unsigned char state) 37 | { 38 | debugmsg_state = state; 39 | } 40 | 41 | void debugmsgprintf(const char *format, ...) 42 | { 43 | char msg[MAXMSG]; 44 | va_list ap; 45 | 46 | if (!debugmsg_state) return; 47 | va_start(ap, format); 48 | #ifdef USE_MINIPRINTF 49 | mini_vsnprintf(msg,sizeof(msg)-1,(const char *)format,ap); 50 | #else 51 | vsnprintf(msg,sizeof(msg)-1,(const char *)format,ap); 52 | #endif 53 | msg[MAXMSG-1] = '\000'; 54 | console_println(msg); 55 | } 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /VNA/debugmsg.h: -------------------------------------------------------------------------------- 1 | #ifndef _DEBUGMSG_H 2 | #define _DEBUGMSG_H 3 | 4 | /* 5 | * Copyright (c) 2018 Daniel Marks 6 | 7 | This software is provided 'as-is', without any express or implied 8 | warranty. In no event will the authors be held liable for any damages 9 | arising from the use of this software. 10 | 11 | Permission is granted to anyone to use this software for any purpose, 12 | including commercial applications, and to alter it and redistribute it 13 | freely, subject to the following restrictions: 14 | 15 | 1. The origin of this software must not be misrepresented; you must not 16 | claim that you wrote the original software. If you use this software 17 | in a product, an acknowledgment in the product documentation would be 18 | appreciated but is not required. 19 | 2. Altered source versions must be plainly marked as such, and must not be 20 | misrepresented as being the original software. 21 | 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | extern unsigned char debugmsg_state; 25 | 26 | void debugmsgprintf(const char *format, ...); 27 | void setDebugMsgMode(unsigned char state); 28 | 29 | #define DEBUGM 30 | #define MAXMSG 120 31 | 32 | #ifdef DEBUGM 33 | #define DEBUGMSG(...) debugmsgprintf(__VA_ARGS__) 34 | #else 35 | #define DEBUGMSG {} 36 | #endif 37 | 38 | #endif /* _DEBUGMSG_H */ 39 | -------------------------------------------------------------------------------- /VNA/flashstruct.h: -------------------------------------------------------------------------------- 1 | #ifndef _FLASHSTRUCT_H 2 | #define _FLASHSTRUCT_H 3 | 4 | #include 5 | /* 6 | * Copyright (c) 2018 Daniel Marks 7 | 8 | This software is provided 'as-is', without any express or implied 9 | warranty. In no event will the authors be held liable for any damages 10 | arising from the use of this software. 11 | 12 | Permission is granted to anyone to use this software for any purpose, 13 | including commercial applications, and to alter it and redistribute it 14 | freely, subject to the following restrictions: 15 | 16 | 1. The origin of this software must not be misrepresented; you must not 17 | claim that you wrote the original software. If you use this software 18 | in a product, an acknowledgment in the product documentation would be 19 | appreciated but is not required. 20 | 2. Altered source versions must be plainly marked as such, and must not be 21 | misrepresented as being the original software. 22 | 3. This notice may not be removed or altered from any source distribution. 23 | */ 24 | 25 | int readflashstruct(int flash_page_number, int num_blocks, void *blocks[], int blocklen[]); 26 | int writeflashstruct(int flash_page_number, int num_blocks, void *blocks[], int blocklen[]); 27 | void flash_mount_fs_card(void); 28 | 29 | void usb_init_serial(); 30 | bool usb_init_mass_storage(); 31 | void usb_mass_storage_loop(void); 32 | 33 | int opendatafile(FIL *fp, char *filename); 34 | 35 | extern uint8_t flash_fs_mounted; 36 | 37 | #endif /* _FLASHSTRUCT_H */ 38 | -------------------------------------------------------------------------------- /VNA/jogwheel.h: -------------------------------------------------------------------------------- 1 | #ifndef _JOGWHEEL_H 2 | #define _JOGWHEEL_H 3 | /* 4 | Jog Wheel Class 5 | */ 6 | 7 | /* 8 | * Copyright (c) 2018 Daniel Marks 9 | 10 | This software is provided 'as-is', without any express or implied 11 | warranty. In no event will the authors be held liable for any damages 12 | arising from the use of this software. 13 | 14 | Permission is granted to anyone to use this software for any purpose, 15 | including commercial applications, and to alter it and redistribute it 16 | freely, subject to the following restrictions: 17 | 18 | 1. The origin of this software must not be misrepresented; you must not 19 | claim that you wrote the original software. If you use this software 20 | in a product, an acknowledgment in the product documentation would be 21 | appreciated but is not required. 22 | 2. Altered source versions must be plainly marked as such, and must not be 23 | misrepresented as being the original software. 24 | 3. This notice may not be removed or altered from any source distribution. 25 | */ 26 | 27 | class JogWheel 28 | { 29 | public: 30 | 31 | JogWheel(); 32 | void setup(); 33 | void poll(); 34 | bool getSelect(bool waitselect=false); 35 | int readCounts(); 36 | int totalCounts(); 37 | int readInterrupts(); 38 | }; 39 | 40 | #endif /* _JOGWHEEL_H */ 41 | -------------------------------------------------------------------------------- /VNA/mini-printf.h: -------------------------------------------------------------------------------- 1 | /* 2 | The Minimal snprintf() implementation 3 | 4 | Copyright (c) 2013 Michal Ludvig 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * * Neither the name of the auhor nor the names of its contributors 15 | may be used to endorse or promote products derived from this software 16 | without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | 31 | #ifndef __MINI_PRINTF__ 32 | #define __MINI_PRINTF__ 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | #include 39 | 40 | int mini_vsnprintf(char* buffer, unsigned int buffer_len, const char *fmt, va_list va); 41 | int mini_snprintf(char* buffer, unsigned int buffer_len, const char *fmt, ...); 42 | 43 | #define MINI_PRINTF_FTOA 44 | #ifdef MINI_PRINTF_FTOA 45 | typedef unsigned int float32int; 46 | 47 | unsigned int mini_ftoa(float f, int dec, char *s, int len); 48 | unsigned int mini_itoa(int value, unsigned int radix, unsigned int uppercase, unsigned int unsig, 49 | char *buffer, unsigned int zero_pad); 50 | float ipow10f(int p); 51 | inline float32int float2int32(float f) 52 | { 53 | return *((float32int *)(&f)); 54 | } 55 | inline float int32float(float32int i) 56 | { 57 | return *((float *)(&i)); 58 | } 59 | #endif 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #define vsnprintf mini_vsnprintf 66 | #define snprintf mini_snprintf 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /VNA/structconf.h: -------------------------------------------------------------------------------- 1 | #ifndef _STRUCTCONF_H 2 | #define _STRUCTCONF_H 3 | 4 | /* 5 | * Copyright (c) 2018 Daniel Marks 6 | 7 | This software is provided 'as-is', without any express or implied 8 | warranty. In no event will the authors be held liable for any damages 9 | arising from the use of this software. 10 | 11 | Permission is granted to anyone to use this software for any purpose, 12 | including commercial applications, and to alter it and redistribute it 13 | freely, subject to the following restrictions: 14 | 15 | 1. The origin of this software must not be misrepresented; you must not 16 | claim that you wrote the original software. If you use this software 17 | in a product, an acknowledgment in the product documentation would be 18 | appreciated but is not required. 19 | 2. Altered source versions must be plainly marked as such, and must not be 20 | misrepresented as being the original software. 21 | 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | typedef enum { STRUCTCONF_INT32=0, STRUCTCONF_INT16, STRUCTCONF_INT8, STRUCTCONF_INT32_HEX, STRUCTCONF_INT16_HEX, STRUCTCONF_INT8_HEX, 25 | STRUCTCONF_FLOAT, STRUCTCONF_STRING } structconf_datatype; 26 | 27 | #define STRUCTCONF_INTMIN -2147483648 28 | #define STRUCTCONF_INTMAX 2147483647 29 | 30 | typedef struct _structure_entry 31 | { 32 | const char *parmname; 33 | structconf_datatype dtype; 34 | uint16_t offset; 35 | uint16_t nentries; 36 | int minval; 37 | int maxval; 38 | const char *description; 39 | } structure_entry; 40 | 41 | void se_print_structure(int nentries, const structure_entry se[], void *str); 42 | void se_set_structure_field(int nentries, const structure_entry se[], void *str, const char *c); 43 | 44 | #endif /* _STRUCTCONF_H */ 45 | -------------------------------------------------------------------------------- /VNA/tinycl.h: -------------------------------------------------------------------------------- 1 | #ifndef _TINYCL_H 2 | #define _TINYCL_H 3 | 4 | /* 5 | * Copyright (c) 2018 Daniel Marks 6 | 7 | This software is provided 'as-is', without any express or implied 8 | warranty. In no event will the authors be held liable for any damages 9 | arising from the use of this software. 10 | 11 | Permission is granted to anyone to use this software for any purpose, 12 | including commercial applications, and to alter it and redistribute it 13 | freely, subject to the following restrictions: 14 | 15 | 1. The origin of this software must not be misrepresented; you must not 16 | claim that you wrote the original software. If you use this software 17 | in a product, an acknowledgment in the product documentation would be 18 | appreciated but is not required. 19 | 2. Altered source versions must be plainly marked as such, and must not be 20 | misrepresented as being the original software. 21 | 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #define TINYCL_ARDUINO_DEFAULT 25 | #define TINYCL_MAX_PARAMETERS 4 26 | #define TINYCL_COMMAND_BUFFER 80 27 | 28 | typedef enum { TINYCL_PARM_END=0, TINYCL_PARM_BOOL, TINYCL_PARM_INT, TINYCL_PARM_STR } tinycl_parmtype; 29 | 30 | typedef struct _tinycl_bool 31 | { 32 | bool b; 33 | } tinycl_bool; 34 | 35 | typedef struct _tinycl_integer 36 | { 37 | int i; 38 | } tinycl_integer; 39 | 40 | typedef struct _tinycl_string 41 | { 42 | char *str; 43 | } tinycl_string; 44 | 45 | typedef union _tinycl_parameter 46 | { 47 | tinycl_integer ti; 48 | tinycl_string ts; 49 | tinycl_bool tb; 50 | } tinycl_parameter; 51 | 52 | typedef int (*tinycl_getchar)(void *); 53 | typedef void (*tinycl_putchar)(char c, void *v); 54 | typedef int (*tinycl_commandfunc)(int args, tinycl_parameter *tp, void *v); 55 | 56 | typedef struct _tinycl_command 57 | { 58 | const char *command_name; 59 | const char *description; 60 | tinycl_commandfunc tc; 61 | const tinycl_parmtype tpt[TINYCL_MAX_PARAMETERS]; 62 | } tinycl_command; 63 | 64 | int tinycl_task(int num_cmd, const tinycl_command *tc, void *v); 65 | void tinycl_print_commands(int num_cmd, const tinycl_command *tc); 66 | void tinycl_set_getchar(tinycl_getchar tg, void *tgp); 67 | void tinycl_set_putchar(tinycl_putchar tp, void *tpp); 68 | 69 | extern bool tinycl_do_echo; 70 | extern bool tinycl_do_checksum; 71 | 72 | 73 | #endif /* _TINYCL_H */ 74 | -------------------------------------------------------------------------------- /VNA/touchscreen.h: -------------------------------------------------------------------------------- 1 | #ifndef _TOUCHSCREEN_H 2 | #define _TOUCHSCREEN_H 3 | 4 | /* 5 | * Copyright (c) 2018 Daniel Marks 6 | 7 | This software is provided 'as-is', without any express or implied 8 | warranty. In no event will the authors be held liable for any damages 9 | arising from the use of this software. 10 | 11 | Permission is granted to anyone to use this software for any purpose, 12 | including commercial applications, and to alter it and redistribute it 13 | freely, subject to the following restrictions: 14 | 15 | 1. The origin of this software must not be misrepresented; you must not 16 | claim that you wrote the original software. If you use this software 17 | in a product, an acknowledgment in the product documentation would be 18 | appreciated but is not required. 19 | 2. Altered source versions must be plainly marked as such, and must not be 20 | misrepresented as being the original software. 21 | 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #include "SPI.h" 25 | #include "Adafruit_GFX.h" 26 | #include "Adafruit_GFX_AS.h" 27 | #include "Adafruit_ILI9341_STM.h" 28 | #include "XPT2046_Touchscreen.h" 29 | 30 | void touchscreen_task(void); 31 | void touchscreen_setup(void); 32 | void touchscreen_test(void); 33 | 34 | typedef int (*touchscreen_commandfunc)(int code, void *v); 35 | 36 | typedef struct _touchscreen_button_panel_entry 37 | { 38 | int16_t code; /* button code */ 39 | int16_t x,y; /* position of button */ 40 | int16_t r; /* corner radius */ 41 | int16_t w,h; /* width an height of button */ 42 | uint16_t outline_color; /* outline button color */ 43 | uint16_t fill_color; /* fill color */ 44 | uint16_t text_color; /* text color */ 45 | const char *label; /* text label */ 46 | uint8_t textsize; /* text size */ 47 | touchscreen_commandfunc tc; /* function to call */ 48 | } touchscreen_button_panel_entry; 49 | 50 | #define TOUCHSCREEN_FIXEDPOINT_OFFSET 65536 51 | #define TOUCHSCREEN_SELECT_COLOR 0xF03F 52 | 53 | typedef struct _touchscreen_calibration 54 | { 55 | int32_t a,b,d,e,k; 56 | int64_t c,f; 57 | bool iscal; 58 | } touchscreen_calibration; 59 | 60 | bool touchscreen_solid_press(int16_t &x, int16_t &y, int16_t &z, bool applycal=true, int16_t ms=150); 61 | bool touchscreen_solid_release(int16_t ms=150); 62 | void touchscreen_draw_button_panel(Adafruit_GFX *gfx, int n_entries, const touchscreen_button_panel_entry *tbpe); 63 | int16_t touchscreen_get_button_press(Adafruit_GFX *gfx, int n_entries, const touchscreen_button_panel_entry *tbpe, void *v=NULL); 64 | void touchscreen_draw_button(Adafruit_GFX *gfx, const touchscreen_button_panel_entry *t, int disptype=0); 65 | void touchscreen_calibrate(void); 66 | 67 | void touchscreen_display_block(int16_t x, int16_t y, const char *c, int16_t textsize, bool center); 68 | void touchscreen_display_message(const char *c); 69 | bool touchscreen_abort(void); 70 | 71 | extern touchscreen_calibration tcal; 72 | 73 | #endif /* _TOUCHSCREEN_H */ 74 | -------------------------------------------------------------------------------- /board-smt/VNA BOM.ods: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board-smt/VNA BOM.ods -------------------------------------------------------------------------------- /board-smt/VNA Schematics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board-smt/VNA Schematics.pdf -------------------------------------------------------------------------------- /board-smt/VNA board.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board-smt/VNA board.png -------------------------------------------------------------------------------- /board-smt/VNA-BOM.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board-smt/VNA-BOM.xlsx -------------------------------------------------------------------------------- /board-smt/VNA-top.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board-smt/VNA-top.xlsx -------------------------------------------------------------------------------- /board-smt/VNA.pretty/PAD_DEFAULT_CLOSED.kicad_mod: -------------------------------------------------------------------------------- 1 | (module PAD_DEFAULT_CLOSED (layer F.Cu) (tedit 5DD35602) 2 | (fp_text reference REF** (at 0 0.5) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value PAD_DEFAULT_CLOSED (at 0 -0.5) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (pad 1 smd circle (at -1.75 0) (size 1 1) (layers F.Cu F.Paste F.Mask)) 9 | (pad 1 smd circle (at 1.75 0) (size 1 1) (layers F.Cu F.Paste F.Mask)) 10 | (pad 1 smd rect (at -1.04 0) (size 1.5 1) (layers F.Cu F.Paste F.Mask)) 11 | (pad 1 smd rect (at 1 0) (size 1.5 1) (layers F.Cu F.Paste F.Mask)) 12 | (pad 1 smd rect (at 0 0) (size 1 0.5) (layers F.Cu F.Paste F.Mask)) 13 | ) 14 | -------------------------------------------------------------------------------- /board-smt/VNA.pretty/PAD_DEFAULT_OPEN.kicad_mod: -------------------------------------------------------------------------------- 1 | (module PAD_DEFAULT_OPEN (layer F.Cu) (tedit 5DD35599) 2 | (fp_text reference REF** (at 0 0.5) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value PAD_DEFAULT_CLOSED (at 0 -0.5) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (pad 1 smd circle (at -1.75 0) (size 1 1) (layers F.Cu F.Paste F.Mask)) 9 | (pad 2 smd circle (at 1.75 0) (size 1 1) (layers F.Cu F.Paste F.Mask)) 10 | (pad 1 smd rect (at -1.04 0) (size 1.5 1) (layers F.Cu F.Paste F.Mask)) 11 | (pad 2 smd rect (at 1 0) (size 1.5 1) (layers F.Cu F.Paste F.Mask)) 12 | ) 13 | -------------------------------------------------------------------------------- /board-smt/VNA.pro: -------------------------------------------------------------------------------- 1 | update=1/1/2021 7:14:07 PM 2 | version=1 3 | last_client=kicad 4 | [pcbnew] 5 | version=1 6 | LastNetListRead= 7 | UseCmpFile=1 8 | PadDrill=0.600000000000 9 | PadDrillOvalY=0.600000000000 10 | PadSizeH=1.500000000000 11 | PadSizeV=1.500000000000 12 | PcbTextSizeV=1.500000000000 13 | PcbTextSizeH=1.500000000000 14 | PcbTextThickness=0.300000000000 15 | ModuleTextSizeV=1.000000000000 16 | ModuleTextSizeH=1.000000000000 17 | ModuleTextSizeThickness=0.150000000000 18 | SolderMaskClearance=0.000000000000 19 | SolderMaskMinWidth=0.000000000000 20 | DrawSegmentWidth=0.200000000000 21 | BoardOutlineThickness=0.100000000000 22 | ModuleOutlineThickness=0.150000000000 23 | [cvpcb] 24 | version=1 25 | NetIExt=net 26 | [general] 27 | version=1 28 | [eeschema] 29 | version=1 30 | LibDir=../VNA 31 | [eeschema/libraries] 32 | LibName1=power 33 | LibName2=device 34 | LibName3=switches 35 | LibName4=relays 36 | LibName5=motors 37 | LibName6=transistors 38 | LibName7=conn 39 | LibName8=linear 40 | LibName9=regul 41 | LibName10=74xx 42 | LibName11=cmos4000 43 | LibName12=adc-dac 44 | LibName13=memory 45 | LibName14=xilinx 46 | LibName15=microcontrollers 47 | LibName16=dsp 48 | LibName17=microchip 49 | LibName18=analog_switches 50 | LibName19=motorola 51 | LibName20=texas 52 | LibName21=intel 53 | LibName22=audio 54 | LibName23=interface 55 | LibName24=digital-audio 56 | LibName25=philips 57 | LibName26=display 58 | LibName27=cypress 59 | LibName28=siliconi 60 | LibName29=opto 61 | LibName30=atmel 62 | LibName31=contrib 63 | LibName32=valves 64 | LibName33=bluepill 65 | LibName34=sa612 66 | LibName35=si5351a 67 | LibName36=AMS1117-3V3 68 | LibName37=mt3608 69 | LibName38=cn3052 70 | LibName39=microsd_spi_cd 71 | LibName40=stm32f103c8t6 72 | [schematic_editor] 73 | version=1 74 | PageLayoutDescrFile= 75 | PlotDirectoryName= 76 | SubpartIdSeparator=0 77 | SubpartFirstId=65 78 | NetFmtName=Pcbnew 79 | SpiceForceRefPrefix=0 80 | SpiceUseNetNumbers=0 81 | LabSize=60 82 | -------------------------------------------------------------------------------- /board-smt/bluepill.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /board-smt/bluepill.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # BLUEPILL 5 | # 6 | DEF BLUEPILL UB 0 40 Y Y 1 F N 7 | F0 "UB" 150 600 60 H V C CNN 8 | F1 "BLUEPILL" 150 700 60 H V C CNN 9 | F2 "" 150 700 60 H I C CNN 10 | F3 "" 150 700 60 H I C CNN 11 | DRAW 12 | T 0 150 500 60 0 0 0 STM32F103C8T6 Normal 0 C C 13 | S -1150 800 1550 -1300 0 1 0 f 14 | X Vbat 1 -1350 700 200 R 50 50 1 1 I 15 | X PC13_5V_LED 2 -1350 600 200 R 50 50 1 1 I 16 | X PC14_5V_OSC32IN 3 -1350 500 200 R 50 50 1 1 I 17 | X PC15_5V_OSC32OUT 4 -1350 400 200 R 50 50 1 1 I 18 | X NRST_RESET 7 -1350 -900 200 R 50 50 1 1 I 19 | X PA0_ADC0_CTS2_T2C1E_WKUP 10 -1350 300 200 R 50 50 1 1 I 20 | X PA9_TX1_T1C2_5V 30 1750 -700 200 L 50 50 1 1 I 21 | X PB4_JTRST_MISO1_T3C1_5V 40 1750 -100 200 L 50 50 1 1 I 22 | X +3.3V 70 -1350 -1000 200 R 50 50 1 1 I 23 | X PA1_ADC1_RTS2_T2C2 11 -1350 200 200 R 50 50 1 1 I 24 | X PB10_SCL2_TX3_T2C3N_5V 21 -1350 -700 200 R 50 50 1 1 I 25 | X PA10_RX1_T1C3_5V 31 1750 -600 200 L 50 50 1 1 I 26 | X PB5_SMBAI1_MOSI1_T2C2 41 1750 0 200 L 50 50 1 1 I 27 | X GND 71 -1350 -1100 200 R 50 50 1 1 I 28 | X PA2_ADC2_TX2_T2C3 12 -1350 100 200 R 50 50 1 1 I 29 | X PB11_SDA2_RX3_T2C4N_5V 22 -1350 -800 200 R 50 50 1 1 I 30 | X PA11_USBM_CTS1_T1C4_CANRX_5V 32 1750 -500 200 L 50 50 1 1 I 31 | X PB6_SCL1_T4C1_TX1_5V 42 1750 100 200 L 50 50 1 1 I 32 | X GND 72 -1350 -1200 200 R 50 50 1 1 I 33 | X PA3_ADC3_RX2_T2C4 13 -1350 0 200 R 50 50 1 1 I 34 | X PA12_USBP_RTS1_T1ETR_CANTX_5V 33 1750 -400 200 L 50 50 1 1 I 35 | X PB7_SDA1_T4C2_RX1_5V 43 1750 200 200 L 50 50 1 1 I 36 | X +3.3V 73 1750 700 200 L 50 50 1 1 I 37 | X PA4_ADC4_NSS1_CK2 14 -1350 -100 200 R 50 50 1 1 I 38 | X PA13_JTMS_SWDIO 34 -50 -1500 200 U 50 50 1 1 I 39 | X GND 74 1750 600 200 L 50 50 1 1 I 40 | X PA5_ADC5_SCK1 15 -1350 -200 200 R 50 50 1 1 I 41 | X PB12_SMBAI2_NSS2_T1BKIN_CK3_5V 25 1750 -1200 200 L 50 50 1 1 I 42 | X PB8_T4C3_SCL1_CANRX_5V 45 1750 300 200 L 50 50 1 1 I 43 | X +5V 75 1750 500 200 L 50 50 1 1 I 44 | X PA6_ADC6_MISO1_T3C1_T1BKIN 16 -1350 -300 200 R 50 50 1 1 I 45 | X PB13_SCK2_T1C1N_CTS3_5V 26 1750 -1100 200 L 50 50 1 1 I 46 | X PB9_T4C4_SDA1_CANTX_5V 46 1750 400 200 L 50 50 1 1 I 47 | X GND 76 -250 -1500 200 U 50 50 1 1 I 48 | X PA7_ADC7_MOSI1_T3C2_T1C1N 17 -1350 -400 200 R 50 50 1 1 I 49 | X PB14_MISO2_T1C2N_RTS3_5V 27 1750 -1000 200 L 50 50 1 1 I 50 | X PA14_JTCK_SWCLK 37 50 -1500 200 U 50 50 1 1 I 51 | X +3V3 77 -150 -1500 200 U 50 50 1 1 I 52 | X PB0_ADC8_T3C3_T1C2N 18 -1350 -500 200 R 50 50 1 1 I 53 | X PB15_MOSI2_T1C3N_5V 28 1750 -900 200 L 50 50 1 1 I 54 | X PA15_JTDI_NSS1_T2C1E_5V 38 1750 -300 200 L 50 50 1 1 I 55 | X PB1_ADC9_T3C4_T1C3N 19 -1350 -600 200 R 50 50 1 1 I 56 | X PA8_CK1_T1C1_MCO_5V 29 1750 -800 200 L 50 50 1 1 I 57 | X PB3_JTDO_SCK1_T2C2_5V 39 1750 -200 200 L 50 50 1 1 I 58 | ENDDRAW 59 | ENDDEF 60 | # 61 | #End Library 62 | -------------------------------------------------------------------------------- /board-smt/cn3052.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /board-smt/cn3052.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # CN3052 5 | # 6 | DEF CN3052 U 0 40 Y Y 1 F N 7 | F0 "U" 0 0 60 H V C CNN 8 | F1 "CN3052" 50 -100 60 H V C CNN 9 | F2 "" 0 0 60 H I C CNN 10 | F3 "" 0 0 60 H I C CNN 11 | DRAW 12 | S -250 50 350 -600 0 1 0 N 13 | X TEMP1 1 -450 -200 200 R 50 50 1 1 I 14 | X PROG2 2 -450 -300 200 R 50 50 1 1 I 15 | X GND 3 -450 -400 200 R 50 50 1 1 I 16 | X VCC 4 -450 -500 200 R 50 50 1 1 I 17 | X BAT 5 550 -500 200 L 50 50 1 1 I 18 | X STDBY! 6 550 -400 200 L 50 50 1 1 I 19 | X CHRG! 7 550 -300 200 L 50 50 1 1 I 20 | X CE 8 550 -200 200 L 50 50 1 1 I 21 | ENDDRAW 22 | ENDDEF 23 | # 24 | #End Library 25 | -------------------------------------------------------------------------------- /board-smt/conn_rf/bnc_90_1-1337543-0.wings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board-smt/conn_rf/bnc_90_1-1337543-0.wings -------------------------------------------------------------------------------- /board-smt/conn_rf/bnc_straight_1-1337541-0.wings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board-smt/conn_rf/bnc_straight_1-1337541-0.wings -------------------------------------------------------------------------------- /board-smt/conn_rf/coaxial_u.fl-r-smt-1.wings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board-smt/conn_rf/coaxial_u.fl-r-smt-1.wings -------------------------------------------------------------------------------- /board-smt/conn_rf/lemo_epb00250ntn.wings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board-smt/conn_rf/lemo_epb00250ntn.wings -------------------------------------------------------------------------------- /board-smt/conn_rf/sma_90_r300.124.403.wings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board-smt/conn_rf/sma_90_r300.124.403.wings -------------------------------------------------------------------------------- /board-smt/conn_rf/sma_smd_73251-135x.wings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board-smt/conn_rf/sma_smd_73251-135x.wings -------------------------------------------------------------------------------- /board-smt/conn_rf/sma_straight_32k101-400l5.wings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board-smt/conn_rf/sma_straight_32k101-400l5.wings -------------------------------------------------------------------------------- /board-smt/fp-lib-table: -------------------------------------------------------------------------------- 1 | (fp_lib_table 2 | (lib (name VNA)(type KiCad)(uri "$(KIPRJMOD)/VNA.pretty")(options "")(descr "")) 3 | (lib (name w_conn_rf)(type KiCad)(uri "$(KIPRJMOD)/w_conn_rf.pretty")(options "")(descr "")) 4 | ) 5 | -------------------------------------------------------------------------------- /board-smt/gerber/VNA-B.Mask.gbr: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Soldermask,Bot* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.7) date 01/01/21 19:16:52* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | %ADD11R,2.900000X5.480000*% 11 | %ADD12C,2.400000*% 12 | %ADD13C,1.400000*% 13 | %ADD14C,1.920000*% 14 | %ADD15C,3.100000*% 15 | %ADD16R,2.100000X2.100000*% 16 | %ADD17O,2.100000X2.100000*% 17 | %ADD18C,5.400000*% 18 | %ADD19C,4.464000*% 19 | %ADD20R,3.900000X3.900000*% 20 | %ADD21R,3.000000X2.400000*% 21 | %ADD22O,3.000000X2.400000*% 22 | %ADD23R,2.400000X3.000000*% 23 | %ADD24O,2.400000X3.000000*% 24 | G04 APERTURE END LIST* 25 | D10* 26 | D11* 27 | X75950000Y-53700000D03* 28 | X68450000Y-53700000D03* 29 | D12* 30 | X92000000Y-123300000D03* 31 | X87500000Y-123300000D03* 32 | X92000000Y-116800000D03* 33 | X87500000Y-116800000D03* 34 | D13* 35 | X142900000Y-120650000D03* 36 | X142900000Y-112650000D03* 37 | D14* 38 | X101660000Y-128590000D03* 39 | X104200000Y-128590000D03* 40 | X104200000Y-130590000D03* 41 | X101660000Y-130590000D03* 42 | D15* 43 | X96930000Y-133290000D03* 44 | X108930000Y-133290000D03* 45 | D16* 46 | X65800000Y-58800000D03* 47 | D17* 48 | X68340000Y-58800000D03* 49 | D16* 50 | X132588000Y-128524000D03* 51 | D17* 52 | X132588000Y-131064000D03* 53 | X130048000Y-128524000D03* 54 | X130048000Y-131064000D03* 55 | X127508000Y-128524000D03* 56 | X127508000Y-131064000D03* 57 | X124968000Y-128524000D03* 58 | X124968000Y-131064000D03* 59 | X122428000Y-128524000D03* 60 | X122428000Y-131064000D03* 61 | X119888000Y-128524000D03* 62 | X119888000Y-131064000D03* 63 | X117348000Y-128524000D03* 64 | X117348000Y-131064000D03* 65 | D18* 66 | X53000000Y-53000000D03* 67 | X147000000Y-53000000D03* 68 | X53000000Y-132000000D03* 69 | X147000000Y-132000000D03* 70 | D19* 71 | X60000000Y-101000000D03* 72 | X137000000Y-101000000D03* 73 | D20* 74 | X87725000Y-127925000D03* 75 | X87725000Y-133925000D03* 76 | X92425000Y-130925000D03* 77 | D16* 78 | X101200000Y-124700000D03* 79 | D17* 80 | X103740000Y-124700000D03* 81 | D16* 82 | X139700000Y-126100000D03* 83 | D17* 84 | X139700000Y-128640000D03* 85 | X139700000Y-131180000D03* 86 | D11* 87 | X131766000Y-53848000D03* 88 | X124266000Y-53848000D03* 89 | D19* 90 | X60000000Y-57000000D03* 91 | X137000000Y-57000000D03* 92 | D21* 93 | X54900000Y-119500000D03* 94 | D22* 95 | X54900000Y-116960000D03* 96 | X54900000Y-114420000D03* 97 | X54900000Y-111880000D03* 98 | X54900000Y-109340000D03* 99 | X54900000Y-106800000D03* 100 | D23* 101 | X62484000Y-131318000D03* 102 | D24* 103 | X59944000Y-131318000D03* 104 | D16* 105 | X126900000Y-108300000D03* 106 | D17* 107 | X126900000Y-110840000D03* 108 | X126900000Y-113380000D03* 109 | X126900000Y-115920000D03* 110 | D16* 111 | X65700000Y-61800000D03* 112 | D17* 113 | X68240000Y-61800000D03* 114 | D16* 115 | X121200000Y-103600000D03* 116 | D17* 117 | X123740000Y-103600000D03* 118 | X126280000Y-103600000D03* 119 | X128820000Y-103600000D03* 120 | D16* 121 | X102500000Y-102000000D03* 122 | D17* 123 | X105040000Y-102000000D03* 124 | M02* 125 | -------------------------------------------------------------------------------- /board-smt/gerber/VNA-B.SilkS.gbr: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Legend,Bot* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.7) date 01/01/21 19:16:52* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | G04 APERTURE END LIST* 11 | D10* 12 | M02* 13 | -------------------------------------------------------------------------------- /board-smt/gerber/VNA-Edge.Cuts.gbr: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Profile,NP* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.7) date 01/01/21 19:16:52* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | %ADD11C,0.150000*% 11 | G04 APERTURE END LIST* 12 | D10* 13 | D11* 14 | X50000000Y-135000000D02* 15 | X50000000Y-50000000D01* 16 | X150000000Y-135000000D02* 17 | X50000000Y-135000000D01* 18 | X150000000Y-50000000D02* 19 | X150000000Y-135000000D01* 20 | X50000000Y-50000000D02* 21 | X150000000Y-50000000D01* 22 | M02* 23 | -------------------------------------------------------------------------------- /board-smt/gerber/VNA-NPTH.drl: -------------------------------------------------------------------------------- 1 | M48 2 | ;DRILL file {KiCad 4.0.7} date 01/01/21 19:16:53 3 | ;FORMAT={-:-/ absolute / metric / decimal} 4 | FMAT,2 5 | METRIC,TZ 6 | T1C1.000 7 | % 8 | G90 9 | G05 10 | M71 11 | T1 12 | X142.9Y-112.65 13 | X142.9Y-120.65 14 | T0 15 | M30 16 | -------------------------------------------------------------------------------- /board-smt/gerber/VNA-bottom.pos: -------------------------------------------------------------------------------- 1 | ### Module positions - created on 07/12/20 20:59:32 ### 2 | ### Printed by Pcbnew version kicad 4.0.7 3 | ## Unit = mm, Angle = deg. 4 | ## Side : bottom 5 | # Ref Val Package PosX PosY Rot Side 6 | ## End 7 | -------------------------------------------------------------------------------- /board-smt/microsd_spi_cd.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | $CMP MicroSD_SPI_CD 4 | D MicroSD slot with card detect signal 5 | $ENDCMP 6 | # 7 | #End Doc Library 8 | -------------------------------------------------------------------------------- /board-smt/microsd_spi_cd.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # MicroSD_SPI_CD 5 | # 6 | DEF MicroSD_SPI_CD U 0 40 Y Y 1 F N 7 | F0 "U" 0 450 60 H V C CNN 8 | F1 "MicroSD_SPI_CD" -50 0 60 V V C CNN 9 | F2 "" -150 0 60 H V C CNN 10 | F3 "" -150 0 60 H V C CNN 11 | DRAW 12 | P 6 0 1 0 250 400 250 -400 -250 -400 -250 250 -100 400 250 400 f 13 | X ~CS 2 350 300 100 L 50 50 1 1 I 14 | X DI 3 350 200 100 L 50 50 1 1 I 15 | X VDD 4 350 100 100 L 50 50 1 1 I 16 | X SCLK 5 350 0 100 L 50 50 1 1 I 17 | X GND 6 350 -100 100 L 50 50 1 1 I 18 | X DO 7 350 -200 100 L 50 50 1 1 I 19 | X CD 9 350 -300 100 L 50 50 1 1 I 20 | ENDDRAW 21 | ENDDEF 22 | # 23 | #End Library 24 | -------------------------------------------------------------------------------- /board-smt/mt3608.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /board-smt/mt3608.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # MT3608 5 | # 6 | DEF MT3608 U 0 40 Y Y 1 F N 7 | F0 "U" -50 -150 60 H V C CNN 8 | F1 "MT3608" -50 50 60 H V C CNN 9 | F2 "" 0 0 60 H I C CNN 10 | F3 "" 0 0 60 H I C CNN 11 | DRAW 12 | S -350 100 200 -400 0 1 0 N 13 | X SW 1 -550 -100 200 R 50 50 1 1 I 14 | X SW 1 -550 -100 200 R 50 50 1 1 I 15 | X GND 2 -550 -200 200 R 50 50 1 1 I 16 | X FB 3 -550 -300 200 R 50 50 1 1 I 17 | X EN 4 400 -300 200 L 50 50 1 1 I 18 | X IN 5 400 -200 200 L 50 50 1 1 I 19 | X NC 6 400 -100 200 L 50 50 1 1 I 20 | ENDDRAW 21 | ENDDEF 22 | # 23 | #End Library 24 | -------------------------------------------------------------------------------- /board-smt/sa612.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /board-smt/sa612.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # SA612 5 | # 6 | DEF SA612 U 0 40 Y Y 1 F N 7 | F0 "U" 0 100 60 H V C CNN 8 | F1 "SA612" 0 -100 60 V V C CNN 9 | F2 "" 50 -50 60 H I C CNN 10 | F3 "" 50 -50 60 H I C CNN 11 | DRAW 12 | S -350 200 400 -350 0 1 0 N 13 | X INA 1 -550 50 200 R 50 50 1 1 I 14 | X INB 2 -550 -50 200 R 50 50 1 1 I 15 | X GND 3 -550 -150 200 R 50 50 1 1 I 16 | X OUTA 4 -550 -250 200 R 50 50 1 1 I 17 | X OUTB 5 600 -250 200 L 50 50 1 1 I 18 | X OSCi 6 600 -150 200 L 50 50 1 1 I 19 | X OSCo 7 600 -50 200 L 50 50 1 1 I 20 | X VCC 8 600 50 200 L 50 50 1 1 I 21 | ENDDRAW 22 | ENDDEF 23 | # 24 | #End Library 25 | -------------------------------------------------------------------------------- /board-smt/si5351a.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /board-smt/si5351a.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # SI5351A 5 | # 6 | DEF SI5351A U 0 40 Y Y 1 F N 7 | F0 "U" 50 50 60 H V C CNN 8 | F1 "SI5351A" 50 -200 60 V V C CNN 9 | F2 "" 50 50 60 H I C CNN 10 | F3 "" 50 50 60 H I C CNN 11 | DRAW 12 | S -250 200 400 -450 0 1 0 N 13 | X Vdd 1 -450 50 200 R 50 50 1 1 I 14 | X XA 2 -450 -50 200 R 50 50 1 1 I 15 | X XB 3 -450 -150 200 R 50 50 1 1 I 16 | X SCL 4 -450 -250 200 R 50 50 1 1 I 17 | X SDA 5 -450 -350 200 R 50 50 1 1 I 18 | X CLK2 6 600 -350 200 L 50 50 1 1 I 19 | X VDDO 7 600 -250 200 L 50 50 1 1 I 20 | X GND 8 600 -150 200 L 50 50 1 1 I 21 | X CLK1 9 600 -50 200 L 50 50 1 1 I 22 | X CLK0 10 600 50 200 L 50 50 1 1 I 23 | ENDDRAW 24 | ENDDEF 25 | # 26 | #End Library 27 | -------------------------------------------------------------------------------- /board-smt/stm32f103c8t6.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # STM32F103C8T6 5 | # 6 | DEF STM32F103C8T6 U 0 40 Y Y 1 F N 7 | F0 "U" 200 0 60 H V C CNN 8 | F1 "STM32F103C8T6" 0 0 60 H V C CNN 9 | F2 "" 200 0 60 H I C CNN 10 | F3 "" 200 0 60 H I C CNN 11 | $FPLIST 12 | LQFP48 13 | $ENDFPLIST 14 | DRAW 15 | S -700 1300 700 -1400 0 1 0 f 16 | X VBAT 1 -900 1200 200 R 50 50 1 1 W 17 | X PC13_TAMPER_RT_C 2 900 1200 200 L 50 50 1 1 B 18 | X PC14_OSC32_IN 3 900 1100 200 L 50 50 1 1 B 19 | X PC14_OSC32_OUT 4 900 1000 200 L 50 50 1 1 B 20 | X PD0_OSC_IN 5 -900 1100 200 R 50 50 1 1 I 21 | X PD1_OSC_OUT 6 -900 1000 200 R 50 50 1 1 O 22 | X NRST 7 -900 900 200 R 50 50 1 1 B 23 | X VSSA 8 900 -1000 200 L 50 50 1 1 W 24 | X VDDA 9 -900 -1000 200 R 50 50 1 1 W 25 | X PA0_WKUP 10 -900 700 200 R 50 50 1 1 B 26 | X PB2 20 900 500 200 L 50 50 1 1 B 27 | X PA9 30 -900 -200 200 R 50 50 1 1 B 28 | X PB4 40 900 300 200 L 50 50 1 1 B 29 | X PA1 11 -900 600 200 R 50 50 1 1 B 30 | X PB10 21 900 -300 200 L 50 50 1 1 B 31 | X PA10 31 -900 -300 200 R 50 50 1 1 B 32 | X PB5 41 900 200 200 L 50 50 1 1 B 33 | X PA2 12 -900 500 200 R 50 50 1 1 B 34 | X PB11 22 900 -400 200 L 50 50 1 1 B 35 | X PA11 32 -900 -400 200 R 50 50 1 1 B 36 | X PB6 42 900 100 200 L 50 50 1 1 B 37 | X PA3 13 -900 400 200 R 50 50 1 1 B 38 | X VSS_1 23 900 -1100 200 L 50 50 1 1 W 39 | X PA12 33 -900 -500 200 R 50 50 1 1 B 40 | X PB7 43 900 0 200 L 50 50 1 1 B 41 | X PA4 14 -900 300 200 R 50 50 1 1 B 42 | X VDD_1 24 -900 -1100 200 R 50 50 1 1 W 43 | X PA13 34 -900 -600 200 R 50 50 1 1 B 44 | X BOOT0 44 900 900 200 L 50 50 1 1 W 45 | X PA5 15 -900 200 200 R 50 50 1 1 B 46 | X PB12 25 900 -500 200 L 50 50 1 1 B 47 | X VSS_2 35 900 -1200 200 L 50 50 1 1 W 48 | X PB8 45 900 -100 200 L 50 50 1 1 B 49 | X PA6 16 -900 100 200 R 50 50 1 1 B 50 | X PB13 26 900 -600 200 L 50 50 1 1 B 51 | X VDD_2 36 -900 -1200 200 R 50 50 1 1 W 52 | X PB9 46 900 -200 200 L 50 50 1 1 B 53 | X PA7 17 -900 0 200 R 50 50 1 1 B 54 | X PB14 27 900 -700 200 L 50 50 1 1 B 55 | X PA14 37 -900 -700 200 R 50 50 1 1 W 56 | X VSS_3 47 900 -1300 200 L 50 50 1 1 W 57 | X PB0 18 900 700 200 L 50 50 1 1 B 58 | X PB15 28 900 -800 200 L 50 50 1 1 B 59 | X PA15 38 -900 -800 200 R 50 50 1 1 W 60 | X VDD_3 48 -900 -1300 200 R 50 50 1 1 W 61 | X PB1 19 900 600 200 L 50 50 1 1 B 62 | X PA8 29 -900 -100 200 R 50 50 1 1 B 63 | X PB3 39 900 400 200 L 50 50 1 1 B 64 | ENDDRAW 65 | ENDDEF 66 | # 67 | #End Library 68 | -------------------------------------------------------------------------------- /board-smt/w_conn_rf.pretty/bnc_90_1-1337543-0.kicad_mod: -------------------------------------------------------------------------------- 1 | (module bnc_90_1-1337543-0 (layer F.Cu) 2 | (descr "BNC connector, Tyco 1-1337543-0") 3 | (fp_text reference bnc_90_1-1337543-0 (at 0 -14.9) (layer F.SilkS) 4 | (effects (font (size 1 1) (thickness 0.2))) 5 | ) 6 | (fp_text value VAL** (at 0 -16.4) (layer F.SilkS) 7 | (effects (font (size 1 1) (thickness 0.2))) 8 | ) 9 | (fp_line (start -6.4 1.2) (end 6.4 0.5) (layer F.SilkS) (width 0.3)) 10 | (fp_line (start -6.4 5.2) (end 6.4 4.5) (layer F.SilkS) (width 0.3)) 11 | (fp_line (start -6.4 4.2) (end 6.4 3.5) (layer F.SilkS) (width 0.3)) 12 | (fp_line (start -6.4 2.2) (end 6.4 1.5) (layer F.SilkS) (width 0.3)) 13 | (fp_line (start -6.4 3.2) (end 6.4 2.5) (layer F.SilkS) (width 0.3)) 14 | (fp_line (start -6.4 7.2) (end 6.4 6.5) (layer F.SilkS) (width 0.3)) 15 | (fp_line (start -6.4 6.2) (end 6.4 5.5) (layer F.SilkS) (width 0.3)) 16 | (fp_line (start -6.4 8.2) (end 6.4 7.5) (layer F.SilkS) (width 0.3)) 17 | (fp_line (start -6.4 9.2) (end 6.4 8.5) (layer F.SilkS) (width 0.3)) 18 | (fp_line (start 6.4 9.2) (end 6.4 0) (layer F.SilkS) (width 0.3)) 19 | (fp_line (start -6.4 9.2) (end -6.4 0) (layer F.SilkS) (width 0.3)) 20 | (fp_line (start 4.8 21.2) (end 4.8 9.2) (layer F.SilkS) (width 0.3)) 21 | (fp_line (start -4.8 21.2) (end -4.8 9.2) (layer F.SilkS) (width 0.3)) 22 | (fp_line (start -4.8 21.2) (end 4.8 21.2) (layer F.SilkS) (width 0.3)) 23 | (fp_line (start -6.4 9.2) (end 6.4 9.2) (layer F.SilkS) (width 0.3)) 24 | (fp_line (start 7.4 0) (end 7.4 -13.7) (layer F.SilkS) (width 0.3)) 25 | (fp_line (start -7.4 -13.7) (end -7.4 0) (layer F.SilkS) (width 0.3)) 26 | (fp_line (start -7.4 -13.7) (end 7.4 -13.7) (layer F.SilkS) (width 0.3)) 27 | (fp_line (start -7.4 0) (end 7.4 0) (layer F.SilkS) (width 0.3)) 28 | (pad 1 thru_hole circle (at 0 -12.38) (size 1.5 1.5) (drill 0.9) (layers *.Cu *.Mask F.SilkS)) 29 | (pad 2 thru_hole circle (at 2.54 -12.38) (size 1.5 1.5) (drill 0.9) (layers *.Cu *.Mask F.SilkS)) 30 | (pad "" np_thru_hole circle (at 5.08 -7.3) (size 2.1 2.1) (drill 2.1) (layers *.Cu *.Mask F.SilkS)) 31 | (pad "" np_thru_hole circle (at -5.08 -7.3) (size 2.1 2.1) (drill 2.1) (layers *.Cu *.Mask F.SilkS)) 32 | (model walter/conn_rf/bnc_90_1-1337543-0.wrl 33 | (at (xyz 0 0 0)) 34 | (scale (xyz 1 1 1)) 35 | (rotate (xyz 0 0 0)) 36 | ) 37 | ) 38 | -------------------------------------------------------------------------------- /board-smt/w_conn_rf.pretty/bnc_straight_1-1337541-0.kicad_mod: -------------------------------------------------------------------------------- 1 | (module bnc_straight_1-1337541-0 (layer F.Cu) 2 | (descr "BNC connector, Tyco 1-1337541-0") 3 | (fp_text reference bnc_straight_1-1337541-0 (at 0 -8.6) (layer F.SilkS) 4 | (effects (font (size 1 1) (thickness 0.2))) 5 | ) 6 | (fp_text value VAL** (at 0 8.5) (layer F.SilkS) 7 | (effects (font (size 1 1) (thickness 0.2))) 8 | ) 9 | (fp_circle (center 0 0) (end -0.9 0) (layer F.SilkS) (width 0.3)) 10 | (fp_circle (center 0 0) (end -2.3 0) (layer F.SilkS) (width 0.3)) 11 | (fp_circle (center 0 0) (end -4.6 0) (layer F.SilkS) (width 0.3)) 12 | (fp_line (start -1 5.5) (end -1 4.7) (layer F.SilkS) (width 0.3)) 13 | (fp_line (start -1 5.5) (end 1 5.5) (layer F.SilkS) (width 0.3)) 14 | (fp_line (start 1 5.5) (end 1 4.7) (layer F.SilkS) (width 0.3)) 15 | (fp_line (start 1 -5.5) (end 1 -4.7) (layer F.SilkS) (width 0.3)) 16 | (fp_line (start -1 -5.5) (end -1 -4.7) (layer F.SilkS) (width 0.3)) 17 | (fp_arc (start 0 0) (end 3.31 -5.49) (angle 90) (layer F.SilkS) (width 0.3)) 18 | (fp_arc (start 0 0) (end -5.48 3.31) (angle 90) (layer F.SilkS) (width 0.3)) 19 | (fp_arc (start 0 0) (end 6.4 0) (angle 90) (layer F.SilkS) (width 0.3)) 20 | (fp_arc (start 0 0) (end 0 6.4) (angle 90) (layer F.SilkS) (width 0.3)) 21 | (fp_line (start -3.2 -5.5) (end 3.2 -5.5) (layer F.SilkS) (width 0.3)) 22 | (fp_circle (center 0 0) (end -4.8 0) (layer F.SilkS) (width 0.3)) 23 | (fp_line (start 5.4 -7.5) (end -5.4 -7.5) (layer F.SilkS) (width 0.3)) 24 | (fp_line (start 7.4 7.5) (end 7.4 -5.5) (layer F.SilkS) (width 0.3)) 25 | (fp_line (start -7.4 -5.5) (end -7.4 7.5) (layer F.SilkS) (width 0.3)) 26 | (fp_arc (start 5.4 -5.5) (end 5.4 -7.5) (angle 90) (layer F.SilkS) (width 0.3)) 27 | (fp_arc (start -5.4 -5.5) (end -7.4 -5.5) (angle 90) (layer F.SilkS) (width 0.3)) 28 | (fp_line (start -7.4 7.5) (end 7.4 7.5) (layer F.SilkS) (width 0.3)) 29 | (pad 1 thru_hole circle (at 0 0) (size 1.5 1.5) (drill 0.9) (layers *.Cu *.Mask F.SilkS)) 30 | (pad 2 thru_hole circle (at 2.54 0) (size 1.5 1.5) (drill 0.9) (layers *.Cu *.Mask F.SilkS)) 31 | (pad "" np_thru_hole circle (at 5.08 -5.08) (size 2.1 2.1) (drill 2.1) (layers *.Cu *.Mask F.SilkS)) 32 | (pad "" np_thru_hole circle (at -5.08 5.08) (size 2.1 2.1) (drill 2.1) (layers *.Cu *.Mask F.SilkS)) 33 | (model walter/conn_rf/bnc_straight_1-1337541-0.wrl 34 | (at (xyz 0 0 0)) 35 | (scale (xyz 1 1 1)) 36 | (rotate (xyz 0 0 0)) 37 | ) 38 | ) 39 | -------------------------------------------------------------------------------- /board-smt/w_conn_rf.pretty/coaxial_u.fl-r-smt-1.kicad_mod: -------------------------------------------------------------------------------- 1 | (module coaxial_u.fl-r-smt-1 (layer F.Cu) 2 | (descr "Ultra small surface mount coaxial connector, Hirose U.FL-R-SMT-1") 3 | (fp_text reference coaxial_u.fl-r-smt-1 (at 0 -2.1) (layer F.SilkS) 4 | (effects (font (size 0.5 0.5) (thickness 0.1))) 5 | ) 6 | (fp_text value VAL** (at 0 2.7) (layer F.SilkS) 7 | (effects (font (size 0.5 0.5) (thickness 0.1))) 8 | ) 9 | (fp_circle (center 0 0) (end -0.1 0) (layer F.SilkS) (width 0.15)) 10 | (fp_circle (center 0 0) (end -1 0) (layer F.SilkS) (width 0.15)) 11 | (fp_line (start -1.3 1) (end -1.3 -1) (layer F.SilkS) (width 0.15)) 12 | (fp_line (start 1 1.3) (end -1 1.3) (layer F.SilkS) (width 0.15)) 13 | (fp_line (start 1.3 -1) (end 1.3 1) (layer F.SilkS) (width 0.15)) 14 | (fp_line (start -1 -1.3) (end 1 -1.3) (layer F.SilkS) (width 0.15)) 15 | (fp_arc (start -1 1) (end -1 1.3) (angle 90) (layer F.SilkS) (width 0.15)) 16 | (fp_arc (start 1 1) (end 1.3 1) (angle 90) (layer F.SilkS) (width 0.15)) 17 | (fp_arc (start 1 -1) (end 1 -1.3) (angle 90) (layer F.SilkS) (width 0.15)) 18 | (fp_arc (start -1 -1) (end -1.3 -1) (angle 90) (layer F.SilkS) (width 0.15)) 19 | (pad 2 smd rect (at -1.475 0) (size 1.05 2.2) (layers F.Cu F.Paste F.Mask) 20 | (solder_mask_margin 0.07) (solder_paste_margin -0.05)) 21 | (pad 2 smd rect (at 1.475 0) (size 1.05 2.2) (layers F.Cu F.Paste F.Mask) 22 | (solder_mask_margin 0.07) (solder_paste_margin -0.05)) 23 | (pad 1 smd rect (at 0 1.525) (size 1 1.05) (layers F.Cu F.Paste F.Mask) 24 | (solder_mask_margin 0.07) (solder_paste_margin -0.05)) 25 | (model walter/conn_rf/coaxial_u.fl-r-smt-1.wrl 26 | (at (xyz 0 0 0)) 27 | (scale (xyz 1 1 1)) 28 | (rotate (xyz 0 0 0)) 29 | ) 30 | ) 31 | -------------------------------------------------------------------------------- /board-smt/w_conn_rf.pretty/lemo_epb00250ntn.kicad_mod: -------------------------------------------------------------------------------- 1 | (module lemo_epb00250ntn (layer F.Cu) 2 | (descr "LEMO connector, EPB.00.250.NTN") 3 | (fp_text reference lemo_epb00250ntn (at 0 5.10032) (layer F.SilkS) 4 | (effects (font (thickness 0.3048))) 5 | ) 6 | (fp_text value VAL** (at 0 -4.8006) (layer F.SilkS) 7 | (effects (font (thickness 0.3048))) 8 | ) 9 | (fp_circle (center 0 0) (end -1.30048 0) (layer F.SilkS) (width 0.381)) 10 | (fp_circle (center 0 0) (end -3.50012 0) (layer F.SilkS) (width 0.381)) 11 | (fp_line (start -3.59918 -3.59918) (end 3.59918 -3.59918) (layer F.SilkS) (width 0.381)) 12 | (fp_line (start 3.59918 -3.59918) (end 3.59918 3.59918) (layer F.SilkS) (width 0.381)) 13 | (fp_line (start 3.59918 3.59918) (end -3.59918 3.59918) (layer F.SilkS) (width 0.381)) 14 | (fp_line (start -3.59918 3.59918) (end -3.59918 -3.59918) (layer F.SilkS) (width 0.381)) 15 | (pad 1 thru_hole circle (at 0 0) (size 1.79832 1.79832) (drill 0.89916) (layers *.Cu *.Mask F.SilkS)) 16 | (pad 2 thru_hole circle (at 2.54 -2.54) (size 1.79578 1.79578) (drill 0.89916) (layers *.Cu *.Mask F.SilkS)) 17 | (pad 2 thru_hole circle (at -2.54 -2.54) (size 1.79578 1.79578) (drill 0.89916) (layers *.Cu *.Mask F.SilkS)) 18 | (pad 2 thru_hole circle (at -2.54 2.54) (size 1.79578 1.79578) (drill 0.89916) (layers *.Cu *.Mask F.SilkS)) 19 | (pad 2 thru_hole circle (at 2.54 2.54) (size 1.79578 1.79578) (drill 0.89916) (layers *.Cu *.Mask F.SilkS)) 20 | (model walter/conn_rf/lemo_epb00250ntn.wrl 21 | (at (xyz 0 0 0)) 22 | (scale (xyz 1 1 1)) 23 | (rotate (xyz 0 0 0)) 24 | ) 25 | ) 26 | -------------------------------------------------------------------------------- /board-smt/w_conn_rf.pretty/sma_90_r300.124.403.kicad_mod: -------------------------------------------------------------------------------- 1 | (module sma_90_r300.124.403 (layer F.Cu) 2 | (descr "SMA 90° female connector, reverse polarity, Radiall R300.124.403") 3 | (fp_text reference sma_90_r300.124.403 (at 0 8.9) (layer F.SilkS) 4 | (effects (font (thickness 0.3048))) 5 | ) 6 | (fp_text value VAL** (at 0 -9) (layer F.SilkS) 7 | (effects (font (thickness 0.3048))) 8 | ) 9 | (fp_line (start 2.7 7.5) (end 2.7 6.9) (layer F.SilkS) (width 0.381)) 10 | (fp_line (start -2.7 7.5) (end -2.7 6.9) (layer F.SilkS) (width 0.381)) 11 | (fp_line (start -2.7 2.1) (end -2.7 -0.9) (layer F.SilkS) (width 0.381)) 12 | (fp_line (start 2.7 -0.9) (end 2.7 2.1) (layer F.SilkS) (width 0.381)) 13 | (fp_line (start -3.2 6.8) (end -2.7 6.9) (layer F.SilkS) (width 0.381)) 14 | (fp_line (start -2.7 6.9) (end 2.7 6.9) (layer F.SilkS) (width 0.381)) 15 | (fp_line (start 2.7 6.9) (end 3.2 6.8) (layer F.SilkS) (width 0.381)) 16 | (fp_line (start -2.7 2.1) (end 2.7 2.1) (layer F.SilkS) (width 0.381)) 17 | (fp_line (start 2.7 2.1) (end 3.2 2.2) (layer F.SilkS) (width 0.381)) 18 | (fp_line (start -3.2 2.2) (end -2.7 2.1) (layer F.SilkS) (width 0.381)) 19 | (fp_line (start -3.2 2.9) (end 3.2 2.2) (layer F.SilkS) (width 0.381)) 20 | (fp_line (start -3.2 4.4) (end 3.2 3.7) (layer F.SilkS) (width 0.381)) 21 | (fp_line (start -3.2 3.6) (end 3.2 2.9) (layer F.SilkS) (width 0.381)) 22 | (fp_line (start -3.2 5.2) (end 3.2 4.5) (layer F.SilkS) (width 0.381)) 23 | (fp_line (start -3.2 6) (end 3.2 5.3) (layer F.SilkS) (width 0.381)) 24 | (fp_line (start -3.2 2.2) (end -3.2 6.8) (layer F.SilkS) (width 0.381)) 25 | (fp_line (start -3.2 6.8) (end 3.2 6.1) (layer F.SilkS) (width 0.381)) 26 | (fp_line (start 3.2 2.2) (end 3.2 6.8) (layer F.SilkS) (width 0.381)) 27 | (fp_line (start -2.7 7.5) (end 2.7 7.5) (layer F.SilkS) (width 0.381)) 28 | (fp_line (start -3.3 -0.9) (end -3.3 -7.5) (layer F.SilkS) (width 0.381)) 29 | (fp_line (start -3.3 -7.5) (end 3.3 -7.5018) (layer F.SilkS) (width 0.381)) 30 | (fp_line (start 3.3 -7.5) (end 3.3 -0.9) (layer F.SilkS) (width 0.381)) 31 | (fp_line (start 3.3 -0.9) (end -3.3 -0.9) (layer F.SilkS) (width 0.381)) 32 | (pad 1 thru_hole circle (at 0 -4.2418) (size 2.3 2.3) (drill 1.35) (layers *.Cu *.Mask F.SilkS)) 33 | (pad 2 thru_hole circle (at 2.54 -6.7818) (size 2.3 2.3) (drill 1.35) (layers *.Cu *.Mask F.SilkS)) 34 | (pad 2 thru_hole circle (at -2.54 -6.7818) (size 2.3 2.3) (drill 1.35) (layers *.Cu *.Mask F.SilkS)) 35 | (pad 2 thru_hole circle (at -2.54 -1.7018) (size 2.3 2.3) (drill 1.35) (layers *.Cu *.Mask F.SilkS)) 36 | (pad 2 thru_hole circle (at 2.54 -1.7018) (size 2.3 2.3) (drill 1.35) (layers *.Cu *.Mask F.SilkS)) 37 | (model walter/conn_rf/sma_90_r300.124.403.wrl 38 | (at (xyz 0 0 0)) 39 | (scale (xyz 1 1 1)) 40 | (rotate (xyz 0 0 0)) 41 | ) 42 | ) 43 | -------------------------------------------------------------------------------- /board-smt/w_conn_rf.pretty/sma_smd_73251-135x.kicad_mod: -------------------------------------------------------------------------------- 1 | (module sma_smd_73251-135x (layer F.Cu) 2 | (descr "SMA straight SMD female connector, Molex 73251-135x") 3 | (fp_text reference sma_smd_73251-135x (at 0 4.8) (layer F.SilkS) 4 | (effects (font (thickness 0.3048))) 5 | ) 6 | (fp_text value VAL** (at 0 -4.8) (layer F.SilkS) 7 | (effects (font (thickness 0.3048))) 8 | ) 9 | (fp_circle (center 0 0) (end -0.7 0) (layer F.SilkS) (width 0.381)) 10 | (fp_circle (center 0 0) (end -2.6 0) (layer F.SilkS) (width 0.381)) 11 | (fp_circle (center 0 0) (end -3.1 0) (layer F.SilkS) (width 0.381)) 12 | (fp_line (start -3.2 -3.2) (end -3.2 3.2) (layer F.SilkS) (width 0.381)) 13 | (fp_line (start -3.2 -3.2) (end 3.2 -3.2) (layer F.SilkS) (width 0.381)) 14 | (fp_line (start 3.2 -3.2) (end 3.2 3.2) (layer F.SilkS) (width 0.381)) 15 | (fp_line (start 3.2 3.2) (end -3.2 3.2) (layer F.SilkS) (width 0.381)) 16 | (pad 1 smd rect (at 0 0) (size 1.52 1.52) (layers F.Cu F.Paste F.Mask)) 17 | (pad 2 smd rect (at 2.375 -2.375) (size 1.91 1.91) (layers F.Cu F.Paste F.Mask)) 18 | (pad 2 smd rect (at -2.375 -2.375) (size 1.91 1.91) (layers F.Cu F.Paste F.Mask)) 19 | (pad 2 smd rect (at -2.375 2.375) (size 1.91 1.91) (layers F.Cu F.Paste F.Mask)) 20 | (pad 2 smd rect (at 2.375 2.375) (size 1.91 1.91) (layers F.Cu F.Paste F.Mask)) 21 | (model walter/conn_rf/sma_smd_73251-135x.wrl 22 | (at (xyz 0 0 0)) 23 | (scale (xyz 1 1 1)) 24 | (rotate (xyz 0 0 0)) 25 | ) 26 | ) 27 | -------------------------------------------------------------------------------- /board-smt/w_conn_rf.pretty/sma_straight_32k101-400l5.kicad_mod: -------------------------------------------------------------------------------- 1 | (module sma_straight_32k101-400l5 (layer F.Cu) 2 | (descr "SMA straight female connector, Rosenberger 32K101-400L5") 3 | (fp_text reference sma_straight_32k101-400l5 (at 0 4.8) (layer F.SilkS) 4 | (effects (font (thickness 0.3048))) 5 | ) 6 | (fp_text value VAL** (at 0 -4.8) (layer F.SilkS) 7 | (effects (font (thickness 0.3048))) 8 | ) 9 | (fp_circle (center 0 0) (end -0.7 0) (layer F.SilkS) (width 0.381)) 10 | (fp_circle (center 0 0) (end -2.6 0) (layer F.SilkS) (width 0.381)) 11 | (fp_circle (center 0 0) (end -3.1 0) (layer F.SilkS) (width 0.381)) 12 | (fp_line (start -3.2 -3.2) (end -3.2 3.2) (layer F.SilkS) (width 0.381)) 13 | (fp_line (start -3.2 -3.2) (end 3.2 -3.2) (layer F.SilkS) (width 0.381)) 14 | (fp_line (start 3.2 -3.2) (end 3.2 3.2) (layer F.SilkS) (width 0.381)) 15 | (fp_line (start 3.2 3.2) (end -3.2 3.2) (layer F.SilkS) (width 0.381)) 16 | (pad 1 thru_hole circle (at 0 0) (size 2.3 2.3) (drill 1.35) (layers *.Cu *.Mask F.SilkS)) 17 | (pad 2 thru_hole circle (at 2.54 -2.54) (size 2.5 2.5) (drill 1.45) (layers *.Cu *.Mask F.SilkS)) 18 | (pad 2 thru_hole circle (at -2.54 -2.54) (size 2.5 2.5) (drill 1.45) (layers *.Cu *.Mask F.SilkS)) 19 | (pad 2 thru_hole circle (at -2.54 2.54) (size 2.5 2.5) (drill 1.45) (layers *.Cu *.Mask F.SilkS)) 20 | (pad 2 thru_hole circle (at 2.54 2.54) (size 2.5 2.5) (drill 1.45) (layers *.Cu *.Mask F.SilkS)) 21 | (model walter/conn_rf/sma_straight_32k101-400l5.wrl 22 | (at (xyz 0 0 0)) 23 | (scale (xyz 1 1 1)) 24 | (rotate (xyz 0 0 0)) 25 | ) 26 | ) 27 | -------------------------------------------------------------------------------- /board/VNA BOM.ods: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board/VNA BOM.ods -------------------------------------------------------------------------------- /board/VNA Schematics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board/VNA Schematics.pdf -------------------------------------------------------------------------------- /board/VNA board.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board/VNA board.png -------------------------------------------------------------------------------- /board/VNA.pro: -------------------------------------------------------------------------------- 1 | update=1/1/2021 7:25:05 PM 2 | version=1 3 | last_client=kicad 4 | [pcbnew] 5 | version=1 6 | LastNetListRead= 7 | UseCmpFile=1 8 | PadDrill=0.600000000000 9 | PadDrillOvalY=0.600000000000 10 | PadSizeH=1.500000000000 11 | PadSizeV=1.500000000000 12 | PcbTextSizeV=1.500000000000 13 | PcbTextSizeH=1.500000000000 14 | PcbTextThickness=0.300000000000 15 | ModuleTextSizeV=1.000000000000 16 | ModuleTextSizeH=1.000000000000 17 | ModuleTextSizeThickness=0.150000000000 18 | SolderMaskClearance=0.000000000000 19 | SolderMaskMinWidth=0.000000000000 20 | DrawSegmentWidth=0.200000000000 21 | BoardOutlineThickness=0.100000000000 22 | ModuleOutlineThickness=0.150000000000 23 | [cvpcb] 24 | version=1 25 | NetIExt=net 26 | [general] 27 | version=1 28 | [eeschema] 29 | version=1 30 | LibDir=../VNA 31 | [eeschema/libraries] 32 | LibName1=power 33 | LibName2=device 34 | LibName3=switches 35 | LibName4=relays 36 | LibName5=motors 37 | LibName6=transistors 38 | LibName7=conn 39 | LibName8=linear 40 | LibName9=regul 41 | LibName10=74xx 42 | LibName11=cmos4000 43 | LibName12=adc-dac 44 | LibName13=memory 45 | LibName14=xilinx 46 | LibName15=microcontrollers 47 | LibName16=dsp 48 | LibName17=microchip 49 | LibName18=analog_switches 50 | LibName19=motorola 51 | LibName20=texas 52 | LibName21=intel 53 | LibName22=audio 54 | LibName23=interface 55 | LibName24=digital-audio 56 | LibName25=philips 57 | LibName26=display 58 | LibName27=cypress 59 | LibName28=siliconi 60 | LibName29=opto 61 | LibName30=atmel 62 | LibName31=contrib 63 | LibName32=valves 64 | LibName33=bluepill 65 | LibName34=sa612 66 | LibName35=si5351a 67 | LibName36=microsd_spi_cd 68 | [schematic_editor] 69 | version=1 70 | PageLayoutDescrFile= 71 | PlotDirectoryName= 72 | SubpartIdSeparator=0 73 | SubpartFirstId=65 74 | NetFmtName=Pcbnew 75 | SpiceForceRefPrefix=0 76 | SpiceUseNetNumbers=0 77 | LabSize=60 78 | -------------------------------------------------------------------------------- /board/bluepill.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /board/bluepill.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # BLUEPILL 5 | # 6 | DEF BLUEPILL UB 0 40 Y Y 1 F N 7 | F0 "UB" 150 600 60 H V C CNN 8 | F1 "BLUEPILL" 150 700 60 H V C CNN 9 | F2 "" 150 700 60 H I C CNN 10 | F3 "" 150 700 60 H I C CNN 11 | DRAW 12 | T 0 150 500 60 0 0 0 STM32F103C8T6 Normal 0 C C 13 | S -1150 800 1550 -1300 0 1 0 f 14 | X Vbat 1 -1350 700 200 R 50 50 1 1 I 15 | X PC13_5V_LED 2 -1350 600 200 R 50 50 1 1 I 16 | X PC14_5V_OSC32IN 3 -1350 500 200 R 50 50 1 1 I 17 | X PC15_5V_OSC32OUT 4 -1350 400 200 R 50 50 1 1 I 18 | X NRST_RESET 7 -1350 -900 200 R 50 50 1 1 I 19 | X PA0_ADC0_CTS2_T2C1E_WKUP 10 -1350 300 200 R 50 50 1 1 I 20 | X PA9_TX1_T1C2_5V 30 1750 -700 200 L 50 50 1 1 I 21 | X PB4_JTRST_MISO1_T3C1_5V 40 1750 -100 200 L 50 50 1 1 I 22 | X +3.3V 70 -1350 -1000 200 R 50 50 1 1 I 23 | X PA1_ADC1_RTS2_T2C2 11 -1350 200 200 R 50 50 1 1 I 24 | X PB10_SCL2_TX3_T2C3N_5V 21 -1350 -700 200 R 50 50 1 1 I 25 | X PA10_RX1_T1C3_5V 31 1750 -600 200 L 50 50 1 1 I 26 | X PB5_SMBAI1_MOSI1_T2C2 41 1750 0 200 L 50 50 1 1 I 27 | X GND 71 -1350 -1100 200 R 50 50 1 1 I 28 | X PA2_ADC2_TX2_T2C3 12 -1350 100 200 R 50 50 1 1 I 29 | X PB11_SDA2_RX3_T2C4N_5V 22 -1350 -800 200 R 50 50 1 1 I 30 | X PA11_USBM_CTS1_T1C4_CANRX_5V 32 1750 -500 200 L 50 50 1 1 I 31 | X PB6_SCL1_T4C1_TX1_5V 42 1750 100 200 L 50 50 1 1 I 32 | X GND 72 -1350 -1200 200 R 50 50 1 1 I 33 | X PA3_ADC3_RX2_T2C4 13 -1350 0 200 R 50 50 1 1 I 34 | X PA12_USBP_RTS1_T1ETR_CANTX_5V 33 1750 -400 200 L 50 50 1 1 I 35 | X PB7_SDA1_T4C2_RX1_5V 43 1750 200 200 L 50 50 1 1 I 36 | X +3.3V 73 1750 700 200 L 50 50 1 1 I 37 | X PA4_ADC4_NSS1_CK2 14 -1350 -100 200 R 50 50 1 1 I 38 | X PA13_JTMS_SWDIO 34 -50 -1500 200 U 50 50 1 1 I 39 | X GND 74 1750 600 200 L 50 50 1 1 I 40 | X PA5_ADC5_SCK1 15 -1350 -200 200 R 50 50 1 1 I 41 | X PB12_SMBAI2_NSS2_T1BKIN_CK3_5V 25 1750 -1200 200 L 50 50 1 1 I 42 | X PB8_T4C3_SCL1_CANRX_5V 45 1750 300 200 L 50 50 1 1 I 43 | X +5V 75 1750 500 200 L 50 50 1 1 I 44 | X PA6_ADC6_MISO1_T3C1_T1BKIN 16 -1350 -300 200 R 50 50 1 1 I 45 | X PB13_SCK2_T1C1N_CTS3_5V 26 1750 -1100 200 L 50 50 1 1 I 46 | X PB9_T4C4_SDA1_CANTX_5V 46 1750 400 200 L 50 50 1 1 I 47 | X GND 76 -250 -1500 200 U 50 50 1 1 I 48 | X PA7_ADC7_MOSI1_T3C2_T1C1N 17 -1350 -400 200 R 50 50 1 1 I 49 | X PB14_MISO2_T1C2N_RTS3_5V 27 1750 -1000 200 L 50 50 1 1 I 50 | X PA14_JTCK_SWCLK 37 50 -1500 200 U 50 50 1 1 I 51 | X +3V3 77 -150 -1500 200 U 50 50 1 1 I 52 | X PB0_ADC8_T3C3_T1C2N 18 -1350 -500 200 R 50 50 1 1 I 53 | X PB15_MOSI2_T1C3N_5V 28 1750 -900 200 L 50 50 1 1 I 54 | X PA15_JTDI_NSS1_T2C1E_5V 38 1750 -300 200 L 50 50 1 1 I 55 | X PB1_ADC9_T3C4_T1C3N 19 -1350 -600 200 R 50 50 1 1 I 56 | X PA8_CK1_T1C1_MCO_5V 29 1750 -800 200 L 50 50 1 1 I 57 | X PB3_JTDO_SCK1_T2C2_5V 39 1750 -200 200 L 50 50 1 1 I 58 | ENDDRAW 59 | ENDDEF 60 | # 61 | #End Library 62 | -------------------------------------------------------------------------------- /board/conn_rf/bnc_90_1-1337543-0.wings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board/conn_rf/bnc_90_1-1337543-0.wings -------------------------------------------------------------------------------- /board/conn_rf/bnc_straight_1-1337541-0.wings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board/conn_rf/bnc_straight_1-1337541-0.wings -------------------------------------------------------------------------------- /board/conn_rf/coaxial_u.fl-r-smt-1.wings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board/conn_rf/coaxial_u.fl-r-smt-1.wings -------------------------------------------------------------------------------- /board/conn_rf/lemo_epb00250ntn.wings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board/conn_rf/lemo_epb00250ntn.wings -------------------------------------------------------------------------------- /board/conn_rf/sma_90_r300.124.403.wings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board/conn_rf/sma_90_r300.124.403.wings -------------------------------------------------------------------------------- /board/conn_rf/sma_smd_73251-135x.wings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board/conn_rf/sma_smd_73251-135x.wings -------------------------------------------------------------------------------- /board/conn_rf/sma_straight_32k101-400l5.wings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/board/conn_rf/sma_straight_32k101-400l5.wings -------------------------------------------------------------------------------- /board/fp-lib-table: -------------------------------------------------------------------------------- 1 | (fp_lib_table 2 | (lib (name VNA)(type KiCad)(uri "$(KIPRJMOD)/VNA.pretty")(options "")(descr "")) 3 | (lib (name w_conn_rf)(type KiCad)(uri "$(KIPRJMOD)/w_conn_rf.pretty")(options "")(descr "")) 4 | ) 5 | -------------------------------------------------------------------------------- /board/gerber/VNA-B.SilkS.gbr: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Legend,Bot* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.7) date 01/01/21 19:20:51* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | G04 APERTURE END LIST* 11 | D10* 12 | M02* 13 | -------------------------------------------------------------------------------- /board/gerber/VNA-Edge.Cuts.gbr: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Profile,NP* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.7) date 01/01/21 19:20:51* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | %ADD11C,0.150000*% 11 | G04 APERTURE END LIST* 12 | D10* 13 | D11* 14 | X50000000Y-150000000D02* 15 | X50000000Y-50000000D01* 16 | X150000000Y-150000000D02* 17 | X50000000Y-150000000D01* 18 | X150000000Y-50000000D02* 19 | X150000000Y-150000000D01* 20 | X50000000Y-50000000D02* 21 | X150000000Y-50000000D01* 22 | M02* 23 | -------------------------------------------------------------------------------- /board/gerber/VNA-NPTH.drl: -------------------------------------------------------------------------------- 1 | M48 2 | ;DRILL file {KiCad 4.0.7} date 01/01/21 19:20:53 3 | ;FORMAT={-:-/ absolute / metric / decimal} 4 | FMAT,2 5 | METRIC,TZ 6 | T1C1.000 7 | T2C2.100 8 | % 9 | G90 10 | G05 11 | M71 12 | T1 13 | X147.19Y-125.982 14 | X147.19Y-133.982 15 | T2 16 | X61.509Y-57.887 17 | X71.669Y-57.887 18 | X125.247Y-58.151 19 | X135.407Y-58.151 20 | T0 21 | M30 22 | -------------------------------------------------------------------------------- /board/microsd_spi_cd.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # MicroSD_SPI_CD 5 | # 6 | DEF MicroSD_SPI_CD U 0 40 Y Y 1 F N 7 | F0 "U" 0 450 60 H V C CNN 8 | F1 "MicroSD_SPI_CD" -50 0 60 V V C CNN 9 | F2 "" -150 0 60 H V C CNN 10 | F3 "" -150 0 60 H V C CNN 11 | DRAW 12 | P 6 0 1 0 250 400 250 -400 -250 -400 -250 250 -100 400 250 400 f 13 | X ~CS 2 350 300 100 L 50 50 1 1 I 14 | X DI 3 350 200 100 L 50 50 1 1 I 15 | X VDD 4 350 100 100 L 50 50 1 1 I 16 | X SCLK 5 350 0 100 L 50 50 1 1 I 17 | X GND 6 350 -100 100 L 50 50 1 1 I 18 | X DO 7 350 -200 100 L 50 50 1 1 I 19 | X CD 9 350 -300 100 L 50 50 1 1 I 20 | ENDDRAW 21 | ENDDEF 22 | # 23 | #End Library 24 | -------------------------------------------------------------------------------- /board/sa612.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /board/sa612.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # SA612 5 | # 6 | DEF SA612 U 0 40 Y Y 1 F N 7 | F0 "U" 0 100 60 H V C CNN 8 | F1 "SA612" 0 -100 60 V V C CNN 9 | F2 "" 50 -50 60 H I C CNN 10 | F3 "" 50 -50 60 H I C CNN 11 | DRAW 12 | S -350 200 400 -350 0 1 0 N 13 | X INA 1 -550 50 200 R 50 50 1 1 I 14 | X INB 2 -550 -50 200 R 50 50 1 1 I 15 | X GND 3 -550 -150 200 R 50 50 1 1 I 16 | X OUTA 4 -550 -250 200 R 50 50 1 1 I 17 | X OUTB 5 600 -250 200 L 50 50 1 1 I 18 | X OSCi 6 600 -150 200 L 50 50 1 1 I 19 | X OSCo 7 600 -50 200 L 50 50 1 1 I 20 | X VCC 8 600 50 200 L 50 50 1 1 I 21 | ENDDRAW 22 | ENDDEF 23 | # 24 | #End Library 25 | -------------------------------------------------------------------------------- /board/si5351a.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /board/si5351a.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # SI5351A 5 | # 6 | DEF SI5351A U 0 40 Y Y 1 F N 7 | F0 "U" 50 50 60 H V C CNN 8 | F1 "SI5351A" 50 -200 60 V V C CNN 9 | F2 "" 50 50 60 H I C CNN 10 | F3 "" 50 50 60 H I C CNN 11 | DRAW 12 | S -250 200 400 -450 0 1 0 N 13 | X Vdd 1 -450 50 200 R 50 50 1 1 I 14 | X XA 2 -450 -50 200 R 50 50 1 1 I 15 | X XB 3 -450 -150 200 R 50 50 1 1 I 16 | X SCL 4 -450 -250 200 R 50 50 1 1 I 17 | X SDA 5 -450 -350 200 R 50 50 1 1 I 18 | X CLK2 6 600 -350 200 L 50 50 1 1 I 19 | X VDDO 7 600 -250 200 L 50 50 1 1 I 20 | X GND 8 600 -150 200 L 50 50 1 1 I 21 | X CLK1 9 600 -50 200 L 50 50 1 1 I 22 | X CLK0 10 600 50 200 L 50 50 1 1 I 23 | ENDDRAW 24 | ENDDEF 25 | # 26 | #End Library 27 | -------------------------------------------------------------------------------- /board/w_conn_rf.pretty/bnc_90_1-1337543-0.kicad_mod: -------------------------------------------------------------------------------- 1 | (module bnc_90_1-1337543-0 (layer F.Cu) 2 | (descr "BNC connector, Tyco 1-1337543-0") 3 | (fp_text reference bnc_90_1-1337543-0 (at 0 -14.9) (layer F.SilkS) 4 | (effects (font (size 1 1) (thickness 0.2))) 5 | ) 6 | (fp_text value VAL** (at 0 -16.4) (layer F.SilkS) 7 | (effects (font (size 1 1) (thickness 0.2))) 8 | ) 9 | (fp_line (start -6.4 1.2) (end 6.4 0.5) (layer F.SilkS) (width 0.3)) 10 | (fp_line (start -6.4 5.2) (end 6.4 4.5) (layer F.SilkS) (width 0.3)) 11 | (fp_line (start -6.4 4.2) (end 6.4 3.5) (layer F.SilkS) (width 0.3)) 12 | (fp_line (start -6.4 2.2) (end 6.4 1.5) (layer F.SilkS) (width 0.3)) 13 | (fp_line (start -6.4 3.2) (end 6.4 2.5) (layer F.SilkS) (width 0.3)) 14 | (fp_line (start -6.4 7.2) (end 6.4 6.5) (layer F.SilkS) (width 0.3)) 15 | (fp_line (start -6.4 6.2) (end 6.4 5.5) (layer F.SilkS) (width 0.3)) 16 | (fp_line (start -6.4 8.2) (end 6.4 7.5) (layer F.SilkS) (width 0.3)) 17 | (fp_line (start -6.4 9.2) (end 6.4 8.5) (layer F.SilkS) (width 0.3)) 18 | (fp_line (start 6.4 9.2) (end 6.4 0) (layer F.SilkS) (width 0.3)) 19 | (fp_line (start -6.4 9.2) (end -6.4 0) (layer F.SilkS) (width 0.3)) 20 | (fp_line (start 4.8 21.2) (end 4.8 9.2) (layer F.SilkS) (width 0.3)) 21 | (fp_line (start -4.8 21.2) (end -4.8 9.2) (layer F.SilkS) (width 0.3)) 22 | (fp_line (start -4.8 21.2) (end 4.8 21.2) (layer F.SilkS) (width 0.3)) 23 | (fp_line (start -6.4 9.2) (end 6.4 9.2) (layer F.SilkS) (width 0.3)) 24 | (fp_line (start 7.4 0) (end 7.4 -13.7) (layer F.SilkS) (width 0.3)) 25 | (fp_line (start -7.4 -13.7) (end -7.4 0) (layer F.SilkS) (width 0.3)) 26 | (fp_line (start -7.4 -13.7) (end 7.4 -13.7) (layer F.SilkS) (width 0.3)) 27 | (fp_line (start -7.4 0) (end 7.4 0) (layer F.SilkS) (width 0.3)) 28 | (pad 1 thru_hole circle (at 0 -12.38) (size 1.5 1.5) (drill 0.9) (layers *.Cu *.Mask F.SilkS)) 29 | (pad 2 thru_hole circle (at 2.54 -12.38) (size 1.5 1.5) (drill 0.9) (layers *.Cu *.Mask F.SilkS)) 30 | (pad "" np_thru_hole circle (at 5.08 -7.3) (size 2.1 2.1) (drill 2.1) (layers *.Cu *.Mask F.SilkS)) 31 | (pad "" np_thru_hole circle (at -5.08 -7.3) (size 2.1 2.1) (drill 2.1) (layers *.Cu *.Mask F.SilkS)) 32 | (model walter/conn_rf/bnc_90_1-1337543-0.wrl 33 | (at (xyz 0 0 0)) 34 | (scale (xyz 1 1 1)) 35 | (rotate (xyz 0 0 0)) 36 | ) 37 | ) 38 | -------------------------------------------------------------------------------- /board/w_conn_rf.pretty/bnc_straight_1-1337541-0.kicad_mod: -------------------------------------------------------------------------------- 1 | (module bnc_straight_1-1337541-0 (layer F.Cu) 2 | (descr "BNC connector, Tyco 1-1337541-0") 3 | (fp_text reference bnc_straight_1-1337541-0 (at 0 -8.6) (layer F.SilkS) 4 | (effects (font (size 1 1) (thickness 0.2))) 5 | ) 6 | (fp_text value VAL** (at 0 8.5) (layer F.SilkS) 7 | (effects (font (size 1 1) (thickness 0.2))) 8 | ) 9 | (fp_circle (center 0 0) (end -0.9 0) (layer F.SilkS) (width 0.3)) 10 | (fp_circle (center 0 0) (end -2.3 0) (layer F.SilkS) (width 0.3)) 11 | (fp_circle (center 0 0) (end -4.6 0) (layer F.SilkS) (width 0.3)) 12 | (fp_line (start -1 5.5) (end -1 4.7) (layer F.SilkS) (width 0.3)) 13 | (fp_line (start -1 5.5) (end 1 5.5) (layer F.SilkS) (width 0.3)) 14 | (fp_line (start 1 5.5) (end 1 4.7) (layer F.SilkS) (width 0.3)) 15 | (fp_line (start 1 -5.5) (end 1 -4.7) (layer F.SilkS) (width 0.3)) 16 | (fp_line (start -1 -5.5) (end -1 -4.7) (layer F.SilkS) (width 0.3)) 17 | (fp_arc (start 0 0) (end 3.31 -5.49) (angle 90) (layer F.SilkS) (width 0.3)) 18 | (fp_arc (start 0 0) (end -5.48 3.31) (angle 90) (layer F.SilkS) (width 0.3)) 19 | (fp_arc (start 0 0) (end 6.4 0) (angle 90) (layer F.SilkS) (width 0.3)) 20 | (fp_arc (start 0 0) (end 0 6.4) (angle 90) (layer F.SilkS) (width 0.3)) 21 | (fp_line (start -3.2 -5.5) (end 3.2 -5.5) (layer F.SilkS) (width 0.3)) 22 | (fp_circle (center 0 0) (end -4.8 0) (layer F.SilkS) (width 0.3)) 23 | (fp_line (start 5.4 -7.5) (end -5.4 -7.5) (layer F.SilkS) (width 0.3)) 24 | (fp_line (start 7.4 7.5) (end 7.4 -5.5) (layer F.SilkS) (width 0.3)) 25 | (fp_line (start -7.4 -5.5) (end -7.4 7.5) (layer F.SilkS) (width 0.3)) 26 | (fp_arc (start 5.4 -5.5) (end 5.4 -7.5) (angle 90) (layer F.SilkS) (width 0.3)) 27 | (fp_arc (start -5.4 -5.5) (end -7.4 -5.5) (angle 90) (layer F.SilkS) (width 0.3)) 28 | (fp_line (start -7.4 7.5) (end 7.4 7.5) (layer F.SilkS) (width 0.3)) 29 | (pad 1 thru_hole circle (at 0 0) (size 1.5 1.5) (drill 0.9) (layers *.Cu *.Mask F.SilkS)) 30 | (pad 2 thru_hole circle (at 2.54 0) (size 1.5 1.5) (drill 0.9) (layers *.Cu *.Mask F.SilkS)) 31 | (pad "" np_thru_hole circle (at 5.08 -5.08) (size 2.1 2.1) (drill 2.1) (layers *.Cu *.Mask F.SilkS)) 32 | (pad "" np_thru_hole circle (at -5.08 5.08) (size 2.1 2.1) (drill 2.1) (layers *.Cu *.Mask F.SilkS)) 33 | (model walter/conn_rf/bnc_straight_1-1337541-0.wrl 34 | (at (xyz 0 0 0)) 35 | (scale (xyz 1 1 1)) 36 | (rotate (xyz 0 0 0)) 37 | ) 38 | ) 39 | -------------------------------------------------------------------------------- /board/w_conn_rf.pretty/coaxial_u.fl-r-smt-1.kicad_mod: -------------------------------------------------------------------------------- 1 | (module coaxial_u.fl-r-smt-1 (layer F.Cu) 2 | (descr "Ultra small surface mount coaxial connector, Hirose U.FL-R-SMT-1") 3 | (fp_text reference coaxial_u.fl-r-smt-1 (at 0 -2.1) (layer F.SilkS) 4 | (effects (font (size 0.5 0.5) (thickness 0.1))) 5 | ) 6 | (fp_text value VAL** (at 0 2.7) (layer F.SilkS) 7 | (effects (font (size 0.5 0.5) (thickness 0.1))) 8 | ) 9 | (fp_circle (center 0 0) (end -0.1 0) (layer F.SilkS) (width 0.15)) 10 | (fp_circle (center 0 0) (end -1 0) (layer F.SilkS) (width 0.15)) 11 | (fp_line (start -1.3 1) (end -1.3 -1) (layer F.SilkS) (width 0.15)) 12 | (fp_line (start 1 1.3) (end -1 1.3) (layer F.SilkS) (width 0.15)) 13 | (fp_line (start 1.3 -1) (end 1.3 1) (layer F.SilkS) (width 0.15)) 14 | (fp_line (start -1 -1.3) (end 1 -1.3) (layer F.SilkS) (width 0.15)) 15 | (fp_arc (start -1 1) (end -1 1.3) (angle 90) (layer F.SilkS) (width 0.15)) 16 | (fp_arc (start 1 1) (end 1.3 1) (angle 90) (layer F.SilkS) (width 0.15)) 17 | (fp_arc (start 1 -1) (end 1 -1.3) (angle 90) (layer F.SilkS) (width 0.15)) 18 | (fp_arc (start -1 -1) (end -1.3 -1) (angle 90) (layer F.SilkS) (width 0.15)) 19 | (pad 2 smd rect (at -1.475 0) (size 1.05 2.2) (layers F.Cu F.Paste F.Mask) 20 | (solder_mask_margin 0.07) (solder_paste_margin -0.05)) 21 | (pad 2 smd rect (at 1.475 0) (size 1.05 2.2) (layers F.Cu F.Paste F.Mask) 22 | (solder_mask_margin 0.07) (solder_paste_margin -0.05)) 23 | (pad 1 smd rect (at 0 1.525) (size 1 1.05) (layers F.Cu F.Paste F.Mask) 24 | (solder_mask_margin 0.07) (solder_paste_margin -0.05)) 25 | (model walter/conn_rf/coaxial_u.fl-r-smt-1.wrl 26 | (at (xyz 0 0 0)) 27 | (scale (xyz 1 1 1)) 28 | (rotate (xyz 0 0 0)) 29 | ) 30 | ) 31 | -------------------------------------------------------------------------------- /board/w_conn_rf.pretty/lemo_epb00250ntn.kicad_mod: -------------------------------------------------------------------------------- 1 | (module lemo_epb00250ntn (layer F.Cu) 2 | (descr "LEMO connector, EPB.00.250.NTN") 3 | (fp_text reference lemo_epb00250ntn (at 0 5.10032) (layer F.SilkS) 4 | (effects (font (thickness 0.3048))) 5 | ) 6 | (fp_text value VAL** (at 0 -4.8006) (layer F.SilkS) 7 | (effects (font (thickness 0.3048))) 8 | ) 9 | (fp_circle (center 0 0) (end -1.30048 0) (layer F.SilkS) (width 0.381)) 10 | (fp_circle (center 0 0) (end -3.50012 0) (layer F.SilkS) (width 0.381)) 11 | (fp_line (start -3.59918 -3.59918) (end 3.59918 -3.59918) (layer F.SilkS) (width 0.381)) 12 | (fp_line (start 3.59918 -3.59918) (end 3.59918 3.59918) (layer F.SilkS) (width 0.381)) 13 | (fp_line (start 3.59918 3.59918) (end -3.59918 3.59918) (layer F.SilkS) (width 0.381)) 14 | (fp_line (start -3.59918 3.59918) (end -3.59918 -3.59918) (layer F.SilkS) (width 0.381)) 15 | (pad 1 thru_hole circle (at 0 0) (size 1.79832 1.79832) (drill 0.89916) (layers *.Cu *.Mask F.SilkS)) 16 | (pad 2 thru_hole circle (at 2.54 -2.54) (size 1.79578 1.79578) (drill 0.89916) (layers *.Cu *.Mask F.SilkS)) 17 | (pad 2 thru_hole circle (at -2.54 -2.54) (size 1.79578 1.79578) (drill 0.89916) (layers *.Cu *.Mask F.SilkS)) 18 | (pad 2 thru_hole circle (at -2.54 2.54) (size 1.79578 1.79578) (drill 0.89916) (layers *.Cu *.Mask F.SilkS)) 19 | (pad 2 thru_hole circle (at 2.54 2.54) (size 1.79578 1.79578) (drill 0.89916) (layers *.Cu *.Mask F.SilkS)) 20 | (model walter/conn_rf/lemo_epb00250ntn.wrl 21 | (at (xyz 0 0 0)) 22 | (scale (xyz 1 1 1)) 23 | (rotate (xyz 0 0 0)) 24 | ) 25 | ) 26 | -------------------------------------------------------------------------------- /board/w_conn_rf.pretty/sma_90_r300.124.403.kicad_mod: -------------------------------------------------------------------------------- 1 | (module sma_90_r300.124.403 (layer F.Cu) 2 | (descr "SMA 90° female connector, reverse polarity, Radiall R300.124.403") 3 | (fp_text reference sma_90_r300.124.403 (at 0 8.9) (layer F.SilkS) 4 | (effects (font (thickness 0.3048))) 5 | ) 6 | (fp_text value VAL** (at 0 -9) (layer F.SilkS) 7 | (effects (font (thickness 0.3048))) 8 | ) 9 | (fp_line (start 2.7 7.5) (end 2.7 6.9) (layer F.SilkS) (width 0.381)) 10 | (fp_line (start -2.7 7.5) (end -2.7 6.9) (layer F.SilkS) (width 0.381)) 11 | (fp_line (start -2.7 2.1) (end -2.7 -0.9) (layer F.SilkS) (width 0.381)) 12 | (fp_line (start 2.7 -0.9) (end 2.7 2.1) (layer F.SilkS) (width 0.381)) 13 | (fp_line (start -3.2 6.8) (end -2.7 6.9) (layer F.SilkS) (width 0.381)) 14 | (fp_line (start -2.7 6.9) (end 2.7 6.9) (layer F.SilkS) (width 0.381)) 15 | (fp_line (start 2.7 6.9) (end 3.2 6.8) (layer F.SilkS) (width 0.381)) 16 | (fp_line (start -2.7 2.1) (end 2.7 2.1) (layer F.SilkS) (width 0.381)) 17 | (fp_line (start 2.7 2.1) (end 3.2 2.2) (layer F.SilkS) (width 0.381)) 18 | (fp_line (start -3.2 2.2) (end -2.7 2.1) (layer F.SilkS) (width 0.381)) 19 | (fp_line (start -3.2 2.9) (end 3.2 2.2) (layer F.SilkS) (width 0.381)) 20 | (fp_line (start -3.2 4.4) (end 3.2 3.7) (layer F.SilkS) (width 0.381)) 21 | (fp_line (start -3.2 3.6) (end 3.2 2.9) (layer F.SilkS) (width 0.381)) 22 | (fp_line (start -3.2 5.2) (end 3.2 4.5) (layer F.SilkS) (width 0.381)) 23 | (fp_line (start -3.2 6) (end 3.2 5.3) (layer F.SilkS) (width 0.381)) 24 | (fp_line (start -3.2 2.2) (end -3.2 6.8) (layer F.SilkS) (width 0.381)) 25 | (fp_line (start -3.2 6.8) (end 3.2 6.1) (layer F.SilkS) (width 0.381)) 26 | (fp_line (start 3.2 2.2) (end 3.2 6.8) (layer F.SilkS) (width 0.381)) 27 | (fp_line (start -2.7 7.5) (end 2.7 7.5) (layer F.SilkS) (width 0.381)) 28 | (fp_line (start -3.3 -0.9) (end -3.3 -7.5) (layer F.SilkS) (width 0.381)) 29 | (fp_line (start -3.3 -7.5) (end 3.3 -7.5018) (layer F.SilkS) (width 0.381)) 30 | (fp_line (start 3.3 -7.5) (end 3.3 -0.9) (layer F.SilkS) (width 0.381)) 31 | (fp_line (start 3.3 -0.9) (end -3.3 -0.9) (layer F.SilkS) (width 0.381)) 32 | (pad 1 thru_hole circle (at 0 -4.2418) (size 2.3 2.3) (drill 1.35) (layers *.Cu *.Mask F.SilkS)) 33 | (pad 2 thru_hole circle (at 2.54 -6.7818) (size 2.3 2.3) (drill 1.35) (layers *.Cu *.Mask F.SilkS)) 34 | (pad 2 thru_hole circle (at -2.54 -6.7818) (size 2.3 2.3) (drill 1.35) (layers *.Cu *.Mask F.SilkS)) 35 | (pad 2 thru_hole circle (at -2.54 -1.7018) (size 2.3 2.3) (drill 1.35) (layers *.Cu *.Mask F.SilkS)) 36 | (pad 2 thru_hole circle (at 2.54 -1.7018) (size 2.3 2.3) (drill 1.35) (layers *.Cu *.Mask F.SilkS)) 37 | (model walter/conn_rf/sma_90_r300.124.403.wrl 38 | (at (xyz 0 0 0)) 39 | (scale (xyz 1 1 1)) 40 | (rotate (xyz 0 0 0)) 41 | ) 42 | ) 43 | -------------------------------------------------------------------------------- /board/w_conn_rf.pretty/sma_smd_73251-135x.kicad_mod: -------------------------------------------------------------------------------- 1 | (module sma_smd_73251-135x (layer F.Cu) 2 | (descr "SMA straight SMD female connector, Molex 73251-135x") 3 | (fp_text reference sma_smd_73251-135x (at 0 4.8) (layer F.SilkS) 4 | (effects (font (thickness 0.3048))) 5 | ) 6 | (fp_text value VAL** (at 0 -4.8) (layer F.SilkS) 7 | (effects (font (thickness 0.3048))) 8 | ) 9 | (fp_circle (center 0 0) (end -0.7 0) (layer F.SilkS) (width 0.381)) 10 | (fp_circle (center 0 0) (end -2.6 0) (layer F.SilkS) (width 0.381)) 11 | (fp_circle (center 0 0) (end -3.1 0) (layer F.SilkS) (width 0.381)) 12 | (fp_line (start -3.2 -3.2) (end -3.2 3.2) (layer F.SilkS) (width 0.381)) 13 | (fp_line (start -3.2 -3.2) (end 3.2 -3.2) (layer F.SilkS) (width 0.381)) 14 | (fp_line (start 3.2 -3.2) (end 3.2 3.2) (layer F.SilkS) (width 0.381)) 15 | (fp_line (start 3.2 3.2) (end -3.2 3.2) (layer F.SilkS) (width 0.381)) 16 | (pad 1 smd rect (at 0 0) (size 1.52 1.52) (layers F.Cu F.Paste F.Mask)) 17 | (pad 2 smd rect (at 2.375 -2.375) (size 1.91 1.91) (layers F.Cu F.Paste F.Mask)) 18 | (pad 2 smd rect (at -2.375 -2.375) (size 1.91 1.91) (layers F.Cu F.Paste F.Mask)) 19 | (pad 2 smd rect (at -2.375 2.375) (size 1.91 1.91) (layers F.Cu F.Paste F.Mask)) 20 | (pad 2 smd rect (at 2.375 2.375) (size 1.91 1.91) (layers F.Cu F.Paste F.Mask)) 21 | (model walter/conn_rf/sma_smd_73251-135x.wrl 22 | (at (xyz 0 0 0)) 23 | (scale (xyz 1 1 1)) 24 | (rotate (xyz 0 0 0)) 25 | ) 26 | ) 27 | -------------------------------------------------------------------------------- /board/w_conn_rf.pretty/sma_straight_32k101-400l5.kicad_mod: -------------------------------------------------------------------------------- 1 | (module sma_straight_32k101-400l5 (layer F.Cu) 2 | (descr "SMA straight female connector, Rosenberger 32K101-400L5") 3 | (fp_text reference sma_straight_32k101-400l5 (at 0 4.8) (layer F.SilkS) 4 | (effects (font (thickness 0.3048))) 5 | ) 6 | (fp_text value VAL** (at 0 -4.8) (layer F.SilkS) 7 | (effects (font (thickness 0.3048))) 8 | ) 9 | (fp_circle (center 0 0) (end -0.7 0) (layer F.SilkS) (width 0.381)) 10 | (fp_circle (center 0 0) (end -2.6 0) (layer F.SilkS) (width 0.381)) 11 | (fp_circle (center 0 0) (end -3.1 0) (layer F.SilkS) (width 0.381)) 12 | (fp_line (start -3.2 -3.2) (end -3.2 3.2) (layer F.SilkS) (width 0.381)) 13 | (fp_line (start -3.2 -3.2) (end 3.2 -3.2) (layer F.SilkS) (width 0.381)) 14 | (fp_line (start 3.2 -3.2) (end 3.2 3.2) (layer F.SilkS) (width 0.381)) 15 | (fp_line (start 3.2 3.2) (end -3.2 3.2) (layer F.SilkS) (width 0.381)) 16 | (pad 1 thru_hole circle (at 0 0) (size 2.3 2.3) (drill 1.35) (layers *.Cu *.Mask F.SilkS)) 17 | (pad 2 thru_hole circle (at 2.54 -2.54) (size 2.5 2.5) (drill 1.45) (layers *.Cu *.Mask F.SilkS)) 18 | (pad 2 thru_hole circle (at -2.54 -2.54) (size 2.5 2.5) (drill 1.45) (layers *.Cu *.Mask F.SilkS)) 19 | (pad 2 thru_hole circle (at -2.54 2.54) (size 2.5 2.5) (drill 1.45) (layers *.Cu *.Mask F.SilkS)) 20 | (pad 2 thru_hole circle (at 2.54 2.54) (size 2.5 2.5) (drill 1.45) (layers *.Cu *.Mask F.SilkS)) 21 | (model walter/conn_rf/sma_straight_32k101-400l5.wrl 22 | (at (xyz 0 0 0)) 23 | (scale (xyz 1 1 1)) 24 | (rotate (xyz 0 0 0)) 25 | ) 26 | ) 27 | -------------------------------------------------------------------------------- /daughterboard/LCD-Daughterboard-Schematic.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/daughterboard/LCD-Daughterboard-Schematic.pdf -------------------------------------------------------------------------------- /daughterboard/alps_rotary_encoder_switch.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | $CMP Rotary_Encoder_Switch 4 | D Rotary encoder, dual channel, incremental quadrate outputs, with switch 5 | K rotary switch encoder switch push button 6 | F ~ 7 | $ENDCMP 8 | # 9 | #End Doc Library 10 | -------------------------------------------------------------------------------- /daughterboard/alps_rotary_encoder_switch.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # Rotary_Encoder_Switch 5 | # 6 | DEF Rotary_Encoder_Switch SW 0 40 Y Y 1 F N 7 | F0 "SW" 0 260 50 H V C CNN 8 | F1 "Rotary_Encoder_Switch" 0 -260 50 H V C CNN 9 | F2 "" -100 160 50 H I C CNN 10 | F3 "" 0 260 50 H I C CNN 11 | DRAW 12 | A 0 0 120 -899 899 0 1 10 N 0 -120 0 120 13 | C 0 0 75 0 1 10 N 14 | C 160 40 5 0 1 10 N 15 | S -200 200 200 -200 0 1 10 f 16 | P 2 0 1 10 -10 -70 -10 70 N 17 | P 2 0 1 10 0 -120 20 -140 N 18 | P 2 0 1 10 0 -120 20 -100 N 19 | P 2 0 1 10 0 -70 0 70 N 20 | P 2 0 1 10 0 120 20 100 N 21 | P 2 0 1 10 10 70 10 -70 N 22 | P 2 0 1 10 20 140 0 120 N 23 | P 2 0 1 10 160 40 180 -35 N 24 | P 3 0 1 10 200 -100 160 -100 160 -40 N 25 | P 3 0 1 10 200 100 160 100 160 40 N 26 | X ~ A -300 100 100 R 50 50 1 1 I 27 | X ~ B -300 -100 100 R 50 50 1 1 I 28 | X ~ C -300 0 100 R 50 50 1 1 I 29 | X ~ S1 300 -100 100 L 50 50 1 1 I 30 | X ~ S2 300 100 100 L 50 50 1 1 I 31 | ENDDRAW 32 | ENDDEF 33 | # 34 | #End Library 35 | -------------------------------------------------------------------------------- /daughterboard/daughterboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/daughterboard/daughterboard.png -------------------------------------------------------------------------------- /daughterboard/daughterboard.pretty/RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm.kicad_mod: -------------------------------------------------------------------------------- 1 | (module RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm (layer F.Cu) (tedit 5A74C8CB) 2 | (descr "Alps rotary encoder, EC12E... with switch, vertical shaft, http://www.alps.com/prod/info/E/HTML/Encoder/Incremental/EC11/EC11E15204A3.html") 3 | (tags "rotary encoder") 4 | (fp_text reference REF** (at 2.8 -4.7) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm (at 7.5 10.4) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_text user %R (at 11.1 6.3) (layer F.Fab) 11 | (effects (font (size 1 1) (thickness 0.15))) 12 | ) 13 | (fp_line (start 7 2.5) (end 8 2.5) (layer F.SilkS) (width 0.12)) 14 | (fp_line (start 7.5 2) (end 7.5 3) (layer F.SilkS) (width 0.12)) 15 | (fp_line (start 13.6 6) (end 13.6 8.4) (layer F.SilkS) (width 0.12)) 16 | (fp_line (start 13.6 1.2) (end 13.6 3.8) (layer F.SilkS) (width 0.12)) 17 | (fp_line (start 13.6 -3.4) (end 13.6 -1) (layer F.SilkS) (width 0.12)) 18 | (fp_line (start 4.5 2.5) (end 10.5 2.5) (layer F.Fab) (width 0.12)) 19 | (fp_line (start 7.5 -0.5) (end 7.5 5.5) (layer F.Fab) (width 0.12)) 20 | (fp_line (start 0.3 -1.6) (end 0 -1.3) (layer F.SilkS) (width 0.12)) 21 | (fp_line (start -0.3 -1.6) (end 0.3 -1.6) (layer F.SilkS) (width 0.12)) 22 | (fp_line (start 0 -1.3) (end -0.3 -1.6) (layer F.SilkS) (width 0.12)) 23 | (fp_line (start 1.4 -3.4) (end 1.4 8.4) (layer F.SilkS) (width 0.12)) 24 | (fp_line (start 5.5 -3.4) (end 1.4 -3.4) (layer F.SilkS) (width 0.12)) 25 | (fp_line (start 5.5 8.4) (end 1.4 8.4) (layer F.SilkS) (width 0.12)) 26 | (fp_line (start 13.6 8.4) (end 9.5 8.4) (layer F.SilkS) (width 0.12)) 27 | (fp_line (start 9.5 -3.4) (end 13.6 -3.4) (layer F.SilkS) (width 0.12)) 28 | (fp_line (start 1.5 -2.2) (end 2.5 -3.3) (layer F.Fab) (width 0.12)) 29 | (fp_line (start 1.5 8.3) (end 1.5 -2.2) (layer F.Fab) (width 0.12)) 30 | (fp_line (start 13.5 8.3) (end 1.5 8.3) (layer F.Fab) (width 0.12)) 31 | (fp_line (start 13.5 -3.3) (end 13.5 8.3) (layer F.Fab) (width 0.12)) 32 | (fp_line (start 2.5 -3.3) (end 13.5 -3.3) (layer F.Fab) (width 0.12)) 33 | (fp_line (start -1.5 -4.6) (end 16 -4.6) (layer F.CrtYd) (width 0.05)) 34 | (fp_line (start -1.5 -4.6) (end -1.5 9.6) (layer F.CrtYd) (width 0.05)) 35 | (fp_line (start 16 9.6) (end 16 -4.6) (layer F.CrtYd) (width 0.05)) 36 | (fp_line (start 16 9.6) (end -1.5 9.6) (layer F.CrtYd) (width 0.05)) 37 | (fp_circle (center 7.5 2.5) (end 10.5 2.5) (layer F.SilkS) (width 0.12)) 38 | (fp_circle (center 7.5 2.5) (end 10.5 2.5) (layer F.Fab) (width 0.12)) 39 | (pad S1 thru_hole circle (at 14.5 5) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 40 | (pad S2 thru_hole circle (at 14.5 0) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 41 | (pad MP thru_hole rect (at 7.5 8.1) (size 3.2 2) (drill oval 2.8 1.5) (layers *.Cu *.Mask)) 42 | (pad MP thru_hole rect (at 7.5 -3.1) (size 3.2 2) (drill oval 2.8 1.5) (layers *.Cu *.Mask)) 43 | (pad B thru_hole circle (at 0 5) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 44 | (pad C thru_hole circle (at 0 2.5) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 45 | (pad A thru_hole rect (at 0 0) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 46 | (model ${KISYS3DMOD}/Rotary_Encoder.3dshapes/RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm.wrl 47 | (at (xyz 0 0 0)) 48 | (scale (xyz 1 1 1)) 49 | (rotate (xyz 0 0 0)) 50 | ) 51 | ) 52 | -------------------------------------------------------------------------------- /daughterboard/daughterboard.pretty/RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm_CircularMountingHoles.kicad_mod: -------------------------------------------------------------------------------- 1 | (module RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm_CircularMountingHoles (layer F.Cu) (tedit 5A74C8DD) 2 | (descr "Alps rotary encoder, EC12E... with switch, vertical shaft, mounting holes with circular drills, http://www.alps.com/prod/info/E/HTML/Encoder/Incremental/EC11/EC11E15204A3.html") 3 | (tags "rotary encoder") 4 | (fp_text reference REF** (at 2.8 -4.7) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm_CircularMountingHoles (at 7.5 10.4) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_text user %R (at 11.1 6.3) (layer F.Fab) 11 | (effects (font (size 1 1) (thickness 0.15))) 12 | ) 13 | (fp_line (start 7 2.5) (end 8 2.5) (layer F.SilkS) (width 0.12)) 14 | (fp_line (start 7.5 2) (end 7.5 3) (layer F.SilkS) (width 0.12)) 15 | (fp_line (start 13.6 6) (end 13.6 8.4) (layer F.SilkS) (width 0.12)) 16 | (fp_line (start 13.6 1.2) (end 13.6 3.8) (layer F.SilkS) (width 0.12)) 17 | (fp_line (start 13.6 -3.4) (end 13.6 -1) (layer F.SilkS) (width 0.12)) 18 | (fp_line (start 4.5 2.5) (end 10.5 2.5) (layer F.Fab) (width 0.12)) 19 | (fp_line (start 7.5 -0.5) (end 7.5 5.5) (layer F.Fab) (width 0.12)) 20 | (fp_line (start 0.3 -1.6) (end 0 -1.3) (layer F.SilkS) (width 0.12)) 21 | (fp_line (start -0.3 -1.6) (end 0.3 -1.6) (layer F.SilkS) (width 0.12)) 22 | (fp_line (start 0 -1.3) (end -0.3 -1.6) (layer F.SilkS) (width 0.12)) 23 | (fp_line (start 1.4 -3.4) (end 1.4 8.4) (layer F.SilkS) (width 0.12)) 24 | (fp_line (start 5.5 -3.4) (end 1.4 -3.4) (layer F.SilkS) (width 0.12)) 25 | (fp_line (start 5.5 8.4) (end 1.4 8.4) (layer F.SilkS) (width 0.12)) 26 | (fp_line (start 13.6 8.4) (end 9.5 8.4) (layer F.SilkS) (width 0.12)) 27 | (fp_line (start 9.5 -3.4) (end 13.6 -3.4) (layer F.SilkS) (width 0.12)) 28 | (fp_line (start 1.5 -2.2) (end 2.5 -3.3) (layer F.Fab) (width 0.12)) 29 | (fp_line (start 1.5 8.3) (end 1.5 -2.2) (layer F.Fab) (width 0.12)) 30 | (fp_line (start 13.5 8.3) (end 1.5 8.3) (layer F.Fab) (width 0.12)) 31 | (fp_line (start 13.5 -3.3) (end 13.5 8.3) (layer F.Fab) (width 0.12)) 32 | (fp_line (start 2.5 -3.3) (end 13.5 -3.3) (layer F.Fab) (width 0.12)) 33 | (fp_line (start -1.5 -5.2) (end 16 -5.2) (layer F.CrtYd) (width 0.05)) 34 | (fp_line (start -1.5 -5.2) (end -1.5 10.2) (layer F.CrtYd) (width 0.05)) 35 | (fp_line (start 16 10.2) (end 16 -5.2) (layer F.CrtYd) (width 0.05)) 36 | (fp_line (start 16 10.2) (end -1.5 10.2) (layer F.CrtYd) (width 0.05)) 37 | (fp_circle (center 7.5 2.5) (end 10.5 2.5) (layer F.SilkS) (width 0.12)) 38 | (fp_circle (center 7.5 2.5) (end 10.5 2.5) (layer F.Fab) (width 0.12)) 39 | (pad S1 thru_hole circle (at 14.5 5) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 40 | (pad S2 thru_hole circle (at 14.5 0) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 41 | (pad MP thru_hole circle (at 7.5 8.1) (size 3.2 3.2) (drill 2.6) (layers *.Cu *.Mask)) 42 | (pad MP thru_hole circle (at 7.5 -3.1) (size 3.2 3.2) (drill 2.6) (layers *.Cu *.Mask)) 43 | (pad B thru_hole circle (at 0 5) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 44 | (pad C thru_hole circle (at 0 2.5) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 45 | (pad A thru_hole rect (at 0 0) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 46 | (model ${KISYS3DMOD}/Rotary_Encoder.3dshapes/RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm_CircularMountingHoles.wrl 47 | (at (xyz 0 0 0)) 48 | (scale (xyz 1 1 1)) 49 | (rotate (xyz 0 0 0)) 50 | ) 51 | ) 52 | -------------------------------------------------------------------------------- /daughterboard/daughterboard.pretty/RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm_altered.kicad_mod: -------------------------------------------------------------------------------- 1 | (module RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm_altered (layer F.Cu) (tedit 5DAF7838) 2 | (descr "Alps rotary encoder, EC12E... with switch, vertical shaft, http://www.alps.com/prod/info/E/HTML/Encoder/Incremental/EC11/EC11E15204A3.html") 3 | (tags "rotary encoder") 4 | (fp_text reference REF** (at 2.8 -4.7) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm_altered (at 7.5 10.4) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_text user %R (at 11.1 6.3) (layer F.Fab) 11 | (effects (font (size 1 1) (thickness 0.15))) 12 | ) 13 | (fp_line (start 7 2.5) (end 8 2.5) (layer F.SilkS) (width 0.12)) 14 | (fp_line (start 7.5 2) (end 7.5 3) (layer F.SilkS) (width 0.12)) 15 | (fp_line (start 13.6 6) (end 13.6 8.4) (layer F.SilkS) (width 0.12)) 16 | (fp_line (start 13.6 1.2) (end 13.6 3.8) (layer F.SilkS) (width 0.12)) 17 | (fp_line (start 13.6 -3.4) (end 13.6 -1) (layer F.SilkS) (width 0.12)) 18 | (fp_line (start 4.5 2.5) (end 10.5 2.5) (layer F.Fab) (width 0.12)) 19 | (fp_line (start 7.5 -0.5) (end 7.5 5.5) (layer F.Fab) (width 0.12)) 20 | (fp_line (start 0.3 -1.6) (end 0 -1.3) (layer F.SilkS) (width 0.12)) 21 | (fp_line (start -0.3 -1.6) (end 0.3 -1.6) (layer F.SilkS) (width 0.12)) 22 | (fp_line (start 0 -1.3) (end -0.3 -1.6) (layer F.SilkS) (width 0.12)) 23 | (fp_line (start 1.4 -3.4) (end 1.4 8.4) (layer F.SilkS) (width 0.12)) 24 | (fp_line (start 5.5 -3.4) (end 1.4 -3.4) (layer F.SilkS) (width 0.12)) 25 | (fp_line (start 5.5 8.4) (end 1.4 8.4) (layer F.SilkS) (width 0.12)) 26 | (fp_line (start 13.6 8.4) (end 9.5 8.4) (layer F.SilkS) (width 0.12)) 27 | (fp_line (start 9.5 -3.4) (end 13.6 -3.4) (layer F.SilkS) (width 0.12)) 28 | (fp_line (start 1.5 -2.2) (end 2.5 -3.3) (layer F.Fab) (width 0.12)) 29 | (fp_line (start 1.5 8.3) (end 1.5 -2.2) (layer F.Fab) (width 0.12)) 30 | (fp_line (start 13.5 8.3) (end 1.5 8.3) (layer F.Fab) (width 0.12)) 31 | (fp_line (start 13.5 -3.3) (end 13.5 8.3) (layer F.Fab) (width 0.12)) 32 | (fp_line (start 2.5 -3.3) (end 13.5 -3.3) (layer F.Fab) (width 0.12)) 33 | (fp_line (start -1.5 -4.6) (end 16 -4.6) (layer F.CrtYd) (width 0.05)) 34 | (fp_line (start -1.5 -4.6) (end -1.5 9.6) (layer F.CrtYd) (width 0.05)) 35 | (fp_line (start 16 9.6) (end 16 -4.6) (layer F.CrtYd) (width 0.05)) 36 | (fp_line (start 16 9.6) (end -1.5 9.6) (layer F.CrtYd) (width 0.05)) 37 | (fp_circle (center 7.5 2.5) (end 10.5 2.5) (layer F.SilkS) (width 0.12)) 38 | (fp_circle (center 7.5 2.5) (end 10.5 2.5) (layer F.Fab) (width 0.12)) 39 | (pad S1 thru_hole circle (at 14.5 5) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 40 | (pad S2 thru_hole circle (at 14.5 0) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 41 | (pad MP thru_hole rect (at 7.5 8.1) (size 3.2 2) (drill oval 2.8 1.5) (layers *.Cu *.Mask)) 42 | (pad MP thru_hole rect (at 7.5 -3.1) (size 3.2 2) (drill oval 2.8 1.5) (layers *.Cu *.Mask)) 43 | (pad 3 thru_hole circle (at 0 5) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 44 | (pad 2 thru_hole circle (at 0 2.5) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 45 | (pad 1 thru_hole rect (at 0 0) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 46 | (model ${KISYS3DMOD}/Rotary_Encoder.3dshapes/RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm.wrl 47 | (at (xyz 0 0 0)) 48 | (scale (xyz 1 1 1)) 49 | (rotate (xyz 0 0 0)) 50 | ) 51 | ) 52 | -------------------------------------------------------------------------------- /daughterboard/daughterboard.pretty/RotaryEncoder_Alps_EC11E_Vertical_H20mm.kicad_mod: -------------------------------------------------------------------------------- 1 | (module RotaryEncoder_Alps_EC11E_Vertical_H20mm (layer F.Cu) (tedit 5A64F74E) 2 | (descr "Alps rotary encoder, EC12E... without switch (pins are dummy), vertical shaft, http://www.alps.com/prod/info/E/HTML/Encoder/Incremental/EC11/EC11E15204A3.html") 3 | (tags "rotary encoder") 4 | (fp_text reference REF** (at 2.8 -4.7) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value RotaryEncoder_Alps_EC11E_Vertical_H20mm (at 7.5 10.4) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_text user %R (at 11.1 6.3) (layer F.Fab) 11 | (effects (font (size 1 1) (thickness 0.15))) 12 | ) 13 | (fp_line (start 7 2.5) (end 8 2.5) (layer F.SilkS) (width 0.12)) 14 | (fp_line (start 7.5 2) (end 7.5 3) (layer F.SilkS) (width 0.12)) 15 | (fp_line (start 13.6 5.8) (end 13.6 8.4) (layer F.SilkS) (width 0.12)) 16 | (fp_line (start 13.6 1.2) (end 13.6 3.8) (layer F.SilkS) (width 0.12)) 17 | (fp_line (start 13.6 -3.4) (end 13.6 -0.8) (layer F.SilkS) (width 0.12)) 18 | (fp_line (start 4.5 2.5) (end 10.5 2.5) (layer F.Fab) (width 0.12)) 19 | (fp_line (start 7.5 -0.5) (end 7.5 5.5) (layer F.Fab) (width 0.12)) 20 | (fp_line (start 0.3 -1.6) (end 0 -1.3) (layer F.SilkS) (width 0.12)) 21 | (fp_line (start -0.3 -1.6) (end 0.3 -1.6) (layer F.SilkS) (width 0.12)) 22 | (fp_line (start 0 -1.3) (end -0.3 -1.6) (layer F.SilkS) (width 0.12)) 23 | (fp_line (start 1.4 -3.3) (end 1.4 8.4) (layer F.SilkS) (width 0.12)) 24 | (fp_line (start 5.5 -3.3) (end 1.4 -3.3) (layer F.SilkS) (width 0.12)) 25 | (fp_line (start 5.5 8.4) (end 1.4 8.4) (layer F.SilkS) (width 0.12)) 26 | (fp_line (start 13.6 8.4) (end 9.5 8.4) (layer F.SilkS) (width 0.12)) 27 | (fp_line (start 9.5 -3.4) (end 13.6 -3.4) (layer F.SilkS) (width 0.12)) 28 | (fp_line (start 1.5 -2.2) (end 2.5 -3.3) (layer F.Fab) (width 0.12)) 29 | (fp_line (start 1.5 8.3) (end 1.5 -2.2) (layer F.Fab) (width 0.12)) 30 | (fp_line (start 13.5 8.3) (end 1.5 8.3) (layer F.Fab) (width 0.12)) 31 | (fp_line (start 13.5 -3.3) (end 13.5 8.3) (layer F.Fab) (width 0.12)) 32 | (fp_line (start 2.5 -3.3) (end 13.5 -3.3) (layer F.Fab) (width 0.12)) 33 | (fp_line (start -1.25 -4.35) (end 15.5 -4.35) (layer F.CrtYd) (width 0.05)) 34 | (fp_line (start -1.25 -4.35) (end -1.25 9.35) (layer F.CrtYd) (width 0.05)) 35 | (fp_line (start 15.5 9.35) (end 15.5 -4.35) (layer F.CrtYd) (width 0.05)) 36 | (fp_line (start 15.5 9.35) (end -1.25 9.35) (layer F.CrtYd) (width 0.05)) 37 | (fp_circle (center 7.5 2.5) (end 10.5 2.5) (layer F.SilkS) (width 0.12)) 38 | (fp_circle (center 7.5 2.5) (end 10.5 2.5) (layer F.Fab) (width 0.12)) 39 | (pad "" thru_hole circle (at 14.5 5) (size 1.5 1.5) (drill 1) (layers *.Cu *.Mask)) 40 | (pad "" thru_hole circle (at 14.5 0) (size 1.5 1.5) (drill 1) (layers *.Cu *.Mask)) 41 | (pad MP thru_hole rect (at 7.5 8.1) (size 3.2 2) (drill oval 2.8 1.5) (layers *.Cu *.Mask)) 42 | (pad MP thru_hole rect (at 7.5 -3.1) (size 3.2 2) (drill oval 2.8 1.5) (layers *.Cu *.Mask)) 43 | (pad B thru_hole circle (at 0 5) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 44 | (pad C thru_hole circle (at 0 2.5) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 45 | (pad A thru_hole rect (at 0 0) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 46 | (model ${KISYS3DMOD}/Rotary_Encoder.3dshapes/RotaryEncoder_Alps_EC11E_Vertical_H20mm.wrl 47 | (at (xyz 0 0 0)) 48 | (scale (xyz 1 1 1)) 49 | (rotate (xyz 0 0 0)) 50 | ) 51 | ) 52 | -------------------------------------------------------------------------------- /daughterboard/daughterboard.pretty/RotaryEncoder_Alps_EC11E_Vertical_H20mm_CircularMountingHoles.kicad_mod: -------------------------------------------------------------------------------- 1 | (module RotaryEncoder_Alps_EC11E_Vertical_H20mm_CircularMountingHoles (layer F.Cu) (tedit 5A64F967) 2 | (descr "Alps rotary encoder, EC12E... without switch (pins are dummy), vertical shaft, mounting holes with circular drills, http://www.alps.com/prod/info/E/HTML/Encoder/Incremental/EC11/EC11E15204A3.html") 3 | (tags "rotary encoder") 4 | (fp_text reference REF** (at 2.8 -4.7) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value RotaryEncoder_Alps_EC11E_Vertical_H20mm_CircularMountingHoles (at 7.5 10.4) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_text user %R (at 11.1 6.3) (layer F.Fab) 11 | (effects (font (size 1 1) (thickness 0.15))) 12 | ) 13 | (fp_line (start 7 2.5) (end 8 2.5) (layer F.SilkS) (width 0.12)) 14 | (fp_line (start 7.5 2) (end 7.5 3) (layer F.SilkS) (width 0.12)) 15 | (fp_line (start 13.6 5.8) (end 13.6 8.4) (layer F.SilkS) (width 0.12)) 16 | (fp_line (start 13.6 1.2) (end 13.6 3.8) (layer F.SilkS) (width 0.12)) 17 | (fp_line (start 13.6 -3.4) (end 13.6 -0.8) (layer F.SilkS) (width 0.12)) 18 | (fp_line (start 4.5 2.5) (end 10.5 2.5) (layer F.Fab) (width 0.12)) 19 | (fp_line (start 7.5 -0.5) (end 7.5 5.5) (layer F.Fab) (width 0.12)) 20 | (fp_line (start 0.3 -1.6) (end 0 -1.3) (layer F.SilkS) (width 0.12)) 21 | (fp_line (start -0.3 -1.6) (end 0.3 -1.6) (layer F.SilkS) (width 0.12)) 22 | (fp_line (start 0 -1.3) (end -0.3 -1.6) (layer F.SilkS) (width 0.12)) 23 | (fp_line (start 1.4 -3.3) (end 1.4 8.4) (layer F.SilkS) (width 0.12)) 24 | (fp_line (start 5.5 -3.3) (end 1.4 -3.3) (layer F.SilkS) (width 0.12)) 25 | (fp_line (start 5.5 8.4) (end 1.4 8.4) (layer F.SilkS) (width 0.12)) 26 | (fp_line (start 13.6 8.4) (end 9.5 8.4) (layer F.SilkS) (width 0.12)) 27 | (fp_line (start 9.5 -3.4) (end 13.6 -3.4) (layer F.SilkS) (width 0.12)) 28 | (fp_line (start 1.5 -2.2) (end 2.5 -3.3) (layer F.Fab) (width 0.12)) 29 | (fp_line (start 1.5 8.3) (end 1.5 -2.2) (layer F.Fab) (width 0.12)) 30 | (fp_line (start 13.5 8.3) (end 1.5 8.3) (layer F.Fab) (width 0.12)) 31 | (fp_line (start 13.5 -3.3) (end 13.5 8.3) (layer F.Fab) (width 0.12)) 32 | (fp_line (start 2.5 -3.3) (end 13.5 -3.3) (layer F.Fab) (width 0.12)) 33 | (fp_line (start -1.25 -4.95) (end 15.5 -4.95) (layer F.CrtYd) (width 0.05)) 34 | (fp_line (start -1.25 -4.95) (end -1.25 9.95) (layer F.CrtYd) (width 0.05)) 35 | (fp_line (start 15.5 9.95) (end 15.5 -4.95) (layer F.CrtYd) (width 0.05)) 36 | (fp_line (start 15.5 9.95) (end -1.25 9.95) (layer F.CrtYd) (width 0.05)) 37 | (fp_circle (center 7.5 2.5) (end 10.5 2.5) (layer F.SilkS) (width 0.12)) 38 | (fp_circle (center 7.5 2.5) (end 10.5 2.5) (layer F.Fab) (width 0.12)) 39 | (pad "" thru_hole circle (at 14.5 5) (size 1.5 1.5) (drill 1) (layers *.Cu *.Mask)) 40 | (pad "" thru_hole circle (at 14.5 0) (size 1.5 1.5) (drill 1) (layers *.Cu *.Mask)) 41 | (pad MP thru_hole circle (at 7.5 8.1) (size 3.2 3.2) (drill 2.6) (layers *.Cu *.Mask)) 42 | (pad MP thru_hole circle (at 7.5 -3.1) (size 3.2 3.2) (drill 2.6) (layers *.Cu *.Mask)) 43 | (pad B thru_hole circle (at 0 5) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 44 | (pad C thru_hole circle (at 0 2.5) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 45 | (pad A thru_hole rect (at 0 0) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 46 | (model ${KISYS3DMOD}/Rotary_Encoder.3dshapes/RotaryEncoder_Alps_EC11E_Vertical_H20mm_CircularMountingHoles.wrl 47 | (at (xyz 0 0 0)) 48 | (scale (xyz 1 1 1)) 49 | (rotate (xyz 0 0 0)) 50 | ) 51 | ) 52 | -------------------------------------------------------------------------------- /daughterboard/daughterboard.pretty/RotaryEncoder_Alps_EC12E_Vertical_H20mm.kicad_mod: -------------------------------------------------------------------------------- 1 | (module RotaryEncoder_Alps_EC12E_Vertical_H20mm (layer F.Cu) (tedit 5A64F4AE) 2 | (descr "Alps rotary encoder, EC12E..., vertical shaft, http://www.alps.com/prod/info/E/HTML/Encoder/Incremental/EC12E/EC12E1240405.html") 3 | (tags "rotary encoder") 4 | (fp_text reference REF** (at 2.8 -4.7) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value RotaryEncoder_Alps_EC12E_Vertical_H20mm (at 7.5 10.4) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_line (start 7 2.5) (end 8 2.5) (layer F.SilkS) (width 0.12)) 11 | (fp_line (start 7.5 2) (end 7.5 3) (layer F.SilkS) (width 0.12)) 12 | (fp_line (start 4.5 2.5) (end 10.5 2.5) (layer F.Fab) (width 0.12)) 13 | (fp_line (start 7.5 -0.5) (end 7.5 5.5) (layer F.Fab) (width 0.12)) 14 | (fp_text user %R (at 11.5 6.6) (layer F.Fab) 15 | (effects (font (size 1 1) (thickness 0.15))) 16 | ) 17 | (fp_line (start 0.3 -1.6) (end 0 -1.3) (layer F.SilkS) (width 0.12)) 18 | (fp_line (start -0.3 -1.6) (end 0.3 -1.6) (layer F.SilkS) (width 0.12)) 19 | (fp_line (start 0 -1.3) (end -0.3 -1.6) (layer F.SilkS) (width 0.12)) 20 | (fp_line (start 0.8 -3.8) (end 0.8 -1.3) (layer F.SilkS) (width 0.12)) 21 | (fp_line (start 5.6 -3.8) (end 0.8 -3.8) (layer F.SilkS) (width 0.12)) 22 | (fp_line (start 0.8 8.8) (end 0.8 6) (layer F.SilkS) (width 0.12)) 23 | (fp_line (start 5.7 8.8) (end 0.8 8.8) (layer F.SilkS) (width 0.12)) 24 | (fp_line (start 14.2 8.8) (end 9.3 8.8) (layer F.SilkS) (width 0.12)) 25 | (fp_line (start 14.2 -3.8) (end 14.2 8.8) (layer F.SilkS) (width 0.12)) 26 | (fp_line (start 9.3 -3.8) (end 14.2 -3.8) (layer F.SilkS) (width 0.12)) 27 | (fp_line (start 0.9 -2.6) (end 1.9 -3.7) (layer F.Fab) (width 0.12)) 28 | (fp_line (start 0.9 8.7) (end 0.9 -2.6) (layer F.Fab) (width 0.12)) 29 | (fp_line (start 14.1 8.7) (end 0.9 8.7) (layer F.Fab) (width 0.12)) 30 | (fp_line (start 14.1 -3.7) (end 14.1 8.7) (layer F.Fab) (width 0.12)) 31 | (fp_line (start 1.9 -3.7) (end 14.1 -3.7) (layer F.Fab) (width 0.12)) 32 | (fp_line (start -1.25 -4.6) (end 14.35 -4.6) (layer F.CrtYd) (width 0.05)) 33 | (fp_line (start -1.25 -4.6) (end -1.25 9.6) (layer F.CrtYd) (width 0.05)) 34 | (fp_line (start 14.35 9.6) (end 14.35 -4.6) (layer F.CrtYd) (width 0.05)) 35 | (fp_line (start 14.35 9.6) (end -1.25 9.6) (layer F.CrtYd) (width 0.05)) 36 | (fp_circle (center 7.5 2.5) (end 10.5 2.5) (layer F.SilkS) (width 0.12)) 37 | (fp_circle (center 7.5 2.5) (end 10.5 2.5) (layer F.Fab) (width 0.12)) 38 | (pad MP thru_hole rect (at 7.5 8.1) (size 3 2.5) (drill oval 2.5 2) (layers *.Cu *.Mask)) 39 | (pad MP thru_hole rect (at 7.5 -3.1) (size 3 2.5) (drill oval 2.5 2) (layers *.Cu *.Mask)) 40 | (pad B thru_hole circle (at 0 5) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 41 | (pad C thru_hole circle (at 0 2.5) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 42 | (pad A thru_hole rect (at 0 0) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 43 | (model ${KISYS3DMOD}/Rotary_Encoder.3dshapes/RotaryEncoder_Alps_EC12E_Vertical_H20mm.wrl 44 | (at (xyz 0 0 0)) 45 | (scale (xyz 1 1 1)) 46 | (rotate (xyz 0 0 0)) 47 | ) 48 | ) 49 | -------------------------------------------------------------------------------- /daughterboard/daughterboard.pretty/RotaryEncoder_Alps_EC12E_Vertical_H20mm_CircularMountingHoles.kicad_mod: -------------------------------------------------------------------------------- 1 | (module RotaryEncoder_Alps_EC12E_Vertical_H20mm_CircularMountingHoles (layer F.Cu) (tedit 5A64F967) 2 | (descr "Alps rotary encoder, EC12E..., vertical shaft, mounting holes with circular drills, http://www.alps.com/prod/info/E/HTML/Encoder/Incremental/EC12E/EC12E1240405.html") 3 | (tags "rotary encoder") 4 | (fp_text reference REF** (at 2.8 -4.7) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value RotaryEncoder_Alps_EC12E_Vertical_H20mm_CircularMountingHoles (at 7.5 10.4) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_text user %R (at 11.5 6.6) (layer F.Fab) 11 | (effects (font (size 1 1) (thickness 0.15))) 12 | ) 13 | (fp_line (start 7 2.5) (end 8 2.5) (layer F.SilkS) (width 0.12)) 14 | (fp_line (start 7.5 2) (end 7.5 3) (layer F.SilkS) (width 0.12)) 15 | (fp_line (start 4.5 2.5) (end 10.5 2.5) (layer F.Fab) (width 0.12)) 16 | (fp_line (start 7.5 -0.5) (end 7.5 5.5) (layer F.Fab) (width 0.12)) 17 | (fp_line (start 0.3 -1.6) (end 0 -1.3) (layer F.SilkS) (width 0.12)) 18 | (fp_line (start -0.3 -1.6) (end 0.3 -1.6) (layer F.SilkS) (width 0.12)) 19 | (fp_line (start 0 -1.3) (end -0.3 -1.6) (layer F.SilkS) (width 0.12)) 20 | (fp_line (start 0.8 -3.8) (end 0.8 -1.3) (layer F.SilkS) (width 0.12)) 21 | (fp_line (start 5.6 -3.8) (end 0.8 -3.8) (layer F.SilkS) (width 0.12)) 22 | (fp_line (start 0.8 8.8) (end 0.8 6) (layer F.SilkS) (width 0.12)) 23 | (fp_line (start 5.7 8.8) (end 0.8 8.8) (layer F.SilkS) (width 0.12)) 24 | (fp_line (start 14.2 8.8) (end 9.3 8.8) (layer F.SilkS) (width 0.12)) 25 | (fp_line (start 14.2 -3.8) (end 14.2 8.8) (layer F.SilkS) (width 0.12)) 26 | (fp_line (start 9.3 -3.8) (end 14.2 -3.8) (layer F.SilkS) (width 0.12)) 27 | (fp_line (start 0.9 -2.6) (end 1.9 -3.7) (layer F.Fab) (width 0.12)) 28 | (fp_line (start 0.9 8.7) (end 0.9 -2.6) (layer F.Fab) (width 0.12)) 29 | (fp_line (start 14.1 8.7) (end 0.9 8.7) (layer F.Fab) (width 0.12)) 30 | (fp_line (start 14.1 -3.7) (end 14.1 8.7) (layer F.Fab) (width 0.12)) 31 | (fp_line (start 1.9 -3.7) (end 14.1 -3.7) (layer F.Fab) (width 0.12)) 32 | (fp_line (start -1.25 -4.75) (end 14.35 -4.75) (layer F.CrtYd) (width 0.05)) 33 | (fp_line (start -1.25 -4.75) (end -1.25 9.75) (layer F.CrtYd) (width 0.05)) 34 | (fp_line (start 14.35 9.75) (end 14.35 -4.75) (layer F.CrtYd) (width 0.05)) 35 | (fp_line (start 14.35 9.75) (end -1.25 9.75) (layer F.CrtYd) (width 0.05)) 36 | (fp_circle (center 7.5 2.5) (end 10.5 2.5) (layer F.SilkS) (width 0.12)) 37 | (fp_circle (center 7.5 2.5) (end 10.5 2.5) (layer F.Fab) (width 0.12)) 38 | (pad MP thru_hole circle (at 7.5 8.1) (size 2.8 2.8) (drill 2.2) (layers *.Cu *.Mask)) 39 | (pad MP thru_hole circle (at 7.5 -3.1) (size 2.8 2.8) (drill 2.2) (layers *.Cu *.Mask)) 40 | (pad B thru_hole circle (at 0 5) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 41 | (pad C thru_hole circle (at 0 2.5) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 42 | (pad A thru_hole rect (at 0 0) (size 2 2) (drill 1) (layers *.Cu *.Mask)) 43 | (model ${KISYS3DMOD}/Rotary_Encoder.3dshapes/RotaryEncoder_Alps_EC12E_Vertical_H20mm_CircularMountingHoles.wrl 44 | (at (xyz 0 0 0)) 45 | (scale (xyz 1 1 1)) 46 | (rotate (xyz 0 0 0)) 47 | ) 48 | ) 49 | -------------------------------------------------------------------------------- /daughterboard/daughterboard.pro: -------------------------------------------------------------------------------- 1 | update=11/10/2019 4:59:23 PM 2 | version=1 3 | last_client=kicad 4 | [pcbnew] 5 | version=1 6 | LastNetListRead= 7 | UseCmpFile=1 8 | PadDrill=0.600000000000 9 | PadDrillOvalY=0.600000000000 10 | PadSizeH=1.500000000000 11 | PadSizeV=1.500000000000 12 | PcbTextSizeV=1.500000000000 13 | PcbTextSizeH=1.500000000000 14 | PcbTextThickness=0.300000000000 15 | ModuleTextSizeV=1.000000000000 16 | ModuleTextSizeH=1.000000000000 17 | ModuleTextSizeThickness=0.150000000000 18 | SolderMaskClearance=0.000000000000 19 | SolderMaskMinWidth=0.000000000000 20 | DrawSegmentWidth=0.200000000000 21 | BoardOutlineThickness=0.100000000000 22 | ModuleOutlineThickness=0.150000000000 23 | [cvpcb] 24 | version=1 25 | NetIExt=net 26 | [general] 27 | version=1 28 | [eeschema] 29 | version=1 30 | LibDir= 31 | [eeschema/libraries] 32 | LibName1=power 33 | LibName2=device 34 | LibName3=switches 35 | LibName4=relays 36 | LibName5=motors 37 | LibName6=transistors 38 | LibName7=conn 39 | LibName8=linear 40 | LibName9=regul 41 | LibName10=74xx 42 | LibName11=cmos4000 43 | LibName12=adc-dac 44 | LibName13=memory 45 | LibName14=xilinx 46 | LibName15=microcontrollers 47 | LibName16=dsp 48 | LibName17=microchip 49 | LibName18=analog_switches 50 | LibName19=motorola 51 | LibName20=texas 52 | LibName21=intel 53 | LibName22=audio 54 | LibName23=interface 55 | LibName24=digital-audio 56 | LibName25=philips 57 | LibName26=display 58 | LibName27=cypress 59 | LibName28=siliconi 60 | LibName29=opto 61 | LibName30=atmel 62 | LibName31=contrib 63 | LibName32=valves 64 | LibName33=ilidisplay 65 | LibName34=alps_rotary_encoder_switch 66 | [schematic_editor] 67 | version=1 68 | PageLayoutDescrFile= 69 | PlotDirectoryName= 70 | SubpartIdSeparator=0 71 | SubpartFirstId=65 72 | NetFmtName=Pcbnew 73 | SpiceForceRefPrefix=0 74 | SpiceUseNetNumbers=0 75 | LabSize=60 76 | -------------------------------------------------------------------------------- /daughterboard/fp-lib-table: -------------------------------------------------------------------------------- 1 | (fp_lib_table 2 | (lib (name daughterboard)(type KiCad)(uri "$(KIPRJMOD)/daughterboard.pretty")(options "")(descr "")) 3 | ) 4 | -------------------------------------------------------------------------------- /daughterboard/gerber/daughterboard-B.Mask.gbr: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Soldermask,Bot* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.7) date 11/10/19 19:17:38* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | %ADD11C,2.400000*% 11 | %ADD12R,3.600000X2.400000*% 12 | %ADD13R,2.400000X2.400000*% 13 | %ADD14C,2.000000*% 14 | %ADD15O,2.000000X2.000000*% 15 | %ADD16R,2.100000X2.100000*% 16 | %ADD17O,2.100000X2.100000*% 17 | %ADD18R,1.700000X1.900000*% 18 | %ADD19C,4.464000*% 19 | G04 APERTURE END LIST* 20 | D10* 21 | D11* 22 | X116750000Y-81250000D03* 23 | X116750000Y-86250000D03* 24 | D12* 25 | X123750000Y-78150000D03* 26 | X123750000Y-89350000D03* 27 | D11* 28 | X131250000Y-81250000D03* 29 | X131250000Y-83750000D03* 30 | D13* 31 | X131250000Y-86250000D03* 32 | D14* 33 | X138400000Y-66200000D03* 34 | D15* 35 | X138400000Y-73820000D03* 36 | D16* 37 | X118021100Y-70269100D03* 38 | D17* 39 | X120561100Y-70269100D03* 40 | X118021100Y-67729100D03* 41 | X120561100Y-67729100D03* 42 | X118021100Y-65189100D03* 43 | X120561100Y-65189100D03* 44 | X118021100Y-62649100D03* 45 | X120561100Y-62649100D03* 46 | X118021100Y-60109100D03* 47 | X120561100Y-60109100D03* 48 | X118021100Y-57569100D03* 49 | X120561100Y-57569100D03* 50 | X118021100Y-55029100D03* 51 | X120561100Y-55029100D03* 52 | D18* 53 | X138700000Y-60150000D03* 54 | X138700000Y-62850000D03* 55 | D14* 56 | X136200000Y-66900000D03* 57 | D15* 58 | X136200000Y-59280000D03* 59 | D18* 60 | X136000000Y-69650000D03* 61 | X136000000Y-72350000D03* 62 | X134200000Y-80450000D03* 63 | X134200000Y-83150000D03* 64 | D14* 65 | X136700000Y-75500000D03* 66 | D15* 67 | X136700000Y-83120000D03* 68 | D18* 69 | X110000000Y-81950000D03* 70 | X110000000Y-79250000D03* 71 | D14* 72 | X113000000Y-81800000D03* 73 | D15* 74 | X113000000Y-74180000D03* 75 | D11* 76 | X126500000Y-74500000D03* 77 | X126500000Y-70000000D03* 78 | X133000000Y-74500000D03* 79 | X133000000Y-70000000D03* 80 | X126500000Y-66500000D03* 81 | X126500000Y-62000000D03* 82 | X133000000Y-66500000D03* 83 | X133000000Y-62000000D03* 84 | X126500000Y-58500000D03* 85 | X126500000Y-54000000D03* 86 | X133000000Y-58500000D03* 87 | X133000000Y-54000000D03* 88 | D16* 89 | X104000000Y-55000000D03* 90 | D17* 91 | X104000000Y-57540000D03* 92 | X104000000Y-60080000D03* 93 | X104000000Y-62620000D03* 94 | X104000000Y-65160000D03* 95 | X104000000Y-67700000D03* 96 | X104000000Y-70240000D03* 97 | X104000000Y-72780000D03* 98 | X104000000Y-75320000D03* 99 | X104000000Y-77860000D03* 100 | X104000000Y-80400000D03* 101 | X104000000Y-82940000D03* 102 | X104000000Y-85480000D03* 103 | X104000000Y-88020000D03* 104 | D19* 105 | X111000000Y-55500000D03* 106 | X138000000Y-87500000D03* 107 | X111000000Y-87500000D03* 108 | X138000000Y-55500000D03* 109 | M02* 110 | -------------------------------------------------------------------------------- /daughterboard/gerber/daughterboard-Edge.Cuts.gbr: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Profile,NP* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.7) date 11/10/19 19:17:38* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | %ADD11C,0.150000*% 11 | G04 APERTURE END LIST* 12 | D10* 13 | D11* 14 | X100000000Y-91000000D02* 15 | X100000000Y-52000000D01* 16 | X142000000Y-91000000D02* 17 | X100000000Y-91000000D01* 18 | X142000000Y-52000000D02* 19 | X142000000Y-91000000D01* 20 | X100000000Y-52000000D02* 21 | X142000000Y-52000000D01* 22 | M02* 23 | -------------------------------------------------------------------------------- /daughterboard/gerber/daughterboard-F.Mask.gbr: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Soldermask,Top* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.7) date 11/10/19 19:17:38* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | %ADD11C,2.400000*% 11 | %ADD12R,3.600000X2.400000*% 12 | %ADD13R,2.400000X2.400000*% 13 | %ADD14C,2.000000*% 14 | %ADD15O,2.000000X2.000000*% 15 | %ADD16R,2.100000X2.100000*% 16 | %ADD17O,2.100000X2.100000*% 17 | %ADD18C,4.464000*% 18 | G04 APERTURE END LIST* 19 | D10* 20 | D11* 21 | X116750000Y-81250000D03* 22 | X116750000Y-86250000D03* 23 | D12* 24 | X123750000Y-78150000D03* 25 | X123750000Y-89350000D03* 26 | D11* 27 | X131250000Y-81250000D03* 28 | X131250000Y-83750000D03* 29 | D13* 30 | X131250000Y-86250000D03* 31 | D14* 32 | X138400000Y-66200000D03* 33 | D15* 34 | X138400000Y-73820000D03* 35 | D16* 36 | X118021100Y-70269100D03* 37 | D17* 38 | X120561100Y-70269100D03* 39 | X118021100Y-67729100D03* 40 | X120561100Y-67729100D03* 41 | X118021100Y-65189100D03* 42 | X120561100Y-65189100D03* 43 | X118021100Y-62649100D03* 44 | X120561100Y-62649100D03* 45 | X118021100Y-60109100D03* 46 | X120561100Y-60109100D03* 47 | X118021100Y-57569100D03* 48 | X120561100Y-57569100D03* 49 | X118021100Y-55029100D03* 50 | X120561100Y-55029100D03* 51 | D14* 52 | X136200000Y-66900000D03* 53 | D15* 54 | X136200000Y-59280000D03* 55 | D14* 56 | X136700000Y-75500000D03* 57 | D15* 58 | X136700000Y-83120000D03* 59 | D14* 60 | X113000000Y-81800000D03* 61 | D15* 62 | X113000000Y-74180000D03* 63 | D11* 64 | X126500000Y-74500000D03* 65 | X126500000Y-70000000D03* 66 | X133000000Y-74500000D03* 67 | X133000000Y-70000000D03* 68 | X126500000Y-66500000D03* 69 | X126500000Y-62000000D03* 70 | X133000000Y-66500000D03* 71 | X133000000Y-62000000D03* 72 | X126500000Y-58500000D03* 73 | X126500000Y-54000000D03* 74 | X133000000Y-58500000D03* 75 | X133000000Y-54000000D03* 76 | D16* 77 | X104000000Y-55000000D03* 78 | D17* 79 | X104000000Y-57540000D03* 80 | X104000000Y-60080000D03* 81 | X104000000Y-62620000D03* 82 | X104000000Y-65160000D03* 83 | X104000000Y-67700000D03* 84 | X104000000Y-70240000D03* 85 | X104000000Y-72780000D03* 86 | X104000000Y-75320000D03* 87 | X104000000Y-77860000D03* 88 | X104000000Y-80400000D03* 89 | X104000000Y-82940000D03* 90 | X104000000Y-85480000D03* 91 | X104000000Y-88020000D03* 92 | D18* 93 | X111000000Y-55500000D03* 94 | X138000000Y-87500000D03* 95 | X111000000Y-87500000D03* 96 | X138000000Y-55500000D03* 97 | M02* 98 | -------------------------------------------------------------------------------- /daughterboard/gerber/daughterboard.drl: -------------------------------------------------------------------------------- 1 | M48 2 | ;DRILL file {KiCad 4.0.7} date 11/10/19 19:17:39 3 | ;FORMAT={-:-/ absolute / metric / decimal} 4 | FMAT,2 5 | METRIC,TZ 6 | T1C0.400 7 | T2C0.800 8 | T3C1.000 9 | T4C1.100 10 | T5C1.500 11 | T6C3.048 12 | % 13 | G90 14 | G05 15 | M71 16 | T1 17 | X101.Y-68. 18 | X101.7Y-61.368 19 | X107.269Y-74.249 20 | X107.412Y-76.992 21 | X107.823Y-62.484 22 | X111.74Y-71.973 23 | X112.014Y-63.627 24 | X121.8Y-58.8 25 | X124.Y-64.7 26 | X124.3Y-69.1 27 | T2 28 | X113.Y-74.18 29 | X113.Y-81.8 30 | X136.2Y-59.28 31 | X136.2Y-66.9 32 | X136.7Y-75.5 33 | X136.7Y-83.12 34 | X138.4Y-66.2 35 | X138.4Y-73.82 36 | T3 37 | X104.Y-55. 38 | X104.Y-57.54 39 | X104.Y-60.08 40 | X104.Y-62.62 41 | X104.Y-65.16 42 | X104.Y-67.7 43 | X104.Y-70.24 44 | X104.Y-72.78 45 | X104.Y-75.32 46 | X104.Y-77.86 47 | X104.Y-80.4 48 | X104.Y-82.94 49 | X104.Y-85.48 50 | X104.Y-88.02 51 | X116.75Y-81.25 52 | X116.75Y-86.25 53 | X118.021Y-55.029 54 | X118.021Y-57.569 55 | X118.021Y-60.109 56 | X118.021Y-62.649 57 | X118.021Y-65.189 58 | X118.021Y-67.729 59 | X118.021Y-70.269 60 | X120.561Y-55.029 61 | X120.561Y-57.569 62 | X120.561Y-60.109 63 | X120.561Y-62.649 64 | X120.561Y-65.189 65 | X120.561Y-67.729 66 | X120.561Y-70.269 67 | X131.25Y-81.25 68 | X131.25Y-83.75 69 | X131.25Y-86.25 70 | T4 71 | X126.5Y-54. 72 | X126.5Y-58.5 73 | X126.5Y-62. 74 | X126.5Y-66.5 75 | X126.5Y-70. 76 | X126.5Y-74.5 77 | X133.Y-54. 78 | X133.Y-58.5 79 | X133.Y-62. 80 | X133.Y-66.5 81 | X133.Y-70. 82 | X133.Y-74.5 83 | T6 84 | X111.Y-55.5 85 | X111.Y-87.5 86 | X138.Y-55.5 87 | X138.Y-87.5 88 | T5 89 | X124.4Y-78.15G85X123.1Y-78.15 90 | G05 91 | X124.4Y-89.35G85X123.1Y-89.35 92 | G05 93 | T0 94 | M30 95 | -------------------------------------------------------------------------------- /daughterboard/ilidisplay.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /daughterboard/ilidisplay.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # ILIdisplay 5 | # 6 | DEF ILIdisplay DISP 0 40 Y Y 1 F N 7 | F0 "DISP" -450 900 60 H V C CNN 8 | F1 "ILIdisplay" -500 -200 60 V V C CNN 9 | F2 "" 0 0 60 H I C CNN 10 | F3 "" 0 0 60 H I C CNN 11 | DRAW 12 | S -850 1100 -200 -550 0 1 10 N 13 | X TIRQ 1 -1050 1000 200 R 50 50 1 1 I 14 | X T_DO 2 -1050 900 200 R 50 50 1 1 I 15 | X T_DIN 3 -1050 800 200 R 50 50 1 1 I 16 | X T_CS 4 -1050 700 200 R 50 50 1 1 I 17 | X T_CLK 5 -1050 600 200 R 50 50 1 1 I 18 | X SDO(MISO) 6 -1050 400 200 R 50 50 1 1 I 19 | X LED 7 -1050 300 200 R 50 50 1 1 I 20 | X SCK 8 -1050 200 200 R 50 50 1 1 I 21 | X SDI(MOSI) 9 -1050 100 200 R 50 50 1 1 I 22 | X D/C 10 -1050 0 200 R 50 50 1 1 I 23 | X RESET 11 -1050 -100 200 R 50 50 1 1 I 24 | X CS 12 -1050 -200 200 R 50 50 1 1 I 25 | X GND 13 -1050 -300 200 R 50 50 1 1 I 26 | X VCC 14 -1050 -400 200 R 50 50 1 1 I 27 | ENDDRAW 28 | ENDDEF 29 | # 30 | #End Library 31 | -------------------------------------------------------------------------------- /doc/VNA calibration method 2.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/doc/VNA calibration method 2.odt -------------------------------------------------------------------------------- /doc/VNA calibration method 2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/doc/VNA calibration method 2.pdf -------------------------------------------------------------------------------- /doc/VNA calibration method.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/doc/VNA calibration method.odt -------------------------------------------------------------------------------- /doc/VNA calibration method.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/doc/VNA calibration method.pdf -------------------------------------------------------------------------------- /doc/vna-assembled-board.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/doc/vna-assembled-board.jpg -------------------------------------------------------------------------------- /doc/vna-impedance-display.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/doc/vna-impedance-display.jpg -------------------------------------------------------------------------------- /doc/vna-main-screen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/doc/vna-main-screen.jpg -------------------------------------------------------------------------------- /doc/vna-s11-display.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/doc/vna-s11-display.jpg -------------------------------------------------------------------------------- /doc/vna-smith-chart-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/doc/vna-smith-chart-1.jpg -------------------------------------------------------------------------------- /doc/vna-smith-chart-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/doc/vna-smith-chart-2.jpg -------------------------------------------------------------------------------- /doc/vna-swr-display.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/doc/vna-swr-display.jpg -------------------------------------------------------------------------------- /firmware/VNA.ino.generic_stm32f103c.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/firmware/VNA.ino.generic_stm32f103c.bin -------------------------------------------------------------------------------- /fixture/fixture-schematic.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/fixture/fixture-schematic.pdf -------------------------------------------------------------------------------- /fixture/fixture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/fixture/fixture.png -------------------------------------------------------------------------------- /fixture/fixture.pretty/AirHole.kicad_mod: -------------------------------------------------------------------------------- 1 | (module AirHole (layer F.Cu) (tedit 5DB27520) 2 | (fp_text reference J26 (at 0 0.5) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value Conn_01x01 (at 0 -0.5) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (pad "" np_thru_hole circle (at 0 0) (size 2 2) (drill 2) (layers *.Cu *.Mask)) 9 | ) 10 | -------------------------------------------------------------------------------- /fixture/fixture.pretty/bnc_90_1-1337543-0.kicad_mod: -------------------------------------------------------------------------------- 1 | (module bnc_90_1-1337543-0 (layer F.Cu) 2 | (descr "BNC connector, Tyco 1-1337543-0") 3 | (fp_text reference bnc_90_1-1337543-0 (at 0 -14.9) (layer F.SilkS) 4 | (effects (font (size 1 1) (thickness 0.2))) 5 | ) 6 | (fp_text value VAL** (at 0 -16.4) (layer F.SilkS) 7 | (effects (font (size 1 1) (thickness 0.2))) 8 | ) 9 | (fp_line (start -6.4 1.2) (end 6.4 0.5) (layer F.SilkS) (width 0.3)) 10 | (fp_line (start -6.4 5.2) (end 6.4 4.5) (layer F.SilkS) (width 0.3)) 11 | (fp_line (start -6.4 4.2) (end 6.4 3.5) (layer F.SilkS) (width 0.3)) 12 | (fp_line (start -6.4 2.2) (end 6.4 1.5) (layer F.SilkS) (width 0.3)) 13 | (fp_line (start -6.4 3.2) (end 6.4 2.5) (layer F.SilkS) (width 0.3)) 14 | (fp_line (start -6.4 7.2) (end 6.4 6.5) (layer F.SilkS) (width 0.3)) 15 | (fp_line (start -6.4 6.2) (end 6.4 5.5) (layer F.SilkS) (width 0.3)) 16 | (fp_line (start -6.4 8.2) (end 6.4 7.5) (layer F.SilkS) (width 0.3)) 17 | (fp_line (start -6.4 9.2) (end 6.4 8.5) (layer F.SilkS) (width 0.3)) 18 | (fp_line (start 6.4 9.2) (end 6.4 0) (layer F.SilkS) (width 0.3)) 19 | (fp_line (start -6.4 9.2) (end -6.4 0) (layer F.SilkS) (width 0.3)) 20 | (fp_line (start 4.8 21.2) (end 4.8 9.2) (layer F.SilkS) (width 0.3)) 21 | (fp_line (start -4.8 21.2) (end -4.8 9.2) (layer F.SilkS) (width 0.3)) 22 | (fp_line (start -4.8 21.2) (end 4.8 21.2) (layer F.SilkS) (width 0.3)) 23 | (fp_line (start -6.4 9.2) (end 6.4 9.2) (layer F.SilkS) (width 0.3)) 24 | (fp_line (start 7.4 0) (end 7.4 -13.7) (layer F.SilkS) (width 0.3)) 25 | (fp_line (start -7.4 -13.7) (end -7.4 0) (layer F.SilkS) (width 0.3)) 26 | (fp_line (start -7.4 -13.7) (end 7.4 -13.7) (layer F.SilkS) (width 0.3)) 27 | (fp_line (start -7.4 0) (end 7.4 0) (layer F.SilkS) (width 0.3)) 28 | (pad 1 thru_hole circle (at 0 -12.38) (size 1.5 1.5) (drill 0.9) (layers *.Cu *.Mask F.SilkS)) 29 | (pad 2 thru_hole circle (at 2.54 -12.38) (size 1.5 1.5) (drill 0.9) (layers *.Cu *.Mask F.SilkS)) 30 | (pad "" np_thru_hole circle (at 5.08 -7.3) (size 2.1 2.1) (drill 2.1) (layers *.Cu *.Mask F.SilkS)) 31 | (pad "" np_thru_hole circle (at -5.08 -7.3) (size 2.1 2.1) (drill 2.1) (layers *.Cu *.Mask F.SilkS)) 32 | (model walter/conn_rf/bnc_90_1-1337543-0.wrl 33 | (at (xyz 0 0 0)) 34 | (scale (xyz 1 1 1)) 35 | (rotate (xyz 0 0 0)) 36 | ) 37 | ) 38 | -------------------------------------------------------------------------------- /fixture/fixture.pro: -------------------------------------------------------------------------------- 1 | update=11/15/2019 9:51:01 PM 2 | version=1 3 | last_client=kicad 4 | [pcbnew] 5 | version=1 6 | LastNetListRead= 7 | UseCmpFile=1 8 | PadDrill=0.600000000000 9 | PadDrillOvalY=0.600000000000 10 | PadSizeH=1.500000000000 11 | PadSizeV=1.500000000000 12 | PcbTextSizeV=1.500000000000 13 | PcbTextSizeH=1.500000000000 14 | PcbTextThickness=0.300000000000 15 | ModuleTextSizeV=1.000000000000 16 | ModuleTextSizeH=1.000000000000 17 | ModuleTextSizeThickness=0.150000000000 18 | SolderMaskClearance=0.000000000000 19 | SolderMaskMinWidth=0.000000000000 20 | DrawSegmentWidth=0.200000000000 21 | BoardOutlineThickness=0.100000000000 22 | ModuleOutlineThickness=0.150000000000 23 | [cvpcb] 24 | version=1 25 | NetIExt=net 26 | [general] 27 | version=1 28 | [eeschema] 29 | version=1 30 | LibDir=../fixture 31 | [eeschema/libraries] 32 | LibName1=power 33 | LibName2=device 34 | LibName3=switches 35 | LibName4=relays 36 | LibName5=motors 37 | LibName6=transistors 38 | LibName7=conn 39 | LibName8=linear 40 | LibName9=regul 41 | LibName10=74xx 42 | LibName11=cmos4000 43 | LibName12=adc-dac 44 | LibName13=memory 45 | LibName14=xilinx 46 | LibName15=microcontrollers 47 | LibName16=dsp 48 | LibName17=microchip 49 | LibName18=analog_switches 50 | LibName19=motorola 51 | LibName20=texas 52 | LibName21=intel 53 | LibName22=audio 54 | LibName23=interface 55 | LibName24=digital-audio 56 | LibName25=philips 57 | LibName26=display 58 | LibName27=cypress 59 | LibName28=siliconi 60 | LibName29=opto 61 | LibName30=atmel 62 | LibName31=contrib 63 | LibName32=valves 64 | [schematic_editor] 65 | version=1 66 | PageLayoutDescrFile= 67 | PlotDirectoryName= 68 | SubpartIdSeparator=0 69 | SubpartFirstId=65 70 | NetFmtName=Pcbnew 71 | SpiceForceRefPrefix=0 72 | SpiceUseNetNumbers=0 73 | LabSize=60 74 | -------------------------------------------------------------------------------- /fixture/fp-lib-table: -------------------------------------------------------------------------------- 1 | (fp_lib_table 2 | (lib (name fixture)(type KiCad)(uri "$(KIPRJMOD)/fixture.pretty")(options "")(descr "")) 3 | ) 4 | -------------------------------------------------------------------------------- /fixture/gerber/fixture-B.SilkS.gbr: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Legend,Bot* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.7) date 05/05/20 20:17:16* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | G04 APERTURE END LIST* 11 | D10* 12 | M02* 13 | -------------------------------------------------------------------------------- /fixture/gerber/fixture-Edge.Cuts.gbr: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Profile,NP* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.7) date 05/05/20 20:17:16* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | %ADD11C,0.150000*% 11 | G04 APERTURE END LIST* 12 | D10* 13 | D11* 14 | X50000000Y-150000000D02* 15 | X50000000Y-50000000D01* 16 | X150000000Y-150000000D02* 17 | X50000000Y-150000000D01* 18 | X150000000Y-50000000D02* 19 | X150000000Y-150000000D01* 20 | X50000000Y-50000000D02* 21 | X150000000Y-50000000D01* 22 | M02* 23 | -------------------------------------------------------------------------------- /fixture/gerber/fixture-NPTH.drl: -------------------------------------------------------------------------------- 1 | M48 2 | ;DRILL file {KiCad 4.0.7} date 05/05/20 20:17:18 3 | ;FORMAT={-:-/ absolute / metric / decimal} 4 | FMAT,2 5 | METRIC,TZ 6 | T1C0.400 7 | T2C0.600 8 | T3C0.800 9 | T4C1.000 10 | T5C1.200 11 | T6C1.500 12 | % 13 | G90 14 | G05 15 | M71 16 | T6 17 | X123.3Y-86.5 18 | T1 19 | X140.65Y-84.9G85X141.75Y-84.9 20 | G05 21 | X144.575Y-84.9G85X145.425Y-84.9 22 | G05 23 | X148.2Y-84.9G85X148.8Y-84.9 24 | G05 25 | T2 26 | X137.35Y-85.G85X138.25Y-85. 27 | G05 28 | T3 29 | X134.15Y-85.3G85X134.85Y-85.3 30 | G05 31 | T4 32 | X130.85Y-85.6G85X131.35Y-85.6 33 | G05 34 | T5 35 | X127.25Y-86.G85X127.55Y-86. 36 | G05 37 | T0 38 | M30 39 | -------------------------------------------------------------------------------- /libraries/Adafruit_GFX/.gitignore: -------------------------------------------------------------------------------- 1 | default.vim 2 | fontconvert/fontconvert 3 | # Our handy .gitignore for automation ease 4 | Doxyfile* 5 | doxygen_sqlite3.db 6 | html -------------------------------------------------------------------------------- /libraries/Adafruit_GFX/.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | sudo: false 3 | cache: 4 | directories: 5 | - ~/arduino_ide 6 | - ~/.arduino15/packages/ 7 | git: 8 | depth: false 9 | quiet: true 10 | env: 11 | global: 12 | - PRETTYNAME="Adafruit GFX Library" 13 | 14 | before_install: 15 | - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/install.sh) 16 | 17 | install: 18 | - arduino --install-library "Adafruit ILI9341" 19 | 20 | script: 21 | - build_main_platforms 22 | 23 | # Generate and deploy documentation 24 | after_success: 25 | - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/library_check.sh) 26 | - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/doxy_gen_and_deploy.sh) 27 | -------------------------------------------------------------------------------- /libraries/Adafruit_GFX/README.md: -------------------------------------------------------------------------------- 1 | # Adafruit GFX Library # [![Build Status](https://travis-ci.org/adafruit/Adafruit-GFX-Library.svg?branch=master)](https://travis-ci.org/adafruit/Adafruit-GFX-Library) 2 | 3 | This is the core graphics library for all our displays, providing a common set of graphics primitives (points, lines, circles, etc.). It needs to be paired with a hardware-specific library for each display device we carry (to handle the lower-level functions). 4 | 5 | Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! 6 | 7 | Written by Limor Fried/Ladyada for Adafruit Industries. 8 | BSD license, check license.txt for more information. 9 | All text above must be included in any redistribution. 10 | 11 | Recent Arduino IDE releases include the Library Manager for easy installation. Otherwise, to download, click the DOWNLOAD ZIP button, uncompress and rename the uncompressed folder Adafruit_GFX. Confirm that the Adafruit_GFX folder contains Adafruit_GFX.cpp and Adafruit_GFX.h. Place the Adafruit_GFX library folder your ArduinoSketchFolder/Libraries/ folder. You may need to create the Libraries subfolder if its your first library. Restart the IDE. 12 | 13 | # Useful Resources 14 | 15 | - Image2Code: This is a handy Java GUI utility to convert a BMP file into the array code necessary to display the image with the drawBitmap function. Check out the code at ehubin's GitHub repository: https://github.com/ehubin/Adafruit-GFX-Library/tree/master/Img2Code 16 | 17 | - drawXBitmap function: You can use the GIMP photo editor to save a .xbm file and use the array saved in the file to draw a bitmap with the drawXBitmap function. See the pull request here for more details: https://github.com/adafruit/Adafruit-GFX-Library/pull/31 18 | 19 | - 'Fonts' folder contains bitmap fonts for use with recent (1.1 and later) Adafruit_GFX. To use a font in your Arduino sketch, \#include the corresponding .h file and pass address of GFXfont struct to setFont(). Pass NULL to revert to 'classic' fixed-space bitmap font. 20 | 21 | - 'fontconvert' folder contains a command-line tool for converting TTF fonts to Adafruit_GFX header format. 22 | 23 | --- 24 | 25 | ### Roadmap 26 | 27 | The PRIME DIRECTIVE is to maintain backward compatibility with existing Arduino sketches -- many are hosted elsewhere and don't track changes here, some are in print and can never be changed! This "little" library has grown organically over time and sometimes we paint ourselves into a design corner and just have to live with it or add ungainly workarounds. 28 | 29 | Highly unlikely to merge any changes for additional or incompatible font formats (see Prime Directive above). There are already two formats and the code is quite bloaty there as it is (this also creates liabilities for tools and documentation). If you *must* have a more sophisticated font format, consider creating a fork with the features required for your project. For similar reasons, also unlikely to add any more bitmap formats, it's getting messy. 30 | 31 | Please don't reformat code for the sake of reformatting code. The resulting large "visual diff" makes it impossible to untangle actual bug fixes from merely rearranged lines. 32 | -------------------------------------------------------------------------------- /libraries/Adafruit_GFX/fontconvert/Makefile: -------------------------------------------------------------------------------- 1 | all: fontconvert 2 | 3 | CC = gcc 4 | CFLAGS = -Wall -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I/usr/include 5 | LIBS = -lfreetype 6 | 7 | fontconvert: fontconvert.c 8 | $(CC) $(CFLAGS) $< $(LIBS) -o $@ 9 | strip $@ 10 | 11 | clean: 12 | rm -f fontconvert 13 | -------------------------------------------------------------------------------- /libraries/Adafruit_GFX/fontconvert/makefonts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Ugly little Bash script, generates a set of .h files for GFX using 4 | # GNU FreeFont sources. There are three fonts: 'Mono' (Courier-like), 5 | # 'Sans' (Helvetica-like) and 'Serif' (Times-like); four styles: regular, 6 | # bold, oblique or italic, and bold+oblique or bold+italic; and four 7 | # sizes: 9, 12, 18 and 24 point. No real error checking or anything, 8 | # this just powers through all the combinations, calling the fontconvert 9 | # utility and redirecting the output to a .h file for each combo. 10 | 11 | # Adafruit_GFX repository does not include the source outline fonts 12 | # (huge zipfile, different license) but they're easily acquired: 13 | # http://savannah.gnu.org/projects/freefont/ 14 | 15 | convert=./fontconvert 16 | inpath=~/Desktop/freefont/ 17 | outpath=../Fonts/ 18 | fonts=(FreeMono FreeSans FreeSerif) 19 | styles=("" Bold Italic BoldItalic Oblique BoldOblique) 20 | sizes=(9 12 18 24) 21 | 22 | for f in ${fonts[*]} 23 | do 24 | for index in ${!styles[*]} 25 | do 26 | st=${styles[$index]} 27 | for si in ${sizes[*]} 28 | do 29 | infile=$inpath$f$st".ttf" 30 | if [ -f $infile ] # Does source combination exist? 31 | then 32 | outfile=$outpath$f$st$si"pt7b.h" 33 | # printf "%s %s %s > %s\n" $convert $infile $si $outfile 34 | $convert $infile $si > $outfile 35 | fi 36 | done 37 | done 38 | done 39 | -------------------------------------------------------------------------------- /libraries/Adafruit_GFX/gfxfont.h: -------------------------------------------------------------------------------- 1 | // Font structures for newer Adafruit_GFX (1.1 and later). 2 | // Example fonts are included in 'Fonts' directory. 3 | // To use a font in your Arduino sketch, #include the corresponding .h 4 | // file and pass address of GFXfont struct to setFont(). Pass NULL to 5 | // revert to 'classic' fixed-space bitmap font. 6 | 7 | #ifndef _GFXFONT_H_ 8 | #define _GFXFONT_H_ 9 | 10 | /// Font data stored PER GLYPH 11 | typedef struct { 12 | uint16_t bitmapOffset; ///< Pointer into GFXfont->bitmap 13 | uint8_t width; ///< Bitmap dimensions in pixels 14 | uint8_t height; ///< Bitmap dimensions in pixels 15 | uint8_t xAdvance; ///< Distance to advance cursor (x axis) 16 | int8_t xOffset; ///< X dist from cursor pos to UL corner 17 | int8_t yOffset; ///< Y dist from cursor pos to UL corner 18 | } GFXglyph; 19 | 20 | /// Data stored for FONT AS A WHOLE 21 | typedef struct { 22 | uint8_t *bitmap; ///< Glyph bitmaps, concatenated 23 | GFXglyph *glyph; ///< Glyph array 24 | uint8_t first; ///< ASCII extents (first char) 25 | uint8_t last; ///< ASCII extents (last char) 26 | uint8_t yAdvance; ///< Newline distance (y axis) 27 | } GFXfont; 28 | 29 | #endif // _GFXFONT_H_ 30 | -------------------------------------------------------------------------------- /libraries/Adafruit_GFX/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit GFX Library 2 | version=1.3.6 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Adafruit GFX graphics core library, this is the 'core' class that all our other graphics libraries derive from. 6 | paragraph=Install this library in addition to the display library for your hardware. 7 | category=Display 8 | url=https://github.com/adafruit/Adafruit-GFX-Library 9 | architectures=* 10 | -------------------------------------------------------------------------------- /libraries/Adafruit_GFX/license.txt: -------------------------------------------------------------------------------- 1 | Software License Agreement (BSD License) 2 | 3 | Copyright (c) 2012 Adafruit Industries. All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | - Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | - Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /libraries/Adafruit_GFX_AS/Adafruit_GFX_AS.h: -------------------------------------------------------------------------------- 1 | #ifndef _ADAFRUIT_GFX_AS_H 2 | #define _ADAFRUIT_GFX_AS_H 3 | 4 | #include "Load_fonts.h" 5 | 6 | #include 7 | 8 | #define swap(a, b) { int16_t t = a; a = b; b = t; } 9 | 10 | /** This class provides a few extensions to Adafruit_GFX, mostly for compatibility with 11 | * existing code. Note that the fonts ("size" parameter) are not the same ones use as the 12 | * ones provided by Adafruit_GFX. Using any of the functions defined in this class will 13 | * therefore pull additional font tables into flash. If that is an issue, try to stick 14 | * to the base class, or trim down the fonts loaded in Load_fonts.h . */ 15 | class Adafruit_GFX_AS : public Adafruit_GFX { 16 | public: 17 | Adafruit_GFX_AS(int16_t w, int16_t h); // Constructor 18 | int16_t drawUnicode(uint16_t uniCode, int16_t x, int16_t y, int16_t size); 19 | int16_t drawNumber(long long_num,int16_t poX, int16_t poY, int16_t size); 20 | int16_t drawChar(char c, int16_t x, int16_t y, int16_t size); 21 | int16_t drawString(char *string, int16_t poX, int16_t poY, int16_t size); 22 | int16_t drawCentreString(char *string, int16_t dX, int16_t poY, int16_t size); 23 | int16_t drawRightString(char *string, int16_t dX, int16_t poY, int16_t size); 24 | int16_t drawFloat(float floatNumber,int16_t decimal,int16_t poX, int16_t poY, int16_t size); 25 | }; 26 | 27 | #endif // _ADAFRUIT_GFX_AS_H 28 | -------------------------------------------------------------------------------- /libraries/Adafruit_GFX_AS/Font16.h: -------------------------------------------------------------------------------- 1 | #define nr_chrs_f16 96 2 | #define chr_hgt_f16 16 3 | #define data_size_f16 8 4 | #define firstchr_f16 32 5 | 6 | extern const unsigned char widtbl_f16[96]; 7 | extern const unsigned char* const chrtbl_f16[96]; 8 | -------------------------------------------------------------------------------- /libraries/Adafruit_GFX_AS/Font32.h: -------------------------------------------------------------------------------- 1 | #define nr_chrs_f32 96 2 | #define chr_hgt_f32 26 3 | #define data_size_f32 8 4 | #define firstchr_f32 32 5 | 6 | extern const unsigned char widtbl_f32[96]; 7 | extern const unsigned char* const chrtbl_f32[96]; 8 | -------------------------------------------------------------------------------- /libraries/Adafruit_GFX_AS/Font64.h: -------------------------------------------------------------------------------- 1 | #define nr_chrs_f64 96 2 | #define chr_hgt_f64 48 3 | #define data_size_f64 8 4 | #define firstchr_f64 32 5 | 6 | extern const unsigned char widtbl_f64[96]; 7 | extern const unsigned char* const chrtbl_f64[96]; 8 | -------------------------------------------------------------------------------- /libraries/Adafruit_GFX_AS/Font7s.h: -------------------------------------------------------------------------------- 1 | #define nr_chrs_f7s 96 2 | #define chr_hgt_f7s 48 3 | #define data_size_f7s 8 4 | #define firstchr_f7s 32 5 | 6 | extern const unsigned char widtbl_f7s[96]; 7 | extern const unsigned char* const chrtbl_f7s[96]; 8 | -------------------------------------------------------------------------------- /libraries/Adafruit_GFX_AS/Load_fonts.h: -------------------------------------------------------------------------------- 1 | // Comment out the #defines below with // to stop that font being loaded 2 | // If all fonts are loaded the total space required is ablout 17890 bytes 3 | 4 | #define LOAD_GLCD // Standard Adafruit font needs ~1792 bytes in FLASH 5 | 6 | #define LOAD_FONT2 // Small font, needs ~3092 bytes in FLASH 7 | #define LOAD_FONT4 // Medium font, needs ~8126 bytes in FLASH 8 | #define LOAD_FONT6 // Large font, needs ~4404 bytes in FLASH 9 | #define LOAD_FONT7 // 7 segment font, needs ~3652 bytes in FLASH 10 | -------------------------------------------------------------------------------- /libraries/Adafruit_GFX_AS/README.txt: -------------------------------------------------------------------------------- 1 | This library adds a few font-related functions on top of the Adafruit_GFX library (which you need to install, separately). 2 | 3 | Historically, Adafruit_GFX_AS started as a fork of Adafruit_GFX. Most importantly, it added support for using additional fonts, 4 | before similar functionality became available in Adafruit_GFX. 5 | 6 | Today, the main point of this library is to continue supporting projects that have made use of the functions added in Adafruit_GFX_AS, 7 | while also being fully compatible with Adafruit_GFX (which is used as the base class). It is not recommended to use the functions 8 | provided by the Adafruit_GFX_AS class in newly developed code. 9 | 10 | To use this library with a driver that is not based on Adafruit_GFX_AS, all you will have to do is to replace "Adafrui_GFX" with "Adafruit_GFX_AS" 11 | in your driver code. This will usually be three places: The #include-directive, the base-class declaration, and the call to the base-contstructor. 12 | 13 | Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! 14 | 15 | Adafruit_GFX Written by Limor Fried/Ladyada for Adafruit Industries. 16 | Adafruit_GFX_AS funtions added by "Bodmer"(?) 17 | BSD license, check license.txt for more information. 18 | All text above must be included in any redistribution. 19 | 20 | To download, click the DOWNLOAD ZIP button, uncompress and rename the uncompressed folder Adafruit_GFX_AS. Confirm that the Adafruit_GFX_AS folder contains Adafruit_GFX_AS.cpp and Adafruit_GFX_AS.h 21 | 22 | Place the Adafruit_GFX_AS library folder your /Libraries/ folder. You may need to create the Libraries subfolder if its your first library. Restart the IDE. 23 | -------------------------------------------------------------------------------- /libraries/Adafruit_GFX_AS/license.txt: -------------------------------------------------------------------------------- 1 | Software License Agreement (BSD License) 2 | 3 | Copyright (c) 2012 Adafruit Industries. All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | - Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | - Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /libraries/Adafruit_ILI9341_STM/README.txt: -------------------------------------------------------------------------------- 1 | It has minor modifications to support STM32. It has been tested with the Maple Mini. 2 | Further modifications to support DMA transfers in the STM32F1xx by Victor Perez 3/17/2015 3 | 4 | This is a library for the Adafruit ILI9341 display products 5 | 6 | This library works with the Adafruit 2.8" Touch Shield V2 (SPI) 7 | ----> http://www.adafruit.com/products/1651 8 | 9 | Check out the links above for our tutorials and wiring diagrams. 10 | These displays use SPI to communicate, 4 or 5 pins are required 11 | to interface (RST is optional). 12 | 13 | Adafruit invests time and resources providing this open source code, 14 | please support Adafruit and open-source hardware by purchasing 15 | products from Adafruit! 16 | 17 | Written by Limor Fried/Ladyada for Adafruit Industries. 18 | MIT license, all text above must be included in any redistribution 19 | 20 | To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder Adafruit_ILI9341. Check that the Adafruit_ILI9341 folder contains Adafruit_ILI9341.cpp and Adafruit_ILI9341. 21 | 22 | Place the Adafruit_ILI9341 library folder your arduinosketchfolder/libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE 23 | 24 | Also requires the Adafruit_GFX library for Arduino. 25 | -------------------------------------------------------------------------------- /libraries/ElmChanFatFs/rtc_stm32f1.h: -------------------------------------------------------------------------------- 1 | #ifndef _RTC_DEFINED 2 | #define _RTC_DEFINED 3 | 4 | #define _RTC_TDIF +9.0 /* JST = UTC+9.0 */ 5 | 6 | #include "ffSTM32F100.h" 7 | 8 | typedef struct { 9 | uint16_t year; /* 1970..2106 */ 10 | uint8_t month; /* 1..12 */ 11 | uint8_t mday; /* 1..31 */ 12 | uint8_t hour; /* 0..23 */ 13 | uint8_t min; /* 0..59 */ 14 | uint8_t sec; /* 0..59 */ 15 | uint8_t wday; /* 0..6 (Sun..Sat) */ 16 | } RTCTIME; 17 | 18 | int rtc_initialize (void); /* Initialize RTC */ 19 | int rtc_gettime (RTCTIME* rtc); /* Get time */ 20 | int rtc_settime (const RTCTIME* rtc); /* Set time */ 21 | int rtc_getutc (uint32_t* utc); /* Get time in UTC */ 22 | int rtc_setutc (uint32_t utc); /* Set time in UTC */ 23 | 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /libraries/USBComposite/AbsMouse.cpp: -------------------------------------------------------------------------------- 1 | #include "USBComposite.h" 2 | 3 | //================================================================================ 4 | //================================================================================ 5 | // Mouse 6 | 7 | void HIDAbsMouse::begin(void){ 8 | } 9 | 10 | void HIDAbsMouse::end(void){ 11 | } 12 | 13 | void HIDAbsMouse::click(uint8_t b) 14 | { 15 | report.wheel = 0; 16 | report.buttons = b; 17 | sendReport(); 18 | report.buttons = 0; 19 | sendReport(); 20 | } 21 | 22 | void HIDAbsMouse::move(int16 x, int16 y, int8 wheel) 23 | { 24 | report.x = x; 25 | report.y = y; 26 | report.wheel = wheel; 27 | 28 | sendReport(); 29 | } 30 | 31 | void HIDAbsMouse::buttons(uint8_t b) 32 | { 33 | if (b != report.buttons) 34 | { 35 | report.wheel = 0; 36 | report.buttons = b; 37 | sendReport(); 38 | } 39 | } 40 | 41 | void HIDAbsMouse::press(uint8_t b) 42 | { 43 | buttons(report.buttons | b); 44 | } 45 | 46 | void HIDAbsMouse::release(uint8_t b) 47 | { 48 | buttons(report.buttons & ~b); 49 | } 50 | 51 | bool HIDAbsMouse::isPressed(uint8_t b) 52 | { 53 | if ((b & report.buttons) != 0) 54 | return true; 55 | return false; 56 | } 57 | -------------------------------------------------------------------------------- /libraries/USBComposite/Consumer.cpp: -------------------------------------------------------------------------------- 1 | #include "USBComposite.h" 2 | 3 | void HIDConsumer::begin(void) {} 4 | void HIDConsumer::end(void) {} 5 | void HIDConsumer::press(uint16_t button) { 6 | report.button = button; 7 | sendReport(); 8 | } 9 | 10 | void HIDConsumer::release() { 11 | report.button = 0; 12 | sendReport(); 13 | } 14 | -------------------------------------------------------------------------------- /libraries/USBComposite/HIDReports.cpp: -------------------------------------------------------------------------------- 1 | #include "USBComposite.h" 2 | 3 | #define REPORT(name, ...) \ 4 | static uint8_t raw_ ## name[] = { __VA_ARGS__ }; \ 5 | static const HIDReportDescriptor desc_ ## name = { raw_ ##name, sizeof(raw_ ##name) }; \ 6 | const HIDReportDescriptor* hidReport ## name = & desc_ ## name; 7 | 8 | REPORT(KeyboardMouseJoystick, HID_MOUSE_REPORT_DESCRIPTOR(), HID_KEYBOARD_REPORT_DESCRIPTOR(), HID_JOYSTICK_REPORT_DESCRIPTOR()); 9 | REPORT(KeyboardMouse, HID_MOUSE_REPORT_DESCRIPTOR(), HID_KEYBOARD_REPORT_DESCRIPTOR()); 10 | REPORT(Keyboard, HID_KEYBOARD_REPORT_DESCRIPTOR()); 11 | REPORT(Mouse, HID_MOUSE_REPORT_DESCRIPTOR()); 12 | REPORT(KeyboardJoystick, HID_KEYBOARD_REPORT_DESCRIPTOR(), HID_JOYSTICK_REPORT_DESCRIPTOR()); 13 | REPORT(Joystick, HID_JOYSTICK_REPORT_DESCRIPTOR()); 14 | REPORT(BootKeyboard, HID_BOOT_KEYBOARD_REPORT_DESCRIPTOR()); 15 | -------------------------------------------------------------------------------- /libraries/USBComposite/Joystick.cpp: -------------------------------------------------------------------------------- 1 | #include "USBComposite.h" 2 | 3 | // This code requires gcc on low-endian devices. 4 | 5 | //================================================================================ 6 | //================================================================================ 7 | // Joystick 8 | 9 | void HIDJoystick::begin(void){ 10 | } 11 | 12 | void HIDJoystick::end(void){ 13 | } 14 | 15 | void HIDJoystick::setManualReportMode(bool mode) { 16 | manualReport = mode; 17 | } 18 | 19 | bool HIDJoystick::getManualReportMode() { 20 | return manualReport; 21 | } 22 | 23 | void HIDJoystick::safeSendReport() { 24 | if (!manualReport) { 25 | sendReport(); 26 | } 27 | } 28 | 29 | void HIDJoystick::button(uint8_t button, bool val){ 30 | uint32_t mask = ((uint32_t)1 << (button-1)); 31 | 32 | if (val) { 33 | joyReport.buttons |= mask; 34 | } else { 35 | joyReport.buttons &= ~mask; 36 | } 37 | 38 | safeSendReport(); 39 | } 40 | 41 | void HIDJoystick::X(uint16_t val){ 42 | if (val > 1023) val = 1023; 43 | joyReport.x = val; 44 | 45 | safeSendReport(); 46 | } 47 | 48 | void HIDJoystick::Y(uint16_t val){ 49 | if (val > 1023) val = 1023; 50 | joyReport.y = val; 51 | 52 | safeSendReport(); 53 | } 54 | 55 | void HIDJoystick::position(uint16_t x, uint16_t y){ 56 | if (x > 1023) x = 1023; 57 | if (y > 1023) y = 1023; 58 | joyReport.x = x; 59 | joyReport.y = y; 60 | 61 | safeSendReport(); 62 | } 63 | 64 | void HIDJoystick::Xrotate(uint16_t val){ 65 | if (val > 1023) val = 1023; 66 | joyReport.rx = val; 67 | 68 | safeSendReport(); 69 | } 70 | 71 | void HIDJoystick::Yrotate(uint16_t val){ 72 | if (val > 1023) val = 1023; 73 | joyReport.ry = val; 74 | 75 | safeSendReport(); 76 | } 77 | 78 | void HIDJoystick::sliderLeft(uint16_t val){ 79 | if (val > 1023) val = 1023; 80 | joyReport.sliderLeft = val; 81 | 82 | safeSendReport(); 83 | } 84 | 85 | void HIDJoystick::sliderRight(uint16_t val){ 86 | if (val > 1023) val = 1023; 87 | joyReport.sliderRight = val; 88 | 89 | safeSendReport(); 90 | } 91 | 92 | void HIDJoystick::slider(uint16_t val){ 93 | if (val > 1023) val = 1023; 94 | joyReport.sliderLeft = val; 95 | joyReport.sliderRight = val; 96 | 97 | safeSendReport(); 98 | } 99 | 100 | void HIDJoystick::hat(int16_t dir){ 101 | uint8_t val; 102 | if (dir < 0) val = 15; 103 | else if (dir < 23) val = 0; 104 | else if (dir < 68) val = 1; 105 | else if (dir < 113) val = 2; 106 | else if (dir < 158) val = 3; 107 | else if (dir < 203) val = 4; 108 | else if (dir < 245) val = 5; 109 | else if (dir < 293) val = 6; 110 | else if (dir < 338) val = 7; 111 | else val = 15; 112 | 113 | joyReport.hat = val; 114 | 115 | safeSendReport(); 116 | } 117 | 118 | -------------------------------------------------------------------------------- /libraries/USBComposite/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011, Peter Barrett 2 | 3 | Permission to use, copy, modify, and/or distribute this software for 4 | any purpose with or without fee is hereby granted, provided that the 5 | above copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 8 | WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 9 | WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR 10 | BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES 11 | OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 12 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 13 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 14 | SOFTWARE. 15 | 16 | ------------ 17 | 18 | The MIT License 19 | 20 | Copyright (c) 2011 LeafLabs LLC. 21 | Parts of composite HID+Serial code taken from https://github.com/libarra111/Arduino_STM32 22 | USB Mass storage code based on Joe Ferner's code: https://github.com/joeferner/maple-usbMassStorage 23 | MIDI code Copyright (c) 2010 Perry Hung, (c) 2013 Magnus Lundin, (c) 2013 Donald Delmar Davis, Suspect Devices, 24 | (c) 2003-2008 Tymm Twillman . 25 | 26 | Permission is hereby granted, free of charge, to any person 27 | obtaining a copy of this software and associated documentation 28 | files (the "Software"), to deal in the Software without 29 | restriction, including without limitation the rights to use, copy, 30 | modify, merge, publish, distribute, sublicense, and/or sell copies 31 | of the Software, and to permit persons to whom the Software is 32 | furnished to do so, subject to the following conditions: 33 | 34 | The above copyright notice and this permission notice shall be included in 35 | all copies or substantial portions of the Software. 36 | 37 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 38 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 39 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 40 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 41 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 42 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 43 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 44 | SOFTWARE. 45 | -------------------------------------------------------------------------------- /libraries/USBComposite/MinSysex.h: -------------------------------------------------------------------------------- 1 | // 2 | // lgl_min_sysex.h 3 | // LibMaple4Midi 4 | // 5 | // Created by Donald D Davis on 4/11/13. 6 | // Copyright (c) 2013 Suspect Devices. All rights reserved. 7 | // 8 | 9 | #ifndef __LGL_MIN_SYSEX_H__ 10 | #define __LGL_MIN_SYSEX_H__ 1 11 | 12 | 13 | #include "MidiSpecs.h" 14 | //#include "LGL.h" 15 | 16 | #define LEAFLABS_MMA_VENDOR_1 0x7D 17 | #define LEAFLABS_MMA_VENDOR_2 0x1E 18 | #define LEAFLABS_MMA_VENDOR_3 0x4F 19 | 20 | // move to LGL.h 21 | #define LGL_RESET_CMD 0x1e 22 | 23 | #define DEFAULT_MIDI_CHANNEL 0x0A 24 | #define DEFAULT_MIDI_DEVICE 0x0A 25 | #define DEFAULT_MIDI_CABLE 0x00 26 | 27 | // eventually all of this should be in a place for settings which can be written to flash. 28 | extern volatile uint8 myMidiChannel; 29 | extern volatile uint8 myMidiDevice; 30 | extern volatile uint8 myMidiCable; 31 | extern volatile uint8 myMidiID[]; 32 | 33 | 34 | void LglSysexHandler(uint32 *midiBufferRx,uint32 *rx_offset,uint32 *n_unread_bytes); 35 | 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /libraries/USBComposite/Mouse.cpp: -------------------------------------------------------------------------------- 1 | #include "USBComposite.h" 2 | 3 | //================================================================================ 4 | //================================================================================ 5 | // Mouse 6 | 7 | void HIDMouse::begin(void){ 8 | } 9 | 10 | void HIDMouse::end(void){ 11 | } 12 | 13 | void HIDMouse::click(uint8_t b) 14 | { 15 | _buttons = b; 16 | move(0,0,0); 17 | _buttons = 0; 18 | move(0,0,0); 19 | } 20 | 21 | void HIDMouse::move(signed char x, signed char y, signed char wheel) 22 | { 23 | reportBuffer[1] = _buttons; 24 | reportBuffer[2] = x; 25 | reportBuffer[3] = y; 26 | reportBuffer[4] = wheel; 27 | 28 | sendReport(); 29 | } 30 | 31 | void HIDMouse::buttons(uint8_t b) 32 | { 33 | if (b != _buttons) 34 | { 35 | _buttons = b; 36 | move(0,0,0); 37 | } 38 | } 39 | 40 | void HIDMouse::press(uint8_t b) 41 | { 42 | buttons(_buttons | b); 43 | } 44 | 45 | void HIDMouse::release(uint8_t b) 46 | { 47 | buttons(_buttons & ~b); 48 | } 49 | 50 | bool HIDMouse::isPressed(uint8_t b) 51 | { 52 | if ((b & _buttons) > 0) 53 | return true; 54 | return false; 55 | } 56 | 57 | -------------------------------------------------------------------------------- /libraries/USBComposite/UPGRADING-TO-0.90.txt: -------------------------------------------------------------------------------- 1 | Version 0.90 of the library has changed the API significantly in order to save flash and RAM. 2 | The main change is that other than USBComposite, all pre-declared object instances have been 3 | removed. 4 | 5 | When upgrading to 0.90 or higher, you will have to make a number of changes to your code. 6 | 7 | 1. Use a single include file instead of USBHID.h, USBMIDI.h, etc.: 8 | #include 9 | 10 | 2. Declare all instances other than USBComposite. This includes instances of plugin classes 11 | like USBHID as well as of HID profiles like HIDKeyboard (which need an instance of USBHID). 12 | 13 | 3. Note that USBHID is now a class (for consistency with other class names) and there is no 14 | USBHID instance. You need to declare an instance, e.g.: 15 | USBHID HID; 16 | and replace calls to USBHID.* with calls to HID.*. 17 | 18 | 4. Replace USBHID_begin_with_serial(...) with HID.begin(CompositeSerial,...) where HID is your 19 | instance of USBHID. -------------------------------------------------------------------------------- /libraries/USBComposite/USBComposite.h: -------------------------------------------------------------------------------- 1 | #ifndef _USBCOMPOSITE_H_ 2 | #define _USBCOMPOSITE_H_ 3 | 4 | #include 5 | #include "Stream.h" 6 | #include "usb_generic.h" 7 | //#include 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #define USB_MAX_PRODUCT_LENGTH 32 16 | #define USB_MAX_MANUFACTURER_LENGTH 32 17 | #define USB_MAX_SERIAL_NUMBER_LENGTH 20 18 | 19 | 20 | // You could use this for a serial number, but you'll be revealing the device ID to the host, 21 | // and hence burning it for cryptographic purposes. 22 | const char* getDeviceIDString(); 23 | 24 | #define USB_COMPOSITE_MAX_PARTS 6 25 | 26 | class USBCompositeDevice; 27 | 28 | #define DEFAULT_SERIAL_STRING "00000000000000000001" 29 | 30 | typedef bool(*USBPartInitializer)(void*); 31 | typedef void(*USBPartStopper)(void*); 32 | 33 | class USBCompositeDevice { 34 | private: 35 | bool enabled = false; 36 | bool haveSerialNumber = false; 37 | uint8_t iManufacturer[USB_DESCRIPTOR_STRING_LEN(USB_MAX_MANUFACTURER_LENGTH)]; 38 | uint8_t iProduct[USB_DESCRIPTOR_STRING_LEN(USB_MAX_PRODUCT_LENGTH)]; 39 | uint8_t iSerialNumber[USB_DESCRIPTOR_STRING_LEN(USB_MAX_SERIAL_NUMBER_LENGTH)]; 40 | uint16 vendorId; 41 | uint16 productId; 42 | USBCompositePart* parts[USB_COMPOSITE_MAX_PARTS]; 43 | USBPartInitializer init[USB_COMPOSITE_MAX_PARTS]; 44 | USBPartStopper stop[USB_COMPOSITE_MAX_PARTS]; 45 | void* plugin[USB_COMPOSITE_MAX_PARTS]; 46 | uint32 numParts; 47 | public: 48 | USBCompositeDevice(void); 49 | void setVendorId(uint16 vendor=0); 50 | void setProductId(uint16 product=0); 51 | void setManufacturerString(const char* manufacturer=NULL); 52 | void setProductString(const char* product=NULL); 53 | void setSerialString(const char* serialNumber=DEFAULT_SERIAL_STRING); 54 | bool begin(void); 55 | void end(void); 56 | void clear(); 57 | bool isReady() { 58 | return enabled && usb_is_connected(USBLIB) && usb_is_configured(USBLIB); 59 | } 60 | bool add(USBCompositePart* part, void* plugin, USBPartInitializer init = NULL, USBPartStopper stop = NULL); 61 | }; 62 | 63 | extern USBCompositeDevice USBComposite; 64 | #endif 65 | -------------------------------------------------------------------------------- /libraries/USBComposite/USBCompositeSerial.h: -------------------------------------------------------------------------------- 1 | #ifndef _COMPOSITE_SERIAL_H_ 2 | #define _COMPOSITE_SERIAL_H_ 3 | 4 | #include "usb_composite_serial.h" 5 | 6 | class USBCompositeSerial : public Stream { 7 | private: 8 | bool enabled = false; 9 | uint32 txPacketSize = 64; 10 | uint32 rxPacketSize = 64; 11 | public: 12 | void begin(long speed=9600); 13 | void end(); 14 | static bool init(USBCompositeSerial* me); 15 | bool registerComponent(); 16 | 17 | operator bool() { return true; } // Roger Clark. This is needed because in cardinfo.ino it does if (!Serial) . It seems to be a work around for the Leonardo that we needed to implement just to be compliant with the API 18 | 19 | virtual int available(void);// Changed to virtual 20 | 21 | uint32 read(uint8 * buf, uint32 len); 22 | // uint8 read(void); 23 | 24 | // Roger Clark. added functions to support Arduino 1.0 API 25 | virtual int peek(void); 26 | virtual int read(void); 27 | int availableForWrite(void); 28 | virtual void flush(void); 29 | 30 | size_t write(uint8); 31 | size_t write(const char *str); 32 | size_t write(const uint8*, uint32); 33 | 34 | uint8 getRTS(); 35 | uint8 getDTR(); 36 | uint8 isConnected(); 37 | uint8 pending(); 38 | 39 | void setRXPacketSize(uint32 size=64) { 40 | rxPacketSize = size; 41 | } 42 | 43 | void setTXPacketSize(uint32 size=64) { 44 | txPacketSize = size; 45 | } 46 | }; 47 | 48 | extern USBCompositeSerial CompositeSerial; 49 | #endif 50 | -------------------------------------------------------------------------------- /libraries/USBComposite/USBMassStorage.cpp: -------------------------------------------------------------------------------- 1 | #include "USBComposite.h" 2 | #include "usb_mass.h" 3 | #include "usb_mass_mal.h" 4 | #include "usb_composite_serial.h" 5 | #include 6 | 7 | void USBMassStorage::begin() { 8 | if(!enabled) { 9 | USBComposite.clear(); 10 | registerComponent(); 11 | USBComposite.begin(); 12 | 13 | enabled = true; 14 | } 15 | } 16 | 17 | void USBMassStorage::end() { 18 | USBComposite.end(); 19 | } 20 | 21 | void USBMassStorage::loop() { 22 | usb_mass_loop(); 23 | } 24 | 25 | bool USBMassStorage::registerComponent() { 26 | return USBComposite.add(&usbMassPart, this); 27 | } 28 | 29 | void USBMassStorage::setDriveData(uint32 driveNumber, uint32 numSectors, MassStorageReader reader, 30 | MassStorageWriter writer, MassStorageStatuser statuser, MassStorageInitializer initializer) { 31 | if (driveNumber >= USB_MASS_MAX_DRIVES) 32 | return; 33 | usb_mass_drives[driveNumber].blockCount = numSectors; 34 | usb_mass_drives[driveNumber].read = reader; 35 | usb_mass_drives[driveNumber].write = writer; 36 | usb_mass_drives[driveNumber].status = statuser; 37 | usb_mass_drives[driveNumber].init = initializer; 38 | usb_mass_drives[driveNumber].format = initializer; 39 | } 40 | 41 | void USBMassStorage::clearDrives() { 42 | memset(usb_mass_drives, 0, sizeof(usb_mass_drives)); 43 | } 44 | 45 | -------------------------------------------------------------------------------- /libraries/USBComposite/USBMassStorage.h: -------------------------------------------------------------------------------- 1 | #ifndef USBMASSSTORAGE_H 2 | #define USBMASSSTORAGE_H 3 | 4 | #include 5 | #include "USBComposite.h" 6 | #include "usb_generic.h" 7 | #include "usb_mass_mal.h" 8 | 9 | class USBMassStorage { 10 | private: 11 | bool enabled = false; 12 | public: 13 | void begin(); 14 | void end(); 15 | void loop(); 16 | void clearDrives(void); 17 | bool registerComponent(); 18 | void setDriveData(uint32 driveNumber, uint32 numSectors, MassStorageReader reader, 19 | MassStorageWriter writer = NULL, MassStorageStatuser = NULL, MassStorageInitializer = NULL); 20 | }; 21 | 22 | #endif /* USBMASSSTORAGE_H */ 23 | 24 | -------------------------------------------------------------------------------- /libraries/USBComposite/USBXBox360.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011, Peter Barrett 2 | ** 3 | ** Permission to use, copy, modify, and/or distribute this software for 4 | ** any purpose with or without fee is hereby granted, provided that the 5 | ** above copyright notice and this permission notice appear in all copies. 6 | ** 7 | ** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 8 | ** WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 9 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR 10 | ** BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES 11 | ** OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 12 | ** WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 13 | ** ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 14 | ** SOFTWARE. 15 | */ 16 | 17 | #ifndef _USBXBox360_H 18 | #define _USBXBox360_H 19 | 20 | #include 21 | #include 22 | #include "USBComposite.h" 23 | #include "usb_generic.h" 24 | 25 | class USBXBox360 { 26 | private: 27 | uint8_t xbox360_Report[20] = {0,0x14};// 3,0,0,0,0,0x0F,0x20,0x80,0x00,0x02,0x08,0x20,0x80}; 28 | bool manualReport = false; 29 | bool enabled; 30 | void safeSendReport(void); 31 | void sendReport(void); 32 | bool wait(void); 33 | public: 34 | void send(void); 35 | static bool init(void* ignore); 36 | bool registerComponent(); 37 | void stop(); 38 | void setManualReportMode(bool manualReport); 39 | bool getManualReportMode(); 40 | void begin(void); 41 | void end(void); 42 | void button(uint8_t button, bool val); 43 | void X(int16_t val); 44 | void Y(int16_t val); 45 | void position(int16_t x, int16_t y); 46 | void positionRight(int16_t x, int16_t y); 47 | void XRight(int16_t val); 48 | void YRight(int16_t val); 49 | void sliderLeft(uint8_t val); 50 | void sliderRight(uint8_t val); 51 | void hat(int16_t dir); 52 | void setLEDCallback(void (*callback)(uint8 pattern)); 53 | void setRumbleCallback(void (*callback)(uint8 left, uint8 right)); 54 | }; 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /libraries/USBComposite/examples/BootKeyboard/BootKeyboard.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | USBHID HID; 4 | HIDKeyboard BootKeyboard(HID, 0); 5 | 6 | void setup() 7 | { 8 | HID.begin(HID_BOOT_KEYBOARD); 9 | BootKeyboard.begin(); // needed just in case you need LED support 10 | } 11 | 12 | void loop() 13 | { 14 | BootKeyboard.press(KEY_F12); 15 | delay(100); 16 | BootKeyboard.release(KEY_F12); 17 | delay(1000); 18 | } 19 | -------------------------------------------------------------------------------- /libraries/USBComposite/examples/absmouse/absmouse.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | const uint8_t reportDescription[] = { 4 | HID_ABS_MOUSE_REPORT_DESCRIPTOR(HID_MOUSE_REPORT_ID) 5 | }; 6 | 7 | USBHID HID; 8 | HIDAbsMouse mouse(HID); 9 | 10 | void setup(){ 11 | HID.begin(reportDescription, sizeof(reportDescription)); 12 | delay(1000); 13 | mouse.move(0,0); 14 | delay(1000); 15 | mouse.press(MOUSE_LEFT); 16 | mouse.move(500,500); 17 | mouse.release(MOUSE_ALL); 18 | mouse.click(MOUSE_RIGHT); 19 | } 20 | 21 | void loop(){ 22 | mouse.move(0,0); 23 | delay(1000); 24 | mouse.move(16384,16384); 25 | delay(1000); 26 | } 27 | -------------------------------------------------------------------------------- /libraries/USBComposite/examples/consumer/consumer.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | USBHID HID; 4 | 5 | const uint8_t reportDescription[] = { 6 | HID_CONSUMER_REPORT_DESCRIPTOR() 7 | }; 8 | 9 | HIDConsumer Consumer(HID); 10 | 11 | void setup(){ 12 | HID.begin(reportDescription, sizeof(reportDescription)); 13 | } 14 | 15 | void loop() { 16 | Consumer.press(HIDConsumer::BRIGHTNESS_DOWN); 17 | Consumer.release(); 18 | delay(500); 19 | } 20 | 21 | -------------------------------------------------------------------------------- /libraries/USBComposite/examples/jigglemouse/jigglemouse.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define LED PB12 4 | 5 | USBHID HID; 6 | HIDMouse Mouse(HID); 7 | 8 | void setup(){ 9 | pinMode(LED,OUTPUT); 10 | digitalWrite(LED,1); 11 | HID.begin(HID_MOUSE); 12 | delay(1000); 13 | } 14 | 15 | void loop(){ 16 | digitalWrite(LED,0); 17 | Mouse.move(4,0); 18 | delay(500); 19 | digitalWrite(LED,1); 20 | delay(30000); 21 | digitalWrite(LED,0); 22 | Mouse.move(-4,0); 23 | delay(500); 24 | digitalWrite(LED,1); 25 | delay(30000); 26 | } 27 | -------------------------------------------------------------------------------- /libraries/USBComposite/examples/keyboardMouse/keyboardMouse.ino: -------------------------------------------------------------------------------- 1 | #include 2 | /* 3 | * This example types which cardinal direction the mouse will be moved 4 | * and then moves the mouse in that direction. If the mouse doesn't recenter 5 | * at the end, it is probably due to mouse acceleration 6 | */ 7 | 8 | USBHID HID; 9 | HIDKeyboard Keyboard(HID); 10 | HIDMouse Mouse(HID); 11 | 12 | void setup() { 13 | HID.begin(HID_KEYBOARD_MOUSE); 14 | delay(2000); 15 | } 16 | 17 | void loop() { 18 | Keyboard.println("UP"); 19 | Mouse.move(0,-127); 20 | delay(1500); 21 | 22 | Keyboard.println("DOWN"); 23 | Mouse.move(0,127); 24 | Mouse.move(0,127); //Movement cannot be greater than a byte 25 | delay(1500); 26 | 27 | Keyboard.println("LEFT"); 28 | Mouse.move(-127,-127); 29 | delay(1500); 30 | 31 | Keyboard.println("RIGHT"); 32 | Mouse.move(127,0); 33 | Mouse.move(127,0); //Movement cannot be greater than a byte 34 | delay(1500); 35 | 36 | Keyboard.println("CENTER"); 37 | Mouse.move(-127,0); 38 | delay(500); 39 | 40 | delay(5000); 41 | } 42 | -------------------------------------------------------------------------------- /libraries/USBComposite/examples/keyboardwithleds/keyboardwithleds.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | USBHID HID; 4 | HIDKeyboard Keyboard(HID); 5 | USBCompositeSerial CompositeSerial; 6 | 7 | void setup() { 8 | HID.begin(CompositeSerial, HID_KEYBOARD); 9 | Keyboard.begin(); // needed for LED support 10 | delay(1000); 11 | } 12 | 13 | void loop() { 14 | CompositeSerial.println(Keyboard.getLEDs()); 15 | } 16 | 17 | 18 | -------------------------------------------------------------------------------- /libraries/USBComposite/examples/mass/mass.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | USBMassStorage MassStorage; 4 | USBCompositeSerial CompositeSerial; 5 | 6 | #define PRODUCT_ID 0x29 7 | 8 | #include "image.h" 9 | 10 | bool write(const uint8_t *writebuff, uint32_t memoryOffset, uint16_t transferLength) { 11 | memcpy(image+SCSI_BLOCK_SIZE*memoryOffset, writebuff, SCSI_BLOCK_SIZE*transferLength); 12 | 13 | return true; 14 | } 15 | 16 | bool read(uint8_t *readbuff, uint32_t memoryOffset, uint16_t transferLength) { 17 | memcpy(readbuff, image+SCSI_BLOCK_SIZE*memoryOffset, SCSI_BLOCK_SIZE*transferLength); 18 | 19 | return true; 20 | } 21 | 22 | char hexNibble(uint8 x) { 23 | return x < 10 ? x + '0' : x + 'A' - 10; 24 | } 25 | 26 | char* format16(uint16 c) { 27 | static char str[6]; 28 | str[5] = 0; 29 | char *p = str+5; 30 | do { 31 | *--p = (c % 10) + '0'; 32 | c /= 10; 33 | } while(c); 34 | return p; 35 | } 36 | 37 | void dumpDrive() { 38 | char hex[7] = "0x11,"; 39 | CompositeSerial.print("uint8 image["); 40 | CompositeSerial.print(format16(sizeof(image))); 41 | CompositeSerial.println("] = {"); 42 | int last; 43 | for (last=sizeof(image)-1;last>=0 && image[last] == 0;last--); 44 | if (last<0) last=0; 45 | 46 | for (int i=0; i<=last; i++) { 47 | if (i && i % 16 == 0) 48 | CompositeSerial.println(""); 49 | hex[2] = hexNibble(image[i]>>4); 50 | hex[3] = hexNibble(image[i]&0xF); 51 | CompositeSerial.print(hex); 52 | } 53 | CompositeSerial.println("\n};\n"); 54 | } 55 | 56 | void setup() { 57 | USBComposite.setProductId(PRODUCT_ID); 58 | MassStorage.setDriveData(0, sizeof(image)/SCSI_BLOCK_SIZE, read, write); 59 | MassStorage.registerComponent(); 60 | CompositeSerial.registerComponent(); 61 | USBComposite.begin(); 62 | delay(2000); 63 | } 64 | 65 | void loop() { 66 | MassStorage.loop(); 67 | if (CompositeSerial.available() && 'd' == CompositeSerial.read()) { 68 | dumpDrive(); 69 | } 70 | } 71 | 72 | -------------------------------------------------------------------------------- /libraries/USBComposite/examples/midiin/midiin.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define SPEAKER_PIN PA0 4 | 5 | class myMidi : public USBMIDI { 6 | virtual void handleNoteOff(unsigned int channel, unsigned int note, unsigned int velocity) { 7 | noTone(SPEAKER_PIN); 8 | } 9 | virtual void handleNoteOn(unsigned int channel, unsigned int note, unsigned int velocity) { 10 | tone(SPEAKER_PIN, (midiNoteFrequency_10ths[note]+5)/10); 11 | } 12 | 13 | }; 14 | 15 | myMidi midi; 16 | USBCompositeSerial CompositeSerial; 17 | 18 | void setup() { 19 | USBComposite.setProductId(0x0030); 20 | pinMode(SPEAKER_PIN, OUTPUT); 21 | midi.registerComponent(); 22 | CompositeSerial.registerComponent(); 23 | USBComposite.begin(); 24 | } 25 | 26 | void loop() { 27 | midi.poll(); 28 | } 29 | 30 | -------------------------------------------------------------------------------- /libraries/USBComposite/examples/midiout/midiout.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | const uint8_t notes[] = {60, 62, 64, 65, 67, 69, 71, 72, 61, 63, 66, 68, 70}; 4 | const int numNotes = sizeof(notes)/sizeof(*notes); 5 | 6 | USBMIDI midi; 7 | 8 | void setup() { 9 | USBComposite.setProductId(0x0031); 10 | midi.begin(); 11 | delay(1000); 12 | } 13 | 14 | void loop() { 15 | for (int i=0;i 2 | 3 | #define TXSIZE 256 4 | #define RXSIZE 300 5 | 6 | USBHID HID; 7 | HIDRaw raw(HID); 8 | uint8 buf[RXSIZE]; 9 | 10 | const uint8_t reportDescription[] = { 11 | HID_RAW_REPORT_DESCRIPTOR(TXSIZE,RXSIZE) 12 | }; 13 | 14 | void setup(){ 15 | HID.begin(reportDescription, sizeof(reportDescription)); 16 | raw.begin(); 17 | } 18 | 19 | void loop() { 20 | if (raw.getOutput(buf)) { 21 | for (int i=0;i 5 | #include 6 | #include "SdFat.h" 7 | 8 | USBMassStorage MassStorage; 9 | USBCompositeSerial CompositeSerial; 10 | 11 | #define LED_PIN PB12 12 | #define PRODUCT_ID 0x29 13 | 14 | SdFatEX sd; 15 | const uint32_t speed = SPI_CLOCK_DIV2 ; 16 | const uint8_t SD_CHIP_SELECT = SS; 17 | bool enabled = false; 18 | uint32 cardSize; 19 | 20 | bool write(const uint8_t *writebuff, uint32_t startSector, uint16_t numSectors) { 21 | return sd.card()->writeBlocks(startSector, writebuff, numSectors); 22 | } 23 | 24 | bool read(uint8_t *readbuff, uint32_t startSector, uint16_t numSectors) { 25 | return sd.card()->readBlocks(startSector, readbuff, numSectors); 26 | } 27 | 28 | void setup() { 29 | USBComposite.setProductId(PRODUCT_ID); 30 | pinMode(LED_PIN,OUTPUT); 31 | digitalWrite(LED_PIN,1); 32 | } 33 | 34 | void initReader() { 35 | digitalWrite(LED_PIN,0); 36 | cardSize = sd.card()->cardSize(); 37 | MassStorage.setDriveData(0, cardSize, read, write); 38 | MassStorage.registerComponent(); 39 | CompositeSerial.registerComponent(); 40 | USBComposite.begin(); 41 | enabled=true; 42 | } 43 | 44 | void loop() { 45 | if (!enabled) { 46 | if (sd.begin(SD_CHIP_SELECT)) { 47 | initReader(); 48 | } 49 | else { 50 | delay(50); 51 | } 52 | } 53 | else { 54 | MassStorage.loop(); 55 | } 56 | } 57 | 58 | -------------------------------------------------------------------------------- /libraries/USBComposite/examples/simplejoystick/simplejoystick.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | USBHID HID; 4 | HIDJoystick Joystick(HID); 5 | 6 | void setup() { 7 | HID.begin(HID_JOYSTICK); 8 | } 9 | 10 | void loop() { 11 | Joystick.X(0); 12 | delay(500); 13 | Joystick.X(1023); 14 | delay(500); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /libraries/USBComposite/examples/simplekeyboard/simplekeyboard.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | USBHID HID; 4 | HIDKeyboard Keyboard(HID); 5 | 6 | void setup() { 7 | HID.begin(HID_KEYBOARD); 8 | Keyboard.begin(); // useful to detect host capslock state and LEDs 9 | delay(1000); 10 | } 11 | 12 | void loop() { 13 | Keyboard.println("Hello world"); 14 | delay(10000); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /libraries/USBComposite/examples/softjoystick/send.py: -------------------------------------------------------------------------------- 1 | from pywinusb import hid 2 | from time import sleep 3 | 4 | REPORT_ID = 20 5 | HID_REPORT_FEATURE = 3 6 | 7 | device = hid.HidDeviceFilter(vendor_id = 0x1EAF).get_devices()[0] # , product_id = 0x0024 8 | print(device) 9 | device.open() 10 | 11 | """ 12 | uint8_t reportID; 13 | uint32_t buttons; 14 | unsigned hat:4; 15 | unsigned x:10; 16 | unsigned y:10; 17 | unsigned rx:10; 18 | unsigned ry:10; 19 | unsigned sliderLeft:10; 20 | unsigned sliderRight:10; 21 | """ 22 | 23 | def toBits(n,bits): 24 | return tuple((n>>i)&1 for i in range(bits)) 25 | 26 | def getByteFromBits(bits,n): 27 | out = 0 28 | for i in range(8): 29 | out += bits[8*n+i] << i 30 | return out 31 | 32 | def joystickData(reportID=REPORT_ID, buttons=0, hat=15, x=512, y=512, rx=512, ry=512, sliderLeft=512, sliderRight=512): 33 | joyData = ( toBits(reportID,8) + toBits(buttons,32) + toBits(hat,4) + toBits(x,10) + toBits(y,10) + 34 | toBits(rx,10) + toBits(ry,10) + toBits(sliderLeft,10) + toBits(sliderRight,10) ) 35 | out = [getByteFromBits(joyData,n) for n in range(13)] 36 | print(out) 37 | return out 38 | 39 | myReport = None 40 | 41 | for report in device.find_feature_reports(): 42 | if report.report_id == REPORT_ID and report.report_type == "Feature": 43 | myReport = report 44 | break 45 | if myReport is None: 46 | for report in device.find_output_reports(): 47 | if report.report_id == REPORT_ID and report.report_type == "Output": 48 | myReport = report 49 | break 50 | 51 | assert myReport is not None 52 | 53 | while True: 54 | myReport.set_raw_data(joystickData(buttons=7,x=0,y=0)) 55 | 56 | myReport.send() 57 | sleep(0.5) 58 | myReport.set_raw_data(joystickData(buttons=0,x=1023,y=1023)) 59 | myReport.send() 60 | sleep(0.5) 61 | -------------------------------------------------------------------------------- /libraries/USBComposite/examples/softjoystick/softjoystick.ino: -------------------------------------------------------------------------------- 1 | // This is a silly project: you send a feature 2 | // report from the PC, and it becomes a joystick setting. 3 | // I guess it's not completely useless as it lets you 4 | // get vJoy functionality without special vJoy drivers. 5 | 6 | #include 7 | 8 | #define DATA_SIZE (sizeof(JoystickReport_t)-1) 9 | 10 | USBHID HID; 11 | 12 | class HIDJoystickRawData : public HIDJoystick { 13 | private: 14 | uint8_t featureData[HID_BUFFER_ALLOCATE_SIZE(DATA_SIZE,1)]; 15 | HIDBuffer_t fb { featureData, HID_BUFFER_SIZE(DATA_SIZE,1), HID_JOYSTICK_REPORT_ID }; 16 | USBHID HID; 17 | public: 18 | HIDJoystickRawData(USBHID& _HID, uint8_t reportID=HID_JOYSTICK_REPORT_ID) : HIDJoystick(HID, reportID) {} 19 | 20 | void begin() { 21 | HID.setFeatureBuffers(&fb, 1); 22 | } 23 | 24 | void setRawData(JoystickReport_t* p) { 25 | joyReport = *p; 26 | send(); 27 | } 28 | }; 29 | 30 | HIDJoystickRawData joy(HID); 31 | JoystickReport_t report = {HID_JOYSTICK_REPORT_ID}; 32 | 33 | const uint8_t reportDescription[] = { 34 | HID_JOYSTICK_REPORT_DESCRIPTOR(HID_JOYSTICK_REPORT_ID, 35 | HID_FEATURE_REPORT_DESCRIPTOR(DATA_SIZE)) 36 | }; 37 | 38 | void setup() { 39 | HID.begin(reportDescription, sizeof(reportDescription)); 40 | joy.begin(); 41 | } 42 | 43 | void loop() { 44 | if (joy.getFeature(1+(uint8_t*)&report)) { 45 | joy.setRawData(&report); 46 | } 47 | 48 | delay(5); 49 | } 50 | 51 | -------------------------------------------------------------------------------- /libraries/USBComposite/examples/twojoysticks/twojoysticks.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | const uint8_t reportDescription[] = { 4 | HID_MOUSE_REPORT_DESCRIPTOR(), 5 | HID_KEYBOARD_REPORT_DESCRIPTOR(), 6 | HID_JOYSTICK_REPORT_DESCRIPTOR(), 7 | HID_JOYSTICK_REPORT_DESCRIPTOR(HID_JOYSTICK_REPORT_ID+1), 8 | }; 9 | 10 | USBCompositeSerial CompositeSerial; 11 | USBHID HID; 12 | HIDJoystick Joystick(HID); 13 | HIDJoystick Joystick2(HID, HID_JOYSTICK_REPORT_ID+1); 14 | 15 | void setup(){ 16 | HID.begin(CompositeSerial, reportDescription, sizeof(reportDescription)); 17 | Joystick.setManualReportMode(true); 18 | Joystick2.setManualReportMode(true); 19 | } 20 | 21 | void loop(){ 22 | Joystick.X(0); 23 | Joystick.Y(0); 24 | Joystick.sliderRight(1023); 25 | Joystick.send(); 26 | CompositeSerial.println("J1:0,0,1023"); 27 | delay(400); 28 | Joystick.X(1023); 29 | Joystick.Y(1023); 30 | Joystick.sliderRight(0); 31 | Joystick.send(); 32 | CompositeSerial.println("J1:1023,1023,0"); 33 | delay(400); 34 | Joystick2.X(0); 35 | Joystick2.Y(0); 36 | Joystick2.sliderRight(1023); 37 | Joystick2.send(); 38 | CompositeSerial.println("J2:0,0,1023"); 39 | delay(400); 40 | Joystick2.X(1023); 41 | Joystick2.Y(1023); 42 | Joystick2.sliderRight(0); 43 | Joystick2.send(); 44 | CompositeSerial.println("J2:1023,1023,0"); 45 | delay(400); 46 | } 47 | 48 | -------------------------------------------------------------------------------- /libraries/USBComposite/examples/x360/x360.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | USBXBox360 XBox360; 4 | 5 | void setup() { 6 | XBox360.begin(); 7 | delay(1000); 8 | } 9 | 10 | void loop() { 11 | XBox360.X(-32767); 12 | XBox360.Y(-32767); 13 | delay(1000); 14 | XBox360.X(32767); 15 | XBox360.Y(32767); 16 | delay(1000); 17 | } 18 | -------------------------------------------------------------------------------- /libraries/USBComposite/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map USBComposite 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | USBComposite KEYWORD1 10 | USBHID KEYWORD1 11 | USBMIDI KEYWORD1 12 | USBXBox360 KEYWORD1 13 | USBMassStorage KEYWORD1 14 | USBCompositeSerial KEYWORD1 15 | HIDMouse KEYWORD1 16 | HIDKeyboard KEYWORD1 17 | 18 | ####################################### 19 | # Methods and Functions (KEYWORD2) 20 | ####################################### 21 | begin KEYWORD2 22 | end KEYWORD2 23 | XRight KEYWORD2 24 | YRight KEYWORD2 25 | Yrotate KEYWORD2 26 | Y KEYWORD2 27 | Xrotate KEYWORD2 28 | X KEYWORD2 29 | sliderLeft KEYWORD2 30 | sliderRight KEYWORD2 31 | button KEYWORD2 32 | hat KEYWORD2 33 | setManualReportMode KEYWORD2 34 | getManualReportMode KEYWORD2 35 | release KEYWORD2 36 | press KEYWORD2 37 | releaseAll KEYWORD2 38 | move KEYWORD2 39 | send KEYWORD2 40 | click KEYWORD2 41 | registerComponent KEYWORD2 42 | 43 | ####################################### 44 | # Constants (LITERAL1) 45 | ####################################### 46 | USB_HID_MOUSE LITERAL1 47 | USB_HID_KEYBOARD LITERAL1 48 | USB_HID_JOYSTICK LITERAL1 49 | USB_HID_KEYBOARD_MOUSE LITERAL1 50 | USB_HID_KEYBOARD_MOUSE_JOYSTICK LITERAL1 51 | USB_HID_KEYBOARD_JOYSTICK LITERAL1 52 | KEY_LEFT_CTRL LITERAL1 53 | KEY_LEFT_SHIFT LITERAL1 54 | KEY_LEFT_ALT LITERAL1 55 | KEY_LEFT_GUI LITERAL1 56 | KEY_RIGHT_CTRL LITERAL1 57 | KEY_RIGHT_SHIFT LITERAL1 58 | KEY_RIGHT_ALT LITERAL1 59 | KEY_RIGHT_GUI LITERAL1 60 | KEY_UP_ARROW LITERAL1 61 | KEY_DOWN_ARROW LITERAL1 62 | KEY_LEFT_ARROW LITERAL1 63 | KEY_RIGHT_ARROW LITERAL1 64 | KEY_BACKSPACE LITERAL1 65 | KEY_TAB LITERAL1 66 | KEY_RETURN LITERAL1 67 | KEY_ESC LITERAL1 68 | KEY_INSERT LITERAL1 69 | KEY_DELETE LITERAL1 70 | KEY_PAGE_UP LITERAL1 71 | KEY_PAGE_DOWN LITERAL1 72 | KEY_HOME LITERAL1 73 | KEY_END LITERAL1 74 | KEY_CAPS_LOCK LITERAL1 75 | KEY_F1 LITERAL1 76 | KEY_F2 LITERAL1 77 | KEY_F3 LITERAL1 78 | KEY_F4 LITERAL1 79 | KEY_F5 LITERAL1 80 | KEY_F6 LITERAL1 81 | KEY_F7 LITERAL1 82 | KEY_F8 LITERAL1 83 | KEY_F9 LITERAL1 84 | KEY_F10 LITERAL1 85 | KEY_F11 LITERAL1 86 | KEY_F12 LITERAL1 87 | MOUSE_LEFT LITERAL1 88 | MOUSE_MIDDLE LITERAL1 89 | MOUSE_RIGHT LITERAL1 90 | MOUSE_ALL LITERAL1 91 | -------------------------------------------------------------------------------- /libraries/USBComposite/library.properties: -------------------------------------------------------------------------------- 1 | name=USBComposite for STM32F1 2 | version=0.91 3 | author=Various 4 | email=arpruss@gmail.com 5 | sentence=USB HID / MIDI / mass storage library for STM32F1 6 | paragraph=USB HID / MIDI / mass storage library for STM32F1 7 | url=https://github.com/arpruss/USBHID_stm32f1 8 | architectures=STM32F1 9 | maintainer=arpruss@gmail.com 10 | category=Communication -------------------------------------------------------------------------------- /libraries/USBComposite/scripts/midi_table.py: -------------------------------------------------------------------------------- 1 | from math import * 2 | 3 | def freq(m): 4 | return 27.5 * 2**((m-21)/12.) 5 | 6 | print("static constexpr uint32 midiNoteFrequency_10ths[128] = {", end='') 7 | for i in range(128): 8 | if not i % 16: 9 | print("\n ",end='') 10 | print("%d, " % int(floor(freq(i)*10 + 0.5)), end='') 11 | print("};") -------------------------------------------------------------------------------- /libraries/USBComposite/scripts/send.py: -------------------------------------------------------------------------------- 1 | from pywinusb import hid 2 | from time import sleep 3 | 4 | SIZE=1 5 | REPORT_ID=20 6 | 7 | def sample_handler(data): 8 | print("Raw data: {0}".format(data)) 9 | 10 | device = hid.HidDeviceFilter(vendor_id = 0x1EAF, product_id = 0x0004).get_devices()[0] 11 | print(device) 12 | device.open() 13 | device.set_raw_data_handler(sample_handler) 14 | 15 | n = 0 16 | while True: 17 | """ 18 | print("sending") 19 | out_report=device.find_output_reports()[0] 20 | buffer=[i for i in range(SIZE+1)] 21 | buffer[0]=REPORT_ID # report id 22 | buffer[-1] = n 23 | out_report.set_raw_data(buffer) 24 | if out_report.send(): 25 | n = (n+1)&0xFF 26 | """ 27 | sleep(0.5) 28 | #sleep(0.005) 29 | -------------------------------------------------------------------------------- /libraries/USBComposite/scripts/showhids.py: -------------------------------------------------------------------------------- 1 | from pywinusb import hid 2 | 3 | hid.core.show_hids() 4 | -------------------------------------------------------------------------------- /libraries/USBComposite/usb_generic.h: -------------------------------------------------------------------------------- 1 | #ifndef _USB_GENERIC_H 2 | #define _USB_GENERIC_H 3 | #include 4 | typedef unsigned short u16; 5 | typedef unsigned char u8; 6 | #include 7 | #include 8 | 9 | #define PMA_MEMORY_SIZE 512 10 | #define MAX_USB_DESCRIPTOR_DATA_SIZE 200 11 | 12 | #define USB_EP0_BUFFER_SIZE 0x40 13 | #define USB_EP0_TX_BUFFER_ADDRESS 0x40 14 | #define USB_EP0_RX_BUFFER_ADDRESS (USB_EP0_TX_BUFFER_ADDRESS+USB_EP0_BUFFER_SIZE) 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | extern const usb_descriptor_string usb_generic_default_iManufacturer; 21 | extern const usb_descriptor_string usb_generic_default_iProduct; 22 | 23 | typedef struct USBEndpointInfo { 24 | void (*callback)(void); 25 | uint16 bufferSize; 26 | uint16 type; // bulk, interrupt, etc. 27 | uint8 tx; // 1 if TX, 0 if RX 28 | uint8 address; 29 | uint16 pmaAddress; 30 | } USBEndpointInfo; 31 | 32 | typedef struct USBCompositePart { 33 | uint8 numInterfaces; 34 | uint8 numEndpoints; 35 | uint8 startInterface; 36 | uint8 startEndpoint; 37 | uint16 descriptorSize; 38 | void (*getPartDescriptor)(uint8* out); 39 | void (*usbInit)(void); 40 | void (*usbReset)(void); 41 | void (*usbSetConfiguration)(void); 42 | void (*usbClearFeature)(void); 43 | RESULT (*usbDataSetup)(uint8 request); 44 | RESULT (*usbNoDataSetup)(uint8 request); 45 | USBEndpointInfo* endpoints; 46 | } USBCompositePart; 47 | 48 | void usb_generic_set_info(uint16 idVendor, uint16 idProduct, const uint8* iManufacturer, const uint8* iProduct, const uint8* iSerialNumber); 49 | uint8 usb_generic_set_parts(USBCompositePart** _parts, unsigned _numParts); 50 | void usb_generic_disable(void); 51 | void usb_generic_enable(void); 52 | extern volatile int8 usbGenericTransmitting; 53 | void usb_copy_from_pma(uint8 *buf, uint16 len, uint16 pma_offset); 54 | void usb_copy_to_pma(const uint8 *buf, uint16 len, uint16 pma_offset); 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /libraries/USBComposite/usb_mass_internal.h: -------------------------------------------------------------------------------- 1 | #ifndef _USB_MASS_INTERNAL_H_ 2 | #define _USB_MASS_INTERNAL_H_ 3 | 4 | extern USBEndpointInfo usbMassEndpoints[]; 5 | 6 | #define MASS_ENDPOINT_TX 0 7 | #define MASS_ENDPOINT_RX 1 8 | #define USB_MASS_RX_ENDP (usbMassEndpoints[MASS_ENDPOINT_RX].address) 9 | #define USB_MASS_TX_ENDP (usbMassEndpoints[MASS_ENDPOINT_TX].address) 10 | #define USB_MASS_RX_ADDR (usbMassEndpoints[MASS_ENDPOINT_RX].pmaAddress) 11 | #define USB_MASS_TX_ADDR (usbMassEndpoints[MASS_ENDPOINT_TX].pmaAddress) 12 | #endif -------------------------------------------------------------------------------- /libraries/USBComposite/usb_mass_mal.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "usb_mass_mal.h" 3 | 4 | 5 | #define USB_MASS_MAL_FAIL 1 6 | #define USB_MASS_MAL_SUCCESS 0 7 | 8 | MassStorageDriveInfo usb_mass_drives[USB_MASS_MAX_DRIVES] = { { 0 } }; 9 | 10 | uint16_t usb_mass_mal_init(uint8_t lun) { 11 | if (lun >= USB_MASS_MAX_DRIVES || (usb_mass_drives[lun].init != NULL && ! usb_mass_drives[lun].init())) 12 | return USB_MASS_MAL_FAIL; 13 | else 14 | return USB_MASS_MAL_SUCCESS; 15 | } 16 | 17 | void usb_mass_mal_format(uint8_t lun) { 18 | if (lun < USB_MASS_MAX_DRIVES && usb_mass_drives[lun].format != NULL) 19 | usb_mass_drives[lun].format(); 20 | } 21 | 22 | uint16_t usb_mass_mal_get_status(uint8_t lun) { 23 | if (lun >= USB_MASS_MAX_DRIVES || (usb_mass_drives[lun].status != NULL && ! usb_mass_drives[lun].status())) 24 | return USB_MASS_MAL_FAIL; 25 | else 26 | return USB_MASS_MAL_SUCCESS; 27 | } 28 | 29 | uint16_t usb_mass_mal_read_memory(uint8_t lun, uint8_t *readbuff, uint32_t startSector, uint16_t numSectors) { 30 | if (lun >= USB_MASS_MAX_DRIVES || ! usb_mass_drives[lun].read(readbuff, startSector, numSectors)) 31 | return USB_MASS_MAL_FAIL; 32 | else 33 | return USB_MASS_MAL_SUCCESS; 34 | } 35 | 36 | uint16_t usb_mass_mal_write_memory(uint8_t lun, uint8_t *writebuff, uint32_t startSector, uint16_t numSectors) { 37 | if (lun >= USB_MASS_MAX_DRIVES || usb_mass_drives[lun].write == NULL 38 | || ! usb_mass_drives[lun].write(writebuff, startSector, numSectors)) 39 | return USB_MASS_MAL_FAIL; 40 | else 41 | return USB_MASS_MAL_SUCCESS; 42 | } 43 | -------------------------------------------------------------------------------- /libraries/USBComposite/usb_mass_mal.h: -------------------------------------------------------------------------------- 1 | #ifndef __USB_MASS_MAL_H 2 | #define __USB_MASS_MAL_H 3 | 4 | #include 5 | #include 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define SCSI_BLOCK_SIZE 512 12 | 13 | #define USB_MASS_MAX_DRIVES 2 14 | 15 | typedef bool (*MassStorageWriter)(const uint8_t *writebuff, uint32_t startSector, uint16_t numSectors); 16 | typedef bool (*MassStorageReader)(uint8_t *readbuff, uint32_t startSector, uint16_t numSectors); 17 | typedef bool (*MassStorageStatuser)(void); 18 | typedef bool (*MassStorageInitializer)(void); 19 | typedef bool (*MassStorageFormatter)(void); 20 | 21 | typedef struct { 22 | uint32_t blockCount; 23 | MassStorageReader read; 24 | MassStorageWriter write; 25 | MassStorageStatuser status; 26 | MassStorageInitializer init; 27 | MassStorageFormatter format; 28 | } MassStorageDriveInfo; 29 | 30 | extern MassStorageDriveInfo usb_mass_drives[USB_MASS_MAX_DRIVES]; 31 | uint16_t usb_mass_mal_init(uint8_t lun); 32 | uint16_t usb_mass_mal_get_status(uint8_t lun); 33 | uint16_t usb_mass_mal_read_memory(uint8_t lun, uint8_t *readbuff, uint32_t startSector, uint16_t numSectors); 34 | uint16_t usb_mass_mal_write_memory(uint8_t lun, uint8_t *writebuff, uint32_t startSector, uint16_t numSectors); 35 | void usb_mass_mal_format(uint8_t lun); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /libraries/USBComposite/usb_scsi_data.c: -------------------------------------------------------------------------------- 1 | 2 | #include "usb_scsi.h" 3 | 4 | uint8_t SCSI_page00InquiryData[] = { 5 | 0x00, /* PERIPHERAL QUALIFIER & PERIPHERAL DEVICE TYPE*/ 6 | 0x00, 7 | 0x00, 8 | 0x00, 9 | 0x00 /* Supported Pages 00*/ 10 | }; 11 | 12 | uint8_t SCSI_standardInquiryData[] = { 13 | 0x00, /* Direct Access Device */ 14 | 0x80, /* RMB = 1: Removable Medium */ 15 | 0x02, /* Version: No conformance claim to standard */ 16 | 0x02, 17 | 18 | 36 - 4, /* Additional Length */ 19 | 0x00, /* SCCS = 1: Storage Controller Component */ 20 | 0x00, 21 | 0x00, 22 | /* Vendor Identification */ 23 | 'S', 'T', 'M', ' ', ' ', ' ', ' ', ' ', 24 | /* Product Identification */ 25 | 'S', 'D', ' ', 'F', 'l', 'a', 's', 'h', ' ', 26 | 'D', 'i', 's', 'k', ' ', ' ', ' ', 27 | /* Product Revision Level */ 28 | '1', '.', '0', ' ' 29 | }; 30 | 31 | uint8_t SCSI_standardInquiryData2[] = { 32 | 0x00, /* Direct Access Device */ 33 | 0x80, /* RMB = 1: Removable Medium */ 34 | 0x02, /* Version: No conformance claim to standard */ 35 | 0x02, 36 | 37 | 36 - 4, /* Additional Length */ 38 | 0x00, /* SCCS = 1: Storage Controller Component */ 39 | 0x00, 40 | 0x00, 41 | /* Vendor Identification */ 42 | 'S', 'T', 'M', ' ', ' ', ' ', ' ', ' ', 43 | /* Product Identification */ 44 | 'N', 'A', 'N', 'D', ' ', 'F', 'l', 'a', 's', 'h', ' ', 45 | 'D', 'i', 's', 'k', ' ', 46 | /* Product Revision Level */ 47 | '1', '.', '0', ' ' 48 | }; 49 | 50 | uint8_t SCSI_senseData[] = { 51 | 0x70, /*RespCode*/ 52 | 0x00, /*SegmentNumber*/ 53 | SCSI_NO_SENSE, /* Sens_Key*/ 54 | 0x00, 55 | 0x00, 56 | 0x00, 57 | 0x00, /*Information*/ 58 | 0x0A, /*AdditionalSenseLength*/ 59 | 0x00, 60 | 0x00, 61 | 0x00, 62 | 0x00, /*CmdInformation*/ 63 | SCSI_NO_SENSE, /*Asc*/ 64 | 0x00, /*ASCQ*/ 65 | 0x00, /*FRUC*/ 66 | 0x00, /*TBD*/ 67 | 0x00, 68 | 0x00 /*SenseKeySpecific*/ 69 | }; 70 | 71 | uint8_t SCSI_modeSense6Data[] = { 72 | 0x03, 73 | 0x00, 74 | 0x00, 75 | 0x00, 76 | }; 77 | 78 | uint8_t SCSI_modeSense10Data[] = { 79 | 0x00, 80 | 0x06, 81 | 0x00, 82 | 0x00, 83 | 0x00, 84 | 0x00, 85 | 0x00, 86 | 0x00 87 | }; 88 | 89 | uint8_t SCSI_readFormatCapacityData[] = { 90 | 0x00, 91 | 0x00, 92 | 0x00, 93 | 0x08, /* Capacity List Length */ 94 | 95 | /* Block Count */ 96 | 0, 97 | 0, 98 | 0, 99 | 0, 100 | 101 | /* Block Length */ 102 | 0x02, /* Descriptor Code: Formatted Media */ 103 | 0, 104 | 0, 105 | 0 106 | }; 107 | 108 | uint8_t SCSI_readFormatCapacity10Data[] = { 109 | /* Last Logical Block */ 110 | 0, 111 | 0, 112 | 0, 113 | 0, 114 | 115 | /* Block Length */ 116 | 0, 117 | 0, 118 | 0, 119 | 0 120 | }; -------------------------------------------------------------------------------- /libraries/USBComposite/usb_setup.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * The MIT License 3 | * 4 | * Copyright (c) 2012 LeafLabs, LLC. 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, copy, 10 | * modify, merge, publish, distribute, sublicense, and/or sell copies 11 | * of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 21 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 22 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 23 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | *****************************************************************************/ 26 | 27 | /** 28 | * @file wirish/stm32f1/boards_setup.cpp 29 | * @author Marti Bolivar 30 | * @brief STM32F1 chip setup. 31 | * 32 | * This file controls how init() behaves on the STM32F1. Be very 33 | * careful when changing anything here. Many of these values depend 34 | * upon each other. 35 | */ 36 | 37 | #include "boards_private.h" 38 | #include 39 | #include 40 | 41 | #include 42 | 43 | namespace wirish { 44 | namespace priv { 45 | 46 | void board_setup_usb(void) { 47 | #ifdef GENERIC_BOOTLOADER 48 | //Reset the USB interface on generic boards - developed by Victor PV 49 | gpio_set_mode(PIN_MAP[PA12].gpio_device, PIN_MAP[PA12].gpio_bit, GPIO_OUTPUT_PP); 50 | gpio_write_bit(PIN_MAP[PA12].gpio_device, PIN_MAP[PA12].gpio_bit,0); 51 | 52 | for(volatile unsigned int i=0;i<512;i++);// Only small delay seems to be needed, and USB pins will get configured in Serial.begin 53 | gpio_set_mode(PIN_MAP[PA12].gpio_device, PIN_MAP[PA12].gpio_bit, GPIO_INPUT_FLOATING); 54 | #endif 55 | } 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /libraries/USBComposite/usb_x360.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * The MIT License 3 | * 4 | * Copyright (c) 2011 LeafLabs LLC. 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, copy, 10 | * modify, merge, publish, distribute, sublicense, and/or sell copies 11 | * of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 21 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 22 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 23 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | *****************************************************************************/ 26 | 27 | #ifndef _USB_X360_H 28 | #define _USB_X360_H 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | 39 | /* 40 | * Descriptors, etc. 41 | */ 42 | 43 | //extern const uint8_t hid_report_descriptor[]; 44 | 45 | /* 46 | * Endpoint configuration 47 | */ 48 | 49 | #define USB_X360_TX_EPSIZE 0x20 50 | #define USB_X360_RX_EPSIZE 0x20 51 | 52 | /* 53 | * HID interface 54 | */ 55 | 56 | extern USBCompositePart usbX360Part; 57 | void x360_enable(); 58 | void x360_disable(); 59 | 60 | void x360_putc(char ch); 61 | uint32 x360_tx(const uint8* buf, uint32 len); 62 | uint32 x360_rx(uint8* buf, uint32 len); 63 | uint32 x360_hid_peek(uint8* buf, uint32 len); 64 | uint32 x360_data_available(void); /* in RX buffer */ 65 | uint16 x360_get_pending(void); 66 | uint8 x360_is_transmitting(void); 67 | void x360_set_rx_callback(void (*callback)(const uint8* buffer, uint32 size)); 68 | void x360_set_rumble_callback(void (*callback)(uint8 left, uint8 right)); 69 | void x360_set_led_callback(void (*callback)(uint8 pattern)); 70 | 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /libraries/XPT2046_Touchscreen/XPT2046_Touchscreen.h: -------------------------------------------------------------------------------- 1 | /* Touchscreen library for XPT2046 Touch Controller Chip 2 | * Copyright (c) 2015, Paul Stoffregen, paul@pjrc.com 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice, development funding notice, and this permission 12 | * notice shall be included in all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | #ifndef _XPT2046_Touchscreen_h_ 24 | #define _XPT2046_Touchscreen_h_ 25 | 26 | #include "Arduino.h" 27 | #include 28 | 29 | #if ARDUINO < 10600 30 | #error "Arduino 1.6.0 or later (SPI library) is required" 31 | #endif 32 | 33 | class TS_Point { 34 | public: 35 | TS_Point(void) : x(0), y(0), z(0) {} 36 | TS_Point(int16_t x, int16_t y, int16_t z) : x(x), y(y), z(z) {} 37 | bool operator==(TS_Point p) { return ((p.x == x) && (p.y == y) && (p.z == z)); } 38 | bool operator!=(TS_Point p) { return ((p.x != x) || (p.y != y) || (p.z != z)); } 39 | int16_t x, y, z; 40 | }; 41 | 42 | class XPT2046_Touchscreen { 43 | public: 44 | constexpr XPT2046_Touchscreen(uint8_t cspin, uint8_t tirq=255) 45 | : csPin(cspin), tirqPin(tirq) { } 46 | bool begin(); 47 | TS_Point getPoint(); 48 | bool tirqTouched(); 49 | bool touched(); 50 | void readData(uint16_t *x, uint16_t *y, uint8_t *z); 51 | bool bufferEmpty(); 52 | uint8_t bufferSize() { return 1; } 53 | void setRotation(uint8_t n) { rotation = n % 4; } 54 | // protected: 55 | volatile bool isrWake=true; 56 | 57 | private: 58 | void update(); 59 | uint8_t csPin, tirqPin, rotation=1; 60 | int16_t xraw=0, yraw=0, zraw=0; 61 | uint32_t msraw=0x80000000; 62 | }; 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /libraries/XPT2046_Touchscreen/doc/ILI9431Test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/profdc9/VNA/052f5a064502be30f90212793a7a30f0e40de762/libraries/XPT2046_Touchscreen/doc/ILI9431Test.jpg -------------------------------------------------------------------------------- /libraries/XPT2046_Touchscreen/docs/issue_template.md: -------------------------------------------------------------------------------- 1 | Please use this form only to report code defects or bugs. 2 | 3 | For any question, even questions directly pertaining to this code, post your question on the forums related to the board you are using. 4 | 5 | Arduino: forum.arduino.cc 6 | Teensy: forum.pjrc.com 7 | ESP8266: www.esp8266.com 8 | ESP32: www.esp32.com 9 | Adafruit Feather/Metro/Trinket: forums.adafruit.com 10 | Particle Photon: community.particle.io 11 | 12 | If you are experiencing trouble but not certain of the cause, or need help using this code, ask on the appropriate forum. This is not the place to ask for support or help, even directly related to this code. Only use this form you are certain you have discovered a defect in this code! 13 | 14 | Please verify the problem occurs when using the very latest version, using the newest version of Arduino and any other related software. 15 | 16 | 17 | ----------------------------- Remove above ----------------------------- 18 | 19 | 20 | 21 | ### Description 22 | 23 | Describe your problem. 24 | 25 | 26 | 27 | ### Steps To Reproduce Problem 28 | 29 | Please give detailed instructions needed for anyone to attempt to reproduce the problem. 30 | 31 | 32 | 33 | ### Hardware & Software 34 | 35 | Board 36 | Shields / modules used 37 | Arduino IDE version 38 | Teensyduino version (if using Teensy) 39 | Version info & package name (from Tools > Boards > Board Manager) 40 | Operating system & version 41 | Any other software or hardware? 42 | 43 | 44 | ### Arduino Sketch 45 | 46 | ```cpp 47 | // Change the code below by your sketch (please try to give the smallest code which demonstrates the problem) 48 | #include 49 | 50 | // libraries: give links/details so anyone can compile your code for the same result 51 | 52 | void setup() { 53 | } 54 | 55 | void loop() { 56 | } 57 | ``` 58 | 59 | 60 | ### Errors or Incorrect Output 61 | 62 | If you see any errors or incorrect output, please show it here. Please use copy & paste to give an exact copy of the message. Details matter, so please show (not merely describe) the actual message or error exactly as it appears. 63 | 64 | 65 | -------------------------------------------------------------------------------- /libraries/XPT2046_Touchscreen/examples/ILI9341Test/ILI9341Test.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include // from ILI9341_t3 3 | #include 4 | #include 5 | 6 | #define CS_PIN 8 7 | #define TFT_DC 9 8 | #define TFT_CS 10 9 | // MOSI=11, MISO=12, SCK=13 10 | 11 | XPT2046_Touchscreen ts(CS_PIN); 12 | #define TIRQ_PIN 2 13 | //XPT2046_Touchscreen ts(CS_PIN); // Param 2 - NULL - No interrupts 14 | //XPT2046_Touchscreen ts(CS_PIN, 255); // Param 2 - 255 - No interrupts 15 | //XPT2046_Touchscreen ts(CS_PIN, TIRQ_PIN); // Param 2 - Touch IRQ Pin - interrupt enabled polling 16 | 17 | ILI9341_t3 tft = ILI9341_t3(TFT_CS, TFT_DC); 18 | 19 | void setup() { 20 | Serial.begin(38400); 21 | tft.begin(); 22 | tft.setRotation(1); 23 | tft.fillScreen(ILI9341_BLACK); 24 | ts.begin(); 25 | ts.setRotation(1); 26 | while (!Serial && (millis() <= 1000)); 27 | } 28 | 29 | boolean wastouched = true; 30 | 31 | void loop() { 32 | boolean istouched = ts.touched(); 33 | if (istouched) { 34 | TS_Point p = ts.getPoint(); 35 | if (!wastouched) { 36 | tft.fillScreen(ILI9341_BLACK); 37 | tft.setTextColor(ILI9341_YELLOW); 38 | tft.setFont(Arial_60); 39 | tft.setCursor(60, 80); 40 | tft.print("Touch"); 41 | } 42 | tft.fillRect(100, 150, 140, 60, ILI9341_BLACK); 43 | tft.setTextColor(ILI9341_GREEN); 44 | tft.setFont(Arial_24); 45 | tft.setCursor(100, 150); 46 | tft.print("X = "); 47 | tft.print(p.x); 48 | tft.setCursor(100, 180); 49 | tft.print("Y = "); 50 | tft.print(p.y); 51 | Serial.print(", x = "); 52 | Serial.print(p.x); 53 | Serial.print(", y = "); 54 | Serial.println(p.y); 55 | } else { 56 | if (wastouched) { 57 | tft.fillScreen(ILI9341_BLACK); 58 | tft.setTextColor(ILI9341_RED); 59 | tft.setFont(Arial_48); 60 | tft.setCursor(120, 50); 61 | tft.print("No"); 62 | tft.setCursor(80, 120); 63 | tft.print("Touch"); 64 | } 65 | Serial.println("no touch"); 66 | } 67 | wastouched = istouched; 68 | delay(100); 69 | } 70 | -------------------------------------------------------------------------------- /libraries/XPT2046_Touchscreen/examples/TouchTest/TouchTest.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define CS_PIN 8 5 | // MOSI=11, MISO=12, SCK=13 6 | 7 | //XPT2046_Touchscreen ts(CS_PIN); 8 | #define TIRQ_PIN 2 9 | //XPT2046_Touchscreen ts(CS_PIN); // Param 2 - NULL - No interrupts 10 | //XPT2046_Touchscreen ts(CS_PIN, 255); // Param 2 - 255 - No interrupts 11 | XPT2046_Touchscreen ts(CS_PIN, TIRQ_PIN); // Param 2 - Touch IRQ Pin - interrupt enabled polling 12 | 13 | void setup() { 14 | Serial.begin(38400); 15 | ts.begin(); 16 | ts.setRotation(1); 17 | while (!Serial && (millis() <= 1000)); 18 | } 19 | 20 | void loop() { 21 | if (ts.touched()) { 22 | TS_Point p = ts.getPoint(); 23 | Serial.print("Pressure = "); 24 | Serial.print(p.z); 25 | Serial.print(", x = "); 26 | Serial.print(p.x); 27 | Serial.print(", y = "); 28 | Serial.print(p.y); 29 | delay(30); 30 | Serial.println(); 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /libraries/XPT2046_Touchscreen/examples/TouchTestIRQ/TouchTestIRQ.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define CS_PIN 8 5 | // MOSI=11, MISO=12, SCK=13 6 | 7 | // The TIRQ interrupt signal must be used for this example. 8 | #define TIRQ_PIN 2 9 | XPT2046_Touchscreen ts(CS_PIN, TIRQ_PIN); // Param 2 - Touch IRQ Pin - interrupt enabled polling 10 | 11 | void setup() { 12 | Serial.begin(38400); 13 | ts.begin(); 14 | ts.setRotation(1); 15 | while (!Serial && (millis() <= 1000)); 16 | } 17 | 18 | void loop() { 19 | 20 | // tirqTouched() is much faster than touched(). For projects where other SPI chips 21 | // or other time sensitive tasks are added to loop(), using tirqTouched() can greatly 22 | // reduce the delay added to loop() when the screen has not been touched. 23 | if (ts.tirqTouched()) { 24 | if (ts.touched()) { 25 | TS_Point p = ts.getPoint(); 26 | Serial.print("Pressure = "); 27 | Serial.print(p.z); 28 | Serial.print(", x = "); 29 | Serial.print(p.x); 30 | Serial.print(", y = "); 31 | Serial.print(p.y); 32 | delay(30); 33 | Serial.println(); 34 | } 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /libraries/XPT2046_Touchscreen/keywords.txt: -------------------------------------------------------------------------------- 1 | XPT2046_Touchscreen KEYWORD1 2 | TS_Point KEYWORD1 3 | getPoint KEYWORD2 4 | touched KEYWORD2 5 | readData KEYWORD2 6 | bufferEmpty KEYWORD2 7 | bufferSize KEYWORD2 8 | setRotation KEYWORD2 9 | -------------------------------------------------------------------------------- /libraries/XPT2046_Touchscreen/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "XPT2046_Touchscreen", 3 | "keywords": "display, tft, lcd, graphics, spi, touchscreen", 4 | "description": "Touchscreens using the XPT2046 controller chip. Many very low cost color TFT displays with touch screens have this chip.", 5 | "exclude": "doc", 6 | "repository": 7 | { 8 | "type": "git", 9 | "url": "https://github.com/PaulStoffregen/XPT2046_Touchscreen.git" 10 | }, 11 | "frameworks": "arduino", 12 | "platforms": "*" 13 | } 14 | -------------------------------------------------------------------------------- /libraries/XPT2046_Touchscreen/library.properties: -------------------------------------------------------------------------------- 1 | name=XPT2046_Touchscreen 2 | version=1.2 3 | author=Paul Stoffregen 4 | maintainer=Paul Stoffregen 5 | sentence=Touchscreens using the XPT2046 controller chip. 6 | paragraph=Many very low cost color TFT displays with touch screens have this chip. 7 | category=Display 8 | url=https://github.com/PaulStoffregen/XPT2046_Touchscreen 9 | architectures=* 10 | 11 | --------------------------------------------------------------------------------