Difference between revisions of "Gpibgrok"
m (Copy edited (e.g. ref. https://en.wikipedia.org/wiki/Transceiver and https://en.wikipedia.org/wiki/Digi-Key).) |
|||
Line 18: | Line 18: | ||
* STM32L0 ARM Cortex M0 | * STM32L0 ARM Cortex M0 | ||
** Built-in FS USB with | ** Built-in FS USB with crystal-less operation | ||
** Compatible with libopencm3 | ** Compatible with libopencm3 | ||
** 32 pin LQFP keeps size low and assembly easy | ** 32 pin LQFP keeps size low and assembly easy | ||
* Specialty | * Specialty transceivers | ||
** TI still makes the SN75160 (data) and SN75161 (handshake) | ** TI still makes the SN75160 (data) and SN75161 (handshake) | ||
** High current drive required for logic lines according to GPIB standard | ** High current drive required for logic lines according to GPIB standard | ||
** Directional bundling of pins based on protocol | ** Directional bundling of pins based on protocol simplifies firmware | ||
* | * Two-layer PCB to keep cost low | ||
* Designed to fit in L-COM housing for CIB24S GPIB connector | * Designed to fit in L-COM housing for CIB24S GPIB connector | ||
** Saves effort on custom enclosure | ** Saves effort on custom enclosure | ||
Line 34: | Line 34: | ||
This is more of a TODO list at the moment: | This is more of a TODO list at the moment: | ||
* Start with libopencm3 | * Start with libopencm3 | ||
** Add new class for | ** Add new class for USBTMC | ||
* GPIB | * GPIB | ||
** Implement functions | ** Implement functions | ||
Line 48: | Line 48: | ||
** Use the DFU bootloader in libopencm3 | ** Use the DFU bootloader in libopencm3 | ||
** Modify to check register for boot flag instead of hardware pin | ** Modify to check register for boot flag instead of hardware pin | ||
** Some special command in | ** Some special command in USBTMC can set to bootloader mode and reset processor, then when DFU is done, set flag back and boot to main | ||
== Components == | == Components == | ||
Line 55: | Line 55: | ||
* Right-angle, PCB mounted, male: | * Right-angle, PCB mounted, male: | ||
** Norcomp 112-024-113R001: [http://octopart.com/partsearch#search/requestData&q=Norcomp+112-024-113R001 about $5.5]; [http://de.mouser.com/ProductDetail/NorComp/112-024-113R001/?qs=IGgAdOvCTsSdej4q2f%2fo5Q%3d%3d Mouser] (2.80€, but not available ATM), [http://www.digikey.de/product-search/de?x=0&y=0&lang=de&site=de&KeyWords=112-024-113R001 | ** Norcomp 112-024-113R001: [http://octopart.com/partsearch#search/requestData&q=Norcomp+112-024-113R001 about $5.5]; [http://de.mouser.com/ProductDetail/NorComp/112-024-113R001/?qs=IGgAdOvCTsSdej4q2f%2fo5Q%3d%3d Mouser] (2.80€, but not available ATM), [http://www.digikey.de/product-search/de?x=0&y=0&lang=de&site=de&KeyWords=112-024-113R001 Digi-Key] (4.59€) | ||
** TE Connectivity 5552741-1: [http://octopart.com/partsearch#search/requestData&q=TE%20Connectivity%205552741-1 about $7.2]; [http://de.mouser.com/ProductDetail/TE-Connectivity-AMP/5552741-1/?qs=ZDXmSm13592KDB5YbnOqGQEXH8vBFTre66B%2ffSd9ajU%3d Mouser] (5.87€, but not available, and minimum quantity required), [http://www.digikey.de/scripts/dksearch/dksus.dll?vendor=0&keywords=5552741-1 | ** TE Connectivity 5552741-1: [http://octopart.com/partsearch#search/requestData&q=TE%20Connectivity%205552741-1 about $7.2]; [http://de.mouser.com/ProductDetail/TE-Connectivity-AMP/5552741-1/?qs=ZDXmSm13592KDB5YbnOqGQEXH8vBFTre66B%2ffSd9ajU%3d Mouser] (5.87€, but not available, and minimum quantity required), [http://www.digikey.de/scripts/dksearch/dksus.dll?vendor=0&keywords=5552741-1 Digi-Key] (7.50€) | ||
* Straight (no right-angle), PCB mounted, male: | * Straight (no right-angle), PCB mounted, male: | ||
** [http://www.te.com/catalog/pn/en/552283-1 TE Connectivity / AMP 552283-1]: [http://de.mouser.com/ProductDetail/TE-Connectivity-AMP/552283-1/?qs=L%252bK8JgcrFouKshZpXbu%2foxXjsnB6QVdhWc5JSE3CA%2fU%3d Mouser] (4.08€), [http://www.digikey.de/scripts/dksearch/dksus.dll?vendor=0&keywords=552283-1 | ** [http://www.te.com/catalog/pn/en/552283-1 TE Connectivity / AMP 552283-1]: [http://de.mouser.com/ProductDetail/TE-Connectivity-AMP/552283-1/?qs=L%252bK8JgcrFouKshZpXbu%2foxXjsnB6QVdhWc5JSE3CA%2fU%3d Mouser] (4.08€), [http://www.digikey.de/scripts/dksearch/dksus.dll?vendor=0&keywords=552283-1 Digi-Key] (4.51€, but EOL soon? Minimum quantity?) | ||
* Straight (no right-angle), solder-cup, male: | * Straight (no right-angle), solder-cup, male: | ||
** [http://www.norcomp.net/rohspdfs/SCSI-050Ribbon/11Y/111/111-YYY-103L001.pdf Norcomp 111-024-103L001]: [http://www.digikey.de/product-detail/de/111-024-103L001/1024MA-ND/955139 | ** [http://www.norcomp.net/rohspdfs/SCSI-050Ribbon/11Y/111/111-YYY-103L001.pdf Norcomp 111-024-103L001]: [http://www.digikey.de/product-detail/de/111-024-103L001/1024MA-ND/955139 Digi-Key] (2.90€) | ||
** [http://www.amphenolcanada.com/ProductSearch/drawings/AC/5720240.pdf Amphenol 57-20240]: [http://de.mouser.com/ProductDetail/Amphenol-Commercial-Products/57-20240/?qs=9QC6KritiMlxI%2fbOR6fN8o%2fx9VH%2fvGRssdGjBll89tQ%3d Mouser] (4.93€) TODO: Typo on page/datasheet, or is this really female? | ** [http://www.amphenolcanada.com/ProductSearch/drawings/AC/5720240.pdf Amphenol 57-20240]: [http://de.mouser.com/ProductDetail/Amphenol-Commercial-Products/57-20240/?qs=9QC6KritiMlxI%2fbOR6fN8o%2fx9VH%2fvGRssdGjBll89tQ%3d Mouser] (4.93€) TODO: Typo on page/datasheet, or is this really female? | ||
* Straight (no right-angle), solder, male: | * Straight (no right-angle), solder, male: | ||
** [http://www.norcomp.net/rohspdfs/SCSI-050Ribbon/11Y/111/111-YYY-113L001.pdf Norcomp 111-024-113L001]: [http://www.digikey.de/product-detail/de/111-024-113L001/1024PMA-ND/955147 | ** [http://www.norcomp.net/rohspdfs/SCSI-050Ribbon/11Y/111/111-YYY-113L001.pdf Norcomp 111-024-113L001]: [http://www.digikey.de/product-detail/de/111-024-113L001/1024PMA-ND/955147 Digi-Key] (4.54€) | ||
* Straight (no right-angle), solder-cup/cable, male: | * Straight (no right-angle), solder-cup/cable, male: | ||
** [http://www.amphenolcanada.com/ProductSearch/drawings/AC/5730240.pdf Amphenol 57-30240]: [http://de.mouser.com/ProductDetail/Amphenol-Commercial-Products/57-30240/?qs=2ZPlowQld1N7RBj5X0pv8db%252b15EhuRSLDpapiRNYO6M%3d Mouser] (7.19€), | ** [http://www.amphenolcanada.com/ProductSearch/drawings/AC/5730240.pdf Amphenol 57-30240]: [http://de.mouser.com/ProductDetail/Amphenol-Commercial-Products/57-30240/?qs=2ZPlowQld1N7RBj5X0pv8db%252b15EhuRSLDpapiRNYO6M%3d Mouser] (7.19€), Digi-Key: N/A | ||
* Straight (no right-angle), ribbon cable, male: | * Straight (no right-angle), ribbon cable, male: | ||
** MULTICOMP 5F30240P-10NN-XX: [http://de.farnell.com/multicomp/5f30240p-10nn-xx/stecker-centronics-24-pol/dp/1099278 Farnell] (2.31€) | ** MULTICOMP 5F30240P-10NN-XX: [http://de.farnell.com/multicomp/5f30240p-10nn-xx/stecker-centronics-24-pol/dp/1099278 Farnell] (2.31€) | ||
Line 79: | Line 79: | ||
* [http://sine.ni.com/nips/cds/view/p/lang/en/nid/12150 National Instruments TNT5002]: "Single-Chip PCI-to-GPIB Talker/Listener ASIC" ([http://www.ni.com/pdf/products/us/4gpib700-701.pdf datasheet]) | * [http://sine.ni.com/nips/cds/view/p/lang/en/nid/12150 National Instruments TNT5002]: "Single-Chip PCI-to-GPIB Talker/Listener ASIC" ([http://www.ni.com/pdf/products/us/4gpib700-701.pdf datasheet]) | ||
( | (Pretty much all of them are no longer available, or horribly expensive, or hard to get, or a combination thereof.) | ||
=== GPIB transceiver chips === | === GPIB transceiver chips === | ||
* [http://www.datasheetarchive.com/dl/Datasheets-21/DSA-418241.pdf National DS75160A/61A/62A] | * [http://www.datasheetarchive.com/dl/Datasheets-21/DSA-418241.pdf National DS75160A/61A/62A] | ||
* [http://www.ti.com/product/sn75160b SN75160B: Octal General-Purpose Interface Bus Transceiver] ([http://www.ti.com/lit/gpn/sn75160b datasheet]). [http://de.mouser.com/ProductDetail/Texas-Instruments/SN75160BDW/?qs=Dqy2GfToSoRN7kS7RA4kUqt%252bApV44GjizjHa8zhcESY%3d Mouser: 1.55€], [http://www.digikey.de/product-detail/de/SN75160BDW/296-6844-5-ND/370216 | * [http://www.ti.com/product/sn75160b SN75160B: Octal General-Purpose Interface Bus Transceiver] ([http://www.ti.com/lit/gpn/sn75160b datasheet]). [http://de.mouser.com/ProductDetail/Texas-Instruments/SN75160BDW/?qs=Dqy2GfToSoRN7kS7RA4kUqt%252bApV44GjizjHa8zhcESY%3d Mouser: 1.55€], [http://www.digikey.de/product-detail/de/SN75160BDW/296-6844-5-ND/370216 Digi-Key] (2.33€) | ||
* [http://www.ti.com/product/sn75161b SN75161B: Octal General-Purpose Interface Bus Transceiver] ([http://www.ti.com/lit/gpn/sn75161b datasheet]). [http://de.mouser.com/ProductDetail/Texas-Instruments/SN75161BDW/?qs=Dqy2GfToSoSEk6hSOlXO6PWl2ZlfYL4DQU8qvn8WRzg%3d Mouser: 1.45€], [http://www.digikey.de/product-detail/de/SN75161BDWR/296-14951-1-ND/562537 | * [http://www.ti.com/product/sn75161b SN75161B: Octal General-Purpose Interface Bus Transceiver] ([http://www.ti.com/lit/gpn/sn75161b datasheet]). [http://de.mouser.com/ProductDetail/Texas-Instruments/SN75161BDW/?qs=Dqy2GfToSoSEk6hSOlXO6PWl2ZlfYL4DQU8qvn8WRzg%3d Mouser: 1.45€], [http://www.digikey.de/product-detail/de/SN75161BDWR/296-14951-1-ND/562537 Digi-Key] (2.74€) | ||
* [http://www.ti.com/product/sn75162b SN75162B: Octal General-Purpose Interface Bus Transceiver] ([http://www.ti.com/lit/gpn/sn75162b datasheet]). [http://de.mouser.com/ProductDetail/Texas-Instruments/SN75162BDW/?qs=Dqy2GfToSoQt2q38QBjULg%3d%3d Mouser: 2.03€], [http://www.digikey.de/scripts/dksearch/dksus.dll?vendor=0&keywords=SN75162&stock=1 | * [http://www.ti.com/product/sn75162b SN75162B: Octal General-Purpose Interface Bus Transceiver] ([http://www.ti.com/lit/gpn/sn75162b datasheet]). [http://de.mouser.com/ProductDetail/Texas-Instruments/SN75162BDW/?qs=Dqy2GfToSoQt2q38QBjULg%3d%3d Mouser: 2.03€], [http://www.digikey.de/scripts/dksearch/dksus.dll?vendor=0&keywords=SN75162&stock=1 Digi-Key] (2.33€) | ||
== Bill of materials == | == Bill of materials == | ||
Line 107: | Line 107: | ||
|- | |- | ||
|| Chip LED || Lite-On || LTST-C193TBKT-5A || 0603 || 1 || | || Chip LED || Lite-On || LTST-C193TBKT-5A || 0603 || 1 || Digi-Key || $0.47 | ||
|- | |- | ||
Line 150: | Line 150: | ||
* [[User:Ivan747]] (same nick on IRC), experience in hardware, low level firmware (but not USB). Willing to participate with the support from someone experienced in USB protocols on any kind of ARM device. Contact: ivan747[at]users.sourceforge.net. | * [[User:Ivan747]] (same nick on IRC), experience in hardware, low level firmware (but not USB). Willing to participate with the support from someone experienced in USB protocols on any kind of ARM device. Contact: ivan747[at]users.sourceforge.net. | ||
* [[User:Elbridge]] (same nick in IRC), experienced with | * [[User:Elbridge]] (same nick in IRC), experienced with hardware and firmware, but new to open source. |
Revision as of 22:27, 8 April 2019
This page documents some ideas and information for a GPIB-USBTMC hardware interface.
Motivation
There are many ways to communicate with devices that have a GPIB port, and sigrok aims to support as many of them as possible (see IEEE-488). However in this day and age the only reasonable interface for this would have to use a USB device port, since USB host ports are so ubiquitous. The USB standards include a device class specifically made for test and measurement, called the USBTMC class.
Yet most of the GPIB-USB interfaces available don't use this device class; they typically use either a proprietary protocol or serial emulation. There is only one GPIB-USBTMC interface that we know of: the TEK-USB-444 from Tektronix, and it's ridiculously overpriced at around $740.
We think we can make a GPIB-USBTMC interface that is:
- 100% free and open source, hardware and firmware/software
- 100% standards-compliant
- Considerably cheaper than anything else out there (less than $50)
In addition, since we'd be making essentially a "server-side" i.e. USB device-side implementation of the USBTMC protocol, this code would be reusable in projects such as Das Oszi.
Hardware design
- STM32L0 ARM Cortex M0
- Built-in FS USB with crystal-less operation
- Compatible with libopencm3
- 32 pin LQFP keeps size low and assembly easy
- Specialty transceivers
- TI still makes the SN75160 (data) and SN75161 (handshake)
- High current drive required for logic lines according to GPIB standard
- Directional bundling of pins based on protocol simplifies firmware
- Two-layer PCB to keep cost low
- Designed to fit in L-COM housing for CIB24S GPIB connector
- Saves effort on custom enclosure
- Current design hosted at Upverter
Firmware
This is more of a TODO list at the moment:
- Start with libopencm3
- Add new class for USBTMC
- GPIB
- Implement functions
- Serial poll
- Write
- Read
- Reset
- Local lockout
- Monitor and handle SRQs
- Implement functions
- Commands
- All data is just passed thru from PC to GPIB device and back, parsing of SCPI or other protocols is not required in firmware
- Firmware update
- Use the DFU bootloader in libopencm3
- Modify to check register for boot flag instead of hardware pin
- Some special command in USBTMC can set to bootloader mode and reset processor, then when DFU is done, set flag back and boot to main
Components
GPIB connectors
- Right-angle, PCB mounted, male:
- Norcomp 112-024-113R001: about $5.5; Mouser (2.80€, but not available ATM), Digi-Key (4.59€)
- TE Connectivity 5552741-1: about $7.2; Mouser (5.87€, but not available, and minimum quantity required), Digi-Key (7.50€)
- Straight (no right-angle), PCB mounted, male:
- TE Connectivity / AMP 552283-1: Mouser (4.08€), Digi-Key (4.51€, but EOL soon? Minimum quantity?)
- Straight (no right-angle), solder-cup, male:
- Norcomp 111-024-103L001: Digi-Key (2.90€)
- Amphenol 57-20240: Mouser (4.93€) TODO: Typo on page/datasheet, or is this really female?
- Straight (no right-angle), solder, male:
- Norcomp 111-024-113L001: Digi-Key (4.54€)
- Straight (no right-angle), solder-cup/cable, male:
- Amphenol 57-30240: Mouser (7.19€), Digi-Key: N/A
- Straight (no right-angle), ribbon cable, male:
- MULTICOMP 5F30240P-10NN-XX: Farnell (2.31€)
GPIB protocol chips
- Philips/NXP HEF4738
- Fairchild 96LS488
- NEC uPD7210C/D
- National Instruments NAT7210: "Drop-In Replacement Chip for NEC µPD7210 Controller" (datasheet)
- National Instruments NAT9914: "Drop-In Replacement Chips for TI TMS9914A Controllers" (datasheet)
- National Instruments TNT4882: "High-Performance, Lower-Cost Single-Chip GPIB Talker/Listener ASIC" (datasheet)
- National Instruments TNT5002: "Single-Chip PCI-to-GPIB Talker/Listener ASIC" (datasheet)
(Pretty much all of them are no longer available, or horribly expensive, or hard to get, or a combination thereof.)
GPIB transceiver chips
- National DS75160A/61A/62A
- SN75160B: Octal General-Purpose Interface Bus Transceiver (datasheet). Mouser: 1.55€, Digi-Key (2.33€)
- SN75161B: Octal General-Purpose Interface Bus Transceiver (datasheet). Mouser: 1.45€, Digi-Key (2.74€)
- SN75162B: Octal General-Purpose Interface Bus Transceiver (datasheet). Mouser: 2.03€, Digi-Key (2.33€)
Bill of materials
Description | Manufacturer | Part Number | Package | Quantity | Vendor | Price |
---|---|---|---|---|---|---|
Generic Capacitor 100nF 10V | any | 0603 | 5 | $0.10 | ||
Generic Capacitor 1 µF 10V | any | 0603 | 2 | $0.10 | ||
Chip LED | Lite-On | LTST-C193TBKT-5A | 0603 | 1 | Digi-Key | $0.47 |
SMT Micro USB Female right-angle bottom-mount connector type B | Molex | 473460001 | Receptacle | 1 | Newark | $0.52 |
Connector, GPIB Sldr, Female | L-COM | CIB24S | 1 | L-COM | $8.02 | |
Generic Resistor (0.0R) | any | 0603 | 2 | $0.10 | ||
Generic Resistor (30) | any | 0603 | 1 | $0.10 | ||
Common mode filter with ESD protection for USB 2.0 interface | STMicroelectronics | ECMF02-4CMX8 | QFN-8L | 1 | Arrow | $0.54 |
Octal Transceiver GPIB Control | Texas Instruments | SN75161BDW | SOIC | 1 | Arrow | $1.60 |
LP2980-N Micropower 50-mA Ultra Low-Dropout Regulator in SOT-23 Package | Texas Instruments | LP2980IM5-3.3/NOPB | SOT-23-5 | 1 | Arrow | $0.43 |
Octal Transceiver GPIB Data bus | Texas Instruments | SN75160BDW | SOIC | 1 | Digikey | $2.18 |
32-bit MCU ARM Cortex-M0+, 64 KB Flash, 8 KB SRAM, 2 KB EEPROM, USB | STMicroelectronics | STM32L062K8T6 | LQFP32 | 1 | Arrow | $2.33 |
Resources
- Massimiliano Gentile's thesis on writing a USBTMC driver for the AVR32 architecture.
- Hack a Day: GPIB connectivity twofer (covers Galvant GPIBUSB and Sven Pauli's RS232-GPIB interface)
- GPIB connector pinout
Volunteers
Please edit this section with your name and (public) contact details if you are interested in developing this.
- User:Ivan747 (same nick on IRC), experience in hardware, low level firmware (but not USB). Willing to participate with the support from someone experienced in USB protocols on any kind of ARM device. Contact: ivan747[at]users.sourceforge.net.
- User:Elbridge (same nick in IRC), experienced with hardware and firmware, but new to open source.