summaryrefslogtreecommitdiff
path: root/cmpen472hw11_McDonnell/bin
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2025-04-14 17:40:23 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2025-04-14 17:40:23 -0400
commite6f241df0461a3533ea28f9014f84d922e964728 (patch)
treeb59eb0cd784829807ca072ad8ceb187f355fe605 /cmpen472hw11_McDonnell/bin
parent74dbec90535fa58a12366852d8cea73e7b9e0d65 (diff)
HW 11: Switched back to Channel 5 timer
Diffstat (limited to 'cmpen472hw11_McDonnell/bin')
-rw-r--r--cmpen472hw11_McDonnell/bin/Project.absbin11102 -> 11102 bytes
-rw-r--r--cmpen472hw11_McDonnell/bin/Project.abs.phy2
-rw-r--r--cmpen472hw11_McDonnell/bin/Project.abs.s198
-rw-r--r--cmpen472hw11_McDonnell/bin/main.dbg52
4 files changed, 31 insertions, 31 deletions
diff --git a/cmpen472hw11_McDonnell/bin/Project.abs b/cmpen472hw11_McDonnell/bin/Project.abs
index 00be395..444df62 100644
--- a/cmpen472hw11_McDonnell/bin/Project.abs
+++ b/cmpen472hw11_McDonnell/bin/Project.abs
Binary files differ
diff --git a/cmpen472hw11_McDonnell/bin/Project.abs.phy b/cmpen472hw11_McDonnell/bin/Project.abs.phy
index e33610b..d33700a 100644
--- a/cmpen472hw11_McDonnell/bin/Project.abs.phy
+++ b/cmpen472hw11_McDonnell/bin/Project.abs.phy
@@ -1,4 +1,4 @@
S0590000433A5C55736572735C4A61636F62204D63446F6E6E656C6C5C446F63756D656E74735C434D50454E2D3437322D48575C636D70656E343732687731315F4D63446F6E6E656C6C5C62696E5C50726F6A6563742E6162731D
-S2060FFFEC31AE20
+S2060FFFE431AE28
S2060FFFF0315D6D
S9030000FC
diff --git a/cmpen472hw11_McDonnell/bin/Project.abs.s19 b/cmpen472hw11_McDonnell/bin/Project.abs.s19
index 5a796a6..1c56f17 100644
--- a/cmpen472hw11_McDonnell/bin/Project.abs.s19
+++ b/cmpen472hw11_McDonnell/bin/Project.abs.s19
@@ -7,7 +7,7 @@ S1233120FF5A0310EFCE37331635D6CE3030FD30411635E2CE3030163337CE3030FD3041C4
S12331401635C720E014104D3880CE36261635D616360D9727FA5A0116360620F34C378011
S123316010EFFE302C087E302C8E00C8263FCE00007E302CFE302A087E302A8E003C262A5B
S1233180CE00007E302AFE3028087E30288E003C2618CE00007E3028FE3026087E30268EE7
-S12331A000182606CE00007E30261633010BFC3047D3525C524C4E2286017A304BFC3045E1
+S12331A000182606CE00007E30261633010BFC3047D35A5C5A4C4E2086017A304BFC3045D3
S12331C0C300017C3045BC304925031632D50B3B35B6304E81541827008A8174182700AC8F
S12331E081511827002B81711827005087F63044CD300016355836860D163606860A163686
S12332000632F3304C8C0100182500A4C71820009F87C6FFCD300016355836860D163606F0
@@ -15,8 +15,8 @@ S1233220860A1636063287F63044F3304C8C01001825007CC786717A304E207487C7CD303B
S12332400016355836860D163606860A1636063287F63044F3304C8C01002554C786517A1A
S1233260304E204C87F63044CD300016355836860D163606860A16360632F3304C8C0100A4
S1233280252E86747A304E830001202487F63044CD300016355836860D163606860A163695
-S12332A00632B3304C8C00002D0686547A304EC77B3044313A3D3B86025A405A4C86805A51
-S12332C04686005A4DFC3047D3445C524C4E0286025A4C3A3D36875A4C323D3BCC00007CA9
+S12332A00632B3304C8C00002D0686547A304EC77B3044313A3D3B86205A405A4C86805A33
+S12332C04686005A4DFC3047D3445C5A4C4E0286205A4C3A3D36875A4C323D3BCC00007C83
S12332E030457A30441632B6B6304B27FB877A304B1631CFFC3045BC304925EC1632D53A76
S12333003D3BB6304381682605FC3026200C816D2605FC30282003FC302A16331F3A3D3B76
S123332034CE000A181037B7D4CE000A58585858EAB05B01303A3D3B35A630182701C381F4
@@ -74,6 +74,6 @@ S1233980207365676D656E7420646973706C6179730D0A733A20446973706C6179207468D1
S12339A065207365636F6E6473206F6E207468652037207365676D656E7420646973706C8B
S12339C06179730D0A713A2053746F702074686520636C6F636B20616E6420656E746572F0
S11139E020747970657772697465720D0A003F
-S105FFEC31AE30
+S105FFE431AE38
S105FFF0315D7D
S9030000FC
diff --git a/cmpen472hw11_McDonnell/bin/main.dbg b/cmpen472hw11_McDonnell/bin/main.dbg
index 1b74a74..a4a7b7a 100644
--- a/cmpen472hw11_McDonnell/bin/main.dbg
+++ b/cmpen472hw11_McDonnell/bin/main.dbg
@@ -66,7 +66,7 @@ TCNTH EQU $0044 ; Timer free runing main counter
TSCR1 EQU $0046 ; Timer system control 1
TSCR2 EQU $004D ; Timer system control 2
TFLG1 EQU $004E ; Timer interrupt flag 1
-TC1H EQU $0052 ; Timer channel 1 register
+TC5H EQU $005A ; Timer channel 5 register
CR equ $0d ; carriage return, ASCII 'Return' key
LF equ $0a ; line feed, ASCII 'next line' character
@@ -132,10 +132,10 @@ waveType dc.b 'S' ; Used to track wave type 'T' for increa
dc.w rtiisr ; Real Time Interrupt vector
*
**************************************************************************
-* Timer Interrupt Vector Section: address used [ $FFEC to $FFED ] RAM Memory
+* Timer Interrupt Vector Section: address used [ $FFE4 to $FFE5 ] RAM Memory
*
- org $FFEC ; Timer channel 1 interrupt vector setup, on simulator
- dc.w oc1isr
+ org $FFE4 ; Timer channel 5 interrupt vector setup, on simulator
+ dc.w oc5isr
*
**************************************************************************
* Program Section: address used [ $3100 to $3FFF ] RAM Memory
@@ -248,7 +248,7 @@ rtidone jsr PrintTime ; Jump to PrintTime
rtiSkip RTI ; Return from RTI ISR
;*************************************************************************
-; oc1isr subroutine
+; oc5isr subroutine
;
; This subroutine will set a flag after a set number of cycles.
;
@@ -261,19 +261,19 @@ rtiSkip RTI ; Return from RTI ISR
; Comments: The timer will stop after outputCnt == numPoints
;
-oc1isr ldd interval ; Load the interval for the next clock cycle
- addd TC1H ; for next interrupt
- std TC1H ;
- bset TFLG1,%00100010 ; Clear CH1 interrupt flag
+oc5isr ldd interval ; Load the interval for the next clock cycle
+ addd TC5H ; for next interrupt
+ std TC5H ;
+ bset TFLG1,%00100000 ; Clear CH5 interrupt flag
ldaa #1 ; Load 1 into A
staa timeTrigger ; Signal that timer went off
ldd outputCnt ; Load the count of values outputed into D
addd #1 ; Increase output count by 1
std outputCnt ; Update the count of outputted values
cpd numPoints ; Compare D to numPoints
- blo oc1Done ; If D < numPoints, Done
- jsr StopTimerCH1 ; Stop Channel 1 Timer
-oc1Done RTI ; Return from interrupt
+ blo oc5Done ; If D < numPoints, Done
+ jsr StopTimerCH5 ; Stop Channel 5 Timer
+oc5Done RTI ; Return from interrupt
;*************************************************************************
; PrintWave subroutine
@@ -396,9 +396,9 @@ DonePrint stab outputVal ; Store updated output value
rts ; Return from Caller
;*************************************************************************
-; StartTimer1oc subroutine
+; StartTimer5oc subroutine
;
-; This subroutine will enable & start the oc1 timer.
+; This subroutine will enable & start the oc5 timer.
;
; Input: Interval to set the next clock cycle
; Output: No output other
@@ -406,14 +406,14 @@ DonePrint stab outputVal ; Store updated output value
; Memory locations in use: All memory locations used for the oc5 timer.
; interval to set the next cycle.
;
-; Comments: The timer will be enabled only on channel 1 for output compare.
+; Comments: The timer will be enabled only on channel 5 for output compare.
;
-StartTimer1oc
+StartTimer5oc
PSHD
- LDAA #%00000010
- STAA TIOS ; set CH1 Output Compare
- STAA TIE ; set CH1 interrupt Enable
+ LDAA #%00100000
+ STAA TIOS ; set CH5 Output Compare
+ STAA TIE ; set CH5 interrupt Enable
LDAA #%10000000 ; enable timer, Fast Flag Clear not set
STAA TSCR1
LDAA #%00000000 ; TOI Off, TCRE Off, TCLK = BCLK/1
@@ -421,16 +421,16 @@ StartTimer1oc
LDD interval ; 125usec with (24MHz/1 clock)
ADDD TCNTH ; for first interrupt
- STD TC1H ;
+ STD TC5H ;
BSET TFLG1,%00000010 ; initial Timer CH5 interrupt flag Clear, not needed if fast clear set
- LDAA #%00000010
- STAA TIE ; set CH1 interrupt Enable
+ LDAA #%00100000
+ STAA TIE ; set CH5 interrupt Enable
PULD
RTS
;*************************************************************************
-; StopTimerCH1 subroutine
+; StopTimerCH5 subroutine
;
; This subroutine will stop and disable the timer.
;
@@ -442,7 +442,7 @@ StartTimer1oc
; Comments: The timer will be disabled on all channels.
;
-StopTimerCH1
+StopTimerCH5
psha ; Save A to the stack
clra ; Clear A
staa TIE ; Stop Timers
@@ -472,7 +472,7 @@ GenWave
std outputCnt ; Clear outputCnt
staa outputVal ; Clear outputVal
- jsr StartTimer1oc ; Start Timer on CH1
+ jsr StartTimer5oc ; Start Timer on CH5
genLoop ldaa timeTrigger ; Load timeTrigger into A
beq genLoop ; If A == 0, loop
@@ -483,7 +483,7 @@ genLoop ldaa timeTrigger ; Load timeTrigger into A
cpd numPoints ; Compare D to numPoints
blo genLoop ; If D < numPoints, Loop
- jsr StopTimerCH1 ; Turn off timer
+ jsr StopTimerCH5 ; Turn off timer
puld ; Restore D from the stack
rts ; Return