Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:exercises:timer [2010/03/04 17:31] priitjen:exercises:timer [2020/07/20 09:00] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Exercises ====== ====== Exercises ======
  
-Eesmärgiks on koostada programm, mis täidab kirjeldatud ülesannet+The goal is to write a program performing tasks described below
  
-===== Soojendusülesanne =====+===== Warm up exercise =====
  
-  * Panna punane LED vilkuma 10-sekundilise perioodiga (poolperiood s). Teostamiseks luua tarkvaralise viite funktsioonmille parameetriks on sekundite arv.+  * Make the red LED blink. The period is 10 seconds (half period is seconds). Create function of software delaywith amount of seconds as a parameter.
  
-===== Algajale =====+===== For beginners =====
  
-  - LCD ekraanil kuvada aega 100 ms täpsusegamis kulub suvaliste nuppude allavajutamiste vahel. Aja mõõtmise teostus vabal valikul+  - Display on LCD screen, with the accuracy of 100 ms, time between pressing of any random two buttonsExecution of the time measurement is your own choice 
-  - Vajutades nuppu S1,aeglustub kõigi kolme LED vilkumine  2 korda, vajutades nuppu S3, sageneb vilkumine  korda, ja vajutades nuppu S2, määratakse vilkumise sageduseks 1 Hz. Kasutada viitefunktsioone või katkestusi. (Katkestused on keerukamad, kuid viitefunktsioonidega tekib nuppude filtreerimisfunktsiooni tõttu lisaviide.) +  - Pressing button S1, the blinking speed of all three LEDs is slowed down two times.  Pressing button S3, the blinking gets times faster and pressing button S2 the frequency of the blinking will be set to 1 Hz. Use delay functions or interruptions (the interruptions are more difficult but when delay functions are used there will be an extra delay due to the filtering function of the buttons)
-  - 7-segmendilisel LED indikaatoril kuvada nupu S1 vajutamise sagedust hertsidesSageduse näit tuleb piirata madalamalt nulli ja kõrgemalt üheksaga+  - Display the frequency of pressing down the button S1 on the segment LED indicator in Hz-sThe display of the frequency must be limited with 0 at the bottom and with 9 at the top.  
-  - Nupule S1 vajutades loendab programm sekundeid 60-st nulli ja süütab seejärel punase LED-iNupule S2 vajutades on ajaks on 30 sekunditmisjärel süüdatakse kollane LED. Nupp S3 aeg on 10 sekundit ja LED on rohelineKõik protsessid peavad toimima paralleelseltLED-id kustuvad, kui  vajutada vastavaid nuppe+  - If button S1 is pressed, the program counts down the seconds from 60 to 0 and then lights the red LED. If button S2 is pressed the time is 30 secondsfollowed by lighting of the yellow LED.  For S3 the time is 10 seconds and the LED is greenAll the processes have to take place simultaneouslyThe LEDs switch off when corresponding buttons are pressed
-  - Näidata LCD ekraanil kellaaega kujul hh:mm:ss. Kasutada tuleb raudvaralist taimerit koos katkestustega ja kellaaeg peab nuppudega seadistatav olemaSoovitatav on kasutada 3 nuppumillest S1 suurendab roteeruvalt tunde, S2 minuteid ja S3 sekundeid.+  - Display the Time on the LCD as follows: hh:mm:ss. Use hardware timer with interruptions and the Time must be configurable with the buttonsIt is advised to use three buttons, S1 for increasing rotationally the hours, S2 for minutes and S3 for seconds.
  
-===== Edasijõudnule =====+===== For advanced =====
  
-  - Teha stoppermis LCD ekraanil kuvab tundeminuteidsekundeid ja millisekundeidNupp S1 alustab mõõtmist, S2 peatab mõõtmise ja S3 nullib ajaKasutada tuleb taimeri katkestust+  - Design a stopwatchwhich displays hoursminutesseconds and milliseconds on LCD screenButton S1 starts the time, S2 stops it and S3 zeros itInterruption of the timer must be used
-  - 2-sekundilise vahega süttib ja kustub sujuvalt järjest punanekollane ja roheline LED. Sujuv valgustus saadakse LED-i mitmesajahertsise sagedusega moduleerides (seda ülikiiresti süüdates ja kustutadesja põlemise/kustumise aja proportsioone muutesmistõttu silmale paistabet LED-i heledus muutub (tegu on pulsilaiusmodulatsiooniga). +  - In second intervals redyellow and green LED are smoothly lit and switched off after each otherThe smooth lighting is achieved by modulating the LEDs with hundredths of hertz (by lighting and switching it off very fastand by changing the proportions between lighted/switched off timecausing to appear for the  eyethat the brightness of the LEDs is changing (this is Pulse With Modulation). 
-  - Tekitada C-keelde programmilõik, mis tekitab 14.7456 MHz taktsagedusel 10 μs ± 10 % viiteViite toime tõestada teoreetiliselt kompileeritud programmi .lss failis olevaid assemblerkeele instruktsioone kommenteerides.+  - Make a part of program in C-language which produces a delay of 10 μs ± 10 % at frequency of 14,7456 MHzVerify the functioning of the delay theoretically compiled program. By commenting the instructions in assembler language in the .lss file of compiled program
  
-===== Kordamisküsimused =====+===== Questions =====
  
-  - Millised meetodid on viite tekitamiseks+  - What are the methods for crating delay
-  - Kuidas tekitada tarkvaraline viideMillistest parameetritest tarkvaralise viite kestus sõltub+  - How is software delay createdOn 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 8-bitise taimeri ületäitumise katkestuse perioodkui taktsagedus on 16 MHz ja sagedusjaguri tegur 1024. +  - Calculate the overflow interruption period for 8-bit timerif the clock rate is 16 MHz and frequency divider's factor is 1024. 
-  - Mis asi on arvutites peituv "RTC"+  - What is RTC hidden in the computers
-  - Mis juhtub 19. jaanuaril 2038 arvutite maailmas+  - 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 ATmega128 taimer 0. Mida on nende registritega võimalik seadistada+  - What indexes can be used to set up the ATmega128 timer 0? What can be adjusted with these registers
-  - Milline on suurim katkestuste ajaline täpsus millisekundites, mida on võimalik saavutada ATmega128 mikrokontrollerigamis töötab 14.7456 MHz taktsageduselNäidake arvutusvalem+  - Which is the longest duration of the interruptions in milliseconds which can be achieved with ATmega128 micro-controller that work at the clock frequency of 14,7456 MHz? Show the calculation formula
-  - Kui protsessor on tugevalt koormatud programmi täitmisega (näiteks juhib mitut mootorit ja kontrollib pidevalt paljude andurite väärtusi), siis kas see mõjutab taimeri aja mõõtmise täpsustSelgitage oma vastust.+  - In case the processor is heavily loaded with an execution of a program (for example, it controls several motors and the values of several sensors at once), does this have an effect on the accuracy of the timerExplain your answer.
en/exercises/timer.1267723913.txt.gz · Last modified: 2020/07/20 09:00 (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0