P2 board testing - anyone done code to test out a board?
Cluso99
Posts: 18,069
I'm testing out my P2 RetroBlade2 boards and was wondering if anyone has done a pin test program?
What I'm thinking is checking for adjacent shorts for all I/O pins (well P0-P57 or P0-P61 although may need to allow for possible pullups/pulldowns on P59-P61).
Here is the idea...
Enable internal pullups on all pins (all means P0-57/61)
Now, for each pin, one at a time
disable the pullup
enable pulldown
read all pins (or 3 adjacent pins being lower, same, higher)
verify the current pin is low, and others are still high
enable pullup
Repeat the same but using pulldowns, and single pullup
Repeat both steps above, but instead of enabling pulldown/pullup drive low/high
While this does not check the pin to the connector, it does check for shorts between the P2 pins which is the most likely. A visual should provide reasonable confidence that the P2 pins are soldered to the pads, and a full pcb testing was paid for then there shouldn't be any tracking problems.
What I'm thinking is checking for adjacent shorts for all I/O pins (well P0-P57 or P0-P61 although may need to allow for possible pullups/pulldowns on P59-P61).
Here is the idea...
Enable internal pullups on all pins (all means P0-57/61)
Now, for each pin, one at a time
disable the pullup
enable pulldown
read all pins (or 3 adjacent pins being lower, same, higher)
verify the current pin is low, and others are still high
enable pullup
Repeat the same but using pulldowns, and single pullup
Repeat both steps above, but instead of enabling pulldown/pullup drive low/high
While this does not check the pin to the connector, it does check for shorts between the P2 pins which is the most likely. A visual should provide reasonable confidence that the P2 pins are soldered to the pads, and a full pcb testing was paid for then there shouldn't be any tracking problems.
Comments
For your P2 EDGE test I would probably let the computer test the computer, in this case to P2 against the P2, one being the Unit Under Test (UUT), and the second P2 the sequencer, controller and results logger. It takes some effort and thought on exactly what you want to test and what you are exactly looking for.
Thanks for the info tho I'm well aware of production testing having built Apple branded product for Apple, etc. However, my RetroBlade2 is not in this class.
What if it emulated an Apple II? Then it would be in the Apple "class".
https://forums.parallax.com/discussion/169269/accurate-dac-reference-data-voltages-from-p2-silicon
For this a big short circuit block was applied to all pins of port A on P2D2, then every pin stepped through in turn Low & High, and all 256 dac levels. The results were recorded on a calibrated hp dvm. This actually found one flaky connection, easily fixed with a soldering iron
There were actually two low readings and two hi readings taken for reasons a bit like you describe, things have settled better by the second reading
* pins stuck low (short to ground)
* pins stuck high (short to VIO)
* shorts between adjacent pins (solder bridges)
I have tested it and the results seek reasonable. Sometimes a double fault is reported (stuck low + short to next pin for the same pin number, for example) but I think that's no problem.
So I have already done my own in spin. I just set all tested pins with 15K pullups, then set each pin, one by one to 15K pulldown and ensured it read low before returning to pullup. I've tested with 1K to 3V3, GND and adjacent pins and my code reports all errors.
My code is posted here
forums.parallax.com/discussion/172457/testing-pins-for-shorts-using-smartpins-and-pullups-pulldowns#latest
I will include a link to your code on that thread too
http://forums.parallax.com/discussion/161872/ram-checksum-error
You came up with a quick test program, which I used at the time to pin down errors on some of my boards, ones that had failed to program.
I believe that Parallax runs exhaustive test on the chips that come back from the foundry, but those happened to slip through. It never hurts to double check while you're at it in your test suite, especially during this startup phase.
My board testing today revealed (one bard) a few pins from one edge were misaligned (not coplanar is the term I think) so the pins were in the air. I had P0-3 permanently low and upon really close inspection (I couldn't see it with my jewelers glasses!) the first few pins were not sitting flat and had not been soldered. The big clue was there was no 3v3 on the vio pin for that group. Touchup is not easy when the bypass caps are so close.
BTW I don't touch the pins as I place the P2 using a suction device on the main chip.
So it seems I am going to need to verify that the pins reach the pcb connectors as my current test does not actually verify the pin is soldered to the pcb, and a visual check cannot see this adequately
IIRC Chip did an example triangle oscillator that uses low current-drive modes and self feedback ?
Maybe the frequency of that can measure pin total trace capacitance, with enough precision to catch isolated pins ?
So, after all pins are verified for no shorts, I’m setting all pins high via 1K5. This way i can manually pass a probe down each connection (unconnected 0.1” pad) with the other via a led and resistor to gnd. I can verify all pads are connected to the pins visually.
EDIT: Ah, and to get it as a frequency rather than a ping time, have the input configured as Schmitt and fed back to the output. Although, I'm not sure how a frequency really helps.
A minor concern: mainly due to the use of an enig-finished pcb, and also gold-flashed connector pins, I'm just wondering if even using a slight laterally-applied-force, as to ensure a good contact with a probe or socket, would not be just enough to provide sufficient contact force, allowing such kind of an "electronic signature à la ozpropdev", to pass thrugouth a louselly solder joint, or even completelly unsoldered one...
If I want some resistance then this variation: