MAIN SITE HOME
Technical Tips
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 Module 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
HP Stream 7 docking
3.7V to 5V
Solar Charger
Infrared Decoder
PIC Music
Code Lock
Code Lock with LCD

USB FREQUENCY COUNTER AND VOLTMETER

Using PIC18F2550 /  for connecting analogue and digital signals to USB port . Included Visual Basic 6 code, Visual Studio 2005 C# code, PIC ASM code, PIC C code and a circuit diagram. The PIC microcontroller has 10 bit analogue to digital converter, by selecting 8 bits conversion the 2 LSB are ignored. The circuit is powered by the USB. The interface to the PC is HID class.
The frequency counter has a range of up to 4MHz (24bits). Inputs samplings can be done at rates of 1 per second and 1 every 0.1 second.
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.
C# code is modified Microchip code from the USB framework, Microchip Solutions v2012-04-03.
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.

PIC16F1459

The PIC16F1459 is a cheap option for pic18f2550. Included Visual Basic 6 code, Visual Studio 2005 C# code, PIC C code for MPLABX and a circuit diagram.

The source code is derived from freeware from these sources:
http://janaxelson.com/usb.htm , http://openprog.altervista.org/USB_firm_eng.html
You are free to use the circuit diagram and the VB software with no limitations.

USB FREQUENCY COUNTER AND VOLTMETER FOR ANDROID

Using PIC18F2550 for connecting analogue and digital signals to Android USB port . The Android USB port is easily accessed by imitating keyboard. 
PIC C code is Microchip sample code for USB Keyboard. The file Keyboard.c has the added code for the ADC and the frequency counter from line 900.  The USB sends 1 bytes at a time for each key, the 11 digits of the counter and voltage are sent in 30 bytes. The HEX file is included, the c code can be compiled using C18 v3.43 with MPLAB.
The Android app is in BASIC! graphic text. http://mougino.free.fr/rfo-basic/index.html . The app uses graphic screen to displays voltage and frequency. The .apk file is the file that installs manually the app to your phone. For editing the app the .bas file can be imported after you install the RFO BASIC app to your PC and or your Android device.
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 Android App

The VB6 application is a combined digital and analogue voltmeter.

   

Circuit Description
See also Technical Tips

Analogue input, voltage range 0 to 5V. Max input voltage is 5.5V .
The counter input, TTL voltage levels.
3.3V internal supply for the USB transceiver. 0.22uF is required for regulation.
D+ D- are the data lines to the USB connector on the PC.
For USB wiring info: http://www.interfacebus.com/Design_Connector_USB.html