Frequency Meter Using Microcontroller

by Avinash KumarP in Circuits > Arduino

2645 Views, 8 Favorites, 0 Comments

Frequency Meter Using Microcontroller

1.jpg
2.png
3.png
4.png
Frequency meter using STM32L476

This tutorial simply states how to calculate frequency of a pulse source using a microcontroller.High voltage level of pulse source is 3.3 V and low is 0V.I have used STM32L476,Tiva launchpad,16x2 alphanumeric LCD some wires breadboard and 1K resistor.

Hardware required:-

1)STM32L476 nucleo board

2)Tiva launchpad or any other microcontroller board(pulse source)

3)16x2 alphanumeric

4)Breadboard

5)1K resistor(for lcd contrast)

Software requirement:-

1)STM32cubemx

2)Keil uVision5

3)Energia (for Tiva launchpad)

Install Stm32cubemx ,Keil UVision5 and Energia in Your Pc,update Them.

Open Stm32cubemx Select Stm32l476 Nucleo Board.Select PC_13 As External Interrupt Pin

1.jpg

No Need to Make Any Changes in Clock Configuration.

2.png

Select TIMER1 and Clock Source As Internal Clock.And Make Settings in TIMER1 According to Pictures.

4.png
3.png
5.png

Give a Name to Your Project and Generate Code for Keil Ide From Stm32cubemx

6.png
7.png

Connect LCD to STM3276 Nucleo Board With Connections Stated Below.

Pin connections of stm32 to lcd

STM32L476 - LCD

GND - PIN1

5V - PIN2

NA - 1K resistor connected to GND

PB10 - RS

PB11 - RW

PB2 - EN

PB12 - D4

PB13 - D5

PB14 - D6

PB15 - D7

5V - PIN15

GND - PIN16

Connect One Pin of Tiva Launchpad to External Interrupt Pin of Stm32l476 and GND Pin of Tiva Launchpad to GND Pin of STM32L476.

If you have any other microcontroller board with you need to connect GPIO of that board on external interrupt pin of STM32L476 nucleo board and connect GND of both boards to each other.You need to toggle this GPIO pin programmatically in it's IDE.

Demo of Project

Frequency meter using STM32L476