|
Electronic Load
1.0
Programmable Constant Current Sink
|


Go to the source code of this file.
Data Structures | |
| struct | ftestPortsStruct |
| Holds the test declarations for one Port. More... | |
Functions | |
| bool | FTest (void) |
| Performs a simple Factory Test. More... | |
| void | FTest485 (void) |
| bool FTest | ( | void | ) |
Performs a simple Factory Test.
This routine tries to test everything that can be tested without user intervention. It cannot detect all possible error conditions but will detect a lot of possible short circuits and other errors and can give valuable hints to the test personal.
This is done by performing a "Walking Zero" and a "Walking One" test i.e. all pins are set to 1 (or 0) and a single 0 (or 1) walks through all pins. As long only the currently tested pin is 0, everything is o.k., if another pin goes to 0, you have a short between these two pins. If a pin always stays at a fixed level, you have a short to VCC or GND.
A test mask defines which pins have to be tested. Bits set to 0 will not be touched and not be tested. Bits set to 1 will be programmed as output and tested against all other 1-pins and the supply.
A few rules have to be obeyed for the factory test to work:
Since interrupts are disabled in the progress of this function and DDRs are modified, the calling routine should perform a watchdog reset to restart the device.
Do not try to restore previous state and continue normal operation, you will most likely forget something and there is nothing bad in willingly performing a reset...

| void FTest485 | ( | void | ) |
1.8.15