home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / cbm / 3384 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  2.5 KB

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