radiotrack.txt 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. NOTES ON RADIOTRACK CARD CONTROL
  2. by Stephen M. Benoit (benoits@servicepro.com) Dec 14, 1996
  3. ----------------------------------------------------------------------------
  4. Document version 1.0
  5. ACKNOWLEDGMENTS
  6. ----------------
  7. This document was made based on 'C' code for Linux from Gideon le Grange
  8. (legrang@active.co.za or legrang@cs.sun.ac.za) in 1994, and elaborations from
  9. Frans Brinkman (brinkman@esd.nl) in 1996. The results reported here are from
  10. experiments that the author performed on his own setup, so your mileage may
  11. vary... I make no guarantees, claims or warranties to the suitability or
  12. validity of this information. No other documentation on the AIMS
  13. Lab (http://www.aimslab.com/) RadioTrack card was made available to the
  14. author. This document is offered in the hopes that it might help users who
  15. want to use the RadioTrack card in an environment other than MS Windows.
  16. WHY THIS DOCUMENT?
  17. ------------------
  18. I have a RadioTrack card from back when I ran an MS-Windows platform. After
  19. converting to Linux, I found Gideon le Grange's command-line software for
  20. running the card, and found that it was good! Frans Brinkman made a
  21. comfortable X-windows interface, and added a scanning feature. For hack
  22. value, I wanted to see if the tuner could be tuned beyond the usual FM radio
  23. broadcast band, so I could pick up the audio carriers from North American
  24. broadcast TV channels, situated just below and above the 87.0-109.0 MHz range.
  25. I did not get much success, but I learned about programming ioports under
  26. Linux and gained some insights about the hardware design used for the card.
  27. So, without further delay, here are the details.
  28. PHYSICAL DESCRIPTION
  29. --------------------
  30. The RadioTrack card is an ISA 8-bit FM radio card. The radio frequency (RF)
  31. input is simply an antenna lead, and the output is a power audio signal
  32. available through a miniature phone plug. Its RF frequencies of operation are
  33. more or less limited from 87.0 to 109.0 MHz (the commercial FM broadcast
  34. band). Although the registers can be programmed to request frequencies beyond
  35. these limits, experiments did not give promising results. The variable
  36. frequency oscillator (VFO) that demodulates the intermediate frequency (IF)
  37. signal probably has a small range of useful frequencies, and wraps around or
  38. gets clipped beyond the limits mentioned above.
  39. CONTROLLING THE CARD WITH IOPORT
  40. --------------------------------
  41. The RadioTrack (base) ioport is configurable for 0x30c or 0x20c. Only one
  42. ioport seems to be involved. The ioport decoding circuitry must be pretty
  43. simple, as individual ioport bits are directly matched to specific functions
  44. (or blocks) of the radio card. This way, many functions can be changed in
  45. parallel with one write to the ioport. The only feedback available through
  46. the ioports appears to be the "Stereo Detect" bit.
  47. The bits of the ioport are arranged as follows:
  48. MSb LSb
  49. +------+------+------+--------+--------+-------+---------+--------+
  50. | VolA | VolB | ???? | Stereo | Radio | TuneA | TuneB | Tune |
  51. | (+) | (-) | | Detect | Audio | (bit) | (latch) | Update |
  52. | | | | Enable | Enable | | | Enable |
  53. +------+------+------+--------+--------+-------+---------+--------+
  54. VolA . VolB [AB......]
  55. -----------
  56. 0 0 : audio mute
  57. 0 1 : volume + (some delay required)
  58. 1 0 : volume - (some delay required)
  59. 1 1 : stay at present volume
  60. Stereo Detect Enable [...S....]
  61. --------------------
  62. 0 : No Detect
  63. 1 : Detect
  64. Results available by reading ioport >60 msec after last port write.
  65. 0xff ==> no stereo detected, 0xfd ==> stereo detected.
  66. Radio to Audio (path) Enable [....R...]
  67. ----------------------------
  68. 0 : Disable path (silence)
  69. 1 : Enable path (audio produced)
  70. TuneA . TuneB [.....AB.]
  71. -------------
  72. 0 0 : "zero" bit phase 1
  73. 0 1 : "zero" bit phase 2
  74. 1 0 : "one" bit phase 1
  75. 1 1 : "one" bit phase 2
  76. 24-bit code, where bits = (freq*40) + 10486188.
  77. The Most Significant 11 bits must be 1010 xxxx 0x0 to be valid.
  78. The bits are shifted in LSb first.
  79. Tune Update Enable [.......T]
  80. ------------------
  81. 0 : Tuner held constant
  82. 1 : Tuner updating in progress
  83. PROGRAMMING EXAMPLES
  84. --------------------
  85. Default: BASE <-- 0xc8 (current volume, no stereo detect,
  86. radio enable, tuner adjust disable)
  87. Card Off: BASE <-- 0x00 (audio mute, no stereo detect,
  88. radio disable, tuner adjust disable)
  89. Card On: BASE <-- 0x00 (see "Card Off", clears any unfinished business)
  90. BASE <-- 0xc8 (see "Default")
  91. Volume Down: BASE <-- 0x48 (volume down, no stereo detect,
  92. radio enable, tuner adjust disable)
  93. * wait 10 msec *
  94. BASE <-- 0xc8 (see "Default")
  95. Volume Up: BASE <-- 0x88 (volume up, no stereo detect,
  96. radio enable, tuner adjust disable)
  97. * wait 10 msec *
  98. BASE <-- 0xc8 (see "Default")
  99. Check Stereo: BASE <-- 0xd8 (current volume, stereo detect,
  100. radio enable, tuner adjust disable)
  101. * wait 100 msec *
  102. x <-- BASE (read ioport)
  103. BASE <-- 0xc8 (see "Default")
  104. x=0xff ==> "not stereo", x=0xfd ==> "stereo detected"
  105. Set Frequency: code = (freq*40) + 10486188
  106. foreach of the 24 bits in code,
  107. (from Least to Most Significant):
  108. to write a "zero" bit,
  109. BASE <-- 0x01 (audio mute, no stereo detect, radio
  110. disable, "zero" bit phase 1, tuner adjust)
  111. BASE <-- 0x03 (audio mute, no stereo detect, radio
  112. disable, "zero" bit phase 2, tuner adjust)
  113. to write a "one" bit,
  114. BASE <-- 0x05 (audio mute, no stereo detect, radio
  115. disable, "one" bit phase 1, tuner adjust)
  116. BASE <-- 0x07 (audio mute, no stereo detect, radio
  117. disable, "one" bit phase 2, tuner adjust)
  118. ----------------------------------------------------------------------------