SNLA267A March 2019 – June 2019 DS90UB953-Q1 , DS90UB954-Q1 , DS90UB960-Q1
## PatternGenerationOn953.py
##
## revision 1.0
##
########
import time
# 953 config
runTime = 3
board.devAddr = 0x30
# # CSI sel and CSI enable
# board.WriteReg(0x32, 0x01)
# time.sleep(0.5)
# board.WriteReg(0x33, 0x01)
# time.sleep(0.5)
# enable pat gen
board.WriteReg(0xB0, 0x00)
board.WriteReg(0xB1, 0x01)
board.WriteReg(0xB2, 0x01) #enable pattern generator
board.WriteReg(0xB1, 0x02)
board.WriteReg(0xB2, 0xB3) #fixed color pattern, 8 color bars, block size of 5
board.WriteReg(0xB1, 0x03)
board.WriteReg(0xB2, 0x24) #CSI Data Identifier (0x24 = RGB888, 0x2C = RAW12, 0x2B = RAW10)
board.WriteReg(0xB1, 0x04)
board.WriteReg(0xB2, 0x16) #line size (15:8)
board.WriteReg(0xB1, 0x05)
board.WriteReg(0xB2, 0x80) #line size (7:0)
board.WriteReg(0xB1, 0x06)
board.WriteReg(0xB2, 0x02) #bar size (15:8)
board.WriteReg(0xB1, 0x07)
board.WriteReg(0xB2, 0xd0) #bar size (7:0)
board.WriteReg(0xB1, 0x08)
board.WriteReg(0xB2, 0x04) #active lines per frame (15:8)
board.WriteReg(0xB1, 0x09)
board.WriteReg(0xB2, 0x38) #active lines per frame (7:0)
board.WriteReg(0xB1, 0x0a)
board.WriteReg(0xB2, 0x04) #total lines per frame (15:8)
board.WriteReg(0xB1, 0x0b)
board.WriteReg(0xB2, 0x65) #total lines per frame (7:0)
board.WriteReg(0xB1, 0x0c)
board.WriteReg(0xB2, 0x0B) #line period (15:8)
board.WriteReg(0xB1, 0x0d)
board.WriteReg(0xB2, 0x93) #line period (7:0)
board.WriteReg(0xB1, 0x0e)
board.WriteReg(0xB2, 0x21) #vertical back porch
board.WriteReg(0xB1, 0x0f)
board.WriteReg(0xB2, 0x0a) #vertical front porch
#
board.WriteReg(0xB1, 0x10)
board.WriteReg(0xB2, 0x00) #1st byte of fixed color
board.WriteReg(0xB1, 0x11)
board.WriteReg(0xB2, 0x00) #2nd byte of fixed color
board.WriteReg(0xB1, 0x12)
board.WriteReg(0xB2, 0xFF) #3rd byte of fixed color
# board.WriteReg(0xB1, 0x13)
# board.WriteReg(0xB2, 0xff) #4th byte of fixed color
# board.WriteReg(0xB1, 0x14)
# board.WriteReg(0xB2, 0xff) #5th byte of fixed color
# board.WriteReg(0xB1, 0x15)
# board.WriteReg(0xB2, 0x00) #6th byte of fixed color
# board.WriteReg(0xB1, 0x16)
# board.WriteReg(0xB2, 0x00) #7th byte of fixed color
# board.WriteReg(0xB1, 0x17)
# board.WriteReg(0xB2, 0x0f) #8th byte of fixed color
# board.WriteReg(0xB1, 0x18)
# board.WriteReg(0xB2, 0xf0) #9th byte of fixed color
# board.WriteReg(0xB1, 0x19)
# board.WriteReg(0xB2, 0x00) #10th byte of fixed color
# board.WriteReg(0xB1, 0x1A)
# board.WriteReg(0xB2, 0x00) #11th byte of fixed color
# board.WriteReg(0xB1, 0x1B)
# board.WriteReg(0xB1, 0x3f) #12th byte of fixed color
# board.WriteReg(0xB1, 0x1C)
# board.WriteReg(0xB2, 0xc0) #13th byte of fixed color
# board.WriteReg(0xB1, 0x1D)
# board.WriteReg(0xB2, 0x00) #14th byte of fixed color
# board.WriteReg(0xB1, 0x1E)
# board.WriteReg(0xB2, 0x00) #15th byte of fixed color
# board.WriteReg(0xB1, 0x1F)
# board.WriteReg(0xB2, 0x00) #16th byte of fixed color