This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:multiasm:exercisesbook:avr:sut [2026/04/30 10:46] – [Handling of the buffered 4-digit, 7-segment display] pczekalski | en:multiasm:exercisesbook:avr:sut [2026/05/04 14:50] (current) – [Visualising Instruction Execution Time Using an Oscilloscope] pczekalski | ||
|---|---|---|---|
| Line 340: | Line 340: | ||
| <note tip> | <note tip> | ||
| + | |||
| + | ==== Visualising Instruction Execution Time Using an Oscilloscope ==== | ||
| + | Let's try to visualise how code operates the GPIO. Naturally, in the remote lab, it is not possible to do it remotely, so here we present some desk-based experiments.\\ | ||
| + | The '' | ||
| + | In the function that displays a single digit, there is a section that loads a binary mask into the internal registers, enabling the LED segments that constitute the digit to be turned on and off. It is: | ||
| + | <code asm> | ||
| + | ... | ||
| + | sbi LAT_PORT, LAT_PIN | ||
| + | cbi LAT_PORT, LAT_PIN | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | The figures {{ref> | ||
| + | '' | ||
| + | The Arduino Uno operates at 16 MHz, so each cycle is 1/16000000 s, which is about 63 ns. According to the documentation, | ||
| + | |||
| + | <figure arduinounodigitoscilloscope1> | ||
| + | {{: | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | <figure arduinounodigitoscilloscope2> | ||
| + | {{: | ||
| + | < | ||
| + | </ | ||