Other Parts Discussed in Thread: ALP
Dear expert,
In 94x 92x Timing Detection Analysis.pdf, Below script is for video resolution extraction.
In customer side, the link is LOCKed. They send video from UB947, so they didn't need pattern gen.
They followed below script and UB948 0x69 register always return 0. Could you give some guidance here?
BTW, when writing 0x19 to UB948 0x68 register, its read back value is 0x18. And when writing 0x11 to 0x68 register, its read back is 0x10. Bit 0 is always 0. Is it normal?
Thanks
------------script----------------------------
board.WriteI2C(UB948,0x68,0x19) # H active High monitor
time.sleep(0.1) # Critical delay! Needed for proper operation!
board.WriteI2C(UB948,0x68,0x19) # Need to write this register again after the delay// also tried to write 0x11
Hhigh = board.ReadI2C(UB948, 0x69, 1)
board.WriteI2C(UB948,0x68,0x09) # H active Low monitor
Hlow = board.ReadI2C(UB948, 0x69, 1)
board.WriteI2C(UB948,0x68,0x39) # V active High monitor
Vhigh = board.ReadI2C(UB948, 0x69, 1)
board.WriteI2C(UB948,0x68,0x29) # V active Low monitor
Vlow = board.ReadI2C(UB948, 0x69, 1)
mask = int('00111111',2)
hlowmask = Hlow & mask
hhighmask = Hhigh & mask
vlowmask = Vlow & mask
vhighmask = Vhigh & mask
hhighmask = hhighmask << 6
vhighmask = vhighmask << 6
Hactive = hhighmask | hlowmask
Vactive = vhighmask | vlowmask
print "Detected Resolution = ",Hactive,"x",Vactive