The Everything Interface: Desktop to Chip [USB to SPI, I2C, JTAG, UART, SWD...]
ฝัง
- เผยแพร่เมื่อ 23 ก.ค. 2024
- The USB-to-digital Swiss army knife (FT2232H) is available in a super handy package: the Tigard multi-protocol tool for hardware hacking.
See how I get Python talking SPI and I2C from a computer, to quickly develop and understand chip APIs. This thing can also program flash memory, microcontrollers, and FPGAs, do JTAG and SWD, level-shift to anything between 1.8 and 5 Volts and is all around pretty cool and useful.
** Resources **
The Tigard documentation is at: github.com/tigard-tools/tigard
and you can get it at
www.crowdsupply.com/securingh...
or (EU) 1bitsquared.de/products/tigard
The FTDI FT2232H datasheet: ftdichip.com/wp-content/uploa...
PyFTDI, a favorite for using the computer to talk to stuff in Python: eblot.github.io/pyftdi/featur...
The code used to get the Tigard managing the PCF8575 and controlling the Caravel processor is available at:
github.com/psychogenic/psycho...
If you're curious about the Caravel SoC, you can find out more at
caravel-harness.readthedocs.i...
and the housekeeping SPI stuff is at
caravel-harness.readthedocs.i... - วิทยาศาสตร์และเทคโนโลยี
Thanks for showcasing Tigard. I am glad you like it. We had fun creating it. :) The name is based on the name of a town in Oregon right next to Portland. So this is how we pronounce it. But it makes sense that folks pronounce it like Tiger considering the pun on the sticker. :D
Hi Piotr, thanks for the comments, work on Tigard and elucidation of the pronunciation mystery!! If you'd aimed a bit further south, the Beaverton name would have given it a much different vibe and logo, hah.
@@PsychogenicTechnologies Not that it's very important, but Beaverton is north of Tigard.
Just discovered this channel, thank you verymuch for the information you are providing, priceless
Many thanks for your feedback--glad "The Algorithm" made it so it managed to get to you, and very happy you find it useful. Am currently working on a range of different videos, interleaved with workwork, but hope to be putting out a few soon. Thanks again, cheers.
Just stumbled on your channel -- and some really cool topics! With your involvement in PCB Fabrication, and interest in I/O, and glamorous hair-- it's a crime you're not going by the name FabIO! Hahaha. Anyhow, keep up the good work!
hahaha, oh no, I can't believe I never heard that one or thought of it. Wow, awesome. So... it has returned... (way back, I worked in a bar where the nick wanted to stick but I kept managing to somehow sidestep)! Too bad fab.io is taken, lol.
Thanks for the comment/feedback and the laugh! :)
Neat, love these tips. Thanks Pat.
:) awesome--I have other vids I want to put out, but I'll be making more of these quickies. Thanks Stewart!
Stopped to give it a like, nice tool, cheers!
Thanks!
Sounds like a worthy upgrade from my trusty bus pirate! That level shifter sounds awesome
The bus pirate is very nice, and supports a whole lot (if not all?) of the same tools. But yeah, with 1v8 making more appearances, and shifting around between multiple projects at once, I really like having the module figure out and deal with all the shifting for me.
Great video, great tool!!!
Thanks
Thanks for the feedback, really glad you liked 😀
3:37 nothing like some self-deprecating humor to start your day 🙂Well scripted and to the point! Subbed! I won a MCU-Link Pro Debug Probe recently which is again a cheap alternative that combines jtag/swd/serial ports. Would be great if you could cover that!
hah, yeah :) But I seriously love finding something that, sure isn't lab-grade, but is cheap and gives you what you need 90% of the time. I don't know the MCU-Link Pro, took a quick look and it does look interesting. One bullet point that caught my eye was "Energy measurement down to sub 200 nA resolution at 1% typical accuracy" ... hm...
Nice tool I will have to get one.
I like it a lot. There are a few others that might be worth it, on Ali and elsewhere, but I play with enough different stuff that the level-shifting is a huge deal and really practical.
i like this kind of info...For your info
FYI, I appreciate the info--thanks for the info! 😆
Just ordered a tigard!
Sweet: sure it'll be useful in a bunch of scenarios. It actually comes with a bunch of labelled jumpers and cables I didn't even show.
Awesome!
Thanks! If there's anything specific you'd like me to cover, let me know. Glad you enjoyed, hope it was useful :)
Great looking tool! 😊
Can I ask what level shifter you use? Sounds really useful, especially if the supported device can set the level ❤
Hi Kaylee! Yes, it is super useful and the thing comes with two shifters on-board, specifically the SN74LVC8T245 (www.ti.com/product/SN74LVC8T245 ) which is, I think, what sets the 1.8-5V limits.
I use the the Analog Discovery 2 board for I2C/SPI/Can/Waveform-generator , but if you need OpenOCD/JTAG/SWD then the Tigard is the way to go! Incidentally the ESP-Prog uses the FT2232H *L*.
BTW, unrelated, but any thoughts on building SoCs using LambdaSoc (Amaranth HDL) vs LiteX (m-labs or whitequark's Migen/MiSoc)? I'm looking at writing an AMBA ABH-Lite slave device
Yeah, am still figuring out a few things with the Tigard but it's a lotta fun! Didn't know about the ESP prog.
As for SoC -- haven't used Migen/MiSoc but AFAIK migen became nmigen became amaranth and whitequark et al. have been working like crazy on Amaranth, so it's very active and alive... not sure about the others, as I've been turning to amaranth everytime I need something (actually trying to get in another little sub for tinytapeout 5, also w/amaranth).
this module work as spi slave ? i.e, to send data from a SPI master to this module, then convert to USB
Hi Jeferson, I don't actually know the answer to this--it's an interesting use case but one I've never encountered with the device. A quick search says that if it's possible to use an FT2232 in this mode, it ain't exactly popular. I was thinking worst case would be you could bit-bang using the GPIO interface, but as the slave device you don't get to choose the rate, so it might not be up to the task.
So is this basically a better Bus Pirate?
I'd like to replace mine with something like this, particularly since it seems to support JTAG better/fully.
I left my Bus Pirate somewhere (i.e. lost it) a good while ago, but IIRC it is very similar. Haven't played with the JTAG yet, but I sure like the whole automatic voltage level shifting (and going down to 1.8V logic... 5V tolerant is cool but I want to be able to talk to these easily) and the variety of headers is pretty swell too.
@PsychogenicTechnologies the Bus Pirate didn't really support JTAG out of the box. You had to install alternate firmware and, AFAIR, give up other features to use JTAG. Anyway, I never got it working for that function before it essentially became abandonware.
Anyhoo... this looks like a sweet little widget to add to my collection. Thx.
Oh neat! Do you know whether the Tigard kit sold by Mouser is the same as the kit sold in the 1bitsquared shop? I'm just asking because the photo from 1bitsquared shows the board plus labeled cables and the photo on Mouser shows only the board and there is no BOM of the kit that suggests that the accessories are included in the Mouser kit. Also, do we get permission to list this tool on the Recessim wiki?
Hullo DeadBug! :) To answer your Q, I don't actually know. However, I've gone through crowd supply for a few different projects--the Tigard, the LimeSDR, I can't remember what else--and it's always been shipped to me by Mouser. So my *guess* is that it's the same (mine came with the cables).
As for permission... same answer! Hah, I'm pretty sure it'd be ok... I'd had no contact with the creators of this tool prior to doing my video, so I can't say, but I was pinged by Joe Fitz (@securelyfitz on twatter) and he's a cool guy, created the thing to scratch an itch and released it, like any of us would surely gladly do. So if you have a question on that, I'd suggest pinging him.
Cheers!
@@PsychogenicTechnologies Thanks for the tip, will do! Cheers!
Yeah
I agree: yeah!! :-D I actually got to meet the Tigard guy at the crowd supply conf in Portland a week ago, and he just gave me another one--am really happy about that, I love this tool and having a backup or a way to coordinate multiple units doing different things is awesome
..need little help here (Win box): when I typed "pyftdi.ftdi.Ftdi.show_devices()" in python 3.8.6 .. I get error . I have the driver installed, and see COM interface in Device Manager.
Error:
raise ValueError("The device has no langid"
ValueError: The device has no langid (permission issue, no string descriptors supported or device error)
De
Hello Vignesh, unfortunately I'm a little clueless when it comes to windows--and the last time I was there, I was amazed at how hard it was to get anything done with an OS that's supposed to be "easy"--ugh. I did find stuff like this: forum.newae.com/t/the-device-has-no-langid/2891/7 and, the last time I was there it was actually to try and get something working for a CM in china, with python and USB, because they only had win machines. It was a nightmare, I gave up and wound up sending them a preprogrammed RPI Pico to do the job, hah. Anyway, my guess is it's something with libusb which seems pretty tricky with mickeysoft, but I really don't know!
@@PsychogenicTechnologies Hi, Thanks for taking time to reply.
I have been chasing this issue since morning and found a temp fix (hope it helps other too). Which is to use Zadig.exe that replaces FTDI dll with libusbk.dll. This worked for me on windows, but the downside is, now you lose FT_Programmer’s ability to connect to FTDI chip.
I guess, I can rerun Zadig to reverse it, but looking for a better solution that works with both FTDI programmer and ability to use JTAG.
@@vigneshb5347 ah, well a workaround is certainly better than it just not working. Thanks a lot for sharing it!