Easy tool to test/debug/drive I2C and SPI (Open Source) (Arduino Uno R3) - Page 1
Forum section: electronics / projects

author: liu_zhiyong
author_rank: Newbie
timestamp: July 02, 2023, 04:08:34 am
content: Just coded an easy tool to test/debug/drive I2C and SPI, with Arduino Uno R3.(Other types of Arduino should also work - even though that's not tested)(Arduino Uno R3 is very cheap, easily available, and it's all open source, so you own the entire "toolchain" stuff)Take a look at one part of tutorial:(Tutorial is a bunch of screenshots, showing how it works)And the waveforms have been checked, for example:You can check the source code here:https://github.com/signaloperator/sofirmware/blob/main/sofirmware.inoAnd documentation here:https://signaloperator.com/The whole thing is in the micro controller, and verified to work on Windows and Linux.(It should also work on Mac - again, not tested though)(This is my first Arduino project. Most of time I code in Keil as my job. I hope you enjoy this stuff. And comments and stars would be appreciated. Have a nice day.)

author: liu_zhiyong
author_rank: Newbie
timestamp: July 04, 2023, 12:32:09 pm
content: Comment and feedback would be appreciated - either positive or negative.Maybe recommend other tools of similar functionality. I don't make any money with this open-source project. It's great to see others. I might buy.Actually I bought several similar tools. And this open-source project is a little bit special, I think, because:Absolutely clean - users don't need any special software installed on computer. (The whole business is inside micro controller)Total ownership - the whole "toolchain" stuff is completely open. (including hardware, and easily available)Truly understand the code - the source code contains a lot of comment, explaining every bit of business. (And it's relatively simple)(There are other open-source / commercial tools of similar functionality. As far as I know, none has "a little bit special" points listed above. Have a nice day.)

author: rhb
author_rank: Super Contributor
timestamp: July 04, 2023, 08:10:48 pm
content: Thank you!This looks very useful, especially as it's so cheap you can make them as pass thru taps to fit particular dev boards, etc. My Instek DSO can do this but it's not very convenient. And my HP 16500A and 16702A are serious overkill.You clearly put a lot of thought into the project.HaveFun!Reg

author: liu_zhiyong
author_rank: Newbie
timestamp: July 05, 2023, 12:47:46 pm
content: Great to hear from you! Ah I briefly checked the tools you mentioned(Instek DSO, HP 16500A, 16702A), and these appear to be high-end gears.My little open-source project and these high-end instruments really belong to different scenarios.Yes, this thing is "so cheap you can make them as pass thru taps".And ownership - you probably never need to worry about its availability. (I guess people will keep producing these Arduino boards because of its super "ecosystem")Kind Regards,

author: rhb
author_rank: Super Contributor
timestamp: July 05, 2023, 02:12:06 pm
content: I'm 70. 5 years ago my sister and her husband took over my bedroom for 7-8 months while I remodeled Mother's house to accommodate a wheelchair as Phil has Parkinson's.He deteriorated so quickly, that realizing that there go I but for the grace of God, I started buying toys. I'd rarely done that my whole life. I now have Tek & HPAK lab setup that cost over $500k in the mid '90s. All bought for about $25k.I'm a huge fan of all the cheap instruments available now. I buy quite a few of them and when I encounter something I think useful for other people to know I will make comparisons of cheap stuff from China. Hugen grabbed onto edy555's design and made huge splash just after I spent around $3k for an 8753C and 16046A S parameter set. While the 8753C is far superior, I haven't had space to use it and instead used one of my nanoVNAs.I'm not a big Arduino fan, but the 5 V 40 mA GPIO drive is sufficient to support 10 of the design max of 13. With $3 SBCs it's excellent glue logic for many tasks.Have Fun!Reg

author: coromonadalix
author_rank: Super Contributor
timestamp: July 05, 2023, 04:12:31 pm
content: @ OP liu_zhiyongwhat is the pcb interface on the arduino ports, look lika a level shiftermodel or whre can we find it ?thks for the project

author: luudee
author_rank: Frequent Contributor
timestamp: July 05, 2023, 04:16:22 pm
content: Wonderful project, thank you !Have you seen thesehttps://spidriver.com/https://i2cdriver.com/If I remember correctly, they are around $35 USD each ...I have both and am very happy with them ....Cheers,luudee

author: liu_zhiyong
author_rank: Newbie
timestamp: July 06, 2023, 12:36:34 pm
content: @rhbI totally understand the "I started buying toys" thing. Sometimes, money simply does not mean too much anymore. (And its value is decreasing steadily anyway, with this "stimulus" and that "initiative")It's well said, "we're here for a good time, not a long time".Just did Google searches about the tools in your last post. Well, let's just say I'm more familiar with C language and tiny micro controllers. No comment here.For Arduino, the keyword is "availability". Whatever country you are in, whatever OS you use, whatever price you can afford.(I use the expensive "genuine" one, but it's perfectly OK to use cheap "copy" boards)Kind Regards,

author: liu_zhiyong
author_rank: Newbie
timestamp: July 06, 2023, 01:08:09 pm
content: @coromonadalixYes, it's bi-directional level shifter, between 5V and 3.3V. You just pay attention that each channel should have two transistors, and it should be fine.More details:https://www.digikey.com/en/blog/logic-level-shifting-basics(Go for "Figure 7: Isolated bus lines in a translated data communication circuit.")I prefer this to chips, because chips might have issues, for example:https://www.edaboard.com/threads/microcontroller-level-translator-not-working.222251/Kind Regards,

author: liu_zhiyong
author_rank: Newbie
timestamp: July 06, 2023, 01:33:13 pm
content: @luudeeYou are welcome. Yes, I've seen these online, but did not use them.The opinion here is, maybe it's better to leave waveform displaying to logic analyzer, instead of a small screen. Just an opinion.Actually I seriously considered about buying "Digital Discovery: Portable USB Logic Analyzer and Digital Pattern Generator". I still think it's great.Kind Regards,