home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.pascal.borland      Borland Pascal was actually pretty neat      2,978 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,578 of 2,978   
   Dr John Stockton to All   
   Re: Timing   
   10 May 05 21:20:13   
   
   From: reply0505@merlyn.demon.co.uk   
      
   JRS:  In article , dated Tue, 10   
   May 2005 18:10:27, seen in news:comp.lang.pascal.borland, Björn Felten   
    posted :   
   >> Actually, gettime() is quantized to 18.2 ticks per second.  I leave it   
   >> as an exercise to the reader as to why this is, although it should be   
   >> obvious :)   
   >   
   >    I wouldn't say it's that obvious, unless you were doing programming   
   >for the old PC, where the Xtal, that also happened to produce the timing   
   >for the UART, was chosen so it could produce an exact clock cycle for   
   >the old 300, 1200, 2400, 4800, 9600 and so on, speeds of yesterdays. 8-)   
      
   None of those has any particular relation to 18.2 Hz.   
      
   It's not obvious exactly why it's 18.2 Hz, since that has two particular   
   properties; it's very close to 2^16 ticks per hour, and it's 2^-16 times   
   a third of the NTSC "color sub-carrier" frequency.   
      
   Given the probable accuracy of a cheap NTSC crystal, ISTM that the 18.2   
   Hz could have been considered as exactly 2^16 * 1/hour; but there are in   
   fact $1800B0 ticks per MSDOS day.   
      
   There can be no doubt that for any given baud rate, some integer sub-   
   multiple of the 4*NTSC signal in ISA bus 30B would do for a clock; but I   
   believe that in general UARTS have been driven by their own crystals,   
   chosen to need straightforward divisors.  ICBW.   
      
   --   
    © John Stockton, Surrey, UK. *@merlyn.demon.co.uk / ??.Stockton@physics.org ©   
    Web   - FAQish topics, acronyms, & links.   
    Correct <= 4-line sig. separator as above, a line precisely "-- " (SoRFC1036)   
    Do not Mail News to me.    Before a reply, quote with ">" or "> " (SoRFC1036)   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca