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.
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.
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.
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.
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 ?
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.