the language of your choice.
Main Program:
HouseKeep (set ports, clear flags, set defaults)
Read upload bit (has user saved previous settings?)
If low
CopyPROM (load defaults from EEPROM)
Endif
ReadConfiguration (get former settings from EEPROM)
SetConfiguration (set board registers)
Beginloop: (Start of endless loop)
Read self-test bit
Read self-test number
If bit=0 and number <>0 (self test operation)
Case: (test number)
On 1 do test 1
On 2 do test 2
On 3 do test 3
On 4 do test 4
Endcase;
Else (normal operation)
Read interface flag (Check for faults or user input)
If set
Read status word (Identify faults or user input)
If fault flag, do soft reset, endif
If jitter flag <> jitter state, toggle state, endif
If calibration request, Calibrate, endif
If Bit 0, SetAmplitude, Endif
If Bit 1, SetBitRate, SetAmplitude, Endif
If Bit 2, SetBitRate, SetAmplitude, Endif
If Bit 3, SetFrequency, Endif
If parameters have changed
Update EEPROM
Endif
Clear interface flag
Endif
Endif
Endloop;
^
I don't understand the PDL
I'll try rewriting in JS, then you tell me what I'm doing wrong :P
Is HouseKeep a function?
Обсуждают сегодня