This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:exercises:timer [2010/03/04 17:53] – priitj | en:exercises:timer [2020/07/20 09:00] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Exercises ====== | ====== Exercises ====== | ||
- | The goal is to write a program | + | The goal is to write a program |
===== Warm up exercise ===== | ===== Warm up exercise ===== | ||
- | * Make the red LED blink. The period is 10 seconds (half period is 5 seconds). Create function of software delay, | + | * Make the red LED blink. The period is 10 seconds (half period is 5 seconds). Create function of software delay, |
===== For beginners ===== | ===== For beginners ===== | ||
- | - Display | + | - Display on LCD screen, with the accuracy of 100 ms, time between |
- | - If the S1 button is pressed, the blinking speed of all three LED-s is slowed down three times. | + | - Pressing button |
- Display the frequency of pressing down the button S1 on the 7 segment LED indicator in Hz-s. The display of the frequency must be limited with 0 at the bottom and with 9 at the top. | - Display the frequency of pressing down the button S1 on the 7 segment LED indicator in Hz-s. The display of the frequency must be limited with 0 at the bottom and with 9 at the top. | ||
- | - If button S1 is pressed, the program | + | - If button S1 is pressed, the program |
- | - Display the Time on the LCD as follows: hh:mm:ss. Use hardware timer with one interruption | + | - Display the Time on the LCD as follows: hh:mm:ss. Use hardware timer 1 with interruptions |
===== For advanced ===== | ===== For advanced ===== | ||
- | - Teha stopper, mis LCD ekraanil kuvab tunde, minuteid, sekundeid ja millisekundeid. Nupp S1 alustab mõõtmist, S2 peatab mõõtmise ja S3 nullib aja. Kasutada tuleb taimeri katkestust. | + | - Design a stopwatch, which displays hours, minutes, seconds and milliseconds on LCD screen. Button |
- | - 2-sekundilise vahega süttib ja kustub sujuvalt järjest punane, kollane ja roheline | + | - In 2 second intervals red, yellow and green LED are smoothly lit and switched off after each other. The smooth lighting is achieved by modulating the LEDs with hundredths of hertz (by lighting and switching it off very fast) and by changing the proportions between lighted/switched off time, causing to appear for the eye, that the brightness of the LEDs is changing |
- | - Tekitada | + | - Make a part of program in C-language which produces a delay of 10 μs ± 10 % at frequency of 14,7456 MHz. Verify the functioning of the delay theoretically |
- | ===== Kordamisküsimused | + | ===== Questions |
- | - Millised meetodid on viite tekitamiseks? | + | - What are the methods for crating delay? |
- | - Kuidas tekitada tarkvaraline viide? Millistest parameetritest tarkvaralise viite kestus sõltub? | + | - How is software delay created? On which parameters depends the duration of the software delay? |
- | - Mis sunnib kasutama raudvaralist taimerit koos katkestusega? | + | - What makes us use hardware delay/timer with interruptions? |
- | - Arvutage | + | - Calculate the overflow interruption period for 8-bit timer, if the clock rate is 16 MHz and frequency divider' |
- | - Mis asi on arvutites peituv "RTC"? | + | - What is RTC hidden in the computers? |
- | - Mis juhtub | + | - What happens on the 19.01.2038 in the world of computers? |
- | - Mida saab AVR taimeritega veel teha peale aja loendamise? | + | - What can be done with the AVR timers besides counting time? |
- | - Milliste registritega saab seadistada | + | - What indexes can be used to set up the ATmega128 |
- | - Milline on suurim katkestuste ajaline täpsus millisekundites, | + | - Which is the longest duration of the interruptions in milliseconds which can be achieved with ATmega128 |
- | - Kui protsessor on tugevalt koormatud programmi täitmisega | + | - In case the processor is heavily loaded with an execution of a program |