3.2inch Touch Screen
Features of 3.2inch Touch Screen:
LCD Type: TFT
LCD Interface: SPI
Touch Screen Type: Resistive.
Touch Screen Controller: XPT2046.
Colors: 65536
Backlight: LED.
Resolution: 320*240 (Pixel).
Aspect Ratio: 4:3.
Power Consumption: TBD.
Backlight Current: TBD
Operating Temp. (℃): TBD
How to install RASpberry pi with 3.2 inch Touch Screen:
Install Required C Libraries
In order to use the API examples we provide, related C libraries are required, which are pre-installed in our configured system image. If you're using your own system image, the C libraries should be installed manually.
Install WiringPi
The WiringPi installation package file can be found on: /home/pi/WringPi under the image we provide, or can be obtained from the official website:
https://projects.drogon.net/raspberry-pi/wiringpi/download-and-install/
Copy the installation package into your own system via a USB flash drive, enter the WiringPi folder, then do this to install:
chmod 777 build
./build
Run the following command to check the installation:
gpio –v
Install C Library bcm2835
The bcm2835 installation package file can be found on: /home/pi/bcm2835-1.25 under the image we provide, or can be obtained from the official website:
http://www.airspayce.com/mikem/bcm2835/
Copy the installation package into your own system via a USB flash drive, enter the bcm2835-1.25 folder, then do this to install:
./configure
make
sudo make check
sudo make install
DVK512 User Manual:
API Demo Code
All the demo codes for Raspberry Pi and the corresponding Makefile are included in our
configured system image: /home/pi/DVK512/.
If you're using your own system instead, the demo code can be found here as well:
CD_DVK512_EN/Program/
Use the following command to compile the demo code:
Make
Demos
First write the system image we provide to your SD card, enter the system, and double click the
"LXTerminal" on the desktop.
Log in as root, enter username:
su
Then the password:
raspberry
Note:
All the demos are running under root account, in case you happen to get stuck or any error
occurred, it might be that you're not logging in as root.
3.2-inch LCD display switch to the HDMI display
(The default boot mode of the image we provided is booted from 3.2-inch screen, HDMI no
output. If you want to output from HDMI, you need to operate as following :)
On the LXTerminal, enter
HDMI-SYS-SHOW
The system will load the driver( wait several minutes), when finished, the raspberry pi will
re-boot automatically, after it re-booted, waiting more than 30 seconds, there will be
information display on the LCD screen, and enter into startx interface.
HDMI display switch to 3.2-inch LCD display
Insert the LCD to the Raspberry pi board (The pin 1 of the LCD needs to match with the pin 1
of the Raspberry pi)
For the 3.2inch RPi LCD V2 version, on the LXTerminal, please enter
LCD32-SYS-SHOW
For the 3.2inch RPi LCD V3 version, on the LXTerminal, please enter
LCD32-SYS-SHOW-V3
The system will load the driver for several minutes, after loaded, the raspberry pi will re-boot
automatically, and after re-booted, please wait for 30 seconds or more then there will be
information display on the LCD screen, and enter into startx interface
LED Demo
On the LXTerminal, enter
LED_Test
The 8 LEDs should light up one by one.
Press "Ctrl+C" to end the demo.
8 channel Logic Level Converter Demo
1, Connect the 8 channel Logic Level Converter to the onboard 8I/Os connector (Note: The
VCC1 pinheader on the Logic Level Converter should connect to the 3V3 pinheader of the
8I/Os connector on DVK512);
2, Connect the Logic Level Converter VCC2 to the DVK512 onboard 5V pinheader via DuPont
wire;
3. Connect GND to GND;
Then open LED JMP jumper, and connect B0-B3 to LED0-LED3 via DuPont wire, open KEY
JMP jumper, and connect B4-B7 to KEY0-KEY3 via DuPont wire.
On the LXTerminal, enter
8-LOGIC
Press KEY0-KEY3 on DVK512, the related LEDs will light up, press “Ctrl+C“ to end the
demo.
74LVC8T245 Level Converter Demo
1, Connect the 74LVC8T245 Board to the onboard 8I/Os connector (Note: The VCCA
pinheader on the 74LVC8T245 Board should connect to the 3V3 pinheader of the 8I/Os
connector on DVK512);
2, Connect the 74LVC8T245 Board VCCB to the DVK512 onboard 5V pinheader via DuPont
wire;
3. Connect GND to GND;
Then On the LXTerminal, enter
74LVC8T245_Test
Open the Jumper Cap in LED JMP, then connect B0-B3 to LED0-LED3, then LEDs will be
blinking; then connect B4-B7 to LED0-LED3, then LEDs will be blinking. Press “Ctrl+C” to
end the demo
Joystick demo
(Note: When using the 3.2 inch LCD, the LCD will disturb P0 value read of the joystick, the
joystick program will disturb the LCD touch.)
Connect the Mix Board to the 8I/Os connector P0-P7,
On the LXTerminal, enter
JOYSTICK_Test
Press any key button or the joystick, LXTerminal will show the one had been pressed.
Key Demo
(Only for Raspberry Pi Model B+. The system will crash if run on Raspberry Pi Model B)
On the LXTerminal, enter
KEY_Test
Press any key button or the joystick, LXTerminal will show the one had been pressed.
Buzzer and PWM
Connect the Mix Board to the 8I/Os connector P0-P7,
On the LXTerminal, enter,
Buzzer_PWM_Test
The buzzer will sound with decreasing volume, until no sound.
DS18B20 Demo
Connect the DS18B20 to Mix Board, and then connect the Mix Board to the onboard 8I/Os
connector P0-P7.
On the LXTerminal, enter
modprobe w1-gpio
modprobe w1-therm
ls /sys/bus/w1/devices/
You will see a string like 28-000004379b6f, get the last 7 numbers and letters (They are different for each DS18B20, in the writer’s case, it is 4379b6f).
Then enter:
DS18B20_Test 4379b6f
LXTerminal should print the temperature value.
Infrared Remote Control
Connect the LFN0038K (Infrared Receiver) to the Mix Board IRM connector, connect the Mix
Board to the 8I/Os connector P0-P7,
On the LXTerminal, enter
IRM
Press any key on the Infrared Remote Controller provided by Waveshare; The LXTerminal will
print the decoded infrared signal in hexadecimal format.
Press "Ctrl+C" to end the demo.
LCD1602 Demo
Connect the "LCD1602" to the LCD1602 connector.
On the LXTerminal, enter:
LCD1602_Test
LCD1602 will display characters. If there is no information, please adjust the potentiometer
until there is information displayed.
PCF8563 RTC Demo
Short the RTC JMP,
On the LXTerminal, enter:
i2cdetect -y 1
The LXTerminal will print the PCF8563's address, indicating that the PCF8563 has been
detected. It's 51 in the writer’s case.
The address might be different, depending on the Raspberry Pi's version and the concrete
configuration of PCF8563.
Then on the LXTerminal, enter:
modprobe i2c-dev
echo pcf8563 0x51 > /sys/class/i2c-adapter/i2c-1/new_device
hwclock –r (for reading the time info from the connected I2C RTC hardware) The LXTerminal
will print the time info of the PCF8563, which is different from the system time.
Enter:
hwclock –w (writing the Raspberry Pi system time info to the PCF8563)
Then:
hwclock –r
Now the time info of Raspberry Pi system and the PCF8563 have been synchronized.
hwclock –s (synchronize the system time and the hardware RTC)
PCF8591 AD/DA Demo
Firstly connect the PCF8591 module we provided to the I2C connector;
On the LXTerminal, enter
PCF8591-ADC
The LXTerminal will print AD Value read from ADC0-ADC3 (pinheader AIN0-ANI3 of
PCF8591 module), as the following figure:
On the LXTerminal, enter
PCF8591-DAC