Connecting Tech Pros Worldwide Forums | Help | Site Map

how to display two timer?

Newbie
 
Join Date: Oct 2009
Posts: 4
#1: Oct 15 '09
hello!
i need someone to help me..
i need to display two independent timer, this timer need input from keyboard key to stop, terminate and reset the timer..
i am using 8051 microcontroller

Expert
 
Join Date: Mar 2008
Location: Naperville, Illinois U.S.
Posts: 834
#2: Oct 15 '09

re: how to display two timer?


You need two indepedent timers.
Do you plan to use timers built into the 8051 or will there be external timers?
If external timers, do you understand the software interface to them?

You need some means to display the timer values.
What is your display device?
Do you understand the software interface to it?

You need to acquire inputs from the keyboard.
Do you understand the software interface to the keyboard?
Newbie
 
Join Date: Oct 2009
Posts: 4
#3: Oct 16 '09

re: how to display two timer?


thank you for respond to this message.. this timer need to be display at hyper terminal.. i have 2 options, whether to use c or assembly to display this timer.. i don't know how to declare inputs from keyboard to stop, terminate and restart the timer.. need your help..
Needs Regular Fix
 
Join Date: Jul 2008
Posts: 386
#4: Oct 18 '09

re: how to display two timer?


So now we know that the output must be transmitted over rs-232, and let me guess that the input keys must be read from it as well. For this task , C/asm preference depends mostly on your familiarity with one of them on 8051. I would set up timer interrupt to fire once in 1 millisecond, update timer values for running timers, and use uart interrupt to update 'running'/'stopped' flags for timers.
Newbie
 
Join Date: Oct 2009
Posts: 4
#5: Oct 20 '09

re: how to display two timer?


really? can you please help me..
Needs Regular Fix
 
Join Date: Jul 2008
Posts: 386
#6: Oct 20 '09

re: how to display two timer?


Haven't I already? Anyway, the most difficult parts of the task - setting up the toolchain, making the hardware part, ( like progressing from "nothing" to "blinking led" ) are up to you and can't be helped remotely.
Newbie
 
Join Date: Oct 2009
Posts: 4
#7: Oct 21 '09

re: how to display two timer?


i dont know how to make the keyboard as an input
Banfa's Avatar
Administrator
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,215
#8: Oct 21 '09

re: how to display two timer?


By the sounds of it you will have your microprocessor connected to a PC via a serial (RS232) cable and run Hyper-terminal (or some other terminal emulator) on the PC.

Hyper-terminal becomes your input and output, anything you write to the serial port on your micro-processor will be displayed in hyper terminal. Anything you type into hyper-terminal can be read by your micro-processor from the serial port.

The serial port in you micro-controller is the UART. In most implementations the UART outputs TTL level logical so a buffer device (external IC) has to be used to convert this to RS232 line level.
Needs Regular Fix
 
Join Date: Jul 2008
Posts: 386
#9: Oct 21 '09

re: how to display two timer?


You mentioned hyperterminal - so you need to connect computer's serial port to 8051's rxd pin (using with level convertor), then poll rxc flag or setup rxc interrupt handler.
Reply


Similar C / C++ bytes