Testing device to talk I2C/SPI/bitbanging - Page 1
Forum section: electronics / projects

author: kuon
author_rank: Regular Contributor
timestamp: January 05, 2024, 09:44:54 pm
content: I am looking for an USB device I can program from linux (C at minimum and if possible higher level language) that I can use to test I2C, SPI and bitbanging.I'm aware of bus pirate but I wonder if there is something newer with those features:- I2C clock stretching support- Minimal logic analyzer (monitoring some pins and dumping a CSV file is enough, but I'm not against fancy features)- CAN support would be nice, but not not a requirement- 3.3V required, but if there is something that can do both 3.3 and 5V I would be happy- USB galvanic isolation would be nice, I have an USB isolator, but if it's embedded it's one less thing I can forget- Visualization on the board would be a nice plus, like a LED per output that is lit for high and off for low, or a small display. The minimum would be a LED just to be sure the program I sent from the PC is running, this would gain time as I wouldn't have to hook the scope each time.

author: dobsonr741
author_rank: Frequent Contributor
timestamp: January 06, 2024, 01:41:55 am
content: Look at FT2232H, if you are looking to write code on your host, not on a microcontroller. You’ll find good open source support and plenty of drivers from FTDI.

author: MarkF
author_rank: Super Contributor
timestamp: January 06, 2024, 02:41:47 am
content: I spun my own version of DLP'sDLP-245PL-G USB-Microcontroller Development Board.The I/O is controlled by tokens sent from the USB bus. The FT245RL FTDI chip's I/O can be either 3.3V or 5V if used in conjunction with a PIC18(LF) microcontroller. The VCCIO pin of the FT245RL sets the voltage for the I/O pins. When you purchase one of their modules, they give you a link to the firmware. Which, I re-wrote and added my own commands. Their original firmware only does digital I/O and ADC conversion.You will need a PICKIT to re-program the firmware.

author: zapta
author_rank: Super Contributor
timestamp: January 06, 2024, 06:35:12 am
content: These people have interesting boards. I used their I2CMini from a python script and it was very easy to use.https://i2cdriver.com/Bus pirate is a stale product. Got one, tried to access from Python and had hard time to find a supported library that works.

author: kuon
author_rank: Regular Contributor
timestamp: January 06, 2024, 02:01:56 pm
content: Quote from: dobsonr741 on January 06, 2024, 01:41:55 amI should have mentioned that I tried the FT2232H board. But the I2C does not support clock stretching. There is a software hack that does, but it's unreliable.

author: kuon
author_rank: Regular Contributor
timestamp: January 06, 2024, 02:10:49 pm
content: Quote from: zapta on January 06, 2024, 06:35:12 amThey look really nice! But I would need the two of them and I cannot do bit banging which is something I need. Still, I will try them.Quote from: MarkF on January 06, 2024, 02:41:47 amThis looks promising. After a quick read I do not really get how this is programmed, but I'm sure it cannot be that convoluted.

author: MarkF
author_rank: Super Contributor
timestamp: January 06, 2024, 02:25:06 pm
content: Quote from: kuon on January 06, 2024, 02:10:49 pmIf you look at the schematic at the end of their datasheet, there is a 5-pin programming header (J1) to the left of the PIC microcontroller.

author: kuon
author_rank: Regular Contributor
timestamp: January 06, 2024, 02:27:53 pm
content: Quote from: MarkF on January 06, 2024, 02:25:06 pmAh yes, I missed that, you have direct access to the MCU.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: January 06, 2024, 10:19:34 pm
content: Quote from: kuon on January 06, 2024, 02:01:56 pmMaybe try the FT4222H ? which claimsClock stretching support in master and slave modeI'd think the SPI can be leveraged to do 4 lanes of logic analyzer capture.It's not clear if SPI and i2c can be simultaneously active, but using two modules may be simpler anyway. There is some web mention of python libraries for FT4222H

author: kuon
author_rank: Regular Contributor
timestamp: January 07, 2024, 02:14:55 pm
content: I will try the FT4222H, but I really like the look of the I2Cmini board, I wish something like that would exist with all protocols I need.