Products > Test Equipment
open source GPIB adapter
PioB:
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 instructions
Reading | ################################################## | 100% 0.04s
avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: erasing chip
avrdude: reading input file "0x3F"
avrdude: writing lock (1 bytes):
Writing | ################################################## | 100% 0.02s
avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3F:
avrdude: load data lock data from input file 0x3F:
avrdude: input file 0x3F contains 1 bytes
avrdude: reading on-chip lock data:
Reading | ################################################## | 100% 0.01s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0xff != 0x3f
avrdude: verification error; content mismatch
avrdude: safemode: Fuses OK (E:FB, H:99, L:52)
avrdude done. Thank you.
$ sudo avrdude -c jtag2isp -p m32u4 -U flash:w:BootLoader.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.04s
avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "BootLoader.hex"
avrdude: input file BootLoader.hex auto detected as Intel Hex
avrdude: writing flash (32768 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 32768 bytes of flash written
avrdude: 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 Hex
avrdude: input file BootLoader.hex contains 32768 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 32768 bytes of flash verified
avrdude: safemode: Fuses OK (E:FB, H:99, L:52)
avrdude done. Thank you.
--- End code ---
Reading back the fuses/other info yields the following:
--- Code: --- avrdude -c jtag2isp -P usb -p m32u4 -n -v -B22
avrdude: Version 6.3, compiled on Jul 21 2021 at 00:00:00
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System 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, skipping
Using Port : usb
Using Programmer : jtag2isp
Setting bit clk period : 22.0
avrdude: usbdev_open(): Found JTAGICE mkII, serno: 00B000004F4F
JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
boot-loader FW version: 255
firmware version: 7.39
hardware version: 0
S_MCU:
boot-loader FW version: 255
firmware version: 7.39
hardware version: 1
Serial number: 00:b0:00:00:4f:4f
Device ID: JTAGICEmkII
AVR Part : ATmega32U4
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00
flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : JTAGMKII_ISP
Description : Atmel JTAG ICE mkII in ISP mode
Vtarget : 5.1 V
SCK period : 23.12 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: safemode: hfuse reads as 99
avrdude: safemode: efuse reads as FB
avrdude: safemode: hfuse reads as 99
avrdude: safemode: efuse reads as FB
avrdude: safemode: Fuses OK (E:FB, H:99, L:52)
avrdude done. Thank you.
--- End code ---
maxwell3e10:
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.
Venturi962:
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
simba15:
--- Quote from: maxwell3e10 on February 23, 2022, 08:50:58 pm ---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.
--- End quote ---
I 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.
PioB:
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
$lsusb
Bus 003 Device 019: ID 03eb:2045 Atmel Corp. LUFA Mass Storage Demo Application
I 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.BIN
bb6785db41417e20e522b72fcbcfba61 TestAndMeasurement.bin
bb6785db41417e20e522b72fcbcfba61 /run/media/baettig/GPIBUSBBOOT/FLASH.BIN
So 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 enumeration
You 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/11 unfortunately without resolve so far...)
I'd be grateful for any hints.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version