URL
https://opencores.org/ocsvn/rf6809/rf6809/trunk
Subversion Repositories rf6809
[/] [rf6809/] [trunk/] [software/] [boot/] [timer.asm] - Rev 12
Go to most recent revision | Compare with Previous | Blame | View Log
; ============================================================================; __; \\__/ o\ (C) 2022 Robert Finch, Waterloo; \ __ / All rights reserved.; \/_// robfinch<remove>@opencores.org; ||;;; Timer routines for a WDC6522 compatible circuit.;; This source file is free software: you can redistribute it and/or modify; it under the terms of the GNU Lesser General Public License as published; by the Free Software Foundation, either version 3 of the License, or; (at your option) any later version.;; This source file is distributed in the hope that it will be useful,; but WITHOUT ANY WARRANTY; without even the implied warranty of; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the; GNU General Public License for more details.;; You should have received a copy of the GNU General Public License; along with this program. If not, see <http://www.gnu.org/licenses/>.;; ============================================================================;TimerInit:ldd #$61A80 ; compare to 400000 (100 Hz assuming 40MHz clock)stb VIA+VIA_T3CMPLsta VIA+VIA_T3CMPHclr VIA+VIA_T3LLclr VIA+VIA_T3LHlda VIA+VIA_ACR ; set continuous mode for timerora #$100sta VIA+VIA_ACR ; enable timer #3 interruptslda #$810sta VIA+VIA_IERrtsTimerIRQ:; Reset the edge sense circuit in the PIClda #31 ; Timer is IRQ #31sta IrqSource ; stuff a byte indicating the IRQ source for PEEK()sta PIC+16 ; register 16 is edge sense reset reglda VIA+VIA_IFRbpl notTimerIRQbita #$800beq notTimerIRQclr VIA+VIA_T3LLclr VIA+VIA_T3LHinc $E00037 ; update timer IRQ screen flagnotTimerIRQ:rts
Go to most recent revision | Compare with Previous | Blame | View Log
