home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / ibm / pc / programm / 797 next >
Encoding:
Internet Message Format  |  1993-01-21  |  3.9 KB

  1. Xref: sparky comp.sys.ibm.pc.programmer:797 comp.sys.ibm.pc.misc:16986
  2. Newsgroups: comp.sys.ibm.pc.programmer,comp.sys.ibm.pc.misc
  3. Path: sparky!uunet!haven.umd.edu!purdue!yuma!csn!stortek!stortek!aarond
  4. From: aarond@xibm.StorTek.com (Aaron Dailey)
  5. Subject: Re: Handling multiple interrupts
  6. In-Reply-To: rlw@elan's message of 17 Jan 93 08: 14:03 GMT
  7. Message-ID: <AAROND.93Jan21100211@xibm.StorTek.com>
  8. Sender: usenet@stortek.com
  9. Nntp-Posting-Host: xibm.stortek.com
  10. Organization: StorageTek
  11. References: <rlw.727258443@elan>
  12. Date: Thu, 21 Jan 1993 17:02:11 GMT
  13. Lines: 75
  14.  
  15. I don't think your address is sendable, so I'm following up to the
  16. net:
  17.  
  18. In article <rlw.727258443@elan> rlw@elan (Robert Wald) writes:
  19.  
  20.      Hi, I need some help with interrupts. I'm using two kinds. First,
  21.    the serial port is interrupt driven, and secondly, the AT Real Time
  22.    Clock countdown interrupt. The second is being used to drive
  23.    a camera with a computer controlled exposure time (it has to be
  24.    done this way). 
  25.      First, I'd like to know if there are any references to using
  26.    the hardware properly on the net. I've looked for books, but they
  27.    all shy away once it gets very technical, which is exactly what
  28.    I need. 
  29.  
  30. The 8259 datasheet is of course the ultimate reference, but it's
  31. terse.  Does anyone know of good books on programming the PIC, the
  32. timer, DMA, etc?
  33.  
  34.      The main thing I need to do is to make sure that the
  35.    (simulated?) cascaded 8259 interrupt controllers are happy. The
  36.    serial interrupt is on the first controller, and the RTC interrupt
  37.    is on the second. It seems that some pictures come out with 
  38.    what looks like a doubled exposure time, suggesting that an
  39.    RTC interrupt is being missed. The serial interrupts are driving
  40.    a 19200 baud heavily used connection (unfortunately I can't
  41.    assume a 16550, it has to work with normal serial controllers) running
  42.    a V.32bis modem (without compression) from a 386 machine,
  43.    and I want to make sure that everything is being set and cleared 
  44.    correctly. Does the serial interrupt have to inform the 
  45.    second 8259 that it can go ahead and interrupt, or is sending
  46.    the 0x20 (I think) to the first one enough? Under what circumstances
  47.    can an interrupt be totally suppressed?
  48.  
  49. The serial interrupt ISR, as it's connected only to the first PIC,
  50. only needs to give an EOI to the first PIC.  I'm not sure what would
  51. be going on in your code; the RTC might be interrupting while the
  52. serial ISR is interrupting; have you taken this into accout in your
  53. code?  If you're executing the serial ISR, until you enable interrupts
  54. on the 386 (either by executing the interrupt return, or explicitly
  55. enabling interrupts with STI in your ISR), and give the master PIC an
  56. EOI, you won't see your RTC interrupt.
  57.  
  58.      I could also use some help with the RTC interrupt itself.
  59.    Its supposed to have been documented in PC Techniques last summer
  60.    (possibly 1991), but I can't find it.
  61.  
  62. The datasheet for the RTC is good; you can get it from Motorola, who
  63. originally designed the chip, or from your PC chipset vendor.
  64.  
  65.      I also need to do some internal timing to make sure that
  66.    this is working correctly. How do you read the time in some fashion
  67.    without using a DOS call, or can you make the time DOS (or BIOS) call
  68.    from within an ISR? I want to make sure that the timing is exactly
  69.    doubled (which I'm pretty sure it is). 
  70.  
  71. I don't think you want to use DOS.  I think you can set up one of the
  72. 8254 timers, and use it.  Probably the standand timer isn't high
  73. enough resolution (it's 18 /Sec)
  74.  
  75.      Also, I need to add flow control. Is there a simple example
  76.    or program around which gives an example of modem flow control? 
  77.  
  78. Maybe kermit or one of the other PD comm programs?
  79.  
  80.    Thanks very much for any help.
  81.  
  82.    -Rob
  83.  
  84.  
  85. --
  86. Aaron Dailey Internet: Aaron_Dailey@stortek.com
  87. StorageTek Corporation   Voice: (303) 673-4989, FAX: (303) 673-2570
  88. Mail:  MS0242, 2270 South 88th Street, Louisville, C0 80028
  89.  
  90.