NEW
OLED Oscilloscope ATtiny85
LCD Counter ATtiny88
LCD Counter ATtiny84
SD CARD
20 Tracks Sound Recorder
SD Card Data Logger
FAT32 Player ATtiny85/45
CH376 USB Picture Frame
SD FAT32 Player PIC12F1822
W25Q64 Flash Recorder
SD Picture Frame
SD FAT32 TFT Display
Doorbell with SD/EEPROM
SD Talking Clock
SD FAT32 Sound Player Recorder
SD Arduino Recorder
Arduino Picture Frame
Projects Without uControlador
CH341 USB to I2C OLED
CH341 USB to 16x2 LCD
CH341 USB to TFT
CH341 USB Input Output
PC Digital I/O
CH341 Analogue to USB
USB MCP3201 ADC
FREQUENCY COUNTER
OLED Counter ATtiny85
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
SSD1331 Counter PIC16F628A
Arduino Counter for PC
OLED Arduino Counter
TFT 10MHz Counter
PC Counter
LED Counter
Scope Screen Counter
LCD 16 x 2 Counter
6MHz Android Counter
NIXIE Android Counter
Bluetooth Counters
USB Counter PIC18F2550
OBD2
OBD2 RPM meter PIC16F876A
OBD2 Android Rev Counter
OBD2 Diagnostic App PIC/Arduino
OSCILLOSCOPE
Logic Analyzer
PIC12F1822 Scope for PC
Arduino Oscilloscope for PC
Arduino OLED Oscilloscope
Android Oscilloscope
TFT Oscilloscope
USB Oscilloscope PIC18F2550
THERMOMETER
Temperature Controller
Thermocouple 1023 Deg
Thermometer For Browser
OLED Thermometer PIC12F629
OLED Room Thermostat
TFT Clock and Thermometer
LED Thermometer
USB Thermometer
Serial Thermometer
USB DS18B20 Sensor
TIMER / CLOCK
Cuckoo Clock
Real Time Clock DS3231
LED TM1637 Timer
OLED Timer Thermometer
TFT Timer Thermometer
LED Timer
LCD Timer
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
MISCELLANEOUS
Musical Doorbell
Talk to Arduino
HC-SR04 Sensor
OLED Amp Meter
Water Softener
Solar Charger
Music, Birthday Card
Code Lock
RETIRED
Serial Port
LPT Printer Port
SMALL PROJECTS  
List of Projects Technical Tips  

USB TO SPI - CH341 TFT DISPLAY

CH341 module (from eBay) converts USB to I2C/SPI/EPP. The module links are set to 5V and i2c-spi. The TFT module is a 1.8" 128 X 160 pixel driven by SPI interface and using ST7735 driver IC.
PC app is in Visual Basic-VS2010, it uploads BMP files to the display.
BMP files: Resize image file to 160x128 pixels. Save the files as 24 bits bmp.
The VB wrapping of DLL is taken from GitHub https://github.com/aa4e/ch341_vb . DLL is installed to PC by setup.exe in downloaded driver CH341PAR.ZIP https://www.wch.cn/downloads/CH341PAR_ZIP.html

ch oledoledvb

line

CH341 USB INPUT OUTPUT

CH341 module (from eBay) converts USB to I2C/SPI/EPP. The module links are set to 5V and i2c-spi. 4 digital outputs on pins D0-D3 and 4 digital inputs on pins D4-D7. PC app is in Visual Basic-VS2010, it display the digital inputs, green is high.
The VB wrapping of DLL is taken from GitHub https://github.com/aa4e/ch341_vb . DLL is installed to PC by setup.exe in downloaded driver CH341PAR.ZIP https://www.wch.cn/downloads/CH341PAR_ZIP.html

ch clock

line

USB TO LCD USING CH341

