摘要 |
initializing a low variable(LB) and a polarity variable to be "0"; setting the whole polarity check time of a horizontal synchronization signal(H-Sync.) to be a time variable; checking an H-Sync input port; increasing the high variable by one if the H-Sync input port is high, and increasing the low variable by one if the H-Sync input port is low; judging whether the time variable is 0 after decreasing the time variable by one; repeating the step of increasing the high and the low variable until the time variable becomes "0" if the time variable is not "0", and comparing the high variable value with the low one if the time variable is "0"; storing a negative polarity value if the high variable value is larger than the low one, and otherwise storing a positive polarity value.
|