[Coco] Interrupt Confusion
Roger Taylor
rtaylor at bayou.com
Mon Jan 12 23:07:24 EST 2004
At 03:55 PM 1/12/2004 -0500, you wrote:
>Roger
>
>What caused the problem was I thought the reading the contrrol
>register cleared the flags. I went back and reread the spec and sure
>enough I was wrong. Been programming to much with the HC11
>lately. There the interupt flags are cleared on reading the register
>where the flag is. Forgot the PIA is a creature from the Dark
>Lagoon.
The 6821 is an extremely useful chip, even today. If there is some kind of
modern chip that holds multiple 6821's, I'd like to do some projects with
that baby. I used to draw up robotic project ideas that used the 6821 for
everything.
The thing I never experimented with is whether bits 3,4,5 of the CR
actually work as a whole (if all set) to enable bit 6, which is called CA2
or CB2 depending on the register (65281 or 65283). These outputs control
the audio mode, the joystick selection, cassette motor, etc. Since bit 6
of the CR is an output *and* input line, I am wondering why bit 6 itself
can't be set to control the same functions. A sneaky suspicion tells me
that since bits 3,4,5 control how bit 6 acts, that bit 3 is used as the
switch and bits 4,5 are kept high since all 3 probably have to be high for
bit 6 to be high.
So what we have is 4 bits serving the same purpose per control
register? Anybody know more about this?
----------
Roger Taylor
More information about the Coco
mailing list