I'm trying to use the C++ API to send USB commands to the DLPC350 to set up a pattern sequence. I'm referencing DLPC350 Programmers guide, but the documentation is unclear at times, and I'm having difficulty with certain portions.
I'm able to start and stop a pattern sequence, and change the mode. Defining a new pattern sequence is not working, and I suspect it's with how I'm sending the LUT data with the mailbox. Here are the commands I'm running. In this example, I'm trying to replicate the setup from this screenshot:
1. Display Mode Selection Command
# 1 = pattern display mode
0x1a 0x1b: 0x01
Pattern Display Start/Stop Pattern Sequence
(need to stop prior to sending data)
# 0x00 = stop
0x1a 0x24: 0x00
2. Pattern Display Data Input Source
# 0x00 = 24-bit rgb link
0x1a 0x22: 0x00
3. Pattern Display LUT Control
# byte0 = num LUT entries
# byte1 = 0 means pattern sequence executed once, 1 means repeated
# byte2 = num patterns in pattern sequence
# byte3 = if byte2 set to flash, num images used as patterns
0x1a 0x31: 0x01 0x01 0x02 0x00
4. Pattern Trigger Mode Selection
# 0 - trigger mode: VSYNC
0x1a 0x23: 0x00
5. Pattern Exposure Time and Frame Period
# byte 0-3 = pattern exposure time (us)
# byte 4-7 = frame period (us)
# 4500 = 0b0001000110010100 = 0x11 0x94
0x1a 0x29: 0x00 0x00 0x11 0x94 0x00 0x00 0x11 0x94
6. Set up the image indexes if using images from flash memory
# pass, since using 24-bit rgb link
7. Set up the LUT
7.1 Pattern Display LUT Access Control
# 2 = Open the mailbox for pattern definition
0x1a 0x33: 0x02
7.2 Pattern Display LUT Offset Pointer
# byte0: offset for LUT entries
NOT SURE WHAT TO DO HERE, so pass
7.3 Pattern Display LUT Data
(one entry per pattern in the sequence)
0x1a 0x34: 0b00 0b000000 0b0111 0b0111 0b0 0b0 0b0 0b0 0b0000
0x1a 0x34: 0b00 0b000001 0b0111 0b0111 0b0 0b0 0b0 0b0 0b0000
0x1a 0x34: 0b00 0b000002 0b0111 0b0111 0b0 0b0 0b0 0b0 0b0000
which translate to:
0x1a 0x34: 0x00 0x77 0x00
0x1a 0x34: 0x01 0x77 0x00
0x1a 0x34: 0x02 0x77 0x00
7.4 Pattern Display LUT Access Control
# 0 = Open the mailbox for pattern definition
0x1a 0x33: 0x00
8/9. Validate Data Command Response
0x1a 0x1a: 0x00
0x1a 0x1a: read one byte
10: Pattern Display Start/Stop Pattern Sequence
# 0x02 = start
0x1a 0x24: 0x02
Any help with this would be super appreciated. I've tried referencing the programmers guide extensively without success. The eventual goal is to build a python API for the DLPC350 to share with the community.
Alex