home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!darwin.sura.net!mips!cs.uoregon.edu!nntp.uoregon.edu!news.u.washington.edu!plains!plains.NoDak.edu!stenslan
- From: stenslan@plains.NoDak.edu (David Stensland)
- Newsgroups: comp.sys.cbm
- Subject: Using CNT1 & CNT2 inputs on C-64
- Message-ID: <19724@plains.NoDak.edu>
- Date: 14 Aug 92 03:59:09 GMT
- Sender: Unknown@plains.NoDak.edu
- Organization: North Dakota Higher Education Computing Network
- Lines: 38
- Nntp-Posting-Host: plains.nodak.edu
-
- According to the Programmer's Reference Guide, it is possible to measure
- frequency, pulse width, and delay times of external signals using the CNT
- pins on the 6526's. Has anyone tried this? It appears too easy to be true.
-
- If one sets bit 5 at $DC0E to a one, then the external pulses get clocked
- into $DC04 & $DC05 from pin 4 on the user port (CNT1) right??? If I latch
- these 16 bits after 1 second, then they should be the frequency in Hz if I
- cleared those bytes before clocking them. I could also sample the
- external signal for just 1/10 second and multiply by ten, 1/100 sec x 100,
- etc... for speed's sake. What is the maximum input frequency that can be
- sampled without adding an external decade counter or other frequency
- divider circuit?
-
- My idea is to hook CNT1 & CNT2 as counter/latches for a tachometer and
- speedometer setup. I would like to keep it simple, since I'll be dealing
- with relatively low frequencies. The tach-sender will be sending
- a signal between 0 - 700 Hz max. Don't worry, the signal will be
- conditioned to prevent any nasty voltages from toasting the old '64. I'm
- not worried about the speedometer... that should be easier... I hope.
- I will have a 60 Hz signal applied to the CIA's via a MM5369 17-stage
- oscillator/divider... so timing should remain the same as when run from
- the power supply. I'm not sure what the current draw is on a C-64E
- board... I haven't measured it lately... I've been thinking about using an
- LM323 3 amp regulator to cut the 12.6 volts from the car battery down to a
- descent level. I'm not sure if that's enough... I can deal with that
- later... I just want to see if I can actually measure any external
- frequencies first.
-
- Am I way out in left field or what? I don't have my '64 available right
- now, so I can't test any theories. But if this does work it would be
- really cool! I have made a circuit that hooks up to the user port and
- drives 24 7-segment displays and uses an 8 ch ADC and 2 16 bit MUX's to
- read in other engine parameters. I could save a bunch of counter circuits
- if the '64 can do the work already.
-
- All I want to know is... Will it work?
-
-
-