gen4 Primary Displays for Raspberry Pi DATASHEET DOCUMENT DATE: 02nd AUGUST 2019 DOCUMENT REVISION: 1.2 gen4-4DPi-43T (4.3 " Resistive Touch) gen4-4DPi-50T (5.0 " Resistive Touch) gen4-4DPi-70T (7.0 " Resistive Touch) gen4-4DPi-43CT-CLB (4.3 " Resistive Touch) gen4-4DPi-50CT-CLB (5.0 " Resistive Touch) gen4-4DPi-70CT-CLB (7.0 " Resistive Touch) Uncontrolled Copy when printed or downloaded. Please refer to the 4D Systems website for the latest Revision of this document W W W . 4 D S Y S T E M S . C O M . A U Table of Contents Table of Contents 1. Description ...................................................................................................................4 2. Features .......................................................................................................................4 3. Pin Configuration and Summary ....................................................................................5 4. Connecting the Display to the Pi ....................................................................................7 4.1. Hardware Connection ............................................................................................................. 7 4.2. Software Download/Installation ............................................................................................. 7 4.3. Calibrating the Touch Screen .................................................................................................. 8 4.4. Change the Display Orientation .............................................................................................. 8 4.5. gen4-4DPi-Adaptor Push Button ............................................................................................. 9 4.6. SPI Frequency and Compression ............................................................................................. 9 4.7. Backlight Control ..................................................................................................................... 9 4.8. Parameters Listing .................................................................................................................. 9 4.9. HDMI or 4DPi Output .............................................................................................................. 9 4.10. HDMI or 4DPi Output ............................................................................................................ 9 5. Display Module Part Numbers ..................................................................................... 10 6. Display Module Part Numbers ..................................................................................... 10 7. Standard FFC cable specification ................................................................................. 10 8. Latest Kernel Versions ................................................................................................ 10 9. Mechanical Details gen4-4DPi-43T .............................................................................. 12 10. Mechanical Details gen4-4DPi-50T .............................................................................. 13 11. Mechanical Details gen4-4DPi-70T .............................................................................. 14 12. Mechanical Details gen4-4DPi-43CT-CLB ...................................................................... 15 13. Mechanical Details gen4-4DPi-50CT-CLB ...................................................................... 16 14. Mechanical Details gen4-4DPi-70CT-CLB ...................................................................... 17 15. Schematic Diagram gen4-4DPi (Display module) .......................................................... 18 16. Schematic Diagram gen4-4DPi-Adaptor (Display Adaptor)............................................ 19 17. Specifications ............................................................................................................. 20 18. Appendix 1 - Code Examples - Push Buttons ............................................................... 23 18.1. Example for communicating to Push Buttons, for C: ............................................................ 23 18.2. Example for communicating to Push Buttons, for Python: ................................................... 24 18.3. Example for Shutdown and Reset buttons, for C: ................................................................. 25 gen4-4DPi Page 2 of 29 www.4dsystems.com.au Table of Contents 18.4. Example for Shutdown and Reset buttons, for Python: ....................................................... 26 19. Hardware Revision History .......................................................................................... 27 20. Document Revision History ......................................................................................... 28 21. Legal Notice ................................................................................................................ 29 22. Contact Information ................................................................................................... 29 gen4-4DPi Page 3 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 1. Description 2. Features The gen4-4DPi range are Primary Display's for the Raspberry Pi* A+, B+, Pi2, Pi3, Pi3 B+, Pi Zero and Pi Zero W, which display the primary output of the Raspberry Pi, like what is normally sent to the HDMI or Composite output. It features an integrated Resistive Touch panel or Capacitive Touch panel, enabling the gen4-4DPi to function with the Raspberry Pi without the need for a mouse. * Universal Primary Display for the Raspberry Pi. Communication between the gen4-4DPi and the Raspberry Pi is interfaced with a high speed 48 MHz SPI connection, which utilises an on-board processor for direct command interpretation and SPI communication compression, and features a customised DMA enabled kernel. This combination allows this display to output high frame rate compared to other SPI display solutions, when displaying a typical image/video, and can achieve higher depending if the image can be compressed. The gen4-4DPi is designed to work with the Raspbian Operating System running on the Raspberry Pi, as that is the official Raspberry Pi operating system. It is also compatible with Pixel and Scratch. Please note that the display resolution of the 4.3" is 480x272 pixels, while the 5.0 and the 7.0" are 800x480 pixels, and thus may not display all menus in the Raspbian Desktop fully, without some downscaling. * Compatible with Raspberry Pi A+, B+, Pi2, Pi3, Pi3 B+, Pi4, Pi Zero and Pi Zero W. * 480x272 Resolution (4.3") * 800x480 Resolution (5.0" & 7.0") * TFT Screen with integrated 4-wire Resistive Touch Panel (T), or Capacitive Touch Panel (CT) with Cover Lens Bezel (CLB). * Display GUI output / primary output, just like a monitor connected to the Raspberry Pi * High Speed 48MHz SPI connection to the Raspberry Pi, featuring SPI compression technology. * Typical frame rate of 20 Frames per second (FPS) - 4.3", or 7 Frames per second (5" & 7"), higher if image can be compressed further by the kernel. Lower if no compression is possible. * Powered directly off the Raspberry Pi, no external power supply is required. * On board EEPROM for board identification, following the HAT standard. * 4x 4.0mm Mounting holes on Non-Touch and Resistive Touch modules, or via adhesive for Capacitive Touch model. * RoHS and CE Compliant. The gen4-4DPi range connect to the Raspberry Pi's 40 pin header using the gen4-4DPi Adaptor, which then connects to the gen4-4DPi display module using a 30 way FFC Cable. Note*: Raspberry Pi is a trademark of the Raspberry Pi Foundation, and all references to the words `Raspberry Pi` or the use of its logo/marks are strictly in reference to the Raspberry Pi product, and how this product is compatible with but is not associated with the Raspberry Pi Foundation in any way. gen4-4DPi Page 4 of 29 Resistive Touch Display configuration shown. www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 3. Pin Configuration and Summary H1 Pinout (Raspberry Pi Connector on gen4-4DPi-Adaptor) - Female Connetor Pin Symbol I/O Description 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 +5V +3.3V +5V SDA1 GND SCL1 GPIO14 GPIO4 GPIO15 GND GPIO18 PENIRQ GND KEYIRQ GPIO23 GPIO22 GPIO24 +3.3V GND MOSI GPIO25 MISO SPI-CS0 SCK SPI-CS1 GND ID-SC ID-SD GND GPIO5 GPIO12 GPIO6 GND GPIO13 GPIO16 GPIO19 GPIO20 GPIO26 GPIO21 GND P P P I/O P O I/O I/O I/O P I/O I P I I/O I/O I/O P P O I/O I O O O P O I/O P I/O I/O I/O P I/O I/O I/O I/O I/O I/O P +5V Supply Pin, connected to the main 5V supply of the Raspberry Pi. +3.3V Supply Pin, connected to the main 3.3V supply of the Raspberry Pi. +5V Supply Pin, connected to the main 5V supply of the Raspberry Pi. I2C SDA1 Ground Pin, connected to the main system Ground of the Raspberry Pi. I2C SCL1 GPIO on the Raspberry Pi - unused GPIO on the Raspberry Pi - unused GPIO on the Raspberry Pi - unused Ground Pin, connected to the main system Ground of the Raspberry Pi. GPIO on the Raspberry Pi - Can be used for PWM Backlight, else unused Interrupt for the touchscreen controller Ground Pin, connected to the main system Ground of the Raspberry Pi Interrupt for the push buttons GPIO on the Raspberry Pi - unused GPIO on the Raspberry Pi - unused GPIO on the Raspberry Pi - unused +3.3V Supply Pin, connected to the main 3.3V supply of the Raspberry Pi Ground Pin, connected to the main system Ground of the Raspberry Pi SPI MOSI Pin GPIO on the Raspberry Pi - unused SPI MISO Pin SPI Chip Select 0 - Used for Xilinx Processor for Display, to Raspberry Pi SPI SCK Clock Pin SPI Chip Select 1 - unused Ground Pin, connected to the main system Ground of the Raspberry Pi I2C ID EEPROM I2C ID EEPROM Ground Pin, connected to the main system Ground of the Raspberry Pi GPIO on the Raspberry Pi - unused GPIO on the Raspberry Pi - unused GPIO on the Raspberry Pi - unused Ground Pin, connected to the main system Ground of the Raspberry Pi GPIO on the Raspberry Pi - unused GPIO on the Raspberry Pi - unused GPIO on the Raspberry Pi - unused GPIO on the Raspberry Pi - unused GPIO on the Raspberry Pi - unused GPIO on the Raspberry Pi - unused Ground Pin, connected to the main system Ground of the Raspberry Pi I = Input, O = Output, P = Power gen4-4DPi Page 5 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi Note: The on-board Xilinx processor of the gen4-4DPi utilises one of the Chip Select (CS) pins on the Raspberry Pi's SPI Bus (SPI-CS0). There is SPI-CS1 still available for use by the User. Note: The on-board Resistive Touch Screen Controller or on-board Capacitive Touch Controller, utilises the I2C bus (SDA1, SCL1) to communicate to the Raspberry Pi. The I2C bus is capable of communicating with other devices also, so isn't restricted to only the 4DPi's touch controller. gen4-4DPi 30 way FFC Interface, between gen4-4DPi-Adaptor and gen4-4DPi Display Pin Symbol I/O Description 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 GND SDA1 SCL1 GND MOSI SCK MISO SPI-CS0 GND ID-SC ID-SD GND PENIRQ KEYIRQ GND SW5 SW4 SW3 SW2 SW1 JTAG-TMS JTAG-TDI JTAG-TDO JTAG-TCK GND +5V +5V +3.3V +3.3V GND P I/O O P O O I O P O I/O P I I P I I I I I P P P P P P Ground Pin, connected to the main system Ground of the Raspberry Pi I2C SDA1 I2C SCL1 Ground Pin, connected to the main system Ground of the Raspberry Pi SPI MOSI Pin SPI SCK Clock Pin SPI MISO Pin SPI Chip Select 0 - Used for Xilinx Processor for Display, to Raspberry Pi Ground Pin, connected to the main system Ground of the Raspberry Pi I2C ID EEPROM I2C ID EEPROM Ground Pin, connected to the main system Ground of the Raspberry Pi Interrupt for the touchscreen controller Interrupt for the push buttons Ground Pin, connected to the main system Ground of the Raspberry Pi Button 5 (Not present on Adaptor), connected to Xilinx Processor on display Button 4 on gen4-4DPi-Adaptor, connected to Xilinx Processor on display Button 3 on gen4-4DPi-Adaptor, connected to Xilinx Processor on display Button 2 on gen4-4DPi-Adaptor, connected to Xilinx Processor on display Button 1 on gen4-4DPi-Adaptor, connected to Xilinx Processor on display Special Pins for Factory Programming of Xilinx Processor only - Do Not Connect Special Pins for Factory Programming of Xilinx Processor only - Do Not Connect Special Pins for Factory Programming of Xilinx Processor only - Do Not Connect Special Pins for Factory Programming of Xilinx Processor only - Do Not Connect Ground Pin, connected to the main system Ground of the Raspberry Pi +5V Supply Pin, connected to the main 5V supply of the Raspberry Pi +5V Supply Pin, connected to the main 5V supply of the Raspberry Pi +3.3V Supply Pin, connected to the main 3.3V supply of the Raspberry Pi +3.3V Supply Pin, connected to the main 3.3V supply of the Raspberry Pi Ground Pin, connected to the main system Ground of the Raspberry Pi I = Input, O = Output, P = Power gen4-4DPi Page 6 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 4. Connecting the Display to the Pi 4.1. Hardware Connection The gen4-4DPi is easily connected to a Raspberry Pi. Ensure the Raspberry Pi is powered off when connecting the gen4-4DPi display or adaptor. Simply align the Female 40 way header on the gen44DPi-Adaptor with the Raspberry PI's Male 40 way header, and connecting them together - ensuring the alignment is correct and all pins are seated fully and correctly. The gen4-4DPi-Adaptor should be overhanging inward of the Raspberry Pi. Next simply connect the 30 way FFC cable between the FFC Connector of the gen4-4DPi and the gen4-4DPiAdaptor, ensuring the copper pins are facing upward in the connector. Please note that hardware connection to the Pi is not recommended until the Pi has been set up. Please see instructions below. 4.2. Software Download/Installation 4D Systems has prepared a custom DMA enabled kernel for use with the Raspbian Operating System, which is available for download as a single Package. This can be installed over your existing Raspbian installation, or it can be applied over a fresh image. It is recommended to apply over a fresh image. If you are starting from a fresh image, start from Step 1, else skip to step 3 if you already have a Raspbian Image and which to apply this kernel to that. Please note, it is impossible for us to know what you have done to your Raspbian image, if you are not installing from a fresh image - so if you encounter issues, please try and use a fresh image to determine if possible modifications are conflicting with our kernel release. If you are running a Raspbian version with a Kernel version later than our Kernel Pack, you may encounter problems. Please contact support if you have problems. 1) Download the latest Raspbian Image from the Raspberry Pi website: http://downloads.raspberrypi.org/raspbian_lates t 2) Load the Raspberry Pi image onto a SD card, using the instructions provided on the Raspberry Pi website for Linux, Mac or PC: gen4-4DPi Page 7 of 29 http://www.raspberrypi.org/documentation/inst allation/installing-images/README.md 3) Insert the SD card into the Raspberry PI. Do not connect the gen4-4DPi yet. You will need an external monitor / keyboard / network connection, else simply a network connection to the Pi and the rest can be done over an SSH connection. Start up the Pi with at minimum an Ethernet connection connected. 4) Either log into the Raspberry Pi from your keyboard/monitor using the standard `pi' and `raspberry' credentials, else SSH into your raspberry PI and log in via your SSH session. 5) Expand the file system on downloaded image using raspi-config (submenu Expand Filesystem). After exiting raspi-config a reboot is needed. #sudo raspi-config #sudo reboot 6) Once rebooted, It is highly recommended to do an apt-get update and apt-get upgrade to ensure you are running the latest version of the kernel and firmware on your Pi, before you patch it for the 4DPi. After doing this, reboot once again. Warning: An upgrade should only be done after making sure that the latest kernel is supported by the latest kernel pack from 4D. Otherwise, installing the 4D kernel pack will downgrade the kernel. 7) Once rebooted, log into your Raspberry Pi again, you will need to download and install the kernel which supports the gen4-4DPi. The following step requires sudo `root' access. 8) To download and install files, enter the following commands in terminal/shell /SSH to download the kernel from the 4D Systems Server: $ wget http://4dsystems.com.au/downloads/4DPi/Al l/gen4-hats_4-19-57-v7l+_v1.0.tar.gz Install: $ sudo tar -xzvf gen4-hats_4-19-57v7l+_v1.0.tar.gz -C / The package automatically selects the kernel required for Pi1, Pi2, Pi3 or Pi4 automatically. If you want to check for the kernel packages released by 4D systems, proceed to Section: Latest Kernel Versions www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 9) On newer Raspbian images, by default the system boots to Desktop GUI. Booting to command line can be selected using the raspi-config tool, submenu Boot Options. $ sudo raspi-config 10) Shutdown the Raspberry Pi safely, and remove the power after it has completed its shutdown. For shutting down use the following command The user should get something like this 10-quirks.conf 40-libinput.conf evdev.conf 99-fbturbo.conf 5) 6) Reconnect to SSH and run xinput calibrator. $ DISPLAY=:0.0 xinput_calibrator or Perform the calibration and copy results. The result should be something similar to this: $ sudo halt Shutdown can take a while, since many files have to be written from cache to SD card. Section "InputClass" Identifier "calibration" MatchProduct "AR1020 Touchscreen" Option "Calibration" "98 4001 175 3840" Option "SwapAxes" "0" EndSection 11) Connect the gen4-4DPi to the Raspberry Pi, and reapply power. The terminal should begin to show on the gen4-4DPi, and will be ready to use once the Raspberry Pi has booted. 4.3. Calibrating the Touch Screen Each gen4-4DPi which is shipped from the 4D Systems factory is slightly different, in the sense that each of the touch screens has a slightly different calibration. In order to get the best from your gen4-4DPi, you will need to calibrate the display so it is as accurate as possible. To calibrate the touch screen, the xinput_calibrator is required and the following steps should be carried out. Make sure the Desktop is not running before you start, quit desktop if it is and return to the terminal prompt. Please note that only resistive touch display modules could be calibrated. 1) Install xinput_calibrator (if not installed by default) by running this from terminal: $ sudo apt-get install xinput-calibrator 7) You may test the changes after xinput calibrator ends. To make the changes permanent, paste the results to /etc/X11/xorg.conf.d/99-calibration.conf $ sudo nano /etc/X11/xorg.conf.d/99calibration.conf 8) Save the file and perform a reboot $ sudo reboot now The Display should now be calibrated. 4.4. Change the Display Orientation To change the display orientation, simply edit the /boot/cmdline.txt file Add the parameter below at the second position in the parameter list: 4dpi.rotate = 90 2) Install the event device input driver: 4) Perform a reboot $ sudo reboot now $ sudo poweroff 3) 45- $ sudo apt-get install xserver-xorg-inputevdev And change this to have the value of 0, 90, 180 or 270. It should look something like: Rename 10-evdev.conf file to 45-evdev.conf. dwc_otg.lpm_enable=0 4dpi.rotate=90 console=serial0,115200 $ sudo mv /usr/share/X11/xorg.conf.d/10evdev.conf /usr/share/X11/xorg.conf.d/45evdev.conf Save the file and restart your Raspberry Pi. Check if evdev.conf has a higher number than libinput.conf. $ ls /usr/share/X11/xorg.conf.d/ gen4-4DPi Page 8 of 29 The touch screen will automatically remap the alignment thanks to the custom kernel. After changing the Display Orientation, you need to calibrate again the screen. www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 4.5. gen4-4DPi-Adaptor Push Button 4.8. Parameters Listing The gen4-4DPi-Adaptor features 4 push buttons, which are connected to the Xilinx Processor. These can be used to trigger events on the Raspberry Pi. Please refer to the Appendix for code examples on how to utilize these buttons. The following is a list of all the custom parameters used by the gen4-4DPi. 4.6. SPI Frequency and Compression Valid SPI Frequency values (4dpi.sclk): Values can be almost anything. This has been tested up to 64Mhz. Common values would include 64000000 (64MHz), 48000000 (Default), 32000000, 24000000 etc. The gen4-4DPi can be adjusted to work with a range of SPI Frequencies and levels of compression, depending on the requirements of the end product/project. Increasing the frequency can result in a higher Frame Rate (FPS), however will use more power and processor time. Increasing the level of the compression can also result in a higher FPS, but may cause the display to corrupt. By default, a SPI Frequency of 48Mhz is used, with a Compression level of 7. The following parameters are the defaults in the /boot/cmdline.txt file, and can be edited to adjust the Frequency and Compression level. rotate: Screen rotation 0/90/180/270 (int) compress: SPI compression 0/1/2/3/4/5/6/7 (int) sclk: SPI clock frequency (long) Valid Compression values (4dpi.compress): 0 (compression off) 1 (compression on, auto set based on sclk value) 2 (lowest), 3, 4, 5, 6, 7 (highest compression) These parameters can be set or read from the /boot/cmdline.txt file, and they can be read from the /sys/modules/4dpi/parameters directory. For example: cat /sys/modules/4dpi/parameters/rotate 4dpi.sclk=48000000 4dpi.compress=7 Will display the current rotation saved. Setting compress to be 1 will enable the kernel to control the level of compression based on the frequency selected. This however is not guaranteed to have a good end result, and may require manually setting the compression level if corruption on the display is experienced. 4.9. HDMI or 4DPi Output To switch the X Windows output being displayed on HDMI or 4DPi output, X can be launched using the following commands: startx -- -layout TFT If corruption or display anomalies occur at any given compression level, try to lower it by 1 value and check if this has improved. startx -- -layout HDMI Alternatively, these commands do the same thing: Note, changing the frequency and compression require a restart of the Raspberry Pi. FRAMEBUFFER=/dev/fb1 startx 4.7. Backlight Control 4.10. HDMI or 4DPi Output The backlight brightness can be controlled from the terminal, or from a bash script. The following command can be used to set the backlight from 0 to 100%. It is possible to change the DPI output of the 4DPi the same way as other LXDE based systems. sudo sh -c 'echo 31 > /sys/class/backlight/4d-hats/brightness' nano .Xresources The above will set the backlight to 100%. Simply change the `echo 31' to be anything from 0 to 31. Startx login as pi and open terminal Add this line: Xft.dpi: 75 reboot... This will set the DPI to be 75 gen4-4DPi Page 9 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 5. Display Module Part Numbers 7. Standard FFC cable specification The following is a breakdown on the part numbers and what they mean. Between the gen4-4DPi-Adaptor and the gen4-4DPi Display Module, the following FFC cable is supplied: Example: gen4-4DPi-70CT-CLB 30 Pin Flexible Flat Cable, 150mm Long, 0.5mm (0.02") pitch Cable Type: AWM 20624 80C 60V VW-1 Heat Resistance 80 Degrees Celsius Connections on the opposite side at each end (Type B) gen4 4DPi 70 T CT CLB * * - gen4 Display Range - Display Family - Display size (7.0") - Resistive Touch. - Capacitive Touch - Cover Lens Bezel For part numbers which do not include T or CT, these are non-touch variants. Cover Lens Bezels (CLB) are glass fronts for the display module with overhanging edges, which allow the display module to be mounted directly into a panel using special adhesive on the overhanging glass. These are available for Capacitive Touch only. All FFC connectors on the gen4-4DPi are `Top Contact' meaning the FFC cable has the metal `fingers' pointing upward in the connector, blue stiffner on the back of the FFC cable is down on the PCB side. 8. Latest Kernel Versions Here is the list of the kernel patches released by 4D systems. 6. Display Module Part Numbers Latest release: gen4-hats_4-19-57-v7l+_v1.0.tar.gz The perimeter of the CLB display modules features double-sided adhesive tape, designed to stick directly onto a panel, enclosure, box etc without the need for any mounting screws or hardware. Previous releases: gen4-hats_4-14-34_v1.1.tar.gz gen4-hats_4-9-80_v1.1.tar.gz gen4-hats_4-9-59_v1.2.tar.gz The tape used is 3M 9495LE tape, which uses the wellknown and strong 3M 300LSE adhesive. Note: Older kernel releases are available upon request. Please contact 4D Systems Support Team for more information: www.4dsystems.com.au/support The double-sided adhesive has a thickness of 0.17mm once the backing has been removed. More information on this adhesive can be found on the 3M website. http://multimedia.3m.com/mws/media/771683O/3 mtm-double-coated-tapes-9474le-9495le.pdf gen4-4DPi Page 10 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi gen4-4DPi Page 11 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 9. Mechanical Details gen4-4DPi-43T gen4-4DPi Page 12 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 10. Mechanical Details gen4-4DPi-50T gen4-4DPi Page 13 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 11. Mechanical Details gen4-4DPi-70T gen4-4DPi Page 14 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 12. Mechanical Details gen4-4DPi-43CT-CLB gen4-4DPi Page 15 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 13. Mechanical Details gen4-4DPi-50CT-CLB gen4-4DPi Page 16 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 14. Mechanical Details gen4-4DPi-70CT-CLB gen4-4DPi Page 17 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 15. Schematic Diagram gen4-4DPi (Display module) gen4-4DPi Page 18 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 16. Schematic Diagram gen4-4DPi-Adaptor (Display Adaptor) gen4-4DPi Page 19 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 17. Specifications ABSOLUTE MAXIMUM RATINGS Operating ambient temperature ................................................................................................... -20C to +70C Storage temperature ...................................................................................................................... -30C to +80C NOTE: Stresses above those listed here may cause permanent damage to the device. This is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the recommended operation listings of this specification is not implied. Exposure to maximum rating conditions for extended periods may affect device reliability. RECOMMENDED OPERATING CONDITIONS Parameter Supply Voltage (+3.3V) Supply Voltage (+5V) Operating Temperature Conditions Stable supply from Raspberry Pi Bus Stable supply from Raspberry Pi Bus Min Typ Max Units 3.0 4.5 -10 3.3 5.0 -- 4.0 5.5 +60 V V C GLOBAL CHARACTERISTICS BASED ON OPERATING CONDITIONS Parameter Conditions Min Typ Max Units Supply Current Estimates (Display portion only) (RPi current not included) Idle home screen gen4-4DPi-43T (Max Brightness) gen4-4DPi-43CT-CLB (Max Brightness) gen4-4DPi-50T (Max Brightness) gen4-4DPi-50CT-CLB (Max Brightness) gen4-4DPi-70T (Max Brightness) gen4-4DPi-70CT-CLB (Max Brightness) ------- 250 270 360 380 640 750 ------- mA mA mA mA mA mA Display Endurance Hours of operation, measured to when display is 50% original brightness 30000 -- -- H -- 1M -- Touches -- 100K -- Slides 82 -- -- % Capacitive Touch Only use Finger or Stylus, do not use anything sharp or metal 90 -- -- % 20 -- 100 Gf Cover Lens Bezel Glass Hardness -- 6 -- H Touch Screen Endurance (Resistive Touch) Touch Screen Transparency Touch Screen Operational Force (Resistive Touch) CLB Hardness (Capacitive Touch) gen4-4DPi Number of touches/hits with a 12.5mm tip at a rate of 2x per second with 250gf force Slide stylus on screen, 100gf force, 60mm/s speed with a 0.8mm polyacetal tip stylus pen Resistive Touch Page 20 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi LCD DISPLAY INFORMATION Parameter Conditions Specification gen4-4DPi-43T (Max Brightness) gen4-4DPi-43CT-CLB (Max Brightness) gen4-4DPi-50T (Max Brightness) gen4-4DPi-50CT-CLB (Max Brightness) gen4-4DPi-70T (Max Brightness) gen4-4DPi-70CT-CLB (Max Brightness) TFT Transmissive LCD 4.3", 5.0" or 7.0" Diagonal 480 x 272 (Landscape Viewing) - 4.3" 800 x 480 (Landscape Viewing) - 5" & 7" 400 cd/m2 475 cd/m2 400 cd/m2 475 cd/m2 400 cd/m2 475 cd/m2 Display Contrast Ratio Typical 500:1 Display Viewing Angles Above Centre Below Centre Left of Centre Right of Centre gen4-4DPi-43xx Models 70 Degrees 60 Degrees 70 Degrees 70 Degrees 12 o'clock Display (Optimal viewing is from above when in Landscape/Wide mode) 2x5 Parallel LED's gen4-4DPi-50xx Models 2x6 Parallel LED's gen4-4DPi-70xx Models 9x3 Parallel LED's 4.3" 0.198 x 0.198mm (Square pixels) 5.0" 0.135 x 0.135mm (Square pixels) 7.0" 0.1925 x 0.179mm (non-Square pixels) 4.3" 128 DPI/PPI 5.0" 183 DPI/PPI 132 DPI/PPI (Horizontal) 142 DPI/PPI (Vertical) Display Type Display Sizes Display Resolution Display Brightness Display Viewing Direction Display Backlighting Pixel Pitch Pixel Density (Number of pixels in 1 row in 25.4mm) 7.0" PERFORMANCE Parameter Frame Rate (FPS) (4.3" only) Frame Rate (FPS) (5.0" & 7.0" only) gen4-4DPi Conditions Video Playback, Full Screen, 480x272. A higher FPS can be achieved if display outputting lots of blocks of the same colour. See Section 4.6 Video Playback, Full Screen, 800x480. A higher FPS can be achieved if display outputting lots of blocks of the same colour. See Section 4.6 Page 21 of 29 Min Typ Max Units -- 20 -- FPS -- 7 -- FPS www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi ORDERING INFORMATION Order Code: gen4-4DPi-43T gen4-4DPi-50T gen4-4DPi-70T gen4-4DPi-43CT-CLB gen4-4DPi-50CT-CLB gen4-4DPi-70CT-CLB Packaging: Module sealed in a 4D Systems Box gen4-4DPi Page 22 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 18. Appendix 1 - Code Examples - Push Buttons 18.1. Example for communicating to Push Buttons, for C: // test program to read state of buttons on 4D Systems 4DPi displays #include #include #include #include #include #include #define LCD4DPI_GET_KEYS _IOR('K', 1, unsigned char *) void print_keys(int fd) { unsigned char keys; if (ioctl(fd, LCD4DPI_GET_KEYS, &keys) == -1) { perror("_apps ioctl get"); } else { printf("Keys : %2x\n", keys); } } int main(int argc, char *argv[]) { char *file_name = "/dev/fb1"; int fd; fd = open(file_name, O_RDWR); if (fd == -1) { perror("_apps open"); return 2; } print_keys(fd); printf("Ioctl Number: (dec)%d (hex)%x\n", LCD4DPI_GET_KEYS, LCD4DPI_GET_KEYS); close (fd); return 0; } gen4-4DPi Page 23 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 18.2. Example for communicating to Push Buttons, for Python: #!/usr/bin/python import array, fcntl from time import sleep # test program to read state of buttons on 4D Systems 4DPi displays #LCD4DPI_GET_KEYS = -2147202303 _IOC_NRBITS = 8 _IOC_TYPEBITS = 8 _IOC_SIZEBITS = 14 _IOC_DIRBITS = 2 _IOC_DIRMASK = (1 << _IOC_DIRBITS) - 1 _IOC_NRMASK = (1 << _IOC_NRBITS) - 1 _IOC_TYPEMASK = (1 << _IOC_TYPEBITS ) - 1 _IOC_NRSHIFT = 0 _IOC_TYPESHIFT = _IOC_NRSHIFT+_IOC_NRBITS _IOC_SIZESHIFT = _IOC_TYPESHIFT+_IOC_TYPEBITS _IOC_DIRSHIFT = _IOC_SIZESHIFT+_IOC_SIZEBITS _IOC_NONE = 0 _IOC_WRITE = 1 _IOC_READ = 2 def _IOC(dir, type, nr, size): # print 'dirshift {}, typeshift {}, nrshift {}, sizeshift {}'.format(_IOC_DIRSHIFT, _IOC_TYPESHIFT, _IOC_NRSHIFT, _IOC_SIZESHIFT) ioc = (dir << _IOC_DIRSHIFT ) | (type << _IOC_TYPESHIFT ) | (nr << _IOC_NRSHIFT ) | (size << _IOC_SIZESHIFT) if ioc > 2147483647: ioc -= 4294967296 return ioc #def _IO(type, nr): # return _IOC(_IOC_NONE, type, nr, 0) def _IOR(type,nr,size): return _IOC(_IOC_READ, type, nr, size) #def _IOW(type,nr,size): # return _IOC(_IOC_WRITE, type, nr, sizeof(size)) LCD4DPI_GET_KEYS = _IOR(ord('K'), 1, 4) buf = array.array('h',[0]) print 'Press Top & Bottom buttons simultaneously to exit' with open('/dev/fb1', 'rw') as fd: while True: fcntl.ioctl(fd, LCD4DPI_GET_KEYS, buf, 1) # execute ioctl call to read the keys keys = buf[0] if not keys & 0b00001: print "KEY1" , if not keys & 0b00010: print "KEY2" , if not keys & 0b00100: print "KEY3" , if not keys & 0b01000: print "KEY4" , if not keys & 0b10000: print "KEY5" , if keys != 0b11111: print if keys == 0b01110: # exit if top and bottom pressed break sleep(0.1) gen4-4DPi Page 24 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 18.3. Example for Shutdown and Reset buttons, for C: // test program to Shutdown or Restart Pi using buttons on 4D Systems 4DPi displays #include #include #include #include #include #include #define LCD4DPI_GET_KEYS _IOR('K', 1, unsigned char *) int get_keys(int fd, unsigned char *keys) { if (ioctl(fd, LCD4DPI_GET_KEYS, keys) == -1) { perror("_apps ioctl get"); return 1; } *keys &= 0b11111; return 0; } int main(int argc, char *argv[]) { char *file_name = "/dev/fb1"; int fd; unsigned char key_status; fd = open(file_name, O_RDWR); if (fd == -1) { perror("_apps open"); return 2; } key_status = 0b11111; while(key_status & 0b00001) // press key 1 to exit { if(get_keys(fd, &key_status) != 0) break; // printf("key_status: %x\n", key_status); if(!(key_status & 0b10000)) { system("sudo shutdown -h now"); break; } if(!(key_status & 0b01000)) { system("sudo reboot"); break; } sleep(0.1); } close(fd); return 0; } gen4-4DPi Page 25 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 18.4. Example for Shutdown and Reset buttons, for Python: #!/usr/bin/python import array, fcntl, os from time import sleep # test program to Shutdown or Restart Pi using buttons on 4D Systems 4DPi displays #LCD4DPI_GET_KEYS = -2147202303 _IOC_NRBITS _IOC_TYPEBITS _IOC_SIZEBITS _IOC_DIRBITS _IOC_DIRMASK _IOC_NRMASK _IOC_TYPEMASK = 8 = 8 = 14 = 2 _IOC_NRSHIFT = _IOC_TYPESHIFT _IOC_SIZESHIFT _IOC_DIRSHIFT = (1 << _IOC_DIRBITS) - 1 = (1 << _IOC_NRBITS) - 1 = (1 << _IOC_TYPEBITS ) - 1 0 = _IOC_NRSHIFT+_IOC_NRBITS = _IOC_TYPESHIFT+_IOC_TYPEBITS = _IOC_SIZESHIFT+_IOC_SIZEBITS _IOC_NONE = 0 _IOC_WRITE = 1 _IOC_READ = 2 def _IOC(dir, type, nr, size): # print 'dirshift {}, typeshift {}, nrshift {}, sizeshift {}'.format(_IOC_DIRSHIFT, _IOC_TYPESHIFT, _IOC_NRSHIFT, _IOC_SIZESHIFT) ioc = (dir << _IOC_DIRSHIFT ) | (type << _IOC_TYPESHIFT ) | (nr << _IOC_NRSHIFT ) | (size << _IOC_SIZESHIFT) if ioc > 2147483647: ioc -= 4294967296 return ioc #def _IO(type, nr): # return _IOC(_IOC_NONE, type, nr, 0) def _IOR(type,nr,size): return _IOC(_IOC_READ, type, nr, size) #def _IOW(type,nr,size): # return _IOC(_IOC_WRITE, type, nr, sizeof(size)) LCD4DPI_GET_KEYS = _IOR(ord('K'), 1, 4) #print 'ssd {} {:12} {:0>8x} {:0>32b}'.format(ssd1289, hex(ssd1289), ssd1289, ssd1289) buf = array.array('h',[0]) with open('/dev/fb1', 'rw') as fd: while True: fcntl.ioctl(fd, LCD4DPI_GET_KEYS, buf, 1) # execute ioctl call to read the keys keys = buf[0] if not keys & 0b00001: break if not keys & 0b10000: os.system("sudo shutdown -h now") break if not keys & 0b01000: os.system("sudo reboot") break; sleep(0.1) gen4-4DPi Page 26 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 19. Hardware Revision History Revision Number Date 1.2 30/04/2018 gen4-4DPi Description Initial Public Release Version Page 27 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 20. Document Revision History Revision Number Date 1.0 1.1 06/05/2018 28/03/2019 1.2 02/08/2019 gen4-4DPi Description Initial Public Release Version Cosmetic Changes to gen4 Primary Displays for Raspberry Pi Cosmetic Changes to gen4 Primary Displays for Raspberry Pi and addition of Section - Latest Kernel Versions Page 28 of 29 www.4dsystems.com.au gen4 Primary Displays for Raspberry Pi 21. Legal Notice Proprietary Information The information contained in this document is the property of 4D Systems Pty. Ltd. and may be the subject of patents pending or granted, and must not be copied or disclosed without prior written permission. 4D Systems endeavours to ensure that the information in this document is correct and fairly stated but does not accept liability for any error or omission. The development of 4D Systems products and services is continuous and published information may not be up to date. It is important to check the current position with 4D Systems. 4D Systems reserves the right to modify, update or makes changes to Specifications or written material without prior notice at any time. All trademarks belong to their respective owners and are recognised and acknowledged. Disclaimer of Warranties & Limitation of Liability 4D Systems makes no warranty, either expressed or implied with respect to any product, and specifically disclaims all other warranties, including, without limitation, warranties for merchantability, non-infringement and fitness for any particular purpose. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. Images and graphics used throughout this document are for illustrative purposes only. All images and graphics used are possible to be displayed on the 4D Systems range of products, however the quality may vary. In no event shall 4D Systems be liable to the buyer or to any third party for any indirect, incidental, special, consequential, punitive or exemplary damages (including without limitation lost profits, lost savings, or loss of business opportunity) arising out of or relating to any product or service provided or to be provided by 4D Systems, or the use or inability to use the same, even if 4D Systems has been advised of the possibility of such damages. 4D Systems products are not fault tolerant nor designed, manufactured or intended for use or resale as on line control equipment in hazardous environments requiring fail - safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines or weapons systems in which the failure of the product could lead directly to death, personal injury or severe physical or environmental damage (`High Risk Activities'). 4D Systems and its suppliers specifically disclaim any expressed or implied warranty of fitness for High Risk Activities. Use of 4D Systems' products and devices in 'High Risk Activities' and in any other application is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless 4D Systems from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any 4D Systems intellectual property rights. 22. Contact Information For Technical Support: www.4dsystems.com.au/support For Sales Support: sales@4dsystems.com.au Website: www.4dsystems.com.au Copyright 4D Systems Pty. Ltd. 2000-2019. gen4-4DPi Page 29 of 29 www.4dsystems.com.au