-
Notifications
You must be signed in to change notification settings - Fork 8
Using a DLP 230NP
These instructions enable using QDSpy installed on an RPi to display stimuli on a TI DLP® LightCrafter™ Display 230NP.
To this end, RPi and DLP need to be connected via their pin headers and the configuration of the RPi has to be adjusted to send a video signal via the pin header. A video of a test using a remote SSH shell (from a Windows PC) is available here.
DISCLAIMER: These instructions are provided as-is. Improper use of the software may damage LCr and/or the Raspberry Pi and the user takes full responsibility for any damages.
NOTE: Note that there are several pitfalls, therefore it is recommended to first set up the devices exactly as described here before playing with the settings.
The following procedure requires a RPi 4B and assumes that 64-bit Raspbian ("bookworm") has been successfully installed using the instructions provided here.
NOTE: Other than described in the manual, the LCr requires more that 5 V; in our hands 5.5 V were needed to run it reliable (that is, keeping it from rebooting). An adjustable lab power supply can be used for testing. Eventually, however, one should use the power supply recommended by TI in the DLP 230NP's user manual.
TI provides a ribbon cable to connect RPi and DLP (see manual). However, as we use two pins from the pin header for a different purpose, a connection board that keeps RPi pins GP26
and GP27
disconnected from the DLP is needed. In the configuration described in the DLP manual, these pins are configured floating and only used for flash/FPGA mode. This means, when running the DLP as a display, we do not need these pins.
Instead, on the RPi side, these pins are configured as:
-
GPIO26
input - QDSpy can wait for trigger signals on this pin (e.g., to start a stimulus sequence) -
GPIO27
output - QDSpy uses this pin to signal when a stimulus trial as started ("marker" in QDSpy stimulus scripts)
A simple connector board (Fig. 3.1) breaks these two pins out. It also allows for an LED to check QDSpy marker signals.
Fig. 3.1 - Simple connector board; PCB and circuit |
---|
![]() |
The connector board links RPi and DLP, replacing the ribbon cable (Fig. 3.2).
Fig. 3.2 - Connector board mounted on RPi and DLP |
---|
![]() |
How to modify the config.txt
is decribed in the DLP's manual, which, however, refers to an older Rasbian version (bullseye). For configuration files for bookworm, see below.
The configuration file contains a "switch"; if [none]
is uncommented, the RPi ignores the DLP settings and connects to a normal HDMI display. If [none]
is commented, the RPi ignores connected HDMI displays and is ready to connect to the DLP.
...
# Comment the following [none] to activate the DLP
# ***
#[none]
...
Currently, the DLP connection, however, needs to be initiated via a Python script (see next step) and therefore requires a remote terminal connection to the RPi.
The RPi uses an I2C link to configure the DLP. Normally, the scripts check the available I2C busses and select the correct one. If that fails, try changing the default bus in Libraries/i2c.py
. Check with ls /dev
for available bus number (e.g., indicated by a folder /dev/i2c-22
) and change i2c.py
accordingly. You may need to try the available I2C ports to find the one the projector is connected to.
-
Start a remote terminal session (e.g., using TeraTerm).
-
Configure DLP for parallel mode, basically making it a display that the Raspberry Pi can use:
source qdspy/bin/activate cd ~/QDSpy export DISPLAY=:0 python init_parallel.py
Now the Desktop should be visible.
-
Run a stimulus
python Stimuli/noise_colored1.py
Raspberry Pi configuration (/boot/firmware/config.txt
) for bookworm. For more configurations, see here.
# For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details
# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
# Additional overlays and parameters are documented
# /boot/firmware/overlays/README
# Automatically load overlays for detected cameras
camera_auto_detect=1
# Automatically load overlays for detected DSI displays
display_auto_detect=1
# Automatically load initramfs files, if found
auto_initramfs=1
# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2
# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1
# Run in 64-bit mode
arm_64bit=1
# Disable compensation for displays with overscan
disable_overscan=1
# Run as fast as firmware / board allows
arm_boost=1
# Configure Raspberry PI for SSH over USB
dtoverlay=dwc2
[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1
[all]
# Configure I2C on GPIO Pins #22 and #23
dtoverlay=i2c-gpio,i2c-gpio_sda=23,i2c_gpio_scl=22,i2c_gpio_delay_us=2
# ****
# Comment the following [none] to activate the DLP
# ***
#[none]
dtoverlay=vc4-kms-dpi-generic
dtparam=hactive=1920,hfp=20,hsync=10,hbp=10
dtparam=vactive=1080,vfp=10,vsync=10,vbp=10
dtparam=clock-frequency=125000000
dtparam=hsync-invert,vsync-invert
#dtparam=de-invert
dtparam=rgb666
#[all]
# DLDCR230-related
# -> TE added
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=82
config_hdmi_boost=7
# Configure DPI on GPIO Pins #0 through #21
gpio=0=op
gpio=0=pn
gpio=1-27=ip
gpio=1-27=pn
#gpio=1-25=ip
#gpio=1-25=pn
# Enable DPI18 Overlay
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
# Configuration of 1920 x 1080, 58-60 Hz video output via 18-bit DPI lines (RGB666).
# Configure DPI Video Timings
# RGB 666 CFG 1 (MODE 5)
dpi_output_format=458773
# 58 Hz Timings (Low-End Spec)
# Works at GPIO DRIVE 5-7
hdmi_timings=1920 0 20 10 10 1080 0 10 10 10 0 0 0 58 0 125000000 3
# <-
Currently not working. The DLP is not recognized / fully configured as a display. Possible reasons:
- TI recommends increasing the driving current of the pins; not easily done in bookwork (at least, from what I saw)
- Two option(
output enable disable
,output enable mode
used to configure the DLP are not supported by the KVM driver (for details, see here).
Translation of bullseye parameters to bookworm so far:
hdmi_timings=
[h_active_pixels] 1920 -> hactive, Horizontal active pixels
[h_sync_polarity] 0 -> hsync-invert, Horizontal sync active low
[h_front_porch] 20 -> hfp, Horizontal front porch
[h_sync_pulse] 10 -> hsync, Horizontal sync pulse width
[h_back_porch] 10 -> hbp, Horizontal back porch
[v_active_lines] 1080 -> vactive, Vertical active lines
[v_sync_polarity] 0 -> vsync-invert, Vertical sync active low
[v_front_porch] 10 -> vfp, Vertical front porch
[v_sync_pulse] 10 -> vsync, Vertical sync pulse width
[v_back_porch] 10 -> vbp, Vertical back porch
[v_sync_offset_a] 0
[v_sync_offset_b] 0
[pixel_rep] 0
[frame_rate] 58
[interlaced] 0
[pixel_freq] 125000000 -> clock-frequency, Display clock frequency (Hz)
[aspect_ratio] 3
[-] -> width-mm, Define the screen width in mm
[-] -> height-mm, Define the screen height in mm
[-] -> de-invert, Data Enable active low
[-] -> pixclk-invert, Negative edge pixel clock
dpi_timings=<hactive> <h_sync_polarity> <hfp> <hsync> <hbp> <vactive>
<v_sync_polarity> <vfp> <vsync> <vbp> <n/a> <n/a> <n/a> <n/a> <n/a> <clockfrequency> <n/a>
dtoverlay=vc4-kms-dpi-generic
dtparam=hactive=1920,hfp=20,hsync=10,hbp=10
dtparam=vactive=1080,vfp=10,vsync=10,vbp=10
dtparam=clock-frequency=125000000
dtparam=hsync-invert,vsync-invert,de-invert
dtparam=rgb666
# Configure DPI Video Timings
# RGB 666 CFG 1 (MODE 5)
dpi_output_format=458773
-> dec 458773 = 0x70015 = 0b00_1_11_0_0_00_00_0_0_0001_0101
9 8 7 4 3 0
->
dtparam=hsync-invert,vsync-invert,de-invert
dtparam=rgb666
based on:
0-3 output format
4-7 RGB order
(8 output enable mode)
9 invert pixel clock
10,11 -
(12,13 hsync/vsync disabled)
(14 output enable disable)
15 -
16,17 hsync/vsync polarity
18 output enable invert
19-12 -
- Release notes
- Installation
2.1. ... under Windows
2.2. ... under Linux (experimental) - Using a LightCrafter DLP 230NP
- Notes
4.1. Aspect ratio of shader patterns