6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 9:25 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Aug 30, 2022 8:22 am 
Offline
User avatar

Joined: Wed Jul 27, 2022 6:14 am
Posts: 54
I'm currently implementing a simple timer (Jiffy Clock) for my SBC.
So I try timer 1 in free run mode and want to count interrupts but nothing happens.
I look at the /IRQ pin of the 6522 with my logic analyzer and nothing happens there either.
My initialization currently looks like this:

Code:
    sei
   lda #%01111111
     sta VIA_IER  ; disable all interrupts
   ; setting free run mode with interrupts enabled
   lda #%01000000
     sta VIA_ACR     
   lda #%11000000
     sta VIA_IER  ; enable interrupt for timer 1
   ; setting the vias timer 1 in free run mode, jiffy timer, load with
   lda #<JIFFY_VIA_TIMER_LOAD
   sta VIA_T1LL
   lda #>JIFFY_VIA_TIMER_LOAD
   sta VIA_T1LH
   cli

i also tried #%11000000, so that i can see an output on the PB7 pin, PB7 works, but no signal on the IRQ Pin.
When i trigger manually the IRQ Pin the IRQ Service routine worked.
IRQ is wired as wired-OR with an 3k3 Resistor to +5V.
The 6522 is an N Type- so should be ok with wired OR.

PS.: i did not change the IC.

_________________
don't count on me, i'm engineer (Animotion)
my arduino pages: http://rcarduino.de


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 30, 2022 9:03 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
Write to T1CL and T1CH. I show how to do it in the 6502 interrupts primer, a little below the middle of the page. http://wilsonminesco.com/6502interrupts/#2.1 takes you to that section, and then the code starts several paragraphs below that.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 30, 2022 11:38 am 
Offline
User avatar

Joined: Wed Jul 27, 2022 6:14 am
Posts: 54
GARTHWILSON wrote:
Write to T1CL and T1CH. I show how to do it in the 6502 interrupts primer, a little below the middle of the page. http://wilsonminesco.com/6502interrupts/#2.1 takes you to that section, and then the code starts several paragraphs below that.

:oops:
I've seen it, I've read it and I ignored it when programming... sry :?
Jiffy Clock is working now.

many thanks...

_________________
don't count on me, i'm engineer (Animotion)
my arduino pages: http://rcarduino.de


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: