Lecture_02 - week 2 - Flashing LEDS & delays

Lecture_02 - week 2 - Flashing LEDS & delays -...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture week 2 SEE215
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
A LED can be flashed on and off continuously by - turning it ON - for a period of time & - then turning it OFF - for a period of time - repeating the cycle. Flashing LEDS START INIT LED ON LED OFF Timer ON Timer OFF
Background image of page 2
Press any key(s) Flash LED (s) associated with that key The key may be released during the OFF time and any other key(s) pressed for the next cycle. As each delay is one second, we can make use of subroutines. Specification of flasher
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Flashing LEDS START INIT LED ON LED OFF 1 sec. delay 1 sec. delay Sub-routine symbol Delay for one second return 1 sec. delay
Background image of page 4
1. To implement a 1 second timer, we could execute 16,000,000 nop or no-operation The nop instruction does nothing but takes one clock cycle to execute. This cannot be done as the ATMega128 can only support 65327 instructions. Timer algorithm development
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2. Alternatively we could implement a one second timer by executing one nop 16,000,000 times. We could implement this by using
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/27/2009 for the course SEB 323 - S taught by Professor Professor during the Three '09 term at Deakin.

Page1 / 18

Lecture_02 - week 2 - Flashing LEDS & delays -...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online