Skip to content

Commit e776178

Browse files
committed
Improved output for multiple expected results
1 parent 7910469 commit e776178

File tree

6 files changed

+47
-6
lines changed

6 files changed

+47
-6
lines changed

.DS_Store

0 Bytes
Binary file not shown.

ChipTester.ino

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,12 +291,12 @@ void setPinValue (String p)
291291

292292
void passTest()
293293
{
294-
Serial.println("PASS");
294+
Serial.println(" PASS");
295295
}
296296

297297
void failTest()
298298
{
299-
Serial.println("***FAIL***");
299+
Serial.println(" FAIL <<<");
300300
}
301301

302302
void TestParam(String p)
@@ -417,10 +417,13 @@ void TestParam(String p)
417417
{
418418
if (tstPhase == 0)
419419
{
420-
//Serial.println("Pin:");
421-
//Serial.println(_savePinNum);
420+
Serial.print(" P");
421+
Serial.print(_savePinNum);
422+
Serial.print("=");
423+
422424
//Serial.println("Expect:"+p);
423425
int result = digitalRead(_savePinNum);
426+
Serial.print(result);
424427
if (p[0]=='1') // expect HIGH
425428
{
426429
if (result == 1)
@@ -448,6 +451,7 @@ void TestParam(String p)
448451
else
449452
{
450453
_savePinNum = getPinNumFromName(p);
454+
Serial.print(p+":");
451455
}
452456
break;
453457
}

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ M,22,D0,O,24,D1,O,26,D2,I
1515
P,D0,0,D1,0
1616
```
1717

18+
Lines that do not begin with a valid command are ignored, so you may use
19+
a character like '*' to add comments to your test scripts.
20+
1821
* M = pin mappings - sequences of 3 parameters
1922
* pin number
2023
* pin name to be used in further statements
@@ -35,12 +38,15 @@ E,D2,1
3538
* T = define a named test and the input conditions to be set
3639
* D = delay for a number of milliseconds
3740
* E = expected results to be verified. In this case, the D2 pin will be checked for a logical high value. If any condition on the expected results line fails, the test is considered failed.
38-
39-
Note: Multiple expected results needs to be tested - see issue #1
41+
Multiple expected results may be tested for each E command
4042

4143
## Counting Pulses
4244
For future development:
4345
* C = count pulses on specific pins during a specific delay
46+
* X = measure time in microseconds until expected result is achieved
47+
(ex: set a pin low and measure how long it takes for an output to go high)
48+
This would need both precondition and expected result on same line
49+
and would need to do all work after full line is processed and prepared.
4450

4551
# Sample Test Run in Serial Monitor:
4652
```

SDCard/.DS_Store

2 KB
Binary file not shown.

SDCard/T4001B/T000STRT.csv

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
* Set up pin mappings: PIN number, Pin Name, Input or Output
2+
M,22,D0,O,24,D1,O,26,D2,I
3+
M,28,D3,O,30,D4,O,32,D5,I
4+
M,34,D6,O,36,D7,O,38,D8,I
5+
M,40,D9,O,42,D10,O,44,D11,I
6+
* Set up initial pin values to be set before applying power
7+
* Note: Arduino outputs = chip inputs
8+
P,D0,0,D1,0,D3,0,D4,0
9+
P,D6,0,D7,0,D9,0,D10,0

SDCard/T4001B/T100QNOR.csv

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
****************
2+
* NOR = Not OR *
3+
* 0 NOR 0 = 1 *
4+
* 0 NOR 1 = 0 *
5+
* 1 NOR 0 = 0 *
6+
* 1 NOR 1 = 0 *
7+
****************
8+
9+
* Test all 4 NOR gates with the same values for each truth table row.
10+
11+
T,NOR00,D0,0,D1,0,D3,0,D4,0,D6,0,D7,0,D9,0,D10,0
12+
D,100
13+
E,D2,1,D5,1,D8,1,D11,1
14+
T,NOR01,D0,0,D1,1,D3,0,D4,1,D6,0,D7,1,D9,0,D10,1
15+
D,100
16+
E,D2,0,D5,0,D8,0,D11,0
17+
T,NOR10,D0,1,D1,0,D3,1,D4,0,D6,1,D7,0,D9,1,D10,0
18+
D,100
19+
E,D2,0,D5,0,D8,0,D11,0
20+
T,NOR11,D0,1,D1,1,D3,1,D4,1,D6,1,D7,1,D9,1,D10,1
21+
D,100
22+
E,D2,0,D5,0,D8,0,D11,0

0 commit comments

Comments
 (0)