CH341 module (from eBay) converts USB to I2C/SPI/EPP. The module links are set to 5V and i2c-spi. The LCD module is 16x2 44780 driver IC.
PC app is in Visual Basic-VS2010, it display the text on the LCD. The VB wrapping of DLL is taken from GitHub https://github.com/aa4e/ch341_vb . DLL is installed to PC by setup.exe in downloaded driver CH341PAR.ZIP https://www.wch.cn/downloads/CH341PAR_ZIP.html

choled clock

line

USB TO I2C - CH341 CLOCK

CH341 module (from eBay) converts USB to I2C/SPI/EPP. The module links are set to 3.3V and i2c-spi. The OLED module is a 0.96" 128 X 64 pixel driven by I2C interface and using SSD1306 driver IC. The font used is 5x7 pixels universal font.
PC app is in Visual Basic-VS2010, it display the PC clock. The VB wrapping of DLL is taken from GitHub https://github.com/aa4e/ch341_vb . DLL is installed to PC by setup.exe in downloaded driver CH341PAR.ZIP https://www.wch.cn/downloads/CH341PAR_ZIP.html

choled clock

line

USB TO I2C - CH341 OLED TEXT

CH341 module (from eBay) converts USB to I2C/SPI/EPP. The module links are set to 3.3V and i2c-spi. The OLED module is a 0.96" 128 X 64 pixel driven by I2C interface and using SSD1306 driver IC. The font used is 5x7 pixels universal font.
PC app is in Visual Basic-VS2010, it display text written in the app to the OLED. The VB wrapping of DLL is taken from GitHub https://github.com/aa4e/ch341_vb . DLL is installed to PC by setup.exe in downloaded driver CH341PAR.ZIP https://www.wch.cn/downloads/CH341PAR_ZIP.html

vbcholed oled

line

USB VOLTMETER - CH341 MCP3201

CH341 module (from eBay) converts USB to I2C/SPI/EPP. The module links are set to 5V and i2c-spi. The ADC is MCP3201 12 bit. 10 or 12 bits is selectable, reading intrvals are 1 second or 0.1 second.
PC app is in Visual Basic-VS2010, it display digital and analogue voltage. The VB wrapping of DLL is taken from GitHub https://github.com/aa4e/ch341_vb . DLL is installed to PC by setup.exe in downloaded driver CH341PAR.ZIP https://www.wch.cn/downloads/CH341PAR_ZIP.html
LTC1285, ADS7822 are direct replacement to MCP3201.

vbcholed 

line

USB HID DRIVE OF LCD MODULE

Using PIC18F2550 for connecting 16x2 LCD module to USB port . Included Visual Basic 6 code, VS2005 C# code, vb2010 code and MPLAB X XC8 code based on Microchip code. Also C code MPLAB8.x with C18. The circuit is powered by the USB. The interface to the PC is HID class. All codes use the same PID and VID so any app works with any PIC code.
There are several makes of the LCD module that are interchangeable, the one I used is UC-16207. The LCD module has a 14 way connector, 8 pins are used for data, 2 for supply, register select(RS), read/write, enable (E) and contrast adjust. The R/W input must be connected to earth to make sure that data lines are in input mode. The VB application has only basic functions, it can be changed to interface the display for a variety of inputs.
When USB is plugged it verifies the connection with the host and then initialize the LCD. On typing a character the USB updates all the 32 characters.
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.
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.
The source code is derived from freeware from these sources: http://janaxelson.com/usb.htm , http://openprog.altervista.org/USB_firm_eng.html

 

Circuit Description
See also Technical Tips

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

LCD Module
20K trimmer is needed to adjust the contrast voltage which vary with different batches of LCD.
Pins 7 to 14 are data inputs D0 to D7. Pin 6 is clock input, enables LCD module to read the data.
Pin 4 is Register Select input, it is used for 16 bits instruction.
Pin 5 must be connected to earth to insure that data lines are always inputs.



Write a comment

iconFlag Countermoty22.co.uk  2008-2025