From 90c200e6a9c7d98f37217b8e82c1efdcce0a982f Mon Sep 17 00:00:00 2001 From: "Daniele Verducci (ZenPenguin)" Date: Sun, 10 Jan 2021 11:30:47 +0100 Subject: [PATCH] Not working implementation of timer-driven video signal generation 2 --- .../composite-pal-adapter/software/avr-assembly/main.asm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pat80-io-devices/composite-pal-adapter/software/avr-assembly/main.asm b/pat80-io-devices/composite-pal-adapter/software/avr-assembly/main.asm index acc5f94..fb2d76e 100644 --- a/pat80-io-devices/composite-pal-adapter/software/avr-assembly/main.asm +++ b/pat80-io-devices/composite-pal-adapter/software/avr-assembly/main.asm @@ -85,8 +85,11 @@ main: ; Set prescaler to 1:1 (TCCR1B is XXXXX001) ldi r16, 0b00000001 sts TCCR1B, r16 + ; Clear pending interrupts + ldi r16, 0b00000001 + out TIFR1,r16 ; Enable timer1 overflow interrupt(TOIE1): the interrupt 1 will be fired when timer resets - ldi r16, 0b00000100 + ldi r16, 0b00000001 sts TIMSK1, r16 ; The Global Interrupt Enable bit must be set for the interrupts to be enabled. ldi r16, 0b10000000