160 baud ALDL data - reading on a PC, counter 0?

Pat Ford pford at qnx.com
Thu Jun 17 14:23:44 GMT 1999


Previously, you (Teller.John at orbital.com) wrote:
> Just remember that a PC is a non-real time machine.

Nope not true! M$ is not a real time os I'll accept and even promote. I work at
a RTOS company we have customers world wide doing amazing things on pcs. Visit 

http://www.qnx.com/realworld/transportation/roadware.html
http://www.qnx.com/realworld/vol11-3/land.html

 And there are other RTOSes that can do simular things on a pc ( though I'm biased) 

>  Your interrupts may be held
> of for an indeterminate period due to some chunk of Windows/DOS having suspended
> them to do something trivial (like write to the hard drive or something). 

 See you are blamming the h/w then saying M$ ..

> Don't
> be surprised if occasionally the edge-triggered PIC work-alike in your PC
> sometimes misses an interrupt or two!

once again an os issue not h/w

> 
> The clock to that timer is based on the original PC's 14.XXXX clock which was
> divided down to feed the CPU clock and video scan generator.  It has been a
> while since I knew the exact numbers for all of that, but I'm not surprised your
> measurements disagreed with the manual.

there will be differences based on that as well as the fact that commodity type
pcs aren't that well clocked, the osc is adjusted to work, not to a frequency standard
I've seen pcs with .25Mhz drift in the clocks. M$ drive mother board makers know that 
M$ doesn't require great accuracy.. 


M$ rant mode off

> 
> --- John
> 
> 
>                                                               
>                                                               
>                                                               
>  To:      gmecm at efi332.eng.ohio-state.edu                     
>                                                               
>  cc:      (bcc: John Teller/ORBVA)                            
>                                                               
>                                                               
>                                                               
>  Subject: 160 baud ALDL data - reading on a PC, counter 0?    
>                                                               
> 
> 
> 
> 
> Techo question for PC savvy types...
> 
> Two weeks ago I asked about the 160 baud ALDL data format.
> I've since written a bit of code that uses the serial port's
> CTS line as input, and DTR as a negative voltage output to
> condition, with a single transistor, the ALDL signal. The code
> simply uses CTS interrupts (modem change) and reads the PC's
> 8253/8254 counter channel 0 to generate a timestamps at each
> CTS transition. It works well, but...
> 
> Does anyone know what frequency the AT clocks counter 0 at?
> All my documentation says it's at 0.84 uSec (micro seconds)
> BUT my measurements on a couple of Pentium and 486 machines
> indicate that it's closer to 0.43 uSec AND that it counts
> in lots of 2 (ie. reading counter 0 always reads an even
> binary number). Now I know XTs and early ATs did clock counter
> 0 at 1.19 MHz, but when did they change to closer to 2 Mhz, or
> am I losing the plot?
> 
> I'm going to "tidy up" this bit of code and make it available
> to show the raw 160 baud ALDL data stream in real time. I'm
> not going to try and decode the data stream because I'm going
> to give away this code to whoever wants it. It'll be able to
> run on an XT AND it should also run fine in a DOS box too. Any
> thoughts on the best way to display this raw data?
> 
> regards,
> --
> Peter Gargano
> 
> 
> 

--
Pat Ford                           email: pford at qnx.com
QNX Software Systems, Ltd.           WWW: http://www.qnx.com
(613) 591-0931      (voice)         mail: 175 Terrence Matthews          
(613) 591-3579      (fax)                 Kanata, Ontario, Canada K2M 1W8




More information about the Gmecm mailing list