I am trying to understand how to use the 8253/4 timer to output
a pulse train of a desired frequency. I know about int 08,and 1C.
I know that I write a control word to &h43 to set mode,timer
channel and then load lobyte,hibyte to &h40. This sets the timer
to something other than the standard 18.2 ticks per second.
What I don't know is how to use the resulting timer ticks to
accomplish my goal: Delay the output routine until the tick!
I am writing a DOS process control routine which needs to send
out a stream of pulses which speed up and slow down at programmed
rates with accel/decel ramps.
My first implementation(s) used delay loops. I'd like to move to
a hardware based solution.
The ideal situation would be have microsecond granularity. Rates will not
usually exceed 20k hz. Most everything I've found relates to timing
an event, like the typical use of PB35/dos MTIMER.
What I want is to process through my program, setting things up
and then waiting until the tick/interrupt comes and branches to
my pulse output code. Set the p-port bit(s),clear them ,then set
up and do it again, smoothly.
I tried to use the PB WAIT cmd with port &H40, but using mtimer
to measure results did not work well. I still think this sparsely
documented command (in PB35) could work??
I have lurked here for some time and I know there's a LOT of
experience out there! I have tried to read everything in the
forum re: timing,delays that I could think of to search upon.
So how about it Guys (and Gals), anybody have a simple
dos interrupt
routine for microsecond rate creation. We can reprogram the timer
tick on exit, and reset the clock from the cmos realtime clock?
Or chain the 08 int to our sped up ticker. Either way will work
for me.
I dont want to use the pentium cputicker, still a lot of 486's
doing control work.
Thank you in advance for any help.
OOPS! 8253/4 Arghh! And in my first post
------------------
[This message has been edited by Randal Milota (edited August 11, 2000).]
a pulse train of a desired frequency. I know about int 08,and 1C.
I know that I write a control word to &h43 to set mode,timer
channel and then load lobyte,hibyte to &h40. This sets the timer
to something other than the standard 18.2 ticks per second.
What I don't know is how to use the resulting timer ticks to
accomplish my goal: Delay the output routine until the tick!
I am writing a DOS process control routine which needs to send
out a stream of pulses which speed up and slow down at programmed
rates with accel/decel ramps.
My first implementation(s) used delay loops. I'd like to move to
a hardware based solution.
The ideal situation would be have microsecond granularity. Rates will not
usually exceed 20k hz. Most everything I've found relates to timing
an event, like the typical use of PB35/dos MTIMER.
What I want is to process through my program, setting things up
and then waiting until the tick/interrupt comes and branches to
my pulse output code. Set the p-port bit(s),clear them ,then set
up and do it again, smoothly.
I tried to use the PB WAIT cmd with port &H40, but using mtimer
to measure results did not work well. I still think this sparsely
documented command (in PB35) could work??
I have lurked here for some time and I know there's a LOT of
experience out there! I have tried to read everything in the
forum re: timing,delays that I could think of to search upon.
So how about it Guys (and Gals), anybody have a simple

routine for microsecond rate creation. We can reprogram the timer
tick on exit, and reset the clock from the cmos realtime clock?
Or chain the 08 int to our sped up ticker. Either way will work
for me.
I dont want to use the pentium cputicker, still a lot of 486's
doing control work.
Thank you in advance for any help.
OOPS! 8253/4 Arghh! And in my first post

------------------
[This message has been edited by Randal Milota (edited August 11, 2000).]
Comment