Welcome to Glasgow
1 week, 1 day ago python electronics amaranth nablopomo glasgow
Not long ago, this little device arrived on my doorstep: a Glasgow Interface Explorer. Well, that is, the actual circuit board arrived - the case had actually come months ago, so it was nice to be able to fill it.
But what actually is it?
It's described on its Github page as a "Scots Army Knife for electronics", and it's not a bad analogy: it functions as a whole variety of different tools that can be really handy when poking around in (digital) electronics: it can measure and supply small voltages, understand and speak various common protocols, and so on. In this way it's similar to other devices such as the Bus Pirate. But it is, in my view, superior to them (and I've found my Bus Pirate devices very handy over the years). So what sets it apart?
To my mind the main advantages of the Glasgow are:
- It is based on an FPGA, which means it can handle more complicated (and faster) protocols.
- It is completely configurable, in terms of pins - need to have the clock on pin 5? No problem! The signal on pin 7 is inverted? No big deal, can just flip it with a simple command-line option.
- It connects to your computer by USB, so has more bandwidth for monitoring and controlling signals.
- It is directly controllably using Python. While it's possible to write Python script to control a Bus Pirate (and I've done so), it's a bit fiddly - you have to write a lot of glue code to send the right serial commands that the Pirate expects, and to interpret what it sends back. With Glasgow that's effectively already done: your script gets given a Python object, on which you can call methods to do the things you need to to manipulate your circuit.
The software comes with dozens of modules, including common protocols such as SPI/I2C, control of various types of flash memory chips, some LCD and LED displays, various sensors, and plenty more. And if that's not enough, it's fairly straightforward (once you've learnt some Amaranth) to add your own; the system is well designed so that most of the effort goes on communicating with your device, rather than on trying to interface with the tooling.
The code you write gets compiled into a bitstream for the onboard FPGA - but this is all nicely hidden from you (and surprisingly quick); this also makes the Glasgow into a nice platform for learning to program FPGAs, which (as you'll know if you've been following this blog) is one of my current projects. All in all, a fun little device!
0 comments