This is an old revision of the document!


Exercises

The goal is to write a program which is able to perform tasks described below.

Warm up exercise

  • It counts numbers 1…9 and then back 9…1 on the 7-segment indicator. The period of the counting is 1 second.

For beginner

  1. Present numbers in hexadecimal system randomly on the 7-segment display. The frequency is 1 Hz.
  2. Light into circling 6 outside segments on the 7-segment indicator with the period of 500 ms.
  3. On the alphanumerical LCD write the following text: “õun öö äpu ülo”
  4. Show special symbols on the alphanumerical LCD. Display the following text in two rows: “My program ©”, “Home Lab™”
  5. Display 10 rows of text on the graphic display which can be scrolled up and down using the buttons S1 and S2.
  6. Make user interface with three buttons for inserting text. For example, one button chooses the sign, second verifies the sign and the third verifies the text finally. The maximal length of the text is 10 signs and the text must be turned backwards and displayed on the second row. You may use just Latin alphabet. Choose the LCD.

For advanced

  1. Display Greek letters on the graphic LCD. Display the following rows: “Resistance Ω”, “∑R=∑πR²”, “π=3.141592”.
  2. Write a converter for converting decimal numbers to binary code. Use buttons S3-S1 for inserting decimal numbers (S3- hundredths, S2 – tenths, S1 – ones) in 10 seconds. For example, 4 presses of the button S3 mean the number 400. Present the sign for starting the insertion and the result in binary code on a random LCD.
  3. Write a function which displays a rectangle on the graphic LCD if the width, length and the coordinates of the top left corner are given. The width of the line is 1 pixel. Check if the rectangle fits inside the screen. It is advised to investigate the library of the Home Lab.
  4. Write a simple worm game on the graphic LCD. The width of the worm is 1 pixel and the length is 5 pixels. The worm can be made turning left and right wit the buttons. The worm must avoid collision with the border of the screen (turn before). Bonus points are for ability of picking up the eggs and growing worm. The simplest solution is to make the worm of the “O” letters.
  5. 5. Write a program for displaying different weather phenomenons on the graphic LCD. Sunny weather - icon of the Sun, rainy weather – a cloud with rain, cloudy weather – just a cloud, snow – snowflake. The size of the icons may vary, main thing is that the icons are clearly distinguished. There must be possibility to change the icons by pressing a button.

Questions

  1. Mitu viiku kasutab 7-segmendiline numbernäidik (koos punktisegmendiga), kui see on ühendatud kontrolleriga otse? Mitu viiku on vaja, kui numbernäidikut juhitakse läbi ajuri (driver - A6275)?
  2. Mis määrab 7-segmendilise numbernäidiku heleduse? Kuidas seda reguleerida, kui numbernäidikut juhitakse otse ja läbi ajuri (driver - A6275)?
  3. Kui 7-segmendiline numbernäidik on kontrolleriga otse ühendatud porti A nii, et segment A on PA0, B on PA1 … ja DP on PA7, siis millised on PORTA registri väärtused numbrite 0..9 korral?
  4. Mille poolest erineb alfabeetilise LCD 4-bitiline ja 8-bitiline juhtimimine?
  5. Milliste viikude kaudu reguleeritakse alfabeetilise LCD taustavalgust ja kuidas?
  6. Mis andmevahetusprotokolli kasutab graafiline LCD? Selgitage andmevahetusviikude tähendus.
  7. Kuidas teisendada kümnendsüsteemi arvu kahendsüsteemi arvuks (tekstikujule) ja vastupidi?
  8. Joonistage twisted nematic-tehnoloogias valmistatud LCD ekraani koostekihid.
  9. Kuidas moodustatakse graafilisel LCD-l tähed?
  10. Mille poolest erineb monokromaatiline (must-valge) ja värviline LCD ekraan?
en/exercises/display.1267802664.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