Atmel STK511 User Manual page 29

Avr-based uni-directional radio starter kit
Hide thumbs Also See for STK511:
Table of Contents

Advertisement

STK511 Transmitter Board
KeepAlive:
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; routine: ISRPinChg
; calls: Debounce, S1S2Pressed, WDTStart
; called by: <uC interrupt firmware>
; function: services a single button-press; and, checks for simultaneous
; button press (for changing modulation modes)
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ISRPinChg:
ISRPinBoth:
SETmodeASK:
5-6
4842B–AVR–10/09
RJMP
Main
PUSH
R19
IN
r31, SREG
CLI
WDR
RCALL
Debounce
IN
r16, PINB
CPI
R16,0x06
BREQ
ISRPinBoth
CPI
R16,0x02
BREQ
ISRPinS2
CPI
R16,0x04
BREQ
ISRPinS1
RJMP
ISRPinChgEnd; TP - Exit if glitch
CPI
MODE,FSK
BREQ
SETmodeASK
LDI
mode,FSK
RJMP
ISRPinLoop
; TP - All functions must have push and pop
statements!
; save Status Register
; TP - Disable interrupts
; TP - Clear watchdog timer
; TP - Add delay for debounce
; see which button was pushed
; TP - IF BOTH
; TP - IF only S2
; TP - IF only S1
; TP - For both buttons pressed, check current
state
; TP - If currently FSK, set mode to ASK
; TP - If not FSK, set mode to FSK
; TP - Exit button ISR when buttons released
STK511 User Guide

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STK511 and is the answer not in the manual?

Questions and answers

Table of Contents