8254 Time Chip 
Author Message
 8254 Time Chip

Can anyone tell me or advise me on how to generate a square wave using
8254 Timer Chip and sent it to the parallel port so that I can using the
frequency for some purpose.Thanks for anyone help.

Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.



Fri, 15 Feb 2002 03:00:00 GMT  
 8254 Time Chip

alt.lang.asm:

Quote:
> Can anyone tell me or advise me on how to generate a square wave using
> 8254 Timer Chip and sent it to the parallel port so that I can using the
> frequency for some purpose.Thanks for anyone help.

There is no way to directly connect the output of the 8254 timer chip,
or more likely the emulation of it in your computer's chip set,
directly to the parallel port.

Jack Klein
--
Home: http://home.att.net/~jackklein



Sat, 16 Feb 2002 03:00:00 GMT  
 8254 Time Chip

Quote:

> Can anyone tell me or advise me on how to generate a square wave using
> 8254 Timer Chip and sent it to the parallel port so that I can using
the
> frequency for some purpose.Thanks for anyone help.

   If you use a data pin of parallel port (i.e. accessible through LPT
data port by software) you may do this: set timer to generate periodic
interrupts twice at rate that you need. Your main program should
receive timer interrupt, constantly send '1' to desired LPT pin after
every even timer tick and '0' after every odd tick. Of course, that's a
full time job for your computer...

-- The world is full of kings and queens
That blind your eyes and steal your dreams --
[Black Sabbath]

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Sun, 17 Feb 2002 03:00:00 GMT  
 8254 Time Chip

Quote:

> Can anyone tell me or advise me on how to generate a square wave using
> 8254 Timer Chip and sent it to the parallel port so that I can using
the
> frequency for some purpose.Thanks for anyone help.

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

Hi :)

  I wrote this TSR code in TASM .. it alters the clock to a speed over
9000/sec... the computer time stays accurate... it will put out a very
nice square wave using a lpt port :)  Just insert the code to control
the port where   'Your Code Goes Here' is :)   you can set the clock to
other frequencies easily.... let me know if you need a different clock
speed... I made up a chart that allows for easy changes... this code
has very little overhead on anything above a 386-40... and does pretty
good on an old 286-12 I have here. I have used it to blink LED's and a
few other things..using the printer ports :)

      JUMPS
      START:      JMP     BEGIN
      ;------------------VARIABLE STORAGE
      OLDVECT     DD      ?
      TIMECNT     DW      1
      ;------START OF THE TSR CODE-----
      TSRCODE:
                  PUSH    AX BX CX DX SI DI DS ES
      ;-----------------------------------------------------
                 ;YOUR CODE GOES HERE :)

;*******************************************************************
      GETOUT:
                  DEC     [TIMECNT]
                  JZ      REALOUT
                  POP     ES DS DI SI DX CX BX
                  MOV     AL,20H
                  OUT     20H,AL
                  POP     AX
                  IRET
      REALOUT:
                  MOV     [TIMECNT],512  ;RUN THE REAL TIMER CODE ONCE
                  POP     ES DS DI SI DX CX BX AX   ;EACH 512th TIME :)
      TSREND:     JMP     [OLDVECT]
      ;------SETUP CODE-------------
      BEGIN:
                  MOV     AL,00110110B
                  OUT     43H,AL                    ;9321.719/SEC
                  MOV     AL,80H
                  OUT     40H,AL
                  MOV     AL,00H
                  OUT     40H,AL

                  MOV     AX,3508H
                  INT     21H
                  MOV     [WORD OLDVECT],BX
                  MOV     [WORD OLDVECT+2],ES

                  MOV     AX,2508H
                  MOV     DX,OFFSET TSRCODE
                  INT     21H

                  MOV     DX,OFFSET TSREND + 5
                  INT     27h

      ;------END OF THE SETUP CODE-

                  ENDS
                  END     START

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Mon, 18 Feb 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. 8254 chip

2. 8254 Timer Chip

3. 8253/8254 timer chip question

4. Timing : RTC or 8254

5. Timing : RTC or 8254

6. Using 8253/8254 counters

7. 8254 timer design

8. 8254

9. DOS Locks after 8253/8254 Timer Program runs

10. 8254 timer design

11. DOS Locks after 8253/8254 Timer Program runs

12. programming 8254 timer

 

 
Powered by phpBB® Forum Software