Informace ke cvičení "NPRG037 Programování mikrokontrolérů"

NPRG037 Microcontroller programming tutorials

2021/2022 winter term

- The course and tutorial is held in English, questions may be asked in English, Czech, Slovak (and other languages I can understand).
- For programming, we will use Microchip Studio (free download from Microchip website)
- The slides are mostly generic, but many places describe ATmega128 (our recent educational modules are using it).
- This year, we will probably use the "ATmega328PB Xplained Mini" boards first (maybe later replaced by other boards). Therefore, find & fetch the ATmega328PB datasheet + AVR Instruction Set Manual + ATmega328PB Xplained Mini Board documentation (all availabe in PDF at Microchip website)
- If you want to use other AVR based board, discuss it with me in advance and mind the differences.
- Homeworks are to be submitted via SiS. If you miss the class/tutorial, ask about the setup.

NEWS:
- No class/tutorial on Oct 22 + 29. Instead, do these tasks (submit via SIS):
-- T1: Light up the LED at B5
     Immediately after reset, just light up the LED connected to B5.
-- T2: "if" construct
     Write in assembly a snippet of code equivalent of the following C/C++ construct:

    if( r1 == r0 )
    	A();
    else
    	B();
    C();

-- T3: LED blink
       Whenever the button is pressed, blink the LED (button released -> LED off).
       Button is connected to B7, LED to B5.
       Blinking frequency is not defined - just do it so that it is visible.
       Try to estimate the frequency by analysing your code and write the explanation.
-- T4: Hello World via USART
       At each button press, send "Hello World!" via USART (once per button press). 115200 8N1.
-- T5: Precise 1ms delay
       Write a "delay1ms" function, so that "RCALL delay1ms" takes exactly 1ms (i.e. including the RCALL and RET). Prove your solution is exact by proper code comments and calculations.
-- T6: Blink with watchdog
       After the board is started, LED blinks. When watchdog triggers, it stops. After another reset, it starts blinking again, until the watchdog triggers again.
 


2020/2021 winter term

- The course and tutorial is held in English, questions may be asked in English, Czech, Slovak (and other languages I can understand).
- Due to the government restrictions (Chinese flu and whichever else reason), both lecture and tutorials are held online (email me for details). Session recordings availabe, check slides.
- For programming, we will use Atmel Studio 7 (free download from Atmel website)
- The slides are mostly generic, but many places describe ATmega128 (our educational modules are using it), If you use other AVR based board, mind the differences.
- Homeworks are to be submitted via SiS. If you miss the class/tutorial, ask about the setup.