Giter Site home page Giter Site logo

gpib-usbcdc's Introduction

GPIB-USBCDC

GPIB-USBCDC is an interface bridge between GPIB (HPIB) and USB communication device class. It is Prologix GPIB-USB adapter clone with EFM8 Universal Bee or C8051F38x microcontroller.

Quick user guide

  1. Connect GPIB-USBCDC to the PC. GPIB-USBCDC is recognized as serial port, which will be installed with CDC inf file.
  2. Other usage is almost same as Prologix GPIB-USB adapter. Please see that product manual.

Manual

Nice user manual written by Alessandro Soraruf is available, Thanks! In addition, please set up your device with its address except for zero, in case of bus confliction reported by biergaizi.

Board

EagleCAD files are available (ver.1 schematics and layout. Its components are listed in BOM. The board design is published under Creative Commons Attribution-ShareAlike 4.0 International.

BOM (bill of material)

Part Value Package Multiple
C1, C4 1u / 6V3 1005 2
C2, C3, C5, C6 0.1u / 10V 1005 4
CON1 HRS ZX62R-B-5P 1
CON2 Norcomp 111-024-113L001 1
CON3 JST ZH B4B-ZR 1
IC1 EFM8UB20F32G-A-QFN32 or C8051F387-GM QFN32 1
IC2 SN75160BDWR or SN75ALS160DWR SO20 1
IC3 SN75162BDWR or SN75ALS162DWR SO24 1
LED1 Red 1608 1
LED2 Orange 1608 1
LED3 Green 1608 1
LED4 Blue 1608 1
R1, R2, R3, R4 470 1005 4
R5 1K 1005 1

Firmware

The official binary is published in github release. To build the firmware by yourself, install sdcc (testing with ver 3.3.0 #8604), and just "make" at "firmware" directory of the downloaded code. The generated firmware name is gpib-usbcdc.hex. The firmware code is published under New BSD License.

Build Status

How to write firmware to hardware

Connect a GPIB-USBCDC board and a PC via USB debug adapter (UDA) or compatible one. The minimum required programming connections are summarized in the following table. Then, use Flash Programming Utilities. Note: the board may not be recognized by a PC when an UDA is connected via USB hubs. UDA is recommended to connect a PC directly.

Signal UDA side GPIB-USBCDC board side
C2D 4th pin CON3 3rd pin
C2CK 7th pin CON3 4th pin
GND 3rd pin CON3 1st pin

Additional information

gpib-usbcdc's People

Contributors

fenrir-naru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gpib-usbcdc's Issues

Documentation: Add Warning about GPIB Address 0

I spent days trying to get this GPIB converter to work on my voltmeter but I couldn't even after checking the documentation many times. The voltmeter did not not respond to any command. Meanwhile, strangely, a National Instruments converter (clone) worked without any problem. Eventually I had to troubleshoot this problem by probing the GPIB bus painstalkingly with a logic analyzer. The conclusion was almost hilarious: the voltmeter's GPIB address was set to 0, which is ambiguous, and I didn't realize it.

After I changed the address, it worked flawlessly.

This is not a bug since address 0 is reserved. But I suggest updating the documentation with a warning on GPIB device address 0, so other newcomers don't have to fall into the same trap.

Debugging

If the controller set the device as a listener first and set itself as a talker, it creates a bus contention - both the controller and the device have address 0 and both think they should start talking now, trashing the bus, so it doesn't work. This is the behavior of gpib-usbcdc.

905778031e0c48ea

But... If the controller set itself as a talker first before set the device as a listener, it works (in a mysterious way if you don't have a logic analyzer), because there's only one active talker at this point. Apparently National Instruments does this, perhaps as a workaround just for this case. So it worked without any problem.

fe96947d7244152c

Correct firmware for C8051F387

Hello,
I wanted to ask if there is a firmware version for the adapter if you're using a C8051F387
You recommended either the EFM8UB20F32G-A-QFN32 or C8051F387.
But im having problems with Windows detecting the adapter correctly.
Do i have to build my own firmware or is there a premade one?

Thank you for your help

111

Hello, I encountered an issue when testing your open-source project. When using your code to send data to the computer via GPIB-USB-HS and reading it with NISA, I am facing a problem with the received data. Instead of receiving the 128 ISO characters, I am getting a series of dots and other characters. The data seems to be corrupted. Can you please help me troubleshoot this issue

SDCC command lines for correct Build ?

Hi.
This looks cool, as we are looking for CDC examples using SiLabs C8051F380.

However, I'm unsure about the build settings, and make barfs on this PC.
Q: What is the expected code image size & .MEM file ? (It might pay to upload a .HEX and .MAP & .MEM files to github, so users can see what they should get ?)

I can get a manual build if I use this command line
\SDCC\bin\sdcc.exe --debug --stack-auto --nooverlay --model-small --use-stdout --opt-code-speed -c gpib.c -o OutSDCC
but that --stack-auto seems to pass everything on the stack, and gives a large size: 19059
with .MEM showing DATA space is all Stack.
However, that's likely to be VERY slow.

If I try a simpler
\SDCC\bin\sdcc.exe --debug --use-stdout --opt-code-speed -c gpib.c -o OutSDCC
(I find I need --nooverlay removed, as otherwise it cannot all fit in DATA)

that compiles all modules fine, & gives a much better looking MEM report, & better Size : 16835 except for gpib.c which fails with error reports like this

gpib.c:66: error 92: Functions called via pointers must be 'reentrant' to take this many (bytes for) arguments
gpib.c:67: error 92: Functions called via pointers must be 'reentrant' to take this many (bytes for) arguments
gpib.c:68: error 92: Functions called via pointers must be 'reentrant' to take this many (bytes for) arguments
gpib.c:74: error 92: Functions called via pointers must be 'reentrant' to take this many (bytes for) arguments
gpib.c:78: error 92: Functions called via pointers must be 'reentrant' to take this many (bytes for) arguments
gpib.c:82: error 92: Functions called via pointers must be 'reentrant' to take this many (bytes for) arguments
gpib.c:94: error 92: Functions called via pointers must be 'reentrant' to take this many (bytes for) arguments
gpib.c:101: error 92: Functions called via pointers must be 'reentrant' to take this many (bytes for) arguments
gpib.c:118: error 92: Functions called via pointers must be 'reentrant' to take this many (bytes for) arguments
gpib.c:410: error 92: Functions called via pointers must be 'reentrant' to take this many (bytes for) arguments
gpib.c:413: error 92: Functions called via pointers must be 'reentrant' to take this many (bytes for) arguments
gpib.c:421: error 92: Functions called via pointers must be 'reentrant' to take this many (bytes for) arguments
gpib.c:426: error 92: Functions called via pointers must be 'reentrant' to take this many (bytes for) arguments
gpib.c:575: error 92: Functions called via pointers must be 'reentrant' to take this many (bytes for) arguments

and I could not get a SDCC __reentrant keyword to apply in the function declarations, as they seem tangled in #defines etc
These seem simple print routines ?
Do you have a gpib.c version that has __reentrant applied (or gpib.c that does not need reentrant?), or do you have any command line tips, for getting a build that completes ok ?

GP-IB program writing request?

Hello there. We have an old instrument which is used to be controlled by a vintage NEC PC-9801ES computer running under DOS 6.20 via a PC-9801-29N c-bus GP-IB board. Computer is missing and after a few years not being used we need to use the instrument again. Fortunately there are a few emulators for PC-9801 computers (best to me is Neko Project II emaulator) developed by gamer community but unfortunately they don't support GP-IB interface ? The road map we are guessing is writing a program (under N88-basic and DOS 6.20 Japanese version) to be able to capture the commands from the instrument software running inside Neko Project II emulator environment and convert them to appropriate format and send them to the NI GPIB-PCII/IIA board inside our modern computer ruining running windows XP which is connected to the instrument and vis-versa. Or to include both old c-bus GP-IB and new NI GPIB-PCII/IIA PCI-bus support into the open source Neko Project II emulator. We are looking to hire a GP-IB programmer to do this job for us. Could you please let us know if yourself or anyone else you may aware of who may willing to do this job for us his/her email?

THX

Popping up as GPIB-USB comport

Hello.

Is this device supposed to pop up as a GPIB-USB comport?
if so, i'd guess it doesn't support Pyvisa with multiple instruments or does it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.