Top Banner
Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection pin (Pin 5, PD3) is at a low level. ...when using interrupt to detect a switch press.
18

Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

Dec 17, 2015

Download

Documents

Godwin Melton
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

Asuro Switches/Interrup behaviour

The Asuro Atmega8L is initialized in such a waythat switch interrupts are detected as long as theinterrupt detection pin (Pin 5, PD3) is at a low level.

...when using interrupt todetect a switch press.

Page 2: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

Switch K1

Pin5 = I/L

Page 3: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

High level by R23,1MOhm to VCC

Switch K1

Pin5 = I/L

Page 4: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

Switch K1is pressed

High level by R23,1MOhm to VCC

Switch K1

Pin5 = I/L

Page 5: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

Switch K1is pressed

High level by R23,1MOhm to VCC

External interruptlow level reached

Switch K1

Pin5 = I/L

Page 6: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

Switch K1is pressed

High level by R23,1MOhm to VCC

External interruptlow level reached

Pin5=O/H

Switch K1

Pin5 = I/L

Interrupt functionstarts execution

Page 7: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

Switch K1is pressed

High level by R23,1MOhm to VCC

External interruptlow level reached

Pin5=O/H

Switch K1pressed,stable level

Switch K1

Pin5 = I/L

Page 8: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

Switch K1

Switch K1pressedstable level

Switch K1is pressed

Page 9: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

Switch K2

Switch K2pressedstable level

Switch K2is pressed

Page 10: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

Switch K3

Switch K3pressedstable level

Switch K3is pressed

Page 11: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

Switch K4

Switch K4pressedstable levelSwitch K4

is pressed

Page 12: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

Switch K5

Switch K5pressedstable levelSwitch K5

is pressed

Page 13: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

Switch K6

Switch K6pressedstable level

Switch K6is pressed

Page 14: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

Switch K1is pressed Switch K1

pressedstable level

6ms delay

Start ADCmeasurement ADC

measurementfinished,Pin5=I/H

Switch K1still pressed

Switch K1

an arbitrary delay

Page 15: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

Switch K3is pressed

Switch K3pressedstable level

6ms delay

Switch K3still pressed

Pin5=I/L Pin5=O/H

Switch K3pressedstable level

Switch K3

Switchinterruptenabled

Switchinterruptdisabled

Time neededby programto handle interrupt

New interrupt.Interrupt generatedwhen low level.

Page 16: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

Switch K3

Pin5=I/L

Switch K3released

High level by R23,1MOhm to VCC

Page 17: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

Switch K1

Switch K3pressedstable level

6ms delay 6ms delay

Pin5=O/H

Switch K3released

Start ADCmeasurement

Wrong valuemeasurement

Sometimes a wrong value can be measured.

Page 18: Asuro Switches/Interrup behaviour The Asuro Atmega8L is initialized in such a way that switch interrupts are detected as long as the interrupt detection.

That’s all folks!

Arexx_Henk

Website