- This topic has 1 reply, 1 voice, and was last updated 11 years, 10 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
|
Microcontroller › 8051 › 8051 measures opening and closing time for a switch
Hello everyone,
I’m learning the 8051 microcontroller and i want to do a small project.
What i want is to connect a N.C switch to a port fro example P1.1.
When i press the switch, it will open and when i press for a second time the switch will close.
So i want the 8051 calculate the time during the switch was opened and vice et versa for closing.
Can someone guide me how can i start this small example.
I want to do it in embedded c.
Thank yo for your support
HallBrooks
Thank you for your reply.
i recognize for a beginner it’s very difficult.
So i will try to explain this project:
it can be used as door sensor monitoring.
So when the door is open 8051 must start a timer and count in seconds or ms etc…
and when the door is closed 8051 must stop the timer and in the LCD the time can be displayed.
that’s all for this moment.
i’m trying to study this….
Thank you