News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

WZ500 + GPIB

Started by JonW, Today at 09:47 AM

Previous topic - Next topic

JonW

Hi all,
 
I've been working on a side project developing a USBTMC to Ethernet transparent
bridge instrument adapter to circumvent restricted network access to lab equipment.
As part of that, I ended up writing a complete W5500 Ethernet driver from scratch
off the datasheet. I initially ported the WIZnet C code straight off their website,
used it for a while, and only later realised it had errors in it, which explained
why it was flaky. Ditched it and rewrote from the datasheet in bare metal C on the RP2354. Well tested since and
handles all the edge cases the WIZnet code falls over on.
 
To give some context on the complexity, the full firmware covers a complete USBTMC/
USB488 stack handling all the USB instrument class protocol, a SCPI server that parses,
routes and repackages commands transparently between USB and TCP, and a full W5500 TCP
driver with connection management, retransmit handling and fragmentation recovery. All
bare metal, no RTOS, no lwIP. The whole lot comes in at 73KB on the RP2354. That sounds
like a lot if you're used to PIC sizes, but that is tiny for the RP2354.
Worth saying that a UDP-only Positron port would be a fraction of that
as UDP has none of the connection state, retransmit logic or session management that
makes TCP heavier, so it'll sit very comfortably on a PIC18. The next step is adding legacy fully isolated GPIB support to give a single box that handles USBTMC,
Ethernet and legacy GPIB without needing VXI-11, Prologix or any of that. Basically,
a cheap replacement for the NI and Keysight adapters and doesn't need obsolete driver ic's either.
 
I've seen plenty of posts on here over the years with people using Lantronix and
similar serial-to-Ethernet modules for remote instrument access and data logging —
and those aren't cheap. A PIC18F47Q10 with a W5500 and a CP2102 on the USB side
would do the same job for a fraction of the cost.
 
Would anyone actually use a proper W5500 UDP library for Positron if I ported it?
Not committing to anything yet, just want to know if there's appetite before I spend
the time. I'd include Python test scripts so you can verify it works end-to-end
without needing anything exotic on the bench.
 
Posting some photos of the dev boards below — also have a PIC18F47Q10 variant ready to go to build but may do a dedicated W5500/47Q10 only board to improve the cost.
 

EDIT: Just to be clear, this would only be a working UDP to CDC type bridge for Demo.

Jon

WIZPIC.jpgWIZRP54.jpg