OLED Current Meter PIC12F675
Picture Frame PIC16F690
Talking Clock PIC16F628A
OLED Thermometer PIC12F629
OLED Thermostat PIC16F628A
TFT Counter PIC16F628A
SSD1306 Counter PIC16F628A
SSD1331 Counter PIC16F628A
Color OLED Picture Frame
Arduino Counter for PC
Arduino Oled Code Lock
PC digital I/O without MCU
PC Analog Input without MCU
Arduino Oscilloscope for PC
Arduino OLED Oscilloscope
Arduino Picture Frame
OLED Bitmap Arduino / PIC
OLED Arduino Counter
OLED Timer Thermometer
OLED Frequency Counter
Android Oscilloscope
OBD2 Engine Rev Counter
OBD2 Diagnostic app
TFT Clock and Thermometer
WiFi, Ethernet
WiFi Thermometer
WiFi ESP8266
Doorbell with SD / EEPROM
SD FAT16/32 for .bmp
PETIT FAT bmp Display
TFT Timer, Thermometer
TFT Oscilloscope
SD Talking Clock
Android Talking Clock
SD Sound Recorder
SD FAT32 wav Player
SD Arduino Recorder
LED Thermometer
LED Timer
LCD Timer
TFT 10MHz Counter
100KHz Counter For PC
1MHz Counter For PC
8 Digits LED Counter
Scope Screen Counter
LCD 16 x 2 Counter
LCD Arduino Counter
6MHz Android Counter
NIXIE Android Counter
Bluetooth Counters
USB Counter
USB TFT display BMP
USB DS18B20 Sensor
USB Thermometer
USB Meter
USB Oscilloscope
USB Input-Output
USB Input-Output Android
USB 16x2 LCD
Serial TFT Text
Serial Inputs Outputs
Serial Port LCD
MCP3201 on Serial Port
Serial Thermometer
Analogue Signal to Serial
Serial Thermostat
MCP3201 on LPT
Analogue Signal to LPT
LCD Display on LPT
Water Softener
3.7V to 5V
Solar Charger
Infrared Decoder
PIC Music
Code Lock
Code Lock with LCD
HOME fr  ru  de  in  ro  ar  tr  nl  il  Technical Tips


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.
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

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

moty22.co.uk  2008-2021