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
HOME   Technical Tips

SERIAL PORT 1MHz FREQUENCY COUNTER

Self powered frequency counter plugged into the serial port. Included a Visual Basic (VB6) code and .EXE file, PIC assembly, PIC C code, and a circuit diagram. The PIC16F628A microcontroller is programmed to count the input frequency and transmit it serially to the serial port. The micro controller is powered by the signals of the serial port, so no external power supply is needed. The counter is 20 bit transmitted by the UART in 3 bytes. The crystal can be changed to a ceramic resonator if accuracy isn't essential.

You can read more about serial interface in http://www.beyondlogic.org/spp/serial.htm

Code is for MPLAB, MPLABX and compilers HI TECH or XC8.

The VB application

Circuit Description
See also Technical Tips

Pin 4 at the serial port is turned to +12V by the software enabling RTS. It is regulated to 5V by 78L05. The 5V is the supply to the microcontroller.
Pin 3 is at -12V and pin 7 at +12V constantly and they are used to drive RX input between -9V (input HIGH) and +8v (input LOW) . These levels are sufficient to drive the RS242 input.

Pin 12 is the frequency input, input signal has to be TTL type.
Pin 8 is the UART output, it transmits the 20 bit count in three bytes in RS232 format. When pin 8 is high both transistors conduct and voltage at pin 2 of serial port is at -9V.
The other pins are not in use but must be left open circuit.






23.05.2015 - 12:35
Name:
Comment:

07.03.2015 - 00:26
Name: soho
Comment: 78l05 in or out ??

04.03.2014 - 03:57
Name: Carlos
Comment: Obrigado amigo estava a procura de algo assim para aprender muito bom!
01.05.2010 - 18:56
Name: Mustafa Sayan
Comment: Mersi


moty22.co.uk  2008-2020