Hi
I am currently building a In-circuit tester for a pcb board and i am using a Arduino Mega for the test part.
The main description of the project is that i have 66 test pins that i need to check for short circuits between solder joints on a PCB.
To do this i plan to use the the 54Digital i/o and also the 16 analogue outputs (used as digital i/o)
My main issue is the structure of the code
Because i have to use so many i/o i plan to use a number of arrays to store them in,
I then plan to use different functions to implement the code
So if i take the first test 10 test pins
I plan to write a high to test pin 1 and the read from test pin 2, if value is the same then flag an error,
else
I then write a high to test pin 3 and read from test pin 2 and 4, if value is the same in either of the reads then flag an error
else
i then write a high to test pin 5 and read value from test pin 4 and 6, if value is the same in either of the reads then flag an error
else
i then write a high to test pin 7 and read value from test pin 6 and 8, if value is the same in either of the reads then flag an error
else
return test passed[/color]
As you can see it could be a long code if im going to use arrays.
What my question is if i use an array for the write and an array for the read, then implement the write and read for all the pins at the same time would this work?
I would also like to be able to pin point a fault to an output but if i am using arrays would this be possible?
I am looking for some tips on were to get started and setting out a structure for my code?
Regards James