- This topic has 3 replies, 3 voices, and was last updated 9 years, 1 month ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
|
Microcontroller › AVR › Switch Detection
Hello
I have a project where I need to redesign the tailight system for a car. I am using the Atmega8 microcontroller. The first part is the user input via switches. there are 5 different switches each performing different tasks(such as indicators brakes etc.). Some functions will have to work simultaneosly. I need some help with detecting the switches either using interrupts or polling.
NB:I have done a basic course on Avr so I dont now much and we cannot use Arduino
Thanks
Hi,
As we know there are two external interrupt pins in the atmega8, you have to go for polling for detecting 5 switches. my suggestion for you to choose Atmega 168/328 to make use of PIN change interrupt.
Thanks for the help.
I think polling will be a better option as I may need multiple functions at the same time. From my knolwedge polling will help with switch bouncing.
Thanks
it depends upon what u want to do actually. for light and switch its simple input output devices. no need to have interrupts