Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

what are the fuctions and definition to use for count up timer?

Status
Not open for further replies.

dann11

Full Member level 3
Joined
Oct 22, 2015
Messages
166
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
2,742
Hi, I am new to programming, and I want to design a program code for a count up timer which is controlled by an external push button switch.. what are the necessary functions and definitions that must be seen in my program code?
 

Which MCU are you using ?

All you need in the code is a variable to hold the counter value and a button code. The button code will have a debounce delay. When button is pressed and relesed then counter value will increment by one. You also need a way to display this vaue. You can use UART, LCD or 7 Segment Display to output the counter value.
 

Which MCU are you using ?

All you need in the code is a variable to hold the counter value and a button code. The button code will have a debounce delay. When button is pressed and relesed then counter value will increment by one. You also need a way to display this vaue. You can use UART, LCD or 7 Segment Display to output the counter value.

I will be using at89c51. how should I declare the function and definition for this?
 

Hi dann11,

First you should bring up your micro controller, i.e implement necessary system clock(with internal or external oscillator) & look in to necessary peripherals like GPIO, timer, UART, SPI etc...

Generally push button is connected to the GPIO, as per the GPIO input high/low you can implement your logic..

Let me know if you any specific doubt...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top