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:multiasm:exercisesbook:avr:sut:scenarios:avr5 [2026/05/04 13:25] pczekalskien:multiasm:exercisesbook:avr:sut:scenarios:avr5 [2026/05/04 13:27] (current) pczekalski
Line 133: Line 133:
     ret     ret
 </code> </code>
-<note tip>Remember that the ''delay_N_ms'' function operates on 8-bit arguments, so the maximum delay is 255ms. If you need a longer one, modify it so it works wit 16-bit arguments (''r25:r24'')</note>+<note tip>Remember that the ''delay_N_ms'' function operates on 8-bit arguments, so the maximum delay is 255ms. If you need a longer one, modify it so it works with 16-bit arguments (''r25:r24'')</note>
  
 +** Step 5 **\\
 +Set the main loop. Here you're on your own, but the hint for the algorithm to have a real heartbeat is as follows:
 +<code>
 +loop infinitely:
 +    // --- First beat (Lub) ---
 +    pulse()
 +    delay(200)   // Wait 200 milliseconds
 +
 +    // --- Second beat (Dub) ---
 +    pulse()
 +    delay(750)   // Wait 750 milliseconds (250 + 250 + 250)
 +</code>
  
 ** Result validation **\\ ** Result validation **\\
en/multiasm/exercisesbook/avr/sut/scenarios/avr5.1777890308.txt.gz · Last modified: by pczekalski
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