SNLA267A March 2019 – June 2019 DS90UB953-Q1 , DS90UB954-Q1 , DS90UB960-Q1
## PatternGenerationOn954.py
##
## revision 1.0
##
########
import time
board.devAddr = 0x7A
# 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, 0xB9) #fixed color pattern, 8 color bars, block size of 9
board.WriteReg(0xB1, 0x03)
board.WriteReg(0xB2, 0x2C) #CSI Data Identifier (0x24 = RGB888, 0x2C = 12-bit)
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, 0x02) #active lines per frame (15:8)
board.WriteReg(0xB1, 0x09)
board.WriteReg(0xB2, 0xd0) #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, 0x1a) #total lines per frame (7:0)
board.WriteReg(0xB1, 0x0c)
board.WriteReg(0xB2, 0x0c) #line period (15:8)
board.WriteReg(0xB1, 0x0d)
board.WriteReg(0xB2, 0x67) #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
#0xff0, 0x000, 0x000, 0xff0, 0x000, 0x000
board.WriteReg(0xB1, 0x10)
board.WriteReg(0xB2, 0xff) #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, 0x00) #3rd byte of fixed color
board.WriteReg(0xB1, 0x13)
board.WriteReg(0xB2, 0x00) #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, 0x00) #8th byte of fixed color
board.WriteReg(0xB1, 0x18)
board.WriteReg(0xB2, 0x00) #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, 0x00) #12th byte of fixed color
# board.WriteReg(0xB1, 0x1C)
# board.WriteReg(0xB2, 0x00) #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