open source GPIB adapter - Page 1
Forum section: electronics / testgear

author: dorkshoei
author_rank: Frequent Contributor
timestamp: November 25, 2021, 10:37:19 pm
content: I saw the recent thread here on NI adapter authenticity. I'd been pondering buying something so it was timely.I also found thisold thread hereinquiring about about open source adapters.One of the comments on the thread was "the real cards are GPIB32 and VISa compliant. something none of the homebrews does."I stumbled on this project which claims to be VISA complianthttps://github.com/xyphro/UsbGpibHas anyone tried it or are there any recommended projects to build since the 2012 thread? Or is one of the commercial devices (if authentic) still the way to go?Note I'm asking for a functional opinion not time vs money as that's very subjective.I like the right angled compact design of the above githib design.

author: Nx-1997
author_rank: Regular Contributor
timestamp: November 25, 2021, 11:43:29 pm
content: I have built and successfully tested the xyphro’s UsbGpib adapter. The good news is that it is compatible with all popular vendor visa software, that means that it works with NI Visa, Keysight Visa, and Roden&Schwarz Visa. I personally prefer the R&S Visa as its only 59 MB in size and works perfectly but no python visa support. Only the NI Visa software is supported by the Python’s PyVisa library. The adapter is also very fast in terms of data transfer speed, faster than Keysight 82357B adapter and AR488 adapter.Now the bad news is that the adapter shows up as a USB device and not as a GPIB device that means compatibility is not as great compared to a traditional GPIB adapter. As in Image 1, if a software does not search for USB devices, then xyphro’s UsbGpib adapter will not be detected as shown in image 2. You would have to include the “USB” search string, shown in image 3, for the software to detect the adapter, as shown in image 4. Also you can only connect 1 instrument per adapter and build costs are higher compared to AR488 adapter.

author: nctnico
author_rank: Super Contributor
timestamp: November 25, 2021, 11:46:51 pm
content: Quote from: Nx-1997 on November 25, 2021, 11:43:29 pmFortunately that is not true.Pyvisa also works with PyVISA-Py which is a Python based implementation of a Visa library which prevents you having to install the dreadfull NI Visa software.

author: Nx-1997
author_rank: Regular Contributor
timestamp: November 25, 2021, 11:51:51 pm
content: Nice, I hasn't aware of this library (https://github.com/pyvisa/pyvisa-py). I will test it out when I get time.

author: dorkshoei
author_rank: Frequent Contributor
timestamp: November 26, 2021, 12:26:37 am
content: Quote from: Nx-1997 on November 25, 2021, 11:43:29 pmDo any of the open source adapters show up as a GPIB adapter? Is there an alternative you recommend?

author: Nx-1997
author_rank: Regular Contributor
timestamp: November 26, 2021, 12:42:04 am
content: Quote from: dorkshoei on November 26, 2021, 12:26:37 amI personally don't know of any open source GPIB adapters that show up as GPIB devices. Your best bet would be to get a used NI GPIB-USB-HS adapter or a pci/pcie gpib adapter. If you plan on creating your own scripts/software then the xyphro’s UsbGpib adapter will work well.

author: dorkshoei
author_rank: Frequent Contributor
timestamp: November 26, 2021, 12:54:57 am
content: Quote from: Nx-1997 on November 26, 2021, 12:42:04 amThanks. So what were your build costs? I thought I saw $14 mentioned on xyphro's github page.This AR488 setupdoesn't seem like it would be that much cheaper. I also dislike micro-usb, it's not very durable. I prefer USB-B that xyphro uses. Also like that he has the case design ready for printing.

author: Nx-1997
author_rank: Regular Contributor
timestamp: November 26, 2021, 01:14:01 am
content: For AR488 pro micro adapter:Arduino pro micro 1pcs - $7 CAD with shippingCentronics Connectors 5pcs - $13 CAD with shippingPCB 5pcs (optional) - $16 CAD with shippingFor xyphro’s UsbGpib:ATMEGA32U4RC-AU-ND 5pcs – $37.65 CAD DigikeySMD Components - $8 CAD DigikeyCentronics Connectors 5pcs - $13 CAD with shippingPCB 5pcs - $16 CAD with shippingCost in USD will be lower.Xyphro’s cost of 14$ USD per adapter is probably true.I got the connectors from here:https://www.aliexpress.com/item/32795413098.html?spm=2114.13010708.0.0.7bff4c4d5RM2NJ

author: dorkshoei
author_rank: Frequent Contributor
timestamp: November 26, 2021, 01:24:06 am
content: Nx-1997 thank you for your help. Much appreciated.If anyone in US has a spare xyphro PCB they don't want please send me a PM. They are thin enough that they should be shippable taped to a piece of cardboard at the 1oz letter rate.

author: jjoonathan
author_rank: Frequent Contributor
timestamp: November 26, 2021, 01:53:16 am
content: Quote from: Nx-1997 on November 25, 2021, 11:51:51 pmMy setup is GPIB ----AD007---> Ethernet -> pyvisa-py. I've used it for about 10kloc of scripting at this point, and I love it. No NI drivers, no Keysight drivers, no nonsense, just python and jupyter and it just works.EDIT: and no USB drivers either, and no serial libraries. No Device Manager, no INF files, no udev files, no FTDI drivers. Really.

author: dorkshoei
author_rank: Frequent Contributor
timestamp: November 26, 2021, 03:39:25 pm
content: Quote from: jjoonathan on November 26, 2021, 01:53:16 amAre there any open source ethernet designs? Or are they all USB? Plenty of cheap SoC's now with Ethernet support.

author: jjoonathan
author_rank: Frequent Contributor
timestamp: November 26, 2021, 07:45:41 pm
content: I don't think so, but I'd love to be wrong about that!

author: giovannirat
author_rank: Regular Contributor
timestamp: November 26, 2021, 10:35:34 pm
content: You mean something likehttps://www.eevblog.com/forum/metrology/yaugi-4-gpib-ethernet-poe-adapter/msg3280916/#msg3280916?

author: dorkshoei
author_rank: Frequent Contributor
timestamp: November 30, 2021, 02:49:20 am
content: Quote from: Nx-1997 on November 26, 2021, 01:14:01 amATMEGA32U4 seems pretty solidly discontinued. Octopart shows 0 in stock at authorized distributors.Utsource.com who are IME about as reputable as you can get with Chinese chip sellers shows their stock is all "used". All the third parties on their site claim new which I assume is BS along with theChinese eBay/aliexpress sellers.

author: robert.rozee
author_rank: Frequent Contributor
timestamp: November 30, 2021, 04:11:26 am
content: Quote from: dorkshoei on November 30, 2021, 02:49:20 amsee:https://www.microchip.com/en-us/product/ATmega32U4ATmega32U4Status: In Production.the part is, however, mostly out of stock. like a great many devices from a variety of manufacturers, more supplies are not likely to be seen until late 2022.cheers,rob :-)

