HOME
Technical Tips

PIC Projects
LCD TFT Egg Timer
LCD TFT Oscilloscope
SD Talking Clock
SD/SDHC Recorder
Infrared Decoder
PIC Music
Code Lock
Code Lock with LCD
Egg Timer

LCD Egg Timer
USB PIC18F2550
USB Thermometer
USB Counter
USB Meter
USB Oscilloscope
USB Input-Output
USB 16x2 LCD

COM & LPT Ports
MCP3201 on LPT
Serial Inputs Outputs
Serial Port LCD
Analogue Signal to LPT
MCP3201 on Serial Port
Serial Thermometer
Analogue Signal to Serial LCD Display on LPT
Serial Thermostat

Frequency Counters
LCD TFT 10MHz
100KHz For PC
1MHz For PC
3 Digits LED 1MHz
Scope Screen Display
LCD Module 10MHz

Others
Water Softener
3.7V to 5V
Solar Charger

 
 

SERIAL PORT 100KHz FREQUENCY COUNTER

Self powered frequency counter plugged into the serial port. Included a Visual Basic (VB6) code, PIC code, and a circuit diagram. The PIC16F628A microcontroller is programmed to count the input frequency and transmit it serially to the serial port. The microcontroller is powered by the signals of the serial port, so no external power supply is needed. The counter is 17 bit (16 bits + overflow). The crystal can be changed to a ceramic resonator if accuracy isn't essential.
The signal input is connected via the chip comparator to allow sensitivity down to 100mV.
You can read more about serial interface in http://www.beyondlogic.org/spp/serial.htm

You are free to use the circuit diagram and the software with no limitations.
Software includes PIC code and VB6 code. You are free to use the circuit diagram and the software with no limitations.

The VB6 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 RS232 input.

PIC16F628A contains a UART for serial comm and a 16 bit counter.
Input signal can be 0.1 to 5 vollts peak to peak.
Pin 17 is the frequency input, it's the PIC comparator input. Referance voltage to the comparator is 2.5V at pin 1. Output of the comparator at pin 2 is linked to the PIC counter input at pin 12.
Pin 8 is the UART output, it transmits the 16 bit count and overflow in three 8 bit words in RS232 format.
The other pins are not in use but must be left open circuit.





Comments, ideas and life threats are welcomed.

Name:

Email (optional): Email address wont be displayed.

I want the comment displayed

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



20.07.2014 - 02:02
Name: Moty
Comment: Hi Xtal. You are right, thank you for finding the error. I uploaded the old version of the firmware by mistake. Now it\'s corrected so please download the software again and try it.

19.07.2014 - 18:37
Name: xtal
Comment: Interesting, but software shouldn\\\'t work....CMCon was set to 7 disabled comparators , cmcon never altered so how to get output from RA3 ? , where was TMR1 set up for external input[RB6] .....

28.08.2013 - 14:29
Name: uytrurty
Comment: Robot comment.

28.08.2013 - 14:28
Name: fhdrtye
Comment: Robot comment.

Flag Counter

moty22.co.uk 2014