CH341 USB TO I2C/SPI/EPP
Waveform Generator
AHT21, MAX6675 Thermometer
USB to I2C OLED
USB to LCD
USB Input Output
SD CARD
CH376 USB Picture Frame
SD FAT32 Player PIC12F1822
W25Q64 Flash Recorder
Picture Frame PIC16F690
Color OLED Picture Frame
SD FAT32 TFT Display
Doorbell with SD/EEPROM
SD Talking Clock
SD Sound Recorder
SD FAT32 wav Player
SD Arduino Recorder
Arduino Picture Frame
FREQUENCY COUNTER
AD9833 Waveform Generator
Chrome Browser Counter
Arduino LED MAX7219 Counter
LCD Accurate Counter
OLED Accurate Counter
MilliHertz Counter
PIC Counter For Android
MAX7219 LED Counter
WiFi Frequency Counter
Frequency Generator
OLED Counter PIC12F629
Talking Frequency Counter
TFT Counter PIC16F628A
SSD1306 Counter PIC16F628A
SSD1331 Counter PIC16F628A
Arduino Counter for PC
OLED Arduino Counter
OLED Frequency Counter
TFT 10MHz Counter
PC Counter
LED Counter
Scope Screen Counter
LCD 16 x 2 Counter
LCD Arduino Counter
6MHz Android Counter
NIXIE Android Counter
Bluetooth Counters
USB Counter
OBD2
OBD2 RPM meter PIC16F876A
OBD2 Engine Rev Counter
OBD2 Diagnostic app
OSCILLOSCOPE
Logic Analyzer
PIC12F1822 Scope for PC
Arduino Oscilloscope for PC
Arduino OLED Oscilloscope
Android Oscilloscope
TFT Oscilloscope
USB Oscilloscope
THERMOMETER
Thermocouple 1023 Deg
Thermometer For Browser
OLED Thermometer PIC12F629
OLED Room Thermostat
TFT Clock and Thermometer
LED Thermometer
USB Thermometer
Serial Thermometer
Serial Thermostat
USB DS18B20 Sensor
TIMER / CLOCK
Cuckoo Clock
Real Time Clock DS3231
LED TM1637 Timer
OLED Timer Thermometer
TFT Timer Thermometer
LED Timer
LCD Timer
Clock Thermometer
Talking Clock PIC16F628A
Android Talking Clock
WiFi
WiFi, Ethernet
WiFi Thermometer
WiFi ESP8266
USB
IO for Chrome Browser
USB 16x2 LCD
USB TFT display BMP
USB Meter
USB Input-Output
USB Input-Output Android
DATA ACQUISITION
Analogue to USB (CH341)
MCP3201 on Serial Port
PC Analog Input (USB-UART)
SERIAL PORT
Serial TFT Text
Serial Inputs Outputs
Serial Port LCD
Analogue Signal to Serial
OTHERS
HC-SR04 Sensor
OLED Amp Meter
PC digital I/O (no coding)
Analogue Signal to LPT
LCD Display on LPT
Water Softener
3.7V to 5V
Solar Charger
PIC Music
Code Lock
SMALL PROJECTS  
  Technical Tips  

WinUSB - TFT BMP Bitmap DISPLAY
See also usb_lcd for CH341 TFT.

Using PIC18F2550 for connecting LCD TFT module to USB port .
WinUSB Driver and VS2005 software
Included PIC software based on LVR software for winUSB generic driver. The PC software using Visual Basic 2005 is based on LVR version. This driver allows data transfer at a speed of 120KB/s and the screen is loaded in 2 seconds.
After connecting the programmed PIC to the PC you need to install the driver, use the INF file that included. For the missing files you can download Microchip USB framework, all the needed files are there, http://ww1.microchip.com/downloads/en/devicedoc/MCHP_App_%20Lib%20v2010_02_09_Installer.zip

VB6 and HID class USB software
Also included Visual Basic 6 code and PIC C code that interfaces the PC in HID class. HID class (human interface device) is a class of devices like the mouse and the keyboard, the data transfer rate is limited to 64KB/S. The PC already has a driver for HID USB.The screen loads in about 1 minute.
VB6 code includes guidance to setting up the PC. The PC register the PID and VID (product ID) of the USB device when it's plugged, the VB code uses these ID's to communicate with the device. For commercial VID it is needed to buy it from USB-IF, but in your lab you can use any number.

LCD TFT Module used is 8 bits drive. Inputs to the TFT driver are level shifted from 5V to 3.3V by buffers. The LCD driver is ILI9341.
The pic firmware can read only bitmap file of 24 bits bmp type. The file has to be size of 240 pixels width and 320 pixels high. The firmware removes the bitmap header (54 bytes) and then streams the rest of the file to the TFT. Every 3 bytes are the 24 bits color for one pixel. The bitmap format reads and displays the pixels of the image starting from bottom left.
To create a *.bmp file shrink the picture to 240 pixel wide and 320 pixel high, save it as 24 bit bitmap. You can use MS Paint.

The source code is derived from freeware from these sources: http://janaxelson.com/usb.htm , http://openprog.altervista.org/USB_firm_eng.html
Code was compiled with C18 ver 3.30. PIC18F2550 was programmed using Velleman K8076 or PICKIT2.
Software includes PIC code and VB code.

  

 

 

Circuit Description
See also Technical Tips

RD input is connected to 3.3V on the TFT module.
RST is the RESET of the TFT Module.
The module supply is 5V. The LCD driver I have is ILI9341.
PIC18F2550
Pin 14 is 3.3V internal supply for the USB transceiver. 0.22uF is required for regulation.
Pins 21 to 28 are port B outputs.
Pins 15,16 are the data lines to the USB connector on the PC.
Pin 20 is the PC 5V powering the PIC and the TFT module. It is limited to 100mA by the PC. 0.47uF is for decoupling.
For USB wiring info: http://www.interfacebus.com/Design_Connector_USB.html



Name:

Comments and questions

Copy the number from the picture It stops net-robots from adding comments.



21.10.2015 - 12:29
Name: Moty
Comment: Hi KansaiRobot. That is right , you need a library stored in the program memory for all the shapes. You can copy libs from other freeware codes. pic16 ROM is too small for text lib.

16.10.2015 - 12:21
Name: Moty
Comment: http://www.banggood.com/2_4-Inch-TFT-LCD-Shield-Touch-Board-Display-Module-For-Arduino-UNO-p-940735.html I've ordered this and they sent a board that looks similar but with different driver. In another order they sent me 2 faulty TFT modules so I stopped dealing with them and I recommended to others to be aware. You have to look for a module with ILI9341 drive chip. I can't recommend a reliable Chinese source. Look at this one: http://www.ebay.com/itm/2-2-inch-SPI-TFT-LCD-Display-module-240x320-ILI9341-51-AVR-STM32-ARM-PIC-New-/161805634644?hash=item25ac5e0c54:g:424AAOSwd0BV3Sgh

16.10.2015 - 02:43
Name: KansaiRobot
Comment: Very nice blog. Btw, can you post a link to the TFT LCD you used for this project?? Thanks

iconFlag Countermoty22.co.uk  2008-2024