author: Kean
author_rank: Unknown
timestamp: November 30, 2021, 12:35:31 pm
content: Almost 15k pcs (TQFP) expected to be available for direct purchase in March (I don't put much trust in their stock levels or ETA dates though)https://www.microchipdirect.com/product/ATMEGA32U4-AUR

author: dorkshoei
author_rank: Frequent Contributor
timestamp: November 30, 2021, 03:29:48 pm
content: Quote from: dorkshoei on November 30, 2021, 02:49:20 amI'm also pretty sure ATMEGA32U4RC above is not the correct part. Looking at the data sheet the RC has an internal oscillator and isn't compatible with an external. The UsbGpib uses an external 16mhz crystal.You need the ATMEGA32U4-AU which of course is not in stock. I may get used ones from utsource, I've had fairly good luck with them before.

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: November 30, 2021, 04:52:34 pm
content: I am wondering if the xyphro's code can be modified slightly to use standard Arduino Pro Micro. A few of the pin assignments need to be changed and the bootloader is different. But otherwise one can just get a complete Arduino board and wire it up to GPIB connector.

author: Nx-1997
author_rank: Regular Contributor
timestamp: November 30, 2021, 06:26:24 pm
content: Quote from: dorkshoei on November 30, 2021, 03:29:48 pmThe ATMEGA32U4RC and ATMEGA32U4 are the same, only difference is the fuse configuration. I bought the ATMEGA32U4RC because the ATMEGA32U4 was out of stock. You will have to set the fuses anyway when flashing the bootloader.

author: dorkshoei
author_rank: Frequent Contributor
timestamp: November 30, 2021, 07:24:35 pm
content: Quote from: Nx-1997 on November 30, 2021, 06:26:24 pmPerhaps I'm just not understanding the datasheet or it's confusingly worded.6.2.1 Default Clock Source ATmega16U4 and ATmega32U4 The device is shipped with Low Power Crystal Oscillator (8.0MHz-16MHz) enabled and with the fuse CKDIV8 programmed, resulting in 1.0MHz system clock with an 8 MHz crystal. See Table 28-5 on page 348 for an overview of the default Clock Selection Fuse setting.6.2.2 Default Clock Source ATmega16U4RC and ATmega32U4RC The device is shipped with Calibrated Internal RC oscillator (8.0MHz) enabled and with the fuse CKDIV8 programmed, resulting in 1.0MHz system clock. See Table 28-5 on page 348 for an overview of the default Clock Selection Fuse setting.

author: Venturi962
author_rank: Regular Contributor
timestamp: November 30, 2021, 08:28:01 pm
content: The ATmega32U4RC will work fine, that's what I'm using in the ones I built up.I did have to slow down the bitclock when flashing the bootloader (note the -B 10 at the end) YMMV:avrdude -c usbasp -p m32u4 -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m avrdude -c usbasp -p m32u4 -U flash:w:BootLoader.hex -B 10

author: artag
author_rank: Super Contributor
timestamp: November 30, 2021, 09:13:04 pm
content: Quote from: dorkshoei on November 30, 2021, 02:49:20 amStill plenty in the channel in the form of pro micro arduinos. I've only glanced at xyphro's code, but I think it could be fairly easily modified to work with the pcb I did for the AR488. Probably with a slight loss of speed, as the pinouts are likely to be less optimised for the code.Of course, that wouldn't give the layout and usb connector you prefer. The best solution to that is probably to 3d-print a case that gives extra support to the micro-usb connector - I think there's one already in the AR488 thread.As for ethernet versions : yes, that would be great (although USB is quite convenient in providing power). One way to do it would be via an ethernet-equipped pi or Beaglebone linked to a bunch of USB adapters. Direct connection to ethernet would be faster, but most instruments are fairly slow. Also, all the single board computers with ethernet that I know of (beaglebone, arduino, raspberry pi and teensy 4.1) have 3.3V I/O so you'd need to use the proper buffers. This might seem no great disadvantage or even an improvement but a single bus also means you can't run data transfers in parallel as you can with multiple USB ports.

author: dorkshoei
author_rank: Frequent Contributor
timestamp: November 30, 2021, 09:58:51 pm
content: Quote from: artag on November 30, 2021, 09:13:04 pmIndeed. It makes me wonder whether the Chinese "new" stock available for direct purchase is then actually authentic, vs used/remark. The fact that utsource (who are one of the few honest sellers) has marked all their stock as "used" makes me suspicious of the rest.

author: artag
author_rank: Super Contributor
timestamp: December 05, 2021, 05:59:44 pm
content: Quite possibly. However, I've bought chinese ARduino micros recently and they've all worked OK. So even if they're clones or pulls, they do seem to be functional at least IME.

author: dorkshoei
author_rank: Frequent Contributor
timestamp: December 30, 2021, 03:05:00 am
content: I ordered from utsource, they listed two used lots, each several thousand. Of course it turns out they had zero.I guess I'm waiting till they come back into stock. I'm in no rush so that's fine. Spent the last couple of days 3D printing some enclosures for them ;-)

author: dorkshoei
author_rank: Frequent Contributor
timestamp: January 22, 2022, 08:24:21 pm
content: Quote from: Kean on November 30, 2021, 12:35:31 pmDigiKey now has some stockhttps://www.digikey.com/en/products/detail/ATMEGA32U4-AUR/ATMEGA32U4-AURCT-ND/3440960Which is good as some of the brokers have started to take the pisshttps://www.win-source.net/hot-sales-and-eol-components-atmega32u4-au.html

author: PioB
author_rank: Regular Contributor
timestamp: February 03, 2022, 09:27:21 pm
content: As the TQFP Atmega32U4 is unavailable(but there are some qfn around, hope they'll be left when I submit my next order) , I have _started_ copying @xyphroshttps://github.com/xyphro/UsbGpibschematic into Kicad and started with a layout. I think I need to redo it and put the MCU on the back side as the routing of the GPIB connector is a mess....I attached the KiCAD 6 project, will try and get around to improving it soon, but not tonight anymore

author: PioB
author_rank: Regular Contributor
timestamp: February 05, 2022, 11:43:46 am
content: Oh i just saw, I forgot to connect the VBus Pin of the MCU to 5 V... I quickly rectified that, not that the routing is any more beautiful now...File addedUSB-GPIB adapter copied from xyphro's schematic, for the QFN Atmega32U4, a 6x3.5 mm Crystal and Wuerth MicroUSB.If anyone has any hints for improving the layout, I'm all earsI added the step files for the USB connector and the GPIB connector to the zip, they need to be added to the footprint, as I have saved and linked them locally in my 3d model directory...

author: Venturi962
author_rank: Regular Contributor
timestamp: February 06, 2022, 02:14:12 pm
content: Thanks for the head start, reworked VBus, caps and some signal lines.Edit: Made some more updates.Hardware Notes:Schematic has 100nF Caps for the Crystal, original has 22pFSwitched to more common Crystal sizePrefer through-hole pin headers as opposed to SMD

author: Gribo
author_rank: Frequent Contributor
timestamp: February 10, 2022, 01:26:52 pm
content: You might want to add some ESD protection diodes on the USB lines.The QFN pad could use a symmetrical via arrangement. You don't want voids when soldering it.Edit: The VBus trace should be thicker.

author: Venturi962
author_rank: Regular Contributor
timestamp: February 11, 2022, 02:04:04 pm
content: Incorporated those updates. Included 4 Channel ESD protection (2 Channel part is Out of Stock but should be pin compatible).

author: PioB
author_rank: Regular Contributor
timestamp: February 21, 2022, 07:39:02 pm
content: So I had an earlier Version of the PCB with VBUS connected made at a Chinese board house and am trying to program it now... As I don't have a "real" programmer I am using my Arduino Uno on which I have installed scratch monkey (stk500)https://github.com/microtherion/ScratchMonkey/tree/master/docand which I have used before to successfully program Atmel MCUs.Unfortunately this time I am not lucky, command line fromhttps://github.com/xyphro/UsbGpib:Code:sudo avrdude -c stk500 -p m32u4 -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m avrdude -c stk500 -p m32u4 -U flash:w:BootLoader.hex -P /dev/ttyACM0avrdude: AVR device initialized and ready to accept instructionsReading | ################################################## | 100% 0.01savrdude: Device signature = 0x1e9587 (probably m32u4)avrdude: erasing chipavrdude: reading input file "0x3F"avrdude: writing lock (1 bytes):Writing | ################################################## | 100% 0.01savrdude: 1 bytes of lock writtenavrdude: verifying lock memory against 0x3F:avrdude: load data lock data from input file 0x3F:avrdude: input file 0x3F contains 1 bytesavrdude: reading on-chip lock data:Reading | ################################################## | 100% 0.01savrdude: verifying ...avrdude: verification error, first mismatch at byte 0x00000xff != 0x3favrdude: verification error; content mismatchavrdude: safemode: Fuses OK (E:FB, H:99, L:52)avrdude done. Thank you.Does anyone have any hint how to modify the command line to burn the bootloader?(atmega32u4rc-mu, should be configurable to use the external xtal which IIUC would be taken care of by the fuses?)

author: Venturi962
author_rank: Regular Contributor
timestamp: February 21, 2022, 08:50:41 pm
content: Try setting bitclock in the avrdude command, for example add '-B 10' to the end.

author: PioB
author_rank: Regular Contributor
timestamp: February 21, 2022, 09:06:56 pm
content: Thanks, that still yields the same answer unfortunately.

author: mankan
author_rank: Regular Contributor
timestamp: February 21, 2022, 09:18:37 pm
content: You have not written the bootloader, just set the fuse bits. Divide the first line into two commands, both starting with avrdude.

author: PioB
author_rank: Regular Contributor
timestamp: February 23, 2022, 08:13:14 pm
content: Thank you very much mankan and Venturi962. I bought a avr jtag ice mkII (clone?) and that seems to make life a bit easier (without capacitor and it seems to work more reliably than the arduino stk500... Separating the two commands seems to have brought me a step further. The firmware can be written, but apparently I cannot program the fuses. "avrdude: verification error; content mismatch" So the board is not recognized as a usb mass storage device. (I also do not see any 16 MHz Signal on the two xtal pins, not sure if this is relevant....)Code:$avrdude -c jtag2isp -p m32u4 -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m:avrdude: AVR device initialized and ready to accept instructionsReading | ################################################## | 100% 0.04savrdude: Device signature = 0x1e9587 (probably m32u4)avrdude: erasing chipavrdude: reading input file "0x3F"avrdude: writing lock (1 bytes):Writing | ################################################## | 100% 0.02savrdude: 1 bytes of lock writtenavrdude: verifying lock memory against 0x3F:avrdude: load data lock data from input file 0x3F:avrdude: input file 0x3F contains 1 bytesavrdude: reading on-chip lock data:Reading | ################################################## | 100% 0.01savrdude: verifying ...avrdude: verification error, first mismatch at byte 0x00000xff != 0x3favrdude: verification error; content mismatchavrdude: safemode: Fuses OK (E:FB, H:99, L:52)avrdude done. Thank you.$ sudo avrdude -c jtag2isp -p m32u4 -U flash:w:BootLoader.hexavrdude: AVR device initialized and ready to accept instructionsReading | ################################################## | 100% 0.04savrdude: Device signature = 0x1e9587 (probably m32u4)avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performedTo disable this feature, specify the -D option.avrdude: erasing chipavrdude: reading input file "BootLoader.hex"avrdude: input file BootLoader.hex auto detected as Intel Hexavrdude: writing flash (32768 bytes):Writing | ################################################## | 100% 0.00savrdude: 32768 bytes of flash writtenavrdude: verifying flash memory against BootLoader.hex:avrdude: load data flash data from input file BootLoader.hex:avrdude: input file BootLoader.hex auto detected as Intel Hexavrdude: input file BootLoader.hex contains 32768 bytesavrdude: reading on-chip flash data:Reading | ################################################## | 100% 0.00savrdude: verifying ...avrdude: 32768 bytes of flash verifiedavrdude: safemode: Fuses OK (E:FB, H:99, L:52)avrdude done. Thank you.Reading back the fuses/other info yields the following:Code:avrdude -c jtag2isp -P usb -p m32u4 -n -v -B22avrdude: Version 6.3, compiled on Jul 21 2021 at 00:00:00Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/Copyright (c) 2007-2014 Joerg WunschSystem wide configuration file is "/etc/avrdude/avrdude.conf"User configuration file is "/home/baettig/.avrduderc"User configuration file does not exist or is not a regular file, skippingUsing Port : usbUsing Programmer : jtag2ispSetting bit clk period : 22.0avrdude: usbdev_open(): Found JTAGICE mkII, serno: 00B000004F4FJTAG ICE mkII sign-on message:Communications protocol version: 1M_MCU:boot-loader FW version: 255firmware version: 7.39hardware version: 0S_MCU:boot-loader FW version: 255firmware version: 7.39hardware version: 1Serial number: 00:b0:00:00:4f:4fDevice ID: JTAGICEmkIIAVR Part : ATmega32U4Chip Erase delay : 9000 usPAGEL : PD7BS2 : PA0RESET disposition : dedicatedRETRY pulse : SCKserial program mode : yesparallel program mode : yesTimeout : 200StabDelay : 100CmdexeDelay : 25SyncLoops : 32ByteDelay : 0PollIndex : 3PollValue : 0x53Memory Detail :Block Poll Page PolledMemory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00Programmer Type : JTAGMKII_ISPDescription : Atmel JTAG ICE mkII in ISP modeVtarget : 5.1 VSCK period : 23.12 usavrdude: AVR device initialized and ready to accept instructionsReading | ################################################## | 100% 0.02savrdude: Device signature = 0x1e9587 (probably m32u4)avrdude: safemode: hfuse reads as 99avrdude: safemode: efuse reads as FBavrdude: safemode: hfuse reads as 99avrdude: safemode: efuse reads as FBavrdude: safemode: Fuses OK (E:FB, H:99, L:52)avrdude done. Thank you.

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: February 23, 2022, 08:50:58 pm
content: It would be so much easier if the firmware just run on standard Arduino Pro Micro. No programmers and no PCB needed. Xyphro doesn't like the idea, but it wouldn't be hard to change, I think.

author: Venturi962
author_rank: Regular Contributor
timestamp: February 23, 2022, 09:52:01 pm
content: It looks like you're getting stuck on the lock bit - can you write any fuse? I think you only need to set the Low and High fuses in this case, Lock and Extended aren't strictly needed.avrdude -c jtag2isp -p m32u4 -e -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m

author: simba15
author_rank: Regular Contributor
timestamp: February 24, 2022, 02:21:57 pm
content: Quote from: maxwell3e10 on February 23, 2022, 08:50:58 pmI would highly agree, with an Arduino Almost any one could make this, The current setup requires external tools and introduces extra challenges. Its a great project but if I really want to build one these are the truth.

author: PioB
author_rank: Regular Contributor
timestamp: February 24, 2022, 05:32:27 pm
content: Another step further...so the fuse setting ran, thank you Venturi962! and the programming too.Two of the fuses seem to be correct the lock one is untouched.I re-plugged it in and it appeared as a storage device$lsusbBus 003 Device 019: ID 03eb:2045 Atmel Corp. LUFA Mass Storage Demo ApplicationI then copied the test and measurement bin to the drive and verified if it copied ok.$cp TestAndMeasurement.bin /run/media/baettig/GPIBUSBBOOT/FLASH.BIN$md5sum TestAndMeasurement.bin /run/media/baettig/GPIBUSBBOOT/FLASH.BINbb6785db41417e20e522b72fcbcfba61 TestAndMeasurement.binbb6785db41417e20e522b72fcbcfba61 /run/media/baettig/GPIBUSBBOOT/FLASH.BINSo I unplugged it and plugged it in one more time, now it should not be visible until it is connected to the GPIB on a TM device...It reappeared as a drive ...Unplugging and plugging it into my E3633 power supply (configured as a GPIB device) still doesn't make it change itself to a GPIB interface...according to the manual on github"USB enumerationYou might be surprised initially, that the device does not show up in your device manager (or lsusb), when you connect only the USB side. This is a feature, not a bug (really!). Only, if a GPIB device is connected, you can see the device on your PC too."(I just checked on github and seem to have run into an issue that someone else is at, too:https://github.com/xyphro/UsbGpib/issues/11unfortunately without resolve so far...)I'd be grateful for any hints.

author: Venturi962
author_rank: Regular Contributor
timestamp: February 24, 2022, 06:22:27 pm
content: Can you try programming the extended fuse as well? May have misspoke when I said it wasn't needed.avrdude -c jtag2isp -p m32u4 -e Uefuse:w:0xcb:mOnce you have Flash.bin on the device a power cycle via USB shouldn't show a Drive anymore, but the LED should start flashing to let you know it flashed.

author: PioB
author_rank: Regular Contributor
timestamp: February 24, 2022, 07:35:02 pm
content: Thank you very much! Another step closer.ok, the process so far:avrdude -c jtag2isp -p m32u4 -e -Uefuse:w:0xcb:mavrdude -c jtag2isp -p m32u4 -e -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:mavrdude -c jtag2isp -p m32u4 -U flash:w:BootLoader.hex-> yieldsavrdude: safemode: Fuses OK (E:CB, H:D8, L:FF)unplug, replugcp TestAndMeasurement.bin /run/media/baettig/GPIBUSBBOOT/FLASH.BINverify with md5sum, umount, unplugreplug it into the usb portHmm and it still is recognized as a LUFA drive.Bus 003 Device 027: ID 03eb:2045 Atmel Corp. LUFA Mass Storage Demo Applicationunplug, plug into the E3633A and still LUFAIf I understand correctly, the fuses should now all be correct. (Windows also sees it as a storage device, connected to the power supply)

author: Venturi962
author_rank: Regular Contributor
timestamp: February 24, 2022, 08:02:25 pm
content: Can you try copying the TestAndMeasurement.bin on a Windows Machine instead of Linux? I did this on Windows (power cycling and not unmounting / ejecting) and I wonder if the unmount on Linux is causing problems.

author: PioB
author_rank: Regular Contributor
timestamp: February 24, 2022, 08:33:19 pm
content: Hi Venturi962Thank you very much for helping me, it's now being recognized under Windows as UsbGpib in the device manager if the power supply is connected. Linux now announcesBus 001 Device 004: ID 03eb:2065 Atmel Corp. LUFA Test and Measurement Demo ApplicationSo tomorrow I'll try and get pyvisa working and finding the instrument on the gpib bus.I'll report back once *IDN? returns somethingThank you very much!

author: PioB
author_rank: Regular Contributor
timestamp: February 25, 2022, 05:19:39 pm
content: Another step further... under linux I installed pyvisa, linux-gpib, pyvisa-py. Now I am trying to get to the instrument but:Code:pythonPython 3.10.2 (main, Jan 17 2022, 00:00:00) [GCC 11.2.1 20211203 (Red Hat 11.2.1-7)] on linuxType "help", "copyright", "credits" or "license" for more information.>>> import pyvisa>>> rm = pyvisa.ResourceManager()>>> print(rm.list_resources())()>>> pyvisa.log_to_screen()>>> print(rm.list_resources())2022-02-25 18:14:39,047 - pyvisa - WARNING - Found a device whose serial number cannot be read. The partial VISA resource name is: USB0::1003::8293::???::0::INSTR()(and other errors, /dev/usbtmc0 is in no group, just root has rw permissions, at the moment I have to chmod 666 every time I reboot/unplug it to access the usb-gpib adapter as a regular user)Under windows, I haven't installed any VISA so far, is there something smaller than the (multi)GB Keysight or NI Visa?but apparently the USB-GPIB can see the power supply:Step by step..

author: Venturi962
author_rank: Regular Contributor
timestamp: February 25, 2022, 05:57:01 pm
content: On Linux, try this:https://techoverflow.net/2019/08/09/how-to-fix-pyvisa-found-a-device-whose-serial-number-cannot-be-read-the-partial-visa-resource-name-is-usb0-0instr/- I recall some issues like this on a Raspberry Pi, I could run Python scripts as Root to get around the issue temporarily.On Windows, I think you can also use PyVisa + PyVisa-Py if you don't want to use other VISA solutions (personally I use the Keysight one).Linux-gpib isn't needed as this is considered a USB Resource and not a GPIB one.

author: PioB
author_rank: Regular Contributor
timestamp: February 25, 2022, 06:37:55 pm
content: Thank you very much Venturi962, I owe you one!And I will refer back to the forum here next time I upgrade fedora... Everything works and I got an answer from my power supply!Both modules I built work and I can talk to the power supply!pythonPython 3.10.2 (main, Jan 17 2022, 00:00:00) [GCC 11.2.1 20211203 (Red Hat 11.2.1-7)] on linuxType "help", "copyright", "credits" or "license" for more information.>>> import pyvisa>>> rm = pyvisa.ResourceManager()>>> print(rm.list_resources())('USB0::1003::8293::HEWLETT-PACKARD_E3633A_0_1.4-5.0-1.0::0::INSTR',)>>> my_instrument = rm.open_resource('USB0::1003::8293::HEWLETT-PACKARD_E3633A_0_1.4-5.0-1.0::0::INSTR')>>> print(my_instrument.query('*IDN?'))HEWLETT-PACKARD,E3633A,0,1.4-5.0-1.0Thanks a lot!

author: dazz1
author_rank: Frequent Contributor
timestamp: May 01, 2023, 03:42:10 am
content: HiI saw early discussion on this thread about availability of MCUs.element14 shows both:ATMEGA32U4-AU, part number 1748525 and,ATMEGA32U4-MU, part number 2425127are in stock.Which is the easiest package to hand solder?

author: dazz1
author_rank: Frequent Contributor
timestamp: May 01, 2023, 03:46:48 am
content: Quote from: Venturi962 on February 06, 2022, 02:14:12 pmHiIs this the latest design version?

author: dazz1
author_rank: Frequent Contributor
timestamp: May 02, 2023, 08:58:00 am
content: HiI have ordered Xyphro PCB design, then I found this thread. Hmmmm. I have changed course and now intend to build the Ventura variant.I like the Ventura design a lot and I am looking at making some minor tweaks.I'd prefer the old USB B connector because it is a lot more robust than a micro. 1st option was to allow either to be used on one PCB design, but my initial assessment is that I don't think it is viable without increasing the PCB size. Given that a small increase in the PCB size would have zero cost consequences, that option is still worth considering.The newish type C USB connector looks to be more robust than the micro without the bulk of the B version. Maybe this version:https://nz.element14.com/molex/217175-0001/usb-conn-2-0-type-c-rcpt-6pos/dp/3702928?ost=2171750001. A C-type connector might be the best choice for a new design.Also considering using a dual colour LED driven half by pin 39. Something like thishttps://www.farnell.com/datasheets/1676973.pdf. This would remain compatible with xyphro code but allow for some future enhancements to LED indications.I haven't used KiCAD before so modifying an existing design would be a good learning exercise.

author: dreamcat4
author_rank: Frequent Contributor
timestamp: May 02, 2023, 09:38:08 am
content: couple of things:a) if there is something new and usedul in that zip file code... it should be up into github. and properly versioned / rebased. and or optionally pr (depends if worth the bother)b) we can already see here (see pic) in the network graph. was things added in somebody else's fork in january. for example the usb-c connector is amongst one of those changeshttps://github.com/xyphro/UsbGpib/networkalthough personally i am more interested in using an arduino micro board. and then vero boarding it together to the gpib connector. to see how that turns out... got the updated version of the arduino micro with usb-c on it.

author: dazz1
author_rank: Frequent Contributor
timestamp: May 03, 2023, 09:51:03 am
content: HiIt is not my zip file and although I have a github account, I don't really know how it works. I didn't know about the really useful network feature, so I didn't know what nipo had done.I think there are three improvements worth doing on the nipo fork:1. add anti-static protection on the usb lines.2. add a bi-colour LED which can display 3 distinct colours that can communicate quite a bit of information.3. a better 3D enclosure.

author: dazz1
author_rank: Frequent Contributor
timestamp: May 18, 2023, 08:21:20 am
content: HiI have used this project as an excuse to learn KiCad.I have gathered together the good ideas of others to create the bestest and most marvelous version of the schematic and PCB for the USB-GPIB adapter."My" design is a combination of the best features I see in other designs, plus a couple of features I have dreamed up.The fruits of my effforts can be found here:https://github.com/dazz100/UsbGpib/tree/USB-GPIB-Dazz/HW/DazzThe changes made include:Adding ESD protection,Adding USB-C connector,Used hand solder friendly larger 0603 sized components,Added 2x options for mounting bi-colour LEDs,Added 2x 3mm mounting holes to anchor the enclosure to the PCB.Used a rectilinear shaped PCB to make it easier to use on stiff connectors.The USB-B connector is chunky and robust but relatively large.The USB-micro may be too fragile for knocking around in the lab.The USB-C seems to be the Goldilocks choice.The larger 0603 sized components will make it easier for the visually challenged to hand solder this project.I think the addition of a second LED can be used to convey useful status info to a user, much like the LEDs on an ethernet socket.I have added a LED to a spare output of the MCU. The original software will continue to drive one LED. The software will need to be modified to enable driving the second LED.I have found that there is no standard orientation of the rear panel connection. Readily available bi-colour SMD LEDs point upwards. I have added the option of fitting right angle LEDs on the end of the PCB (opposite the USB). Regardless of orientation, these should always be accessible to see.Centronics connectors can be stiff to insert/remove. The addition of two mounting holes will allow the enclosure to be anchored to the adapter with 3mm screws.For similar reasons, I have used a rectilinear PCB to make it easier to include finger grips in the design of the enclosure. The PCB has been slightly extended so there is some bare PCB that can fit into a slot within the enclosure to further anchor the enclosure to the PCB.The form factor of a "standard" GPIB cable assembly is side entry. This is similar to the form factor of my PCB/enclosure design. I see no advantage in a stepped shape of the PCB.I decided very early not to make any hardware changes (eg. pin allocations) that would require code changes. This includes the bi-colour LEDs which will run as a single LED mode on the current software version. So although this version is only similar in hardware design, it is not essential to modify the software.I haven't yet decided whether the enclosure will be a one-piece "cup" or a two-piece clam shell.I think this is a really good project and the incremental development by others has only improved the outcome. I have three items of old test equipment with a GPIB bus so this adapter will be a way of increasing their usefulness.I am seeking feedback on the schematic and pcb designs. Have I got it right?? Is there a feature missing?? Any feedback would be welcomed.

author: coromonadalix
author_rank: Super Contributor
timestamp: May 18, 2023, 09:03:20 am
content: personally love the usb-c variantMy 2 cent comment would have been to provide some pads for say rgb or 2 color led 3mm or 5 mm led (with their full lenght pins) being put on the side of the pcb if you 3d print some enclosure, the smt led would not be visible ? and with an hole / windowsit is not always easy to see themand i would have used standard straight pins for the programming connector, the right angled one give me chills to solder and i would say they could break easier than going thru the pcb ??annnd they are easier to source, any long straight header pins can do ...thks

author: dazz1
author_rank: Frequent Contributor
timestamp: May 18, 2023, 09:37:08 am
content: HiThanks for you feedback.The header is already straight pin thru holes. See the attached 3D model.The advantage of SMD LEDs is that I can slide the pcb into a one piece enclosure without having to worry about snagging LEDs that stick up through holes.To get around the problem of poor visibility of the LEDs, I was thinking of adding diffuse semi-transparent inserts in the enclosure. A simple way to make inserts would be to take standard LEDs and drill out the leads and diode leaving just a coloured shell. This could then be glued into the enclosure with no attachment to the PCB or smd LEDs.I could add thru-hole led pads, but the LEDs would dictate a two piece clam shell enclosure in their current position. I haven't designed the enclosure yet, but I am heading towards a one piece design that the adapter slides into.I could fit the leaded LEDs along the left edge of the PCB (as drawn). The LEDs could then slide into holes in the enclosure. The advantage of leaded LEDs is that they are available everywhere.

author: dazz1
author_rank: Frequent Contributor
timestamp: May 18, 2023, 10:00:15 am
content: Quote from: coromonadalix on May 18, 2023, 09:03:20 amPCB mount indicators like this one:https://us.rs-online.com/product/dialight/550-5207f/70081710/look like good candidates.I have had a quick tour through the code, and it looks like it would not be too difficult to add LED status for various actions.

author: coromonadalix
author_rank: Super Contributor
timestamp: May 18, 2023, 11:05:47 am
content: a last comment lollwould it be better to use a 10 pin variant of thejtagISP instead of the 6 pinbecause many many adapters / programmers come with the 10 pins and you have to do some battle to get the 10 to 6 pin converter or find programmers in the 6 pin variantshappened to me and was frustrating ...another 2 centswilling to buy assembled board ?? or you'll provide the bare board gerbers etc

author: dazz1
author_rank: Frequent Contributor
timestamp: May 18, 2023, 11:10:27 am
content: HiI have a programmer on order from Aliexpress, complete with the necessary adapter.The extra 4 pins of a 10 pin header would take up quite a bit of real-estate on the pcb.

author: dazz1
author_rank: Frequent Contributor
timestamp: May 18, 2023, 11:30:59 am
content: Quote from: coromonadalix on May 18, 2023, 11:05:47 amI will buy the bare board and assemble myself for my own use.I hadn't considered making/selling them.Most parts come in 5's but I only need 3 adapters. I expect to have at least 2 spare boards plus parts left over.This is a very niche item.

author: dreamcat4
author_rank: Frequent Contributor
timestamp: May 18, 2023, 11:42:48 am
content: Quote from: dazz1 on May 18, 2023, 11:10:27 amCould please provide link to the programmer you ended up ordering? Many thanks

author: dazz1
author_rank: Frequent Contributor
timestamp: May 18, 2023, 12:06:15 pm
content: Quote from: dreamcat4 on May 18, 2023, 11:42:48 amThere are many shops selling the same item. This is one of them.https://www.aliexpress.com/item/1005004954482917.html?spm=a2g0o.order_list.order_list_main.89.23251802Ao05Ef

author: dazz1
author_rank: Frequent Contributor
timestamp: May 19, 2023, 06:19:55 am
content: HiI have now added the option of thru hole, right angle LEDs as shown on the attached screen shot. I have designed for the Dialight 551-xx07F 3mm series. The LEDs are orientated to point out the rear of the adapter to allow for a single piece enclosure. The enclosure will be able to slide over the pcb and connector.The option of the smd bi-colour LED beside the connector is still there. The disadvantage of the SMD option is that the LEDs will only be visible one way up.

author: dazz1
author_rank: Frequent Contributor
timestamp: May 19, 2023, 08:09:41 am
content: HiThe current version of the software is only designed for one red LED. The software will not use the second green LED. I think that two LEDs should be able to provide useful status information, especially for GPIB initial diagnostics.I am hoping someone reading this will be interested enough to take up the challenge of modifying the code to improve visual status information from the two LEDs. I would rather not do it myself because I haven't programmed this MCU before and I don't have the development tool chain setup. I haven't written C code before. I can understand it, but I haven't written it.I propose the pair of LEDs display static on state to indicate power/connection and,flashing to indicate activity as described below.Red on = Power OnGreen on = GPIB device connectedRed flashing = writing data from the GPIB. Achieved by turning off the LED for a moment.Green flashing = reading data from the GPIB. Achieved by turning off the LED for a moment.There is a variable calledCode:s_device_stateWhen this has a value =Code:GPIB_DEVICE_CONNECTSTATE_CONNECTEDthe adapter recognizes that the GPIB is connected to an active device and the green LED should be turned on. The GPIB status is returned by a call to the function declared asCode:bool gpib_is_connectedThe Red LED simply needs to be turned on to indicate that USB is available.Read/Write events can be signaled by setting booleans value each time a read or write function is called. An ISR running at say 100Hz can turn off the related LED, then turn it back on again. This would create an activity indicator. Using a timer triggered ISR will minimise the computing load of the LEDs and display flashing at a rate slow enough to be recognized as flashing.I don't think any of this would be too difficult. It would just need some time and skill.

author: dazz1
author_rank: Frequent Contributor
timestamp: May 22, 2023, 11:56:33 am
content: HiIn this world of virtual reality, I can safely say I have completed the bestest and most marvelous version of the GPIB adapter.Just marvel at the attached viewBack in the real world, I have ordered the PCBs. They will take a couple of months to get to me.In the mean time, I can design an an enclosure around the 3D model. I have a 3D printer so I can try out different ideas.I am thinking of going to a curvaceous organically shaped enclosure because I can. It will be a differentiating feature to the over-priced branded adapters.

author: dazz1
author_rank: Frequent Contributor
timestamp: June 10, 2023, 09:44:25 am
content: HiOK I want to make a small modification to the C code for the adapter.At present, the single indicates different states:LED blinking: The USBGPIB converter is connected to a measurement instrument, it is powered off or its GPIB port is disabled. In this state, the device is also not connected to USB and will not show up in the device manager or lsusb.LED on: The device is connected to a measurement device and GPIB communication possible. It is also accessible over USBLED off: The device is not connected over USB, or the PC powered offRight now, I am still waiting for the pcb's to be delivered. I have the necessary components to build the USB-GPIB adapter.I want to program the 2nd LED to indicate read/write activity like an Ethernet connector. The aim is to provide visual confirmation that the adapter is actively communicating with the device.I think I can do this by triggering the LED off the GPIB-DAV signal. Making this change would leave the code 100% compatible with the Xyphro original hardware design.I need to create a programming tool chain to do this. I have been reading up on AVR compilers and there seems to be a wide choice. I don't need an IDE for the simple code changes I have in mind. The creator Xyphro appears to have used GCC.Can anyone point to a guide on configuring GCC to compile the Xyphro code, and then programming the AVR. I can do this with Win10 or Linux.

author: coromonadalix
author_rank: Super Contributor
timestamp: June 10, 2023, 01:14:44 pm
content: for the 3d caseyou could try some snapping effect between the 2 partsfor the programmer avrdude is a preferred, avrdudess for windows ...I would put myself in line to order 1 or 2 completed pcb's

author: dazz1
author_rank: Frequent Contributor
timestamp: June 10, 2023, 10:34:58 pm
content: HiI have considered an snap enclosure, but the Centronics connectors requires too much force for such an enclosure to survive being pulled and pushed too often.The strongest candidate I have found for a gcc based AVR tool chain is the Ubuntu versionhttps://askubuntu.com/questions/581690/install-avr-libcI have considered selling completed units but I had to close my child labour sweat shops.So after factoring in:the value of my time (I have never been paid more than half of my true value)global warming,carbon tax credits,and of course the effect of inflation on the cost of wurled peasI have a calculated a retail price of $328,231.17 plus shipping and sales tax.Min order quantities required me to buy enough parts for 5x interfaces, but I only have 3x test equipment with a GPIB interface.There could be some wiggle room on the priceTo be serious for just a moment, I doubt that it would be worth me selling individual units at any price. I didn't start work on this project with the intention of selling units. By far the most expensive item is the cost of assembly. To keep that within reasonable limits, I would need a reasonable number of orders to do at one time. Given the niche nature of this adapter, that probably won't happen.

author: tautech
author_rank: Super Contributor
timestamp: June 11, 2023, 05:32:19 am
content: But Dazz, when last I visited you have one slave labor unit still at home, can you not put him to good use ?Or is it?

author: Gertjan
author_rank: Frequent Contributor
timestamp: June 11, 2023, 06:27:42 am
content: Quote from: dazz1 on June 10, 2023, 10:34:58 pmThink out of th box!The solution is not selling adapters, but acquiring two more test equipments with GPIBregards, Gertjan.

author: dazz1
author_rank: Frequent Contributor
timestamp: June 11, 2023, 07:07:58 am
content: Quote from: Gertjan on June 11, 2023, 06:27:42 amThat is the plan

author: dazz1
author_rank: Frequent Contributor
timestamp: June 11, 2023, 07:10:55 am
content: Quote from: tautech on June 11, 2023, 05:32:19 amYes it isand

author: dazz1
author_rank: Frequent Contributor
timestamp: June 11, 2023, 10:47:55 am
content: HiI have been reading into the code. The code to drive the LED doesn't match the documentation that well.So if I am reading the code correctly (I am a C virgin) then:if the USB is connected, the LED stays onCode then goes into a loop. The LED is switched off if no GPIB device is connected.if no GPIB device is connected and off, the LED flashes at 2Hz until.a GPIB device is connected and on, then the LED flashes at 5Hz.It also flashes 250ms pulses when USB data is transferred.So the LED indicates activity, but the LED is shared between GPIB and USB.I am looking at changing the code to show USB status/power on the RED led, and GPIB status/data transfer on the GREEN LED.So:RED ON = USB power onRED Flashing Slow = USB enabledRED Flashing Fast = USB activeGREEN OFF = no GPIB device connected.GREEN ON = GPIB device connected and offGREEN Flashing Slow = GPIB device connected, on and enabled.GREEN Flashing Fast = GPIB device active.Thoughts? Does this make sense??

author: rssenior
author_rank: Newbie
timestamp: June 24, 2023, 05:29:56 am
content: Do you have a bill of materials for your version dazz1? I thought I saw one once, but I'm not seeing it now.

author: dazz1
author_rank: Frequent Contributor
timestamp: June 24, 2023, 06:36:29 am
content: Quote from: rssenior on June 24, 2023, 05:29:56 amI added a BOM for the Xyphro version in issues on his Git page.Attached is a BOM for my version with part numbers from element14.I now have the parts and the PCBs, but not enough time to assemble yet.

author: intabits
author_rank: Frequent Contributor
timestamp: July 04, 2023, 08:44:24 am
content: Quote from: dazz1 on June 24, 2023, 06:36:29 amHave you assembled and tried one yet?I'm currently designing an adapter PCB for this same connector, and as far as I can tell, your connector is arse-about.You would need to mount it to the bottom of the PCB shown in reply #61.Or is it me that has it wrong?I'm looking at these connector diagrams:-https://www.hp9845.net/9845/tutorials/hpib/(bottom of page)http://www.hit.bme.hu/~papay/edu/GPIB/tutor.htmhttps://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kIoVSAUhttps://www.tmatlantic.com/encyclopedia/index.php?ELEMENT_ID=14204All these have DIO1 at top-left when looking into the connector with the wide side at the left. And that would also go to the top-left pad on your PCB, but your DIO1 is at the bottom-left!?I was just about to send my design to JCLPCB after a final check, but now I'm confused....

author: dazz1
author_rank: Frequent Contributor
timestamp: July 04, 2023, 09:49:43 am
content: Quote from: intabits on July 04, 2023, 08:44:24 amNo haven't assembled mine yet. Nor did I check the connector pin-out before I sent my Gerbers out.I started by copying other PCB designs. If I am wrong, so are they. I have checked the pin numbers on the connectors I have. My PCB is OK. Pin 1 marked on the connector puts it on the bottom left.The boards I have are for lead-less devices. A little challenging to solder, but I have a hot air station.I have redesigned my PCB to use a leaded flat pack type package for the MCU. The PCB is just a few mm deeper, but still very small. I have not had this PCB version made.

author: intabits
author_rank: Frequent Contributor
timestamp: July 04, 2023, 10:52:21 am
content: Quote from: dazz1 on July 04, 2023, 09:49:43 amYes, same on my connector. I was following signal names rather than pin numbers.Two of the links in my previous post appeared to be views of cable plugs looking into the mating side, but these are piggy-back, and the views were looking into the female side of them, it seems. (Or looking through the adapter to the instrument connector)Someone else had similar confusion, but provided a definitive diagram:-https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3379350/#msg3379350Thanks for helping clear this up.(Now back to my orginal PCB version for JLCPCB)

author: rhb
author_rank: Super Contributor
timestamp: July 04, 2023, 08:59:00 pm
content: Out of curiosity, what about the AR488 by WaveyDipole? Why would you not use that and the Uno R3 shield @artag designed so you can plug a 24 pin IDC cable on into the shield and attach up to 10 GPIB devices using IDC Centronics coonnectors.There is a very long thread about it on this forum.In any case, the price of name brand GPIB adapters that aren't fakes is ridiculous. So another design is always useful. Thank you.Have Fun!Reg

author: TheDefpom
author_rank: Frequent Contributor
timestamp: July 05, 2023, 03:13:50 am
content: If this works OK I might be interested in one Darren, but I can only scrape together $88,666.42, I hope that is enough.

author: dazz1
author_rank: Frequent Contributor
timestamp: July 05, 2023, 04:38:29 am
content: Quote from: TheDefpom on July 05, 2023, 03:13:50 amI wouldn't normally accept that amount for payment.I usually require at least a 10% deposit.

author: deepfryed
author_rank: Unknown
timestamp: July 05, 2023, 08:57:13 am
content: I'm using xyphro’s UsbGpib adapter on Linux (Debian) and it works perfectly fine as a usbtmc interface. I haven't used it with any NI / proprietary tools and wrote some python using python-usbtmchttps://github.com/python-ivi/python-usbtmcThe python-usbtmc project has a udev rules sample file, I updated it to use the vendor id for the usbtmc device and update the group to dialout. So no need to run things as root. If I need to add some real time graphing, I can use python's matplotlib.e.g.#!/usr/bin/python3import usbtmcimport time# DMM 34401Ainstr = usbtmc.Instrument(0x03eb, 0x1041)print(instr.ask("*IDN?"))print(instr.ask("SYST:ERR?"))print(instr.ask("MEAS:VOLT:DC?"))

author: dazz1
author_rank: Frequent Contributor
timestamp: July 05, 2023, 09:26:42 am
content: Quote from: deepfryed on July 05, 2023, 08:57:13 amI haven't even begun to look at code but I will definitely bookmark that link. I will need to start by learning Python.

author: dragon5
author_rank: Contributor
timestamp: September 13, 2023, 10:58:03 am
content: Check the gpib4pi board released in 2023. It provides GPIB interface solution based on linux-gpib toolchain and its bitbang driver. It is 100% open-source hardware (OSHWA certified NO000003 -https://certification.oshwa.org/no000003.html). It has a standard IEEE-488 compliant SN75160/1 drivers. You can set up a wireless LAN/GPIB gateway with a Raspberry Pi Zero W described in this application notehttps://www.hackster.io/lightside-instruments/wireless-lan-gpib-gateway-with-open-source-hardware-6e0af8

author: dazz1
author_rank: Frequent Contributor
timestamp: September 13, 2023, 11:06:04 am
content: Quote from: dragon5 on September 13, 2023, 10:58:03 amHiI am committed to the USB-GPIB adapter. I have modified the pcb design (twice) and figured out what software mods I need to make for my two LED version. The pcbs and parts are waiting for me to put them together.

author: artag
author_rank: Super Contributor
timestamp: September 13, 2023, 05:11:13 pm
content: Quote from: rhb on July 04, 2023, 08:59:00 pmThe initial question in this thread was to find an adapter which can be accessed through the Visa API. The AR488 doesn't do that - it emulates the Prologix USB adapter, which communicates over a serial-over-USB emulation.I guess it's possible to write a Visa interface for Prologix but I don't know that anyone's done that. Or modify the python interface to use Prologix instead of Visa, but then you end up with a Python API which is another ratsnest of incompatibility.It's also possible, with some reassignment of pins, to make the xyphro software work with AR488 hardware. However, the xyphro software makes better use of the Atmega's pins : some are not available on the Arduino boards which results in inefficiences such as having to bit-address some ports instead of byte-address. IIRC I laid out the Arduino Pro Micro pcb to work as well as possible (eg write the 8 bit data port in only two writes) but the original xyphro assignment is better.

author: maxwell3e10
author_rank: Frequent Contributor
timestamp: September 13, 2023, 05:54:52 pm
content: Could you post your version of the code for Arduino Pro Micro? I'd like to try it, without having to make a custom PCB.

author: caiser01
author_rank: Regular Contributor
timestamp: October 14, 2023, 06:19:47 pm
content: Quote from: artag on September 13, 2023, 05:11:13 pmI use my AR488 adapters with pyvisa exclusively and they work great. Here's an example for reading DC voltage from an HP 34401A:Code:import pyvisafrom sys import platformrm = pyvisa.ResourceManager('@py')if platform == "linux" or platform == "linux2":# Linuxmultimeter = rm.open_resource('ASRL/dev/ttyUSB0::INSTR')elif platform == "darwin":# macOSmultimeter = rm.open_resource('ASRL/dev/cu.usbmodem101::INSTR')elif platform == "win32":# Windows, COMx = ASRLxmultimeter = rm.open_resource('ASRL19::INSTR')multimeter.write('++rst')multimeter.close()sleep(2)multimeter.open()multimeter.baud_rate = 115200multimeter.timeout = 5000multimeter.write_termination = '\n'multimeter.read_termination = '\n'multimeter.write('++addr 22')multimeter.write('++auto 2')multimeter.write('++eos 2')multimeter.write('++eoi 1')multimeter.write('*RST')multimeter.write('*CLS')print(multimeter.query('*IDN?'))multimeter.write('CONF:VOLT:DC 10,0.001')try:while(True):print(multimeter.query('READ?'))except KeyboardInterrupt:multimeter.write('*RST')multimeter.write('*CLS')multimeter.write('++loc')multimeter.close()rm.close()Quote from: artag on September 13, 2023, 05:11:13 pmI'm wondering if the opposite is true, i.e. that you can use AR488 software with the xyphro hardware by changing up the pin assignments. I've been playing around with xyphro adapters and I like the form factor. I'd be interested in trying to get the AR488 firmware running on the xyphro adapter...

author: coromonadalix
author_rank: Super Contributor
timestamp: October 15, 2023, 02:06:04 am
content: you have to remap some pins ...

author: caiser01
author_rank: Regular Contributor
timestamp: October 15, 2023, 06:04:02 pm
content: Looking at the schematics for the xyphro vs the Arduino Pro Micro, I think it is possible to run AR488 on the xyphro adapter but I think it requires a custom Arduino board definition. Two of the pins the xyphro uses as data lines are used as the RX and TX LEDs on the Pro Micro, so I think you'd need an Arduino board definition that remapped those to other pins to be able to flash AR488 on the xyphro hardware.I might give it a shot if I have enough time to kill one day...

author: dazz1
author_rank: Frequent Contributor
timestamp: November 11, 2023, 08:31:12 pm
content: I have assembled one USB-GPIB adapter and I am now trying to load the firmware.I have an Aliexpress usbasp programmer. I am running avrdude on Ubuntu.I have successfully run the following commands:Code:avrdude -P usb -c usbasp -p m32u4 -e -Uefuse:w:0xcb:mavrdude -P usb -c usbasp -p m32u4 -e -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:mavrdude -P usb -c usbasp -p m32u4 -U flash:w:BootLoader.hexavrdude -P usb -c usbasp -p m32u4 -e -U flash: "FLASH.BIN" -vvvvThese commands are based on instructions earlier in this thread and they return messages of success.For the benefit of others:-P the port-c programmer type-p MCU type-e erase first. Necessary before programming.seeCode:/etc/avrdude.confandCode:man avrdudeor/andhttps://www.nongnu.org/avrdude/user-manual/avrdude_3.html#Option-Descriptionsfor full details.I am now stuck on what to do next. I understand this is a copy command, but I can't figure out what my destination should be. I was expecting another avrdude command at this point.Code:cp TestAndMeasurement.bin /run/media/baettig/GPIBUSBBOOT/FLASH.BIN# verify with md5sum, umount, unplug

author: deepfryed
author_rank: Unknown
timestamp: November 11, 2023, 09:24:48 pm
content: Quote from: dazz1 on November 11, 2023, 08:31:12 pmDid you see the note re. Linux on the README ?Quote

author: dazz1
author_rank: Frequent Contributor
timestamp: November 12, 2023, 12:52:22 am
content: Quote from: deepfryed on November 11, 2023, 09:24:48 pmYes, I did not see the note.Quote from: deepfryed on November 11, 2023, 09:24:48 pmThe dd command is one I only use as the option of last resort.I think the root of my problem is a dumb assumption. I assumed that the initial firmware would be all loaded via the programmer.I now see that the process requires the programming of the the boot loader via the ISP connector, followed by copying the firmware via the usb connector.OK so I have connected Win10 (dual-boot PC) to the usb-gpib usb-C connector. I see:Code:GPIBUSBBOOT(D:)EEPROM.BIN 1KBFLASH.BIN 24KBSo that looks like it is working.Then I tried copying TestandMeasurement.bin via the usb connector and got the error message in the attached image.FLASH.BIN is taking up all the space.For me, it makes no sense to re-program via the USB port.To enable the boot loader to load new firmware, I need to remove the enclosure and short two pins on the ISP connector. Then download the firmware via the usb connector using the data destroyer dd command or Win10 copy.If I re-program the firmware via the ISP connector, I need to remove the enclosure and plug in my usbasp programmer using the benign avrdude program.To use the usb connector really requires an externally accessible push switch to short the ISP pins without removing the enclosure. I did look at this option when designing my PCB but did not include one. I think I will add that option on the pcb (fit for but not with).I have make progress. I have confirmed:the ISP works,the usb-C works,the MCU works.but I have not yet been able to load the usb-gpib firmware. I am still doing something wronng.

author: deepfryed
author_rank: Unknown
timestamp: November 12, 2023, 01:04:05 am
content: In theory, you could use the arduino style bootloader and just program directly from USB without shorting any pins. I'm not sure why the flash bootloader was chosen

author: dazz1
author_rank: Frequent Contributor
timestamp: November 12, 2023, 03:13:17 am
content: Quote from: deepfryed on November 12, 2023, 01:04:05 amRight now I am just trying to get the firmware installed and running. I plan to modify the software to run the two status LEDs because two LEDs is always better than one.

author: dazz1
author_rank: Frequent Contributor
timestamp: November 12, 2023, 07:43:59 am
content: I am thinking if I don't install (delete) FLASH.BIN, I will have enough space for the usb-gpib firmware. My understanding of the software is that the FLASH.BIN code is only called if the 2 pins on the ISP connector are shorted.

author: deepfryed
author_rank: Unknown
timestamp: November 12, 2023, 09:17:20 am
content: Code:avr-size --mcu=atmega32u4 --format=avr TestAndMeasurement.elfAVR Memory Usage----------------Device: atmega32u4Program: 9190 bytes (28.0% Full)(.text + .data + .bootloader)Data: 241 bytes (9.4% Full)(.data + .bss + .noinit)I shouldn't take a lot of space. I followed the instructions on getting the bootloader flashed, unplug and plug usb back in, short pin 4 & 6 of the ISP header (MOSI & GND) for abour 3 seconds and the bootloader should appear as a flash drive. Mount it and then copy the file acrossCode:sudo mount /dev/sdb /media/avrsudo dd if=TestAndMeasurement.bin of=/media/avr/FLASH.BIN bs=512 conv=notrunc oflag=direct,syncsudo umount /media/avrThis works as advertised for me.

author: dazz1
author_rank: Frequent Contributor
timestamp: November 12, 2023, 09:26:42 am
content: For me the problem is that the FLASH.BIN file is taking up 24kB of 32kB memory, so no room for the measurement app file.

author: deepfryed
author_rank: Unknown
timestamp: November 12, 2023, 09:33:08 am
content: what is the FLASH.BIN file ?There are 2 artefacts, the bootloader.hex and the TestAndMeasurement.bin files. The bootloader is programmed through the avrdude command as described in the readme.Once the bootloader presents the device as a flash drive, you copy the TestAndMeasurement.bin file to the drive and name it FLASH.BIN, that way the bootloader can program the flash once the file is written.avr-size tells me TestAndMeasurement.elf is about 9K, should not be anywhere close to 20k+

author: dazz1
author_rank: Frequent Contributor
timestamp: November 12, 2023, 09:55:38 am
content: FLASH.BIN appears way back in reply No.41. I missed the bit about renaming it.I will do what you have done and that should work.

author: dazz1
author_rank: Frequent Contributor
timestamp: November 13, 2023, 02:17:35 am
content: HiI didn't do what you said. I tried something else.I started by copying the TestAndMeasurement.bin file to FLASH.BIN. Same file, different name.For all of the commands below, the USB-GPIB adapter was connected to a usbasp programmer via the ISP connector.I ran this command in Linux:Code:>$ avrdude -P usb -c usbasp -p m32u4 -e -U flash:w:FLASH.BINand got the following messages in response:Code:avrdude: warning: cannot set sck period. please check for usbasp firmware update.avrdude: AVR device initialized and ready to accept instructionsReading | ################################################## | 100% 0.00savrdude: Device signature = 0x1e9587 (probably m32u4)avrdude: erasing chipavrdude: warning: cannot set sck period. please check for usbasp firmware update.avrdude: reading input file "FLASH.BIN"avrdude: input file FLASH.BIN auto detected as raw binaryavrdude: writing flash (9312 bytes):Writing | ################################################## | 100% 5.40savrdude: 9312 bytes of flash writtenavrdude: verifying flash memory against FLASH.BIN:avrdude: load data flash data from input file FLASH.BIN:avrdude: input file FLASH.BIN auto detected as raw binaryavrdude: input file FLASH.BIN contains 9312 bytesavrdude: reading on-chip flash data:Reading | ################################################## | 100% 4.74savrdude: verifying ...avrdude: 9312 bytes of flash verifiedavrdude: safemode: Fuses OK (E:F3, H:D8, L:FF)avrdude done. Thank you.After this, the status LED started flashing on the GPIB adapter. So this looks like success.I like writing this sort of thing into Linux shell scripts to reduce the chance of error. I have 4x more adapters to build and program. A script means I can exactly reproduce a complex command sequence.My script looks like this:Code:#!/bin/bash# uploads usb-gpib firmware to usb-gpib adapter.# version 1.2 13 Nov 2023avrdude -P usb -c usbasp -p m32u4 -e -Uefuse:w:0xcb:mavrdude -P usb -c usbasp -p m32u4 -e -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:mavrdude -P usb -c usbasp -p m32u4 -U flash:w:BootLoader.hex# -> yields# avrdude: safemode: Fuses OK (E:CB, H:D8, L:FF)# copy the TestAndMeasurement.bin file to FLASH.BIN. Probably not necessary, but it worked.# This command loads the firmware.avrdude -P usb -c usbasp -p m32u4 -e -U flash:w:"FLASH.BIN"# run this command to read and verify the firmwareavrdude -P usb -c usbasp -p m32u4 -U flash:v:"FLASH.BIN"At the end of running these commands, the status LED slowly flashed on the usb-GPIB adapter. So it all appears to have worked.I then tried shorting the two ISP pins to try and get the adapter to appear as a drive, but that didn't work.The final test I haven't done is to try controlling a device. I have a HP 3478A multi-meter. I just need to find some software compatible with the adapter. One I tried was looking for a COM port.

author: dazz1
author_rank: Frequent Contributor
timestamp: November 13, 2023, 04:46:30 am
content: HiI may have found the bug mentioned in the README file.When I plug in the adapter into the PC USB, it tells me the USB device is not recognised.Yesterday I successfully uploaded the firmware from the PC to the adapter with the same cable and that worked OK. So I don't think I have a hardware problem. The leading hypothesis is that using avrdude to load the firmware has exposed the bug.

author: dazz1
author_rank: Frequent Contributor
timestamp: November 13, 2023, 07:33:58 am
content: I found some ready-made GPIB control software here:https://www.eevblog.com/forum/testgear/hp-34401a-standalone-software/I just need to get my adapter working first.With the usb interface malfunctioning, I can't over-write the existing software via the usb connection. I will have to do it with avrdude.

author: caiser01
author_rank: Regular Contributor
timestamp: November 14, 2023, 02:40:35 pm
content: Quote from: dazz1 on November 13, 2023, 02:17:35 amdeepfryed was telling you the right way to do it, which is the way xyphro outlines in his README on GitHub (https://github.com/xyphro/UsbGpib)Quote from: dazz1 on November 13, 2023, 04:46:30 amSince you deviated from the flashing process that the developer recommends, I would first try erasing and re-flashing using xyphro's instructions exactly before assuming there is a bug. I have flashed several of these adapters without issue by following the xyphro's instructions, and they work correctly afterward. If you prefer to script the process, as you showed in your earlier post, that's fine but the process should still follow what is outlined by the developer.Once the adapter has been flashed and you see the LED blinking, you can connect the adapter to an instrument. One simple method of testing is by using the pyvisa-shell application (https://pyvisa.readthedocs.io/en/latest/introduction/shell.html). This will allow you to interactively communicate with the instrument to test basic functionality. Alternatively if you have a VISA implementation from one of the commercial vendors, they all include a utility that allows you to interactively send commands to and read from the instrument. My personal favorite is Rohde & Schwarz (https://www.rohde-schwarz.com/us/applications/r-s-visa-application-note_56280-148812.html). The R&S Tester app will allow you to quickly check communication with an instrument.Finally, if you're familiar with Python, here is a simple script that can be used to read from the HP 3478A you mentioned in your earlier post. Please note: Your VISA resource string will be different because your adapter will have a different serial number to mine.Code:# HP 3478A Multimeter simple read testimport pyvisarm = pyvisa.ResourceManager()multimeter = rm.open_resource('USB0::0x03EB::0x2065::GPIB_23_3423331363435161F191::INSTR')# Set function to DC voltsmultimeter.write('F1')try:while True:print(float(multimeter.read().strip()))except KeyboardInterrupt:multimeter.clear()multimeter.close()rm.close()

author: dazz1
author_rank: Frequent Contributor
timestamp: November 14, 2023, 07:13:58 pm
content: Quote from: caiser01 on November 14, 2023, 02:40:35 pmI agree with all of the above but I generally don't learn a lot by just following the instructions. I want to modify the Xyphro software to run on my hardware, while remaining compatible with the Xyphro version. To do that I need a deeper understanding of programming model and tool chain. I have programmed in a number of languages but not Python or C++ so I intend to learn. Before this project, I had never heard of avrdude but now I can write usable commands.I will use those links to the gpib type software. They will be useful as a confidence check and for diagnostics.My understanding is that it should be possible to program the firmware by flashing one image to avoid the need for the two step process that can't be scripted (unplug/plug in the adapter). It appears the way to do that with the Xyphro software is to use avrdude to read back an image of a fully flashed usb-gpib adapter flash and use that to write to other un-programmed adapters. When first plugged in, the adapter would not appear as a memory device.I have avrdude installed on the windows side so I am going to play around with that. If things get truly desperate, I might even be forced to follow the instructions.

author: caiser01
author_rank: Regular Contributor
timestamp: November 14, 2023, 09:24:02 pm
content: Quote from: dazz1 on November 14, 2023, 07:13:58 pmIf you want a single hex file that combines the bootloader and GPIB application, there's another way that might be easier. Go get SRecord (https://srecord.sourceforge.net/) and use srec_cat to concatenate the hex files for the bootloader and the application. Both hex files are available already compiled in xyphro's repository. The command to concatenate them will look similar to this:Code:srec_cat BootloaderMassStorage.hex -Intel TestAndMeasurement.hex -Intel -o combined.hex -IntelThat should give you a single hex file you can flash with avrdude in one step.I would still encourage you to flash one adapter by the original instructions so you have a known good baseline before you start changing things.

author: dazz1
author_rank: Frequent Contributor
timestamp: November 15, 2023, 02:16:32 am
content: I previously completed firmware programming in Linux and Windows. The 2nd part of loading the firmware while the adapter pretended to be a memory device, so I have high confidence that the hardware, including usb, is working.Current plan is to use avrdude on the Windows side to reprogram the firmware.Programming with HEX files looks promising.The problem I am having is that I need to link up the GPIB equipment, the adapter, and some GPIB software that matches the equipment. If any one of those links don't work, the whole chain is broken.It would be useful to have a simple program for confidence checking of the adapter. To a limited extent, the flashing LED indicates programming success. I am thinking of a program that flashes the LED (oscilloscope trigger), then pulsing individual MCU pins in timed sequence. Such a simple program would allow a good test of the adapter hardware with any oscilloscope. It would actually be a good test of the whole adapter without dependencies.

author: caiser01
author_rank: Regular Contributor
timestamp: November 15, 2023, 03:34:56 am
content: Quote from: dazz1 on November 15, 2023, 02:16:32 amI think I understand what you're getting at; a sort of "factory test" of the GPIB adapter. If the virtual USB drive part worked for flashing then you've already confirmed USB is working. There's 16 I/O pins you need to check for the GPIB signals. I can see how you could use the LED as a trigger and then pulse each GPIB pin in turn. Another option is to make a really simple test jig that would plug on to the GPIB connector of the adapter. I might just have 16 LEDs tied together common-cathode with a single current limiting resistor. Program the micro to do a simple, single light chaser pattern across the LEDs and that should tell you those pins are okay.Since you've designed your own board, the most important thing is probably to confirm that you've routed the signals from the micro to GPIB connector identically to the original xyphro design. Once you're certain of that, you can be confident that the original firmware will work correctly. Then with xyphro's firmware on the adapter, install R&S VISA on your PC (not much to go wrong there), plug up to an instrument, and try to send a command and/or read some data. If you can do that, you can be confident that everything in the chain is working. Then you can move on to fiddling with the adapter code to add your second LED functionality.But be warned! Timing is super important for the GPIB handshake and data signals! If the code you add for your second LED interferes with any of that, it may break the core GPIB functionality.

author: dazz1
author_rank: Frequent Contributor
timestamp: November 15, 2023, 04:49:45 am
content: Quote from: caiser01Yes, that is exactly what I would have done if I developed this project.Quote from: caiser01After doing some testing today, I am less confident the USB drive part is working. Hmmmm.Quote from: caiser01Yes.Quote from: caiser01Yes that would work, but I figure that anyone who wants a usb-gpib adapter is going to have an oscilloscope, and would not build an LED panel.In my case, I have a HP 54645D scope complete with logic analyzer probes. So if I make up a board with male/female GPIB connectors, and a connector for the HP 54645D LA cable, I can plug in the probe cable and record GPIB signals. That is a feature I could have used to help recent fault finding efforts by others.Quote from: caiser01I checked my board design against Xyphro netlist (slightly modified) so I have high confidence my board is electrically correct. I cannot be certain that the solder joints and actual pcb is fault free.Quote from: caiser01Yes. I am running Xyphro's firmware as-is, without modification.Quote from: caiser01I have already figured out what modifications I want to do. Driving 2 LEDs will be no more time consuming than one. Possibly slightly less.From the windows side, using a USB-ASP programmer, I cleared FLASH and burned the bootloader. When I plug the adapter into the PC USB, it does not show as a USB device. Same is true when I short the ISP pins. I haven't yet tried the cat HEX app.

author: caiser01
author_rank: Regular Contributor
timestamp: November 15, 2023, 05:27:39 am
content: Quote from: dazz1 on November 15, 2023, 04:49:45 amWhat commands did you use to do this?

author: dazz1
author_rank: Frequent Contributor
timestamp: November 15, 2023, 06:43:54 am
content: Quote from: caiser01I followed the Xyphro instructions with these commands:Code:avrdude -P usb -c usbasp -p m32u4 -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:mavrdude --p usb c usbasp -p m32u4 -U flash:w:BootLoader.hexThen I connected the adapter to the PC usb port and, .... nothing.Yesterday I was getting beeps and error messages about usb but I think what I actually did was over-write the BootLoader file with the TestandMeasurement file.I have not yet got to trying the concat hex file thing.Some time later .....I wrote the TestAndMeasurement.bin file to the adapter using the usbasp programmer. Yes, I now realize this wipes out the bootloader. [Edit: I now know the bootloader is not overwritten because it resides in a different part of memory] What it does do is run the TestAndMeasurement firmware. This causes the LED to flash at about 0.3Hz but the PC no longer detects the usb connection being made. That is new. Most likely a hardware fault because I have not changed the software.

author: caiser01
author_rank: Regular Contributor
timestamp: November 15, 2023, 01:16:10 pm
content: Quote from: dazz1 on November 15, 2023, 06:43:54 amThat is the correct behavior for the GPIB application firmware. The light will blink and no USB device will show up until you connect it to the GPIB port of an instrument and power the instrument on. The adapter will then detect the instrument and present itself to the PC as a USB device with the appropriate VISA resource string. xyphro describes his philosophy behind this behavior here:https://github.com/xyphro/UsbGpib#usb-enumeration

author: dazz1
author_rank: Frequent Contributor
timestamp: November 15, 2023, 11:49:15 pm
content: Quote from: caiser01Yes, but I am no longer seeing a usb connection on my PC regardless of what I do. At present the adapter is plugged into a gpib device (HP 3478A), the LED is flashing, but the PC does not see the usb adapter. I am working to the hypothesis that there is a hardware fault on the usb section. The first step is to concat the bootloader and TestAndMeasurement files to see if I can get the adapter to present itself as a CD-ROM.

author: alan.bain
author_rank: Regular Contributor
timestamp: November 16, 2023, 01:11:42 am
content: I have a little direct adaptor Ethernet to GPIB built around a STM32 F439ZI Nucleo and a small daughter board with bus transceivers (so it can operate multiple devices). It seems to work well and at some point I produced a PCB with the whole lot on it to avoid needing the Nucleo, must test someday (the prototype worked well enough it just got used).It speaks a Prologix like command set and seems featured enough to run an HP3048 type phase noise setup. It doesn't support parallel poll because I didn't need it and never wrote the software although the hardware should support it.It's very convenient as the whole equipment rack is connected to ethernet and can happily be controlled by any wifi device without lots of USB wires to risk pulling off surface mount USB micro sockets!(Happy to share the firmware source code / put in public domain for others to use)

author: dazz1
author_rank: Frequent Contributor
timestamp: November 17, 2023, 05:47:57 am
content: I have taken a closer look at the HEX files. I think they already include the correct memory address locations. It should be possible to load both with them ending up in the right locations in flash.So from the windows side, I ran the avrdude command shown in the attached screen snip.The response indicated successful programming. When I plugged the adapter into the PC usb port, nothing. No flashing LED, no ding from the PC to indicate a USB connection. The later may be the usb hardware fault.When I run the the avrdude command that only programs the TestAndMeasurement.hex and not the BootLoasder.hexCode:avrdude -c usbasp -p m32u4 -U flash:w:TestAndMeasurement.hexThen I get the flashing LED back again.It would be useful to know if both hex files can be programmed and then run on hardware known to be working. If both hex files can be programmed with one command, that would simplify things.The software includes a magic value which I think triggers the call to the BootLoader at address 0700h by enabling the watch dog timer, but I haven't studied this in detail.Code:void Jump_To_Bootloader(void){// If USB is used, detach from the bus and reset itUSB_Disable();// Disable all interruptscli();// Wait two seconds for the USB detachment to register on the hostDelay_MS(2000);// Set the bootloader key to the magic value and force a reset//Boot_Key = MAGIC_BOOT_KEY;wdt_enable(WDTO_250MS);Delay_MS(500);((void (*)(void))0x7000)();for (;;);}The next thing I will do is some troubleshooting of the USB hardware to see if I can find something.

author: caiser01
author_rank: Regular Contributor
timestamp: November 17, 2023, 05:11:11 pm
content: Okay, I combined the two original hex files from xyphro's repository with this command:Code:srec_cat BootloaderMassStorage.hex -Intel TestAndMeasurement.hex -Intel -o UsbGpib-combined.hex -IntelThen I programmed that combined hex file to one of my five working adapter of xyphro's hardware design using this command:Code:avrdude -c atmelice_isp -p m32u4 -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m -U flash:w:UsbGpib-combined.hexRight away the LED started flashing. I shorted the two pins on the programming header and the virtual USB drive appeared on my PC as expected. Unplugged and replugged the USB cable and then connected the adapter to my HP 5385A frequency counter. The USBTMC device became visible and then I was able to talk to the counter interactively from Python.So the hex file attached below when flashed to the hardware I have results in a working UsbGpib adapter.

author: dazz1
author_rank: Frequent Contributor
timestamp: November 18, 2023, 04:10:30 am
content: Quote from: caiser01 on November 17, 2023, 05:11:11 pmOK so that is good progress. It will make initial programming of the adapter a lot easier. A very simple script/batch file will do it. It could also be done with adding to the MAKE file.I am still confident that both hex files can be programmed with the one avrdude call. The hex files already include the right addresses to correctly place them in memory space. I didn't set the fuses when I tried because they were already programmed. Using just avrdude would avoid the need to install srec. Just one less thing to go wrong.I am still working to the hypothesis that I have a usb hardware fault, so any failure with my avrdude command is probably due to that fault. I need to do fault finding. I have only assembled one of five pcbs to ensure I haven't introduced any design errors.

author: alan.bain
author_rank: Regular Contributor
timestamp: November 21, 2023, 10:53:38 am
content: Thie attachment shows the ethernet to GPIB adaptor that I use (sitting ontop of the inevitable HP box). As you can probably see this one was hand soldered (!) The central LQFP-144 is the STM32F439ZET6 and the SOICs to right the bus drivers. Voltage regulators on left and the ethernet PHY chip is on the underside.

author: caiser01
author_rank: Regular Contributor
timestamp: November 21, 2023, 06:39:11 pm
content: Quote from: alan.bain on November 21, 2023, 10:53:38 amNice design! I'd be interested to see the source code if/when you want to share. Might be interesting to see about porting to a lower pin count version of the STM32F4 for easier assembly. Still this is very cool!

author: alan.bain
author_rank: Regular Contributor
timestamp: November 21, 2023, 08:25:37 pm
content: Yes. An awful lot of those GPIO pins are unusedI think I ended up in the larger chips because of the ethernet requirement - but stock levels also played a factor (as in I needed something suitable that digikey or mouser actually had in stock when I was building the prototype). The 500Mb flash version was fine - RAM is the main limiting factor. I'll work out a way to share the source code / gerbers / kicad files - very happy to do that if it can help someone else. It was a fun project but has also proved useful.

author: caiser01
author_rank: Regular Contributor
timestamp: November 22, 2023, 04:31:59 am
content: Quote from: alan.bain on November 21, 2023, 08:25:37 pmYou mentioned your adapter uses a command set like the Prologix and AR488. How do you interface with it from the PC? Is there an embedded web page? Or is a TCP/IP socket sort of thing?

author: alan.bain
author_rank: Regular Contributor
timestamp: November 22, 2023, 11:52:01 am
content: I used tcpip sockets. I wanted to be able to write simple software to perform complex measurements e.g. phase noise and it's very easy to open a socket and talk in sockets it from C++/C/Python. There are two sockets one 1234 is the control/data socket over which commands can be sent (e.g. enable EOI, choice of termination chars) and data to and from the device. The other one on port 1235 is a monitor socket which shows the data going back and forth to the device and which is very useful for debugging a device that isn't behaving (I don't have a 54901A!).It can use NVRAM (mimiced by the STM32 flash) to store default config. IP address is established either by DHCP or can be static (there's a chicken and egg situation here for setting the IP the first time as the device doesn't have any other ports - by default it will use DHCP and then let you configure a default address. I'm sure there's a better way but I haven't thought of it. The little switched does a reset to default config.

author: dazz1
author_rank: Frequent Contributor
timestamp: November 25, 2023, 04:14:08 am
content: Quote from: dazz1 on November 18, 2023, 04:10:30 amOK I used srec-cat to program the adapter. That worked. I did a dump on the flash memory.I then ran the following command to program the adapter just using avrdude:Code:..\avrdude -c usbasp -p m32u4 -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m -U flash:w:TestAndMeasurement.hex -U flash:w:BootLoader.hexand did another flash memory dump. Both dumps are identical. That means there is no requirement to install and run srec-cat. Programming both files can be done with a single command and this should mean the adapter is ready to run straight away.My adapter still won't run with both files installed. It takes power from the USB-C, but the LED won't flash at all under any circumstances. I have to erase/not program the BootLoader.hex file.With the adapter plugged into my HP 3478A Multi-meter, the usb does not register on my PC.I gave the board a really good clean (acetone/IPA) to get rid of any trace of flux.I did a continuity check of the USB data lines to make sure they were OK between the connector and the MCU.I cannot find a hardware fault so far.When I program just the TestAndMeasurement.hex file without the BootLoader, the LED starts flashing again.When I connected the adapter to a Linux laptop and ranCode:>lsusbThe adapter did not show (as expected).When I then connected the adapter to my HP 3478A, and ranCode:>lsusbagain, no show.I have an issue with the USB. I have swapped cables with no change.

author: caiser01
author_rank: Regular Contributor
timestamp: November 26, 2023, 02:25:57 am
content: Quote from: dazz1 on November 25, 2023, 04:14:08 amRunning your command above to program one of my known good boards still results in a fully working adapter for me.Quote from: dazz1 on November 25, 2023, 04:14:08 amMaybe, but the fact that your LED never blinks whenever the bootloader is in flash makes me suspect at least part of your problem lies elsewhere. I'm suspicious you have a short or a bad solder connection on at least one of the AVR pins. In particular, I'm wondering if you could have a short or intermittent connection to ground from pin 10 of the AVR since the bootloader is invoked by grounding that pin.For QFN parts, I've had good luck clearing solder issues by heating the chip until the solder reflows, then giving the chip a few gentle but firm taps right in the center with handle of my tweezers.

author: dazz1
author_rank: Frequent Contributor
timestamp: November 26, 2023, 03:20:38 am
content: I definitely have some sort of hardware issue that is unique to my assembly. I went through the USB design last night to make sure I hadn't made a mistake because this is a difference with the Xyphro design.A bad solder joint or solder bridge is definitely a candidate. My symptoms are consistent with pin 10 grounded.Tests of programming the firmware (by me and others) confirm that is not where my problem is. A single line command that can be run in a batch/bash script will make programming easier for everyone. Especially for those building their first adapter.

author: dazz1
author_rank: Frequent Contributor
timestamp: December 01, 2023, 09:33:56 am
content: Quote from: alan.bain on November 22, 2023, 11:52:01 amI discovered the MQTT protocol today. At first glance it could be applied to GPIB networked comms.

author: dazz1
author_rank: Frequent Contributor
timestamp: December 01, 2023, 09:38:18 am
content: Quote from: caiser01 on November 26, 2023, 02:25:57 amI found a solder bridge on the MCU pins 36/37. I cleared that and now the LED flashes/stays on when it should. That is a step forward.The USB is not enumerating so possibly a bad solder joint there. I have already re-checked my design and it seems to be OK.

author: dazz1
author_rank: Frequent Contributor
timestamp: December 03, 2023, 10:23:11 am
content: I soldered two wire-wrap wires to the USB D- and D+ lines on the connector side of the 22R series resistors. I wanted to see what data was reaching the connector.Many techs start fault finding from one end of the signal path. It is a lot faster to start in the middle of the signal path and just repeat the halving process until the fault is found. If (say) there are 16 test points in a signal path, and one is faulty, halving the signal path will find the fault in no more than 4 tests.In all cases, with the adapter plugged into an operating GPIB bus, the LED would flash once, then remain on, indicating a valid connection to a live GPIB bus. If the GPIB bus was made inactive, (turning off the test equipment), the LED started flashing. No evidence of any issue with the GPIB bus, MCU or software.I did see usb renumeration, but only if the USB-C cable was plugged in one way. If the plug was rotated 180 degrees, there was no USB traffic.I swapped cables. Same symptoms.Static testing of the USB-C connector showed no solder bridges.Checked all the resistors in-circuit with the USB connector.I (re)checked the connector data sheet and compared against the circuit diagram and foot print. All good. No problem found.Close inspection indicated some of the solder joints might be suspect. I resoldered the connector joints and tried again.I have gone from renumeration one-way back to renumeration no-way. I see no data on the USB lines.The only thing I have touched is the USB connector, so I suspect the connector is faulty. Swapping that out is going to be a challenge.Images show initial USB signal followed by streaming data and an overview of the setup.The computer is an old Asus eeePC running Linux. I just wanted to see a valid USB connection (command: lsusb )

author: tautech
author_rank: Super Contributor
timestamp: December 03, 2023, 10:31:33 am
content: Isn't USB C polarised ?

author: coromonadalix
author_rank: Super Contributor
timestamp: December 03, 2023, 03:27:09 pm
content: not supposed to if the design is verified, that's the advantage of usb-c, no up / down nightmaresbut have to deal with more pins on the connector

author: dazz1
author_rank: Frequent Contributor
timestamp: December 04, 2023, 07:59:14 am
content: Quote from: tautech on December 03, 2023, 10:31:33 amNot long ago, I would have said I don't know the answer.Now I know just enough to be certain I suffer from the Dunning-Kruger effect. Therefore I can say with some confidence that the usb-C is polarised in a way that you can tell if the plug is in one way, or the other. CC1 and CC2.The attached image compares the connector datasheet pinout with my PCB layout. The pin-out is asymmetric. I was checking to see if I had made a mistake with the pcb layout. I hadn't.All of the diagnostics I have done point to a faulty connector. I don't remember why I chose this connector, but I sourced it from Aliexpress, and that was probably a mistake.Things like that happen under the effect of Dunning-Kruger.

author: dazz1
author_rank: Frequent Contributor
timestamp: December 06, 2023, 01:56:28 am
content: I removed suspect usb connector and found the problem.The visible side of the connector pins were nicely tinned. The lower side was not. I also found lots of flux residue under the connector in a hard to clean out location.I am replacing the usb-c connector and starting by tinning the lower side of the connectors. There is no evidence the first connector was faulty. Just bad soldering. A little embarrassinghttps://www.eevblog.com/forum/Smileys/default/facepalm.gifbecause a few decades ago, I used to manage a school to train technician apprentices. I introduced a High Reliability Hand Soldering course. I never took the course myself so that is my excuse for making a mess of soldering the usb-c connector.When I was young, my eyesight was good and I used large parts. Now I am old, my eyesight is not so good, and I use really small parts.

author: tautech
author_rank: Super Contributor
timestamp: December 06, 2023, 04:09:23 am
content: It does help to select extended/low density footprint when laying out the PCB which provide for a solder fillet to be formed rather than a footprint that's the perfect size for a component.We all live and learn....

author: dazz1
author_rank: Frequent Contributor
timestamp: December 06, 2023, 09:02:55 am
content: I replaced the connector.Removed the solder bridges.Beeped out all the connector pins.Connected everything up and .... nothing.The red led is doing what it should be doing, so the MCU is doing its thing.One of the usb data lines is floating so I could have 2x faulty usb cables or I have a bad batch of usb-c connectors.Since I stopped buying things of Aliexpress for the cheapest price, I haven't had an issue with quality. I find the more you pay for an item on Aliexpress, the better the quality. Definitely not true for western sellers.Apart from the usb connector, there is no evidence that the fault is with the adapter, software etc.

author: dazz1
author_rank: Frequent Contributor
timestamp: December 10, 2023, 07:49:44 am
content: I found the fault with my adapter today.One of the 22R resistors in each USB data line between the MCU and the USB connector had an intermittent fault to open circuit.I found the fault by rescuing a USB socket from an old motherboard. This broke out all of the signal lines.I was then able to do continuity checks through the cable, connector and to the various points on the pcb. This test showed the connector is all good.Probably should have found this fault earlier.The adapter now reliable renumerates with both a Linux and Windows machines.Now I am just tying to get a version of visa running following some pointers way back at post 102.

author: coromonadalix
author_rank: Super Contributor
timestamp: December 10, 2023, 04:12:01 pm
content: Rhode Schwartz visa package is small and efficient, you have rs tools in it to send and read commands ...

author: dazz1
author_rank: Frequent Contributor
timestamp: December 12, 2023, 10:16:57 am
content: Quote from: coromonadalix on December 10, 2023, 04:12:01 pmI have installed R&S visa, now I am just started reading through the manual to get it to work. I have not used GPIB, visa or Python before.

author: dazz1
author_rank: Frequent Contributor
timestamp: December 13, 2023, 10:25:20 am
content: Quote from: caiser01 on November 14, 2023, 02:40:35 pmHiwhere do I find the VISA resource string ?

author: coromonadalix
author_rank: Super Contributor
timestamp: December 13, 2023, 11:32:08 am
content: import pyvisarm = pyvisa.ResourceManager()multimeter = rm.open_resource('USB0::0x03EB::0x2065::GPIB_23_3423331363435161F191::INSTR')

author: caiser01
author_rank: Regular Contributor
timestamp: December 14, 2023, 11:21:55 pm
content: Quote from: dazz1 on December 13, 2023, 10:25:20 amThere's a couple ways to find it. Since you say you haven't used Python before, let's stick to R&S VISA for a start to keep things simple.With your instrument connected to the PC with the USB->GPIB adapter, open the R&S Tester app (just called Tester on Windows, RsVisaTester on Mac/Linux). On the menu bar, click Find Resource. In the window that opens, click the big refresh button in the upper left corner. The available VISA resources will show up in the list on the right of that window. In the list, find the resource for your connected instrument ('USB0::0x03EB::0x2065::nnnnn::INSTR') and double click it. This will take you back the main window of the Tester app. From there, you can click the Connect button and try sending your instrument some commands. For the HP3478A, try writing F1, F2, F3, etc and observe whether the meter function is changing.If everything looks good, just copy the VISA resource string from the Tester app window and paste it over the resource string in my example Python script. Close the Tester app and try running the Python script.

author: dazz1
author_rank: Frequent Contributor
timestamp: December 15, 2023, 11:00:40 pm
content: Quote from: caiser01 on December 14, 2023, 11:21:55 pmI found the resource string using pyvisa on the command line. I haven't tried R&S visa or your script yet. Getting there.I have been programming unprofessionally for around 45 years so I am reasonably relaxed about learning python.Edit 17 Dec 2023:A real resource string looks like this:Code:('USB0::0x03EB::0x2065::GPIB_02_24238323232351C01171::INSTR', 'ASRL1::INSTR')^^It appears to be a constant that is unique to each adapter except for the GPIB instrument address. In this case "02" marked with ^^.If you have a list of instruments with their GPIB addresses, it should be possible to read the GPIB address from the resource string to figure out which code should run for that instrument.This would avoid the need to identify specific adapters. You would be able to plug in any adapter to any instrument.

author: caiser01
author_rank: Regular Contributor
timestamp: December 16, 2023, 01:42:38 am
content: Quote from: dazz1 on December 15, 2023, 11:00:40 pmThe resource string will be different for each different instrument you use the adapter with.If you have the adapter's Auto ID feature enabled (it is by default), the resource string will contain the instrument's response to a *IDN? query. For example, when connected to my HP 53131A universal counter, the resource string is: USB0::0x03EB::0x2065::HEWLETT-PACKARD_53131A_0_3703::INSTRIf you're connected to an instrument that does not support the *IDN? query or if you disable the adapter's Auto ID feature, the resource string will look like this:USB0::0x03EB::0x2065::GPIB_23_3423331363435161F191::INSTRThe part in bold is a serial number that should be unique to each adapter. The GPIB_nn part represents the GPIB address of the connected instrument. This will change for different instruments with different addresses.

author: dazz1
author_rank: Frequent Contributor
timestamp: December 16, 2023, 02:41:09 am
content: HiI have been playing around with the code but it isn't working. I don't appear to have comms with the meter.Code:# HP 3478A Multimeter simple read testimport pyvisaprint("Simple GPIB test for HP3478A multimeter")print("Show the list of Resources")rm = pyvisa.ResourceManager()print(rm.list_resources())# ID string for adapter 0: 'USB0::0x03EB::0x2065::GPIB_23_24238323232351C01171::INSTR'print("Opening the Meter")# Resource = GPIB-usb adapter 0. Different for each adapter.multimeter = rm.open_resource('USB0::0x03EB::0x2065::GPIB_23_24238323232351C01171::INSTR')# Write some text to displaymultimeter.write('D2OK GPIB USB')# Set function to DC volts (F1), auto-range (RA), trigger hold (T4), 4.5 digit (N4), auto-zero (Z1), internal trigger (T1)multimeter.write('H1T1')print("Reading the DC volts")try:while True:print(float(multimeter.read().strip()))except KeyboardInterrupt:multimeter.clear()multimeter.close()rm.close()I usually add a lot of print statements to see what is working, and what isn't.It isn't.I get the following error messages:Code:>python gpib_test.pySimple GPIB test for HP3478A multimeterShow the list of Resources('USB0::0x03EB::0x2065::GPIB_23_24238323232351C01171::INSTR', 'ASRL1::INSTR')Opening the MeterTraceback (most recent call last):File "D:\gpib_test.py", line 19, in <module>multimeter.write('H1T1')...If the resource string is from the instrument and not the adapter, then the adapter must have comms with the instrument.The "D2" command just writes a string to the display, but that is not happening.The "H1T1" puts the meter into DC mode, continuous internal trigger, but it isn't.That indicates I may have a hardware fault either in the instrument, or in the adapter.R&S Tester does not find the usb-gpib adapter resource. I am not sure if installing NI-visa or py-visa has over-written something that R&S needs.

author: caiser01
author_rank: Regular Contributor
timestamp: December 16, 2023, 03:22:29 pm
content: Quote from: dazz1 on December 16, 2023, 02:41:09 amIf you have multiple VISA implementations installed, we need to figure out which one pyvisa is grabbing.What is the output when you run pyvisa-info from the command prompt?

author: dazz1
author_rank: Frequent Contributor
timestamp: December 16, 2023, 08:52:34 pm
content: Quote from: caiser01 on December 16, 2023, 03:22:29 pmCode:Machine Details:Platform ID: Windows-10-10.0.19045-SP0Processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel Python:Implementation: CPythonExecutable: G:\Programs\Python310\python.exeVersion: 3.12.1Compiler: MSC v.1937 64 bit (AMD64)Architecture: AMD64Build: Dec 7 2023 22:03:25 (#tags/v3.12.1:2305ca5)Unicode: UCS4PyVISA Version: 1.14.1 Backends:ivi:Version: 1.14.1 (bundled with PyVISA)#1: C:\WINDOWS\system32\visa32.dll:found by: autoarchitecture:('x86', 64)Vendor: Rohde & Schwarz GmbHImpl. Version: 7340546Spec. Version: 7340544#2: C:\WINDOWS\system32\visa64.dll:found by: autoarchitecture:('x86', 64)Vendor: Rohde & Schwarz GmbHImpl. Version: 7340546Spec. Version: 7340544I can see it is grabbing the R&S visa (I have NI visa installed as well) but when I run R&S directly, it does not detect the usb-gpib adapter.So I still don't know if I have a HW or SW fault.I am writing a test program in C++ (another new language to me, although I have programmed in C-like languages eg.Java) that will sequentially pulse each port pin. It will help identify solder bridges or open circuits on the port pins.It will be a separate stand-alone program usable on, or adaptable to, any AVR MCU.

author: caiser01
author_rank: Regular Contributor
timestamp: December 16, 2023, 09:51:10 pm
content: Quote from: dazz1 on December 16, 2023, 08:52:34 pmThat's weird given that when you run the Python script, it does detect the adapter.Just for giggles, try adding this line after the open_resource line:Code:multimeter.write_termination = '\n'If that doesn't work, try making it '\r\n'.

author: dazz1
author_rank: Frequent Contributor
timestamp: December 16, 2023, 10:22:42 pm
content: Quote from: caiser01 on December 16, 2023, 09:51:10 pmThat worked. Thanks.The code displayed:Code:>python gpib_test_HP3478A.pySimple GPIB test for HP3478A multimeterShow the list of Resources('USB0::0x03EB::0x2065::GPIB_23_24238323232351C01171::INSTR', 'ASRL1::INSTR')Opening the MeterReading the DC volts-1.6431-1.6427-1.6425...So that confirms the adapter is 100% working.

author: caiser01
author_rank: Regular Contributor
timestamp: December 16, 2023, 11:32:23 pm
content: Quote from: dazz1 on December 16, 2023, 10:22:42 pmTook a while to get here but that's great!Just had a look at xyphro's GitHub and it sounds as if he's been busy optimizing the firmware. Should be a nice update when he does his next release.

author: dazz1
author_rank: Frequent Contributor
timestamp: December 17, 2023, 12:17:45 am
content: Quote from: caiser01 on December 16, 2023, 11:32:23 pmThis adapter is a software project with some hardware attached. The quality of this type of project is largely defined by the software. Optimizing the software can only be a good thing.There might be an improvement to be gained by simply altering the compiler settings. By default, the MAKE file compiler settings are set to create the smallest firmware file size. Also the slowest to execute. Changing compiler setting to increase the file size should be a zero effort action to make a small increase in speed.When the compiler is set to build a large file, it replaces call to functions with the code of the function. Code is repeated. It is very inefficient on code size, but also fast. There is no reason to keep the file size any smaller than 32k on the ATmega32U.

author: dazz1
author_rank: Frequent Contributor
timestamp: December 17, 2023, 09:52:45 am
content: Quote from: caiser01 on December 16, 2023, 11:32:23 pmNow I am working on using the GPIB for my WaveTek 2520 RF Signal Generator. I have GPIB comms so the instrument is OK but I need to figure things out to get all the commands working.At present, I am using my deck top PC, which is no where near my workshop.I would like to get my little old Linux Asus eeePC running pyvisa. What do you suggest, and in what order should I install? NI, R&S ?

author: alm
author_rank: Super Contributor
timestamp: December 17, 2023, 10:09:16 am
content: Quote from: dazz1 on December 17, 2023, 09:52:45 amI found installing a commercial VISA stack a pain on Linux. Especially maintaining it through OS upgrades. I'd also research what hardware they support. I know NI-VISA doesn't support NI GPIB-USB devices on Linux kernel versions from the last 15 years or so. I don't know about USBTMC.I would usePyVISA-pyas backend. This integrates much better with Linux and doesn't require any kernel modules or daemons to run.

author: caiser01
author_rank: Regular Contributor
timestamp: December 17, 2023, 04:55:36 pm
content: Quote from: alm on December 17, 2023, 10:09:16 amI've been running R&S VISA on Linux on the Raspberry Pi with zero issues. Like the Windows version, the Linux version of R&S VISA is small, lightweight, and doesn't drag you into any sort of package dependency hell. The only quirk I've encountered is needing to explicitly reference the R&S VISA library in my Python scripts in order to keep pyvisa from automatically wanting to grab pyvisa-py as the backend, but it's pretty easy. I just have this at the top of all my Python scripts for GPIB:Code:from sys import platformif platform == "linux" or platform == "linux2":# Linuxrm = pyvisa.ResourceManager("/usr/lib/librsvisa.so@ivi")elif platform == "darwin":# macOSrm = pyvisa.ResourceManager("/Library/Frameworks/RsVisa.framework/RsVisa@ivi")elif platform == "win32":# Windowsrm = pyvisa.ResourceManager()

author: alm
author_rank: Super Contributor
timestamp: December 17, 2023, 04:58:02 pm
content: What's the advantage of R&S VISA over PyVISA-py, which requires even less setup?

author: dazz1
author_rank: Frequent Contributor
timestamp: December 17, 2023, 06:47:39 pm
content: Quote from: alm on December 17, 2023, 04:58:02 pmI had a look at your launchpad page. I see you are maintaining GPIB firmware, kernel and user packages.Can you please explain what each package is for (the use cases?)

author: alm
author_rank: Super Contributor
timestamp: December 17, 2023, 07:11:36 pm
content: Quote from: dazz1 on December 17, 2023, 06:47:39 pmThat isn't necessary to use with the adapter discussed in this topic, which uses USBTMC. As you can read in the PyVISA-py documentation, it just needs libusb for this.The packages in my signature is for with commercial USB and PCI(e) GPIB interfaces like those made by Agilent, Keysight, NI etc. Also clones, as far as I know. There are kernel drivers, the user space libraries so native (C) applications can talk to them, and Python bindings so Python can talk to them. These packages would allow you to use for example an NI GPIB-USB-HS interface with PyVISA-py.

author: dazz1
author_rank: Frequent Contributor
timestamp: December 17, 2023, 07:33:11 pm
content: Quote from: alm on December 17, 2023, 07:11:36 pmOK so I should just follow the instructions for PyVISA-py.

author: caiser01
author_rank: Regular Contributor
timestamp: December 17, 2023, 08:39:30 pm
content: Quote from: alm on December 17, 2023, 04:58:02 pmThe xyphro adapter presents itself to PC as a USB device and in PyVISA-py, there are several VISA functions that are not implemented for USB. These include clear(), read_stb(), and assert_trigger() all of which can be necessary to take full advantage of an instrument's remote programming capabilities. read_stb(), assert_trigger(), and the various "event" functions in particular are often necessary to get the fastest possible communication with an instrument.To install R&S VISA on the Pi on Linux, all I had to do was download it and run:Code:sudo dpkg -i rsvisa_5.12.9_raspios_buster_arm64.debRunning the installer on Windows or Mac is pretty quick too, so I would argue the setup effort is minimal.R&S VISA also provides the Tracer app, which is super handy for debugging. Just open it and start monitoring in the background while your own application is communicating with the instrument, and you can watch all the raw traffic between your application and the instrument. Great way to track down issues in your GPIB command sequences, especially for the quirkier instruments.

author: Nx-1997
author_rank: Regular Contributor
timestamp: December 20, 2023, 05:09:06 pm
content: Well I finally decided to benchmark my GPIB adpaters since Xyphro released a new firmware. The results shows the capture time (s) for reading a waveform from my tek scope. The new firmware is much faster but not as fast as the Agilent 82357B. The AR488 is the slowest but also the only one not requiring any special drivers or software.Full results discussion are here:https://github.com/xyphro/UsbGpib/discussions/47

author: caiser01
author_rank: Regular Contributor
timestamp: December 20, 2023, 09:13:57 pm
content: I tested xyphro's new release candidate firmware today. Very solid so far. My instruments are old and slow enough that I'm not really seeing the improvements in read/write speed for data but I *did* see a speed improvement in reading the status byte. Reading the status byte of my HP3478A is 250ms faster with the new firmware than the old firmware

author: dazz1
author_rank: Frequent Contributor
timestamp: December 20, 2023, 10:20:28 pm
content: HiI have started to learn Python and Py VISA to write code to run my mostly ancient instruments with GPIB. I have already hit problems writing code that I am sure others have already solved. I have started a new thread here:https://www.eevblog.com/forum/projects/problems-writing-code-for-gpib-py-visa/new/#newas a sort of mini-forum.

author: coromonadalix
author_rank: Super Contributor
timestamp: December 22, 2023, 04:30:44 pm
content: Quote from: caiser01 on December 20, 2023, 09:13:57 pmat :https://github.com/xyphro/UsbGpib

author: dazz1
author_rank: Frequent Contributor
timestamp: January 19, 2024, 03:26:43 am
content: HiJust a tip.I spent the day assembling 4x usb-gpib adapter.My first adapter assembled a few weeks ago had problems with bad joints and solder bridges. I blame it all on the cat.This time I pre-tinned the pins for the usb-c connector and the matching pads.I also pre-tinned the QFN pads and pcb pads.I smeared solder across the earth/heat pad on the QFN.This left a Goldilocks amount of solder for the joints. All good joints and no excess solder to clean away. The cat is sleeping peacefully.

author: dazz1
author_rank: Frequent Contributor
timestamp: March 28, 2024, 08:33:47 am
content: HiA question for those with experience debugging gpib. Is it still useful to have a breakout board to read the gpib signals??The reason I ask is because I have HP54645D scope with 16 channel digital logic inputs like this onehttps://metalab.at/wiki/Datei:HP54645D.jpg. If I make a gipb breakout board, I can plug the flat cable into the scope and board. No fiddly probes.The same board could be used with a HP logic analyser because they use the same cable.

author: pdenisowski
author_rank: Super Contributor
timestamp: March 28, 2024, 02:37:28 pm
content: Quote from: dazz1 on March 28, 2024, 08:33:47 amI just bought a commercially made GPIB breakout board. Am planning to use it this week to debug / analyze some GPIB traffic.https://tinyurl.com/2s499tar(Sorry, tried to post link to the pics here on EEVblog and it keeps failing, so posting a shortened link)

author: Kean
author_rank: Unknown
timestamp: March 28, 2024, 04:49:11 pm
content: Can certainly be useful if you need to diagnose weird GPIB issues or debugging your own interfaceI made up one of these by Jason aka cellularmitosishttps://github.com/pepaslabs/gpib-spy

author: dazz1
author_rank: Frequent Contributor
timestamp: March 29, 2024, 06:46:22 am
content: HiWell it looks like I will be making a break out board, but not like either of the linked designs.I will make use of the connectors I have in the photo.I got the Centronics gpib connectors from Aliexpress because they are dirt cheap. I purchased the HP logic analyser compatible connector to see if it would fit. It does, that gave me a solution looking for a problem.I will design a board that will connect directly to an HP logic analyser, that I don't have, or my HP 54645D mixed signal scope that I do have.The logic probes designated for the HP54xxx series scopes have the probes integrated with the flat cable. They are rare an expensive.I purchased the cable and probe set that plug together. Easier to find, cheaper and more versatile.Along with the Centronics connectors, and HP compatible connector I will include pads for a separate header to make it easy to probe individual lines, if ever needed. Probably a feature I would never use but extra pads are a zero cost.I will be able to save a configuration in the scope, and just plug and play the break-out board. The board will still be usable for someone without a logic analyser.

author: dazz1
author_rank: Frequent Contributor
timestamp: April 07, 2024, 08:19:10 am
content: HiLooking at the detail of the gpib cable standard to apply to my breakout board, the pin-out includes a shield ground plus signal grounds.My question is: Should the shield ground be connected to the signal grounds?The IEEE 488.1 mechanical specification costs a $squillion ( = $USD391.00) so not looking there.

author: caiser01
author_rank: Regular Contributor
timestamp: April 08, 2024, 12:24:03 am
content: Quote from: dazz1 on April 07, 2024, 08:19:10 amI do have access to a copy of IEEE 488.1 and regarding grounding, it says:QuoteBased on that, I would answer your question with a 'No'. It sounds like the intent is to connect the cable shield to the safety earth ground of an instrument or controller (assuming it has a safety earth ground).In your case, since this is a breakout board for debugging purposes and is essentially passive, like a cable, I would say just make sure the shield ground connects through the breakout from one GPIB connector to another. Do not permanently connect any grounds together on the breakout that would normally run separately inside a cable.

author: caiser01
author_rank: Regular Contributor
timestamp: April 08, 2024, 12:28:18 am
content: For completeness, it may also be worth noting the maximum resistance per meter for each conductor and insuring the design of your breakout doesn't cause a violation of these requirements:Quote

author: dazz1
author_rank: Frequent Contributor
timestamp: April 08, 2024, 03:49:26 am
content: Quote from: caiser01 on April 08, 2024, 12:24:03 amThe board by itself is passive, but it will be connected to the logic analyser I don't have, or my HP 54654D logic input. I am including a header that will allow the cable to be plugged into the board, no probes. The probe adapter for the cable has one earth. So I can separately route all of the individual earths that are supposed to be separate in the cable, but I still need an earth for the scope. The most logical gnd being the Logic gnd at pin 24. Does that sound right?

author: dazz1
author_rank: Frequent Contributor
timestamp: April 08, 2024, 08:43:57 am
content: After a little more thought:The intended use is to plug-in directly to the subject equipment. It is very likely that the equipment will have all earths connected. Repeating that connection at the gpib panel connector is probably not going to be enough of an issue to stop the breakout board doing the job it needs to do.Also I suspect the average 1980's/90's engineer would not have paid for the standard and would likely simply connected all of the earths together. The exception might be the shield. Somewhere I read this should be linked to the other earths by a 1M resistor. Maybe to keep the dc floating volts within reasonable limits but that is not a convincing argument.I could include a DIL2x8 header to selectively link earths to a main ground but it would actually be less work to produce a new Mod 2 pcb design.So the plan is to connect all the grounds together, except the shield. I will run that straight through with a Fit-For-But-Not-With option for a smd resistor, just in case.If there is a problem, I will design a new pcb.

author: pdenisowski
author_rank: Super Contributor
timestamp: April 08, 2024, 09:27:45 am
content: Quote from: dazz1 on April 08, 2024, 08:43:57 amThe average engineer working in test and measurement in the 1980s/1990s would either (a) have bought commercial off-the-shelf GPIB adapters and cables and not needed the spec, or (b) would have the spec if they were actually developing GPIB devices. Ask me how I knowThat said, I think this is afantasticproject and am very excited to see how it turns out. Thank you for doing this!

author: dazz1
author_rank: Frequent Contributor
timestamp: April 08, 2024, 08:49:59 pm
content: HiGiven where you work, I would have thought the developers already have breakout boards.Anyway, attached are my drafts.Unlike other breakout bds I have seen, my one has a connector that conforms to the HP pseudo standard 40pin Logic Analyser cable. This board will plug directly to my HP scope that I have, or any HP LA I don't own. No messing around with probes.The board will be self documenting. I am going to add text to the lower silkscreen to show the 40 pin connector signals. Already done that for the header.The header has the same pin-out but exposes the signals and allows for jumpers to be fitted. Specifically, one use case would be to connect a control signal to the LA CLK. It also means that someone who does not have a suitable LA type instrument can probe the signals with this board.I am interested in any feedback to improve the design.

author: pdenisowski
author_rank: Super Contributor
timestamp: April 08, 2024, 09:34:06 pm
content: Quote from: dazz1 on April 08, 2024, 08:49:59 pmFrankly, I like it just the way it is - a big improvement over what I've seen so far for GPIB breakout boxes.

author: dazz1
author_rank: Frequent Contributor
timestamp: April 09, 2024, 08:44:57 am
content: HiI have polished the design.Getting pcb's made and buying parts with MOQ's means I will end up with 5 of these, when I only need one.

author: Kean
author_rank: Unknown
timestamp: April 09, 2024, 10:41:39 am
content: I believe the intent was that pin 12 should be connected to the cable shield (chassis ground) and not to logic ground.Pin 24 is the primary logic ground, and pins 18-23 are nominally logic ground but are actually specified as paired with the signal on the pin above (6-11).Practically all devices I've seen connect pins 18-24 together, and only some also include pin 12 connecting the this common ground.As an example, schematics of Keithley 199 have pin 12 connecting to chassis, and there is a 1M resistor and 10n capacitor between chassis and logic ground (with optional jumper).I doubt any of this will make much difference except with very long cables and multiple instruments.

author: dazz1
author_rank: Frequent Contributor
timestamp: April 09, 2024, 11:17:35 am
content: HiOK I have made those changes.I should add a cap to the second gpib connector but that would mess up my text layout.I don't intend fitting the C/R, unless I have to.

author: Kean
author_rank: Unknown
timestamp: April 09, 2024, 11:46:39 am
content: Quote from: dazz1 on April 09, 2024, 11:17:35 amNope, C/R not really needed. Just leave shield connection intact through the cable and keep it separate from logic ground, and obviously use the logic ground for the LA/scope connection.It doesn't hurt to have the 1M resistor between shield and ground as you have it, but that may also already exist in one of your other devices on the bus.If you have extra PCBs/connectors than I'd be happy to contribute some $ towards one or two and the cost of postage to Sydney.I have a bunch of GPIB/HPIB gear in the office lab and at my home, spread across several benches, and with some still needing repairs.

author: dazz1
author_rank: Frequent Contributor
timestamp: April 10, 2024, 11:14:13 am
content: Quote from: Kean on April 09, 2024, 11:46:39 amI was planning on selling the spare ones on the local auction website. I know there are a few people watching my blog posts. It will be easy enough to send one over the water.I am also looking at putting the pcb design into pcbway projects. Mine would be the only project on pcbway that includes "gpib" so I am probably about 30 years late in designing a break out board.I try and do pcbs in batches to reduce shipping costs. I may be a while before I am ready to get them made.

author: dazz1
author_rank: Frequent Contributor
timestamp: April 11, 2024, 05:22:01 am
content: HiOK I have settled on a final version of the gpib breakout board.The most significant change is the addition of notches that are almost mounting holes.I usually include mounting holes, but I think if anyone makes one of these, they are unlikely to make an enclosure.If they want to 3D print an enclosure, they can include keys in the print to match the notches, orthey can use M3 screws.I have refined the text on the silk screen to make it easier to use. It should not be necessary to refer to standards or pinouts to use this board.

author: tautech
author_rank: Super Contributor
timestamp: April 11, 2024, 06:37:08 am
content: Test is it ?Unconnected NET pin 1 J3.

author: dazz1
author_rank: Frequent Contributor
timestamp: April 11, 2024, 08:44:33 am
content: Quote from: tautech on April 11, 2024, 06:37:08 amNo not quite. The pcb is correct. That pin, and the one on the other header are "V" on the HP logic analyser 40 pin pseudo standard. "V" is not connected on my scope. So this connection would only be active if a HP LA was connected, and the other header was connected to something that needed "V". That is extremely unlikely but it didn't cost anything to add the track, and the other LA signals not used by the scope. So all good.Also pin 5 is NC on the HP standard.Edit: On closer inspection, the line indicates the "J3" label is linked to the connector, because I had selected the J3 label. So no problem but well spotted.

author: tautech
author_rank: Super Contributor
timestamp: April 11, 2024, 09:14:13 am
content: Quote from: dazz1 on April 11, 2024, 08:44:33 amNot what I spotted.....the little arrow on the Pin 1 trace that the ratsnest link connects to.I believe with your editor this indicates a not fully terminated NET.

author: dazz1
author_rank: Frequent Contributor
timestamp: April 11, 2024, 09:23:44 am
content: Quote from: tautech on April 11, 2024, 09:14:13 amIt's a warning about pin 1 pad attributes not matching the symbol. Not an open net and not a problem.

author: dazz1
author_rank: Frequent Contributor
timestamp: April 12, 2024, 04:22:44 am
content: HiI have shared my GPIB breakout board on PCBway here:https://www.pcbway.com/project/shareproject/GPIB_Break_Out_Board_f7812b3e.htmlI have order parts for 5x boards, because of MOQ's so I will have 4x for sale.

author: dazz1
author_rank: Frequent Contributor
timestamp: April 25, 2024, 03:39:07 am
content: HiI have edited this post because I have made a new version 2.0 of the GPIB breakout board. I have scrapped the version 1.0 boards.The version 2.0 has the termination network required by HP for digital inputs. The resistors and capacitors on each signal line are SMD fitted between the pins of the headers. These pins provide some physical protection for the components to stop them getting knocked off. The capacitor/resistor are stacked to keep the pcb design simple and neat. There are 3 smd components but it looks like only 2 in the photos.This breakout board allows direct connection to an HP logic analyser, I don't have, or my HP54645D oscilloscope.The other header provides direct connection to all of the raw GPIB signals. This allows for an adapter to be made for another instrument that is not an HP.I have shared my version 2.0 GPIB breakout board on PCBway here:https://www.pcbway.com/project/shareproject/GPIB_Break_Out_Board_f7812b3e.htmlI have made the first two version2.0 GPIB breakout boards.I only need one breakout board and I have a bag of parts I don't need. I could make up a kit set to sell if there is any interest.

author: julian1
author_rank: Frequent Contributor
timestamp: June 19, 2024, 11:28:30 pm
content: Quote from: alan.bain on November 21, 2023, 10:53:38 amThis looks pretty interesting.What part was used for the two transceivers? I count 20pins so perhaps 75ALS160/75ALS161 for 48mA drive and electrical compatibility with the ieee-488 standard.Was the code ported from the AT-megato the stm32f4?Perhaps the schematics/ footprints are hosted on github/gitlab?

author: dazz1
author_rank: Frequent Contributor
timestamp: September 11, 2024, 12:07:19 am
content: My version of the GPIB USB adapter, based entirely on the Xyphro project, has two LEDs (red and green) but remains fully compatible with Xyphro firmware. The firmware only lights up the RED led.the Xyphro version 2 adapter now has two LEDs on the same pins as my design. In addition, Xyphro has grounded pin xx to allow software detection of whether the hardware is 1 or 2 LEDs.I have chosen to use two separate LEDs for Red and Green because they are readily available and cheap. My PCB design includes a footprint for a surface mounted bi-colour LED. This gives the option of two styles of LED, but not both installed.My plan is to modify the firmware to accommodate two LEDs, while maintaining backward compatibility with the one red LED versions.I am a "C" programming virgin, but I have done something in C-like languages.My plan is to incrementally develop the software.Include a compiler switch to select 1 or 2 LEDs mode at compile/build time.Use a bit of the eeprom to select 1/2 LEDs mode. This would allow a user to select 1/2 LEDs.The compiler switch is the easier option and also has the advantage that I don't have to test the LED mode in run time, that would lead to delays.I plan to maximise use of interrupts to switch the LEDs, but I will still need to do some bit bashing in run time.My first problem has been to setup the development environment.With some guidance from here and running Ubuntu:https://community.platformio.org/t/can-i-create-a-platformio-avr-project-from-existing-code-including-the-lufa-library/42538/2Install GCC:Code:>sudo apt install gcc-avr avr-libcClone the LUFA repository into the git folder:Code:git clone https://github.com/abcminiuser/lufaIt should end up in theCode:/home/user/git/folder. The repository will be calledCode:LUFAClone the UsbGpib.,,,,,repository into the same git folder :Code:git clone https://github.com/xyphro/UsbGpib.git. It should end up in theCode:/home/user/git/folder. The repository will be calledCode:UsbGpibI then renamed theCode:LUFAfolder toCode:LUFA_repositoryFrom the LUFA_repository folder, I moved the LUFA folder into the ~/git/UsbGpib/ folder.From theCode:~/git/UsbGpib/SW/MassStoragefolder runCode:makeThat will build the bootloader.If you look on my Github repository herehttps://github.com/dazz100/UsbGpibYou will find a Linux script in the SW folder that compiles the code, then loads the firmware onto the usb-gpib adapter.There is also a Windows batch file that just loads the firmware onto the adapter.Both would need to be modified to match your directory structure.I am going to edit this post as I progress to building the app.

author: dazz1
author_rank: Frequent Contributor
timestamp: October 23, 2024, 02:33:49 am
content: HiI have successfully modified the firmware for 2x LED (Red and Green) operation.After some experimentation, I think I have arrived at a user friendly signalling system.Slow flashing red LED = no GPIB device connected or connected but no power.Steady green LED = GPIB device connected, switched on, but not active.Fast flashing green LED = GPIB device communicating over the bus.Simple and easy to interpret.I have failed to figure out how to do a pull request to Xyphro's github site. Reading the instructions doesn't help. Only used Github to download files. Never used it for code development. Also my first ever crack at "c" code. Lots of opportunity to get it wrong. So although I may have messed up with Github, the code is working.I have attached the upgraded 2x LED firmware to this post if anyone would like to try it out.

author: Kean
author_rank: Unknown
timestamp: October 23, 2024, 10:51:50 am
content: Quote from: dazz1 on October 23, 2024, 02:33:49 amI'd suggest forking the xyphro code base and applying your changes to your own repo. Then link to the repo here. If Xyphro is interested, it is easy to create a pull request from your fork.PS. you didn't attach anything. As I mention, a link to your forked repo might be better.

author: dazz1
author_rank: Frequent Contributor
timestamp: October 24, 2024, 02:14:51 am
content: Quote from: Kean on October 23, 2024, 10:51:50 amI figured out I forked a fork of xyphro so that messed things up. I have deleted to forked fork from GitHub and directly forked xyphro.Quote from: Kean on October 23, 2024, 10:51:50 amI am aiming to put the modified code on my fork then request that Xyphro pull my version.I have used compiler directives to produce ver 1 or ver 2 firmware from the same source code. Any updates to the single source code will compile for ver 1 or ver 2.For ver 2, the red LED is only on when green is off. I found that both-on doesn't look good and is confusing. The slow flashing red LED is proof of life.The green LED is toggled by an interrupt driven timer only when there is data transfer. The green flashes indicate activity and not quantity. A single instruction toggles the green LED only on timer ticks and only for data. Near zero added processor load. I think the RED/GREEN led pair is easier to interpret.Next task is to get the modified firmware into my fork of Xyphro.

author: dazz1
author_rank: Frequent Contributor
timestamp: October 26, 2024, 10:23:26 am
content: HiI have created a repository on Github.https://github.com/dazz100/UsbGpibIt contains the Kicad PCB design and the firmware for a 2x LED version of the Xyphro USB-GPIB adapter.My version 2 of the firmware and hardware are compatible with both the Xyphro ver 1&2 hardware and software.My version 2 is a slightly different flavour of adapter with slightly different design goals.I have raised a pull request with Xyhpro.I just need to finish the enclosure.

author: Kean
author_rank: Unknown
timestamp: October 26, 2024, 05:16:51 pm
content: Quote from: dazz1 on October 26, 2024, 10:23:26 amExcellent work. If I hadn't already built a few AR488 boards, I'd make some of these.https://github.com/xyphro/UsbGpib/pull/67/commitsCode:119 changed files with 49,735 additions and 97,702 deletionsOof... they are probably not going to accept that pull request for obvious reasons.Xyphro hasn't actually acted on a pull request for a couple of years in any case, and some of those were much smaller.But at least the pull request can be found by others who may be interested - although I suspect they are more likely to find your repo link from here.Just some suggestions:It is best to submit pull requests in small chunks that can be quickly reviewed and ideally also quickly tested.The white space cleanup is great, but makes the pull request a nightmare to review. Painful, but that would be best separated.Deleting the older V1 files is not ideal as they are still relevant to others.

author: dazz1
author_rank: Frequent Contributor
timestamp: October 26, 2024, 08:09:53 pm
content: Quote from: Kean on October 26, 2024, 05:16:51 pmI can feel my head swelling alreadyQuote from: Kean on October 26, 2024, 05:16:51 pmOK but not obvious to me. I haven't yet figured out the Github etiquette This was an all or nothing change. I wanted to submit a complete and completed package, not a series of half baked code changes. If Xyphro is not processing pull requests, the point is moot.Quote from: Kean on October 26, 2024, 05:16:51 pmThe actual code changes are minor. The biggest changes were to the supporting documentation. Most users won't look at the code. They will look at the documentation and are likely to judge the quality of the software and the project as a whole based on the supporting documentation. In too many projects I have reviewed, too much good information is buried in forum posts. So I have made a point of updating the supporting documentation for users.Quote from: Kean on October 26, 2024, 05:16:51 pmOK. I now know that.My editor highlights redundant white space so it is really annoying to leave in.Quote from: Kean on October 26, 2024, 05:16:51 pmWhen making a pull request, I was expecting to have the option to mark the files to pull. It seems that the pull request is for the whole of my fork. If there is a way to mark files for pull, I haven't found it yet. I am still on training wheels for Git and Github. So it wasn't my intention that Xyphro deletes the version 1 stuff. When I edited the README file, I did not delete any version 1 stuff.There is no point in me retaining any Ver 1 stuff in my repository so I have started cleaning it out so it ends up containing only my Ver 2. That will include the README file. The enclosure is the last design work I need to finish. I am learning FreeCAD to do that.My aim has always been to keep my modifications compatible with the Xyphro versions 1 & 2 hardware and software. Probably need to change my version numbering to something like ver 2e (e=enhanced) to avoid confusion. I have been in communications with Xyphro for a long time so he has already included some of my suggestions in his code and hardware. There isn't that much difference between the two version 2's, which was always the intended outcome. More than that, I was hoping that my contributions would be rolled into the Xyphro project to make my fork redundant.So naturally I consider my version to be the best version but only because I tweaked the design to match my design goals.Someone else might choose another version that better suits their needs. That is the really nice feature about open source designs. It gives people choices.

author: coromonadalix
author_rank: Super Contributor
timestamp: October 27, 2024, 10:50:43 am
content: if your design suit your needsand for sure i would love more leds / indicatorsi have 2x of the Xyphro adapters, no complaints ... works fine ... but sometimes i would have loved more leds to get the connection status ...i hope you'll do some tests with wingpib or other gpib softwares, the id string can play tricks ...

author: Kean
author_rank: Unknown
timestamp: October 27, 2024, 10:58:44 am
content: Quote from: dazz1 on October 26, 2024, 08:09:53 pmNo better way to learn than have a go, and you've proven yourself to be someone that does that.I'm no expect on Github either, and I've only done a few pull requests. You can make some changes to the pull request once created, either via command line or the web interface - but it will be via changes to your fork. Sometimes the best way is to create a branch for the pull request, which you can delete later.

author: dazz1
author_rank: Frequent Contributor
timestamp: October 27, 2024, 07:31:22 pm
content: Quote from: coromonadalix on October 27, 2024, 10:50:43 amI find more LEDs is an essential feature.If I show SWMBO something with no LEDs, her eyes instantly glaze over as she ponders what will happen in the next episode of Coronation Street.If I show her something with LEDs, I can hold her attention for at least a few seconds.Quote from: coromonadalix on October 27, 2024, 10:50:43 amNone of my test equipment is young enough to have an ID string, so I can't help there. Of course if anyone would like to donate any test equipment for testing, it would find a good home here.

author: dazz1
author_rank: Frequent Contributor
timestamp: October 27, 2024, 07:52:20 pm
content: Quote from: Kean on October 27, 2024, 10:58:44 amIf Xyphro isn't processing pull requests, the only incentive to creating pull requests is to alert others that there is some ongoing development.I have already stripped out all version 1 stuff from my fork so that it is dedicated to the enhanced version 2e. My current understanding is that will effectively block acceptance of any future pull requests by Xyphro because it would wipe out all the version 1 stuff that should be kept on Xyphro's site. I think it would require Xyphro to create a new branch that he would pull in and clone my version 2e branch. That might be desirable, not-essential if people can just get the version 2e files they need from my site.

author: eliocor
author_rank: Unknown
timestamp: October 28, 2024, 12:02:04 am
content: here it is a (v2e) BOM for buying components from LCSC or for PCB assemby by JLCPCB.BOM contains indicative prices (€) and MOQFor PCBA by JLCPCB the file should be slightly edited:- delete line(s) LED1 or LED2.3 according to your choices- it seems U1 can be chosen in two different cases: leaded and leadless. Is it correct*?- priority was given to components in the BASIC list*) was the PCB designed to accept leaded and leadless cases for U1?

author: dazz1
author_rank: Frequent Contributor
timestamp: October 28, 2024, 12:10:17 am
content: Quote from: eliocor on October 28, 2024, 12:02:04 amThanks for the BOM.The Ver 2e PCB is designed only for the leaded version of U1. The first versions I made were for the leadless MCUs but I had issues with soldering them. The leaded version is much easier to hand solder.I will add your BOM to my Github site.

author: dazz1
author_rank: Frequent Contributor
timestamp: October 28, 2024, 01:17:28 am
content: HiI have just updated my ver 2e BOM because some parts I purchased from Aliexpress and those might not be an option for an assembly service. I have now identified parts from element14 that are equivalent to the Aliexpress parts.The exception is the usb-c connector. element14 don't stock the HRO part. I am reasonably sure there are equivalents by other manufacturers that fit the same foot print. I just don't know the part IDs.I have pushed the update BOM to Github. Would you like to check that against your BOM against my updated version before I push yours to Github?

author: eliocor
author_rank: Unknown
timestamp: October 28, 2024, 02:59:39 am
content: tomorrow I will recheck my BOM and I will send you (via PM) the updated file, or even better, it will be an occasion to learn something about GIT

author: Kean
author_rank: Unknown
timestamp: October 28, 2024, 03:55:07 am
content: Quote from: dazz1 on October 28, 2024, 01:17:28 amI use the GCT USB4105 which is the same footprint as the HRO TYPE-C-31, and available from several Western distributors.https://gct.co/connector/usb4105

author: dazz1
author_rank: Frequent Contributor
timestamp: October 28, 2024, 04:15:03 am
content: Quote from: Kean on October 28, 2024, 03:55:07 amOK. I found it at element14, but there are 3 variants. Which one??https://nz.element14.com/c/connectors/usb-connectors-adapters/usb-connectors?st=GCT+USB4105

author: Kean
author_rank: Unknown
timestamp: October 28, 2024, 04:19:57 am
content: The variants are just for different gold plating and stake/leg lengths. I use the USB4105-GF-A-120 variant for the longer legs in a standard 1.6mm thick PCB.I manually add a little solder to ensure they are secure, but for mass production I imagine some fiddling with solder paste stencil and stake length would be in order.

author: dazz1
author_rank: Frequent Contributor
timestamp: October 28, 2024, 07:49:51 am
content: Quote from: Kean on October 28, 2024, 04:19:57 amI have updated the BOM so that a single order can be placed with element14 to get all the parts needed, except for the pcb.I found the usb connector was the most difficult to solder. Solder bridges and no joint being the main issues. I pre-tinned the pins, and used lots of flux to make good joints. I beeped out the pins to find bridges. I also used a loupe and a microscope.

author: dazz1
author_rank: Frequent Contributor
timestamp: November 04, 2024, 09:22:53 am
content: HiI have been working on a suitable enclosure for the V2e usb-gpib adapter.The results are attached. I am a fan of Art-Deco so the enclosure includes some simple aesthetic curves where they don't need to be.I have used this as an opportunity to try learning FreeCAD. This was about the 3rd attempt at learning. The incentive to learn FreeCAD is to get away from free/fee paying CAD that could lock up all of my existing drawings at the whim of a marketing department. I have used many different CAD packages over many years, and FreeCAD has the worst UE/UI by far. The FreeCAD learning curve is more like a tall cliff. I can only imagine how many potential users have fallen away as they tried to do something simple. It could be that I am just a slow learner, or perhaps I have certain expectations based on my experience with other CAD packages, but doing simple things is incredibly difficult in FreeCAD. I have watched YT videos that take 15 minutes to explain how to copy/paste a drawn element to another section of the same drawing. It has taken far far far too long to draw up this enclosure.I need to do a test print to make sure the enclosure works. The advantage of showing off the CAD on the forum is that the finish is perfect. Much better than I could achieve with an actual 3D printer. Any suggestions for improvements to the design welcomed.

author: dazz1
author_rank: Frequent Contributor
timestamp: November 05, 2024, 11:01:17 pm
content: HiI have printed off the version 2 enclosures shown in the attached images.I have already made some minor modifications to the design to create a version 3 enclosure.Version 3 changes includes:separating the LEDs to reduce light bleed from one to the other.shifting the LEDs slightly over the edge of the board to provide additional clearances.increasing the mounting hole size from 2.7 mm to 3.1mm.slightly adjust the position of the finger depressions.I have updated the Github files here.https://github.com/dazz100/UsbGpib