Oleg Oleg
RUSSIAN FEDERATION, THE • + Follow
Edit Project
Description
FREQUENCY COUNTER WITH PIC16F628A
First of all I wanted a PIC microcontroller to do the whole
job without any additional ICs.
Also I wanted to use the the familiar 16F628A, but because one of the portA pins (RA5) can be used only as input I was short of outputs to do the job.
Driving 6 digit 7-segment multiplexed display requires 7 + 6 = 13 outputs.
The 16F628A has 16 IO pins, two of which are used for the crystal oscillator,
one is for the signal input and other one can be used only for input,
that leaves us with only 12 useful IO pins.
The solution was to drive one of the common cathodes with a transistor, which opens when all other digits are switched off.
7-segment displays used here are 3 digit multiplexed
common cathode type (BC56-12SRWA).
Digits 2..5 are switched on when respective pins are set low.
When all these pins are high, the transistor Q1 opens and switches on the first digit. The current for each segment is about 6-7mA.
I must mention that pins connected to common cathodes theoretically may sink up to 50mA if all segments are light up (7x7mA).
This is way above max specifications of the microcontroller.
But as every digit is switched on for very brief moment I think it is safe.
The whole schematic consumes around 30-40mA in average and the microcontroller is not heating at all, so everything seems OK.
The microcontroller uses its internal 4MHz oscillator for the CPU clock.
Timer1 uses external crystal oscillator with frequency 32768Hz
for setting the 1 second time interval.
Timer0 is used to count the input signal at pin RA4. And finally,
Timer2 is used for cycling and refreshing the digits.
As the input signal will be 5Vpp square wave there isn’t any preamp or buffer in the front.
The counter can measure up to 920-930kHz which is more
than enough for my project.
The reason why it can’t go higher is because driving all these digits
consumes lots of CPU cycles.
I suppose, the program code can be optimized or even written in assembler and then the counter can reach 999999 Hz.
The crystals for 32768Hz are sold in two sizes : 2x6mm and 3x8mm. I recommend 2x6mm because it fits perfectly below the left display.
The other size also can be used but it will lift a little the left display.
May 20,2020
3,095 views
FREQUENCY COUNTER WITH PIC16F628A
PIC microcontroller
Driving 6 digit 7-segment multiplexed display
3095
1
0
Published: May 20,2020
Download Gerber file 11
BOM(Bill of materials)
Purchase
Donation Received ($)
PCBWay Donate 10% cost To Author
Only PCB
PCB+Assembly
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
Copy this HTML into your page to embed a link to order this shared project
Copy
Under the
Attribution-ShareAlike (CC BY-SA)
License.
- Comments(0)
- Likes(1)
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP
0 / 10000
Remove
It looks like you have not written anything. Please add a comment and try again.
View More
- Commodore Bench Mar 04,2021
View More
VOTING
0 votes
- 0 USER VOTES
0.00
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Design
1/4
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Usability
2/4
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Creativity
3/4
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Content
4/4
More by Oleg Oleg
- Development Board STM32F103RET6 Development Board Series STM32F103RET6Resources on the board3.3/5.0/12V power input/output pinReset ...
- DAPLINK and STM32 minimum system combination DAPLINK and STM32 minimum system combination, one data cable can complete the download and debugging...
- USB to RS232 This is a program verification board. The main verification content is the function of USB to RS232 ...
- ESP Air Burner The ESP downloader with Air Burnner interface uses probes instead of DuPont cables.
- Docking station USB3.1 Using GL3520 USB 3.1 HUB chip,Supports super high speed, high speed and full speed USB connection, f...
- RX5808 open source receiver 5.8g open source receiver, can receive 5.8g signal, AV video signal output. Rx5808 dual-reception fu...
- 5.8G image transmission module It can be used for AV signal audio and video wireless transmission; baby monitor; wireless camera se...
- GRBL-ESP32 esp32s 3d is suitable for GRBL and marlin software
- STM32 Sensor Node A Small STM32F103C8T6 board with all functional pins exposed. Similar to the BluePill Board except:N...
- 2.8 inch TFT touch screen The module uses a 2.8-inch TFT color LCD screen. The module is compatible with punctual atomic 2.8TF...
- LED dot matrix clock LED dot matrix electronic clock based on 51 single chip microcomputer.Based on STC15W4K series ultra...
- STM32F411Cx 401Cx minimum system + J-LINK debugger The STM32F411 / 401 microcontroller belongs to the STM32 Dynamic Efficiency series. These devices ar...
- Small passive DC constant current electronic load IntroductionA small passive DC adjustable constant current (CC) electronic load with temperature-con...
- Small jlinkV9 downloader V1.0 Adopt typec interface, stm32f205 master control, lead SWD, SWO, support virtual serial port, resista...
- IP2325 dual string lithium battery charging module Miniature charger for dual lithium batteries.Since the IP2325 does not have a charge balancing funct...
- Electronic switch The operating voltage is within 30V. Depends on the PMOS voltage.
- Power supply module NAE20S08 Is based on SY8288A / JW5068A series power supply ic Volume: 10x10x6mm Input range: 4-23vin Output: ...
- Solder paste dispenser A portable miniature intelligent electric SMT solder paste dispensing pen supports quantitative extr...
You may also like
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
101 1 1 -
-
-
-
Sega Master System RGB Encoder Switcher Z80 QSB v1.2
84 0 0 -
18650 2S2P Battery Charger, Protection and 5V Output Board
125 0 0 -
High Precision Thermal Imager + Infrared Thermometer | OpenTemp
573 0 7 -
Sony PlayStation Multi Output Frequency Oscillator (MOFO) v1
163 0 2 -