1
\$\begingroup\$

I wrote a number of microcontroller GPIO libraries (essentially set pin direction, set pin, read pin, read pin as analog input). I'd like to create an automated test to verify that my library indeed does the correct things with the correct pins. Doing this by hand is tedious and not something I want to do after each change.

Has anyone designed a hardware software combination to automate this? For instance, some resistor DA converter connected to the output pins, output to an A/D pin, seqeunce the output pins and verify that the correct voltage is read from the AD pin. But that leaves the digital inputs untested.

\$\endgroup\$
  • \$\begingroup\$ Sounds suspiciously similar to what the JTAG boundary scan tried to solve. \$\endgroup\$ – pipe Feb 7 '16 at 12:19
  • \$\begingroup\$ I don't see any relation with JTAG. JTAG provides an outside interfave that gives access to (and/or overrides) lots of internal nodes. I want to verify software. \$\endgroup\$ – Wouter van Ooijen Feb 7 '16 at 12:29
  • \$\begingroup\$ This sounds very similar to some of the built in test functions I have done (wrap pins around for both digital and analogue). There are times I have asserted a known high or low into a shift register to test input pins. I will come up with a simple schematic later if I find time. \$\endgroup\$ – Peter Smith Feb 7 '16 at 15:30
  • \$\begingroup\$ @Peter I have let's say 20 or 50 pins to check, some of them analog. \$\endgroup\$ – Wouter van Ooijen Feb 7 '16 at 15:58
  • \$\begingroup\$ That is really not too difficult; I currently work in high reliability applications and just about everything has to be tested (not so much against software as hardware faults but the end result is the same - confirmation that pins toggle or generate some output voltage as required). I need to get at my primary system at the office for this which is tomorrow morning. \$\endgroup\$ – Peter Smith Feb 7 '16 at 16:03
1
\$\begingroup\$

I think you can interface NI myDAQ with LabView to make a suitable test bench for your specific application. It has both analog and digital IOs, but in a limited number.

\$\endgroup\$
  • \$\begingroup\$ NI? MyDAQ? Labview? I want to run something on my microcontroller so it can test the GPIO library, with some suitbale (but hoefully minimal) hardware, like a bunch of resistors or maybe a few multiplexers. What you say doesn't sound minimal. \$\endgroup\$ – Wouter van Ooijen Feb 7 '16 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.