ATtiny2313A.asm 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. ; Автор: shilow@ukr.net
  2. ; Дата:
  3. ; Название:
  4. ; Версия:
  5. ; Имя файла:
  6. ; Для AVR: ATTiny2313
  7. ; Тактовая частота: 8 МГц
  8. ; Выполняемые функции:
  9. ; Шаблон для ATtiny2313
  10. ;
  11. .listmac ; развернём макросы
  12. .nolist
  13. .include "tn2313adef.inc"
  14. .list
  15. ;******************************
  16. ; ячейки в СОЗУ
  17. .DSEG
  18. ;.ORG SRAM_START
  19. Sample: .byte 30
  20. ;
  21. rjmp RESET ; Reset Handler
  22. rjmp INT0 ; External Interrupt0 Handler
  23. rjmp INT1 ; External Interrupt1 Handler
  24. rjmp TIM1_CAPT ; Timer1 Capture Handler
  25. rjmp TIM1_COMPA ; Timer1 CompareA Handler
  26. rjmp TIM1_OVF ; Timer1 Overflow Handler
  27. rjmp TIM0_OVF ; Timer0 Overflow Handler
  28. rjmp USART0_RXC ; USART0 RX Complete Handler
  29. rjmp USART0_DRE ; USART0,UDR Empty Handler
  30. rjmp USART0_TXC ; USART0 TX Complete Handler
  31. rjmp ANA_COMP ; Analog Comparator Handler
  32. rjmp PCINT ; Pin Change Interrupt
  33. rjmp TIMER1_COMPB ; Timer1 Compare B Handler
  34. rjmp TIMER0_COMPA ; Timer0 Compare A Handler
  35. rjmp TIMER0_COMPB ; Timer0 Compare B Handler
  36. rjmp USI_START ; USI Start Handler
  37. rjmp USI_OVERFLOW ; USI Overflow Handler
  38. rjmp EE_READY ; EEPROM Ready Handler
  39. rjmp WDT_OVERFLOW ; Watchdog Overflow Handler
  40. ;
  41. RESET: ldi r16,low(RAMEND) ; Main program start
  42. out SPL,r16 ; Set Stack Pointer to top of RAM
  43. sei ; Enable interrupts
  44. BEGIN:
  45. ;;;;
  46. rjmp BEGIN
  47. ;
  48. ; External Interrupt0 Handler
  49. INT0:
  50. reti
  51. ; External Interrupt1 Handler
  52. INT1:
  53. reti
  54. ; Timer1 Capture Handler
  55. TIM1_CAPT:
  56. reti
  57. ; Timer1 CompareA Handler
  58. TIM1_COMPA:
  59. reti
  60. ; Timer1 Overflow Handler
  61. TIM1_OVF:
  62. reti
  63. ; Timer0 Overflow Handler
  64. TIM0_OVF:
  65. reti
  66. ; USART0 RX Complete Handler
  67. USART0_RXC:
  68. reti
  69. ; USART0,UDR Empty Handler
  70. USART0_DRE:
  71. reti
  72. ; USART0 TX Complete Handler
  73. USART0_TXC:
  74. reti
  75. ; Analog Comparator Handler
  76. ANA_COMP:
  77. reti
  78. ; Pin Change Interrupt
  79. PCINT:
  80. reti
  81. ; Timer1 Compare B Handler
  82. TIMER1_COMPB:
  83. reti
  84. ; Timer0 Compare A Handler
  85. TIMER0_COMPA:
  86. reti
  87. ; Timer0 Compare B Handler
  88. TIMER0_COMPB:
  89. reti
  90. ; USI Start Handler
  91. USI_START:
  92. reti
  93. ; USI Overflow Handler
  94. USI_OVERFLOW:
  95. reti
  96. ; EEPROM Ready Handler
  97. EE_READY:
  98. reti
  99. ; Watchdog Overflow Handler
  100. WDT_OVERFLOW:
  101. reti