Hi,
Does anyone have 6502 code either to pulse PB7 or to trigger an interrupt
from a 6522 VIA? I need to control 2 variable speed DC motors using a
6502 for a tag-playing robot. I have the following code which I am told
is supposed to pulse Port B pin 7:
-----
VIA_BASE = $A000
T1CL = VIA_BASE + 6
T1CH = VIA_BASE + 7
ACR = VIA_BASE + 11
IER = VIA_BASE + 14
LDA #%11000000
STA ACR
LDA #$00
STA IER
LDA #$EE
STA T1CL
LDA #$01
STA T1CH
; You now have a 1kHz wave on PB7, if it works.
DONE JMP DONE
-----
I have tried this code and it doesn't work. Is something wrong with the
code or shall I look elsewhere?
Thanks for your help in advance,
David Yeung
Andre
> -----
> LDA #%11000000
> STA ACR
> LDA #$00
> STA IER
> LDA #$EE
> STA T1CL
> LDA #$01
> STA T1CH
> DONE JMP DONE
> -----
> David Yeung
--
Email address may be invalid. Use "fachat AT physik DOT tu-chemnitz DOT de"
------Fight SPAM - join CAUCE http://www.cauce.org------Thanks, spammers...
Andre Fachat, Institute of physics, Technische Universität Chemnitz, FRG
http://www.tu-chemnitz.de/~fachat
Hi Andre,
Thanks for your response. I already have those data sheets (although not
in electronic form), and the reason that I ask for sample code is because
I couldn't make sense of the data sheets. Or at least the programs which
I thought should work didn't.
David Yeung
Try
http://www.tu-chemnitz.de/~fachat/8bit/osa/v2.0/oa-2.0.0-pre1.tar.gz
and in there the file
oa-2.0.0-pre1/sysapps/irtx/irtx.a65
which is the source for a IR control that utilises the timer/toggle
stuff on the 6522's PB7 to drive an IR LED to control my stereo.
Schematics at
http://www.tu-chemnitz.de/~fachat/8bit/hardware/gecko/index.html
(replace index.html with either gecko.ps.gz or gecko.gif)
Hope that helps
Andre