SHARE
TWEET

Untitled

a guest Nov 12th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; *****************************************************
  2. ; BASIC .ASM template file for AVR
  3. ; ******************************************************
  4.  
  5. .include "E:\VMLAB\include\m32def.inc"
  6.  
  7.  
  8. setup:
  9.     ldi r16,high(ramend)
  10.     out sph,r16
  11.     ldi r16,low(ramend)
  12.     out spl,r16
  13.     ldi r16,0xFF
  14.     out ddra,r16
  15.     ldi r16, 0b11001100
  16.     out porta,r16
  17.     sbi portc,0
  18.     cbi ddrc,0
  19.    
  20.    
  21. program:
  22.     rcall laduj_rejestry
  23.     rcall delay_dec
  24.     out porta,r16
  25.    com r16
  26.    sbis pinc,0
  27.    rjmp wcisniety
  28.     rjmp program
  29.    
  30. wcisniety:
  31.    cbi porta,0
  32.    cbi porta,2
  33.    cbi porta,4
  34.    cbi porta,6
  35.    rjmp program
  36.  
  37. delay_dec:
  38.      dec  r20
  39.     brne delay_dec
  40.     dec  r19
  41.     brne delay_dec
  42.     dec  r18
  43.     brne delay_dec
  44.      ret
  45.    
  46. laduj_rejestry:
  47.    ldi  r18, 3
  48.     ldi  r19, 8
  49.     ldi  r20, 120
  50.     ret
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top