How to interface an external timer

Status
Not open for further replies.

devmania

New Member
Hello Everyone,

I want change the timer value during run time. How should i do that? I also wanted to see timer value on LCD module ? How should i do that? Suppose initially i had given timer value as 10sec and later on during run time i want to change the timer value to 20sec, and these values i have to see on the LCD . Please help in me doing it.
 
Hello ,

I will try to explain you what am working on, There are two motor initially i will give some 10 sec delay between both the motor and this delay should be displayed on lcd. Then after some time i need to set timer for 30 sec between these motor which will also be displayed on lcd. This is like HMI ( human machine interface ) externally i want to change the timer according to my need.
 

Hi,
Which PIC are you using.?
If it has adc channels, one method is to an adc input with a 10K pot, by varying the pot, the program can use the adc value to change the Delay period.
The LCD could easily display the delay period.
 
Thanks for the reply sir, I am thinking to go with AT89c51 . which controller would you suggest me sir?
 
Can i use an external timer which i can set manually?
hi,
I dont think that the 8951 has adc .????
So you could use a couple of push buttons on two port input pins to increment/decrement the delay period.
 
Thanks a lot for your support ,

Please guide me more on this project, its really important to me .
can you please help me with a diagram about the setup ?
 

Attachments

  • AAesp02.gif
    28.4 KB · Views: 213
Last edited:
Thank you again ,

i still have a doubt like how to use these push button and how the value will be shown in LCD and by these push button how will i set the timer .
 
Thank you again ,

i still have a doubt like how to use these push button and how the value will be shown in LCD and by these push button how will i set the timer .

I would suggest you use the LCD program in the link I posted and get the LCD section working first, you can then add push buttons and other items later.
 
Thanks Eric for this valuable reply......

i will tell you what exactly i want to do -
my aim is to switch on and off of a valve . initially there will be some delay let say 10 sec of delay between two valve. so when my system is on i will be able to see the delay value on the LCD. The process will continue. Now after some time i want to increase or decrease the timer value with the help of a push button , this value will be shown on the LCD. this is the total task .

Now what should i do. i am thinking for AT89c51 microcontroller and i will write the program in C language. So what would you suggest ?
 

hi,
What you are planning is not too difficult, usually getting the LCD to work is the main problem.
If you can use a simple program to display say, 'Hello World' it can be used to verify that the LCD program and its hard wiring is OK.

Then add the push buttons and get the program to debounce and recognise the button presses, you could use the LCD to confirm the buttons are working.

Basically what I am suggesting is to use a step by step approach and debug each section of the program and hardware.
As I program in assembler and not 'C' I cannot help with the program itself, I'm sure other members will help.
 
Ok Eric Thanks for guiding me, Please help me out for my further queries. I will start executing the things step by step.
 
timer

I really like using the DS1307. It works very well and with a small coin battery you can keep the timing for a VERY long time.

It is easy to implement if your uC has SCL/SDA pins.

I am normally programming PIC uC's however.

You can easy display this time to an LCD and you can do quick checks on the time elapsed.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…