*/
If you have a PH account, you can customize your PH profile.
*/

View \TIINT.ASM

Examples of Timer I used without I2C on

Submitted By: WEBMASTER
Rating: (Not rated) (Rate It)


;****************************************************************************

;                       Timer I Fixed Rate Timer Usage

;  This program demonstrates how to activate Timer I on the 83C751 or
;  83C752 microcontrollers as a fixed rate timer when the I2C port is not
;  used. Once activated, Timer I will generate an interrupt every 1024
;  machine cycles. The I2C bus pins SCL and SDA may be used as open drain
;  outputs.

;****************************************************************************

$MOD751
$Title(Timer I Fixed Rate Timer)
$Date(07/14/89)


Flags   DATA    20h             ;Flag byte
TstFlag BIT     Flags.0         ;Timer I flag.


        ORG     0
        AJMP    Reset

        ORG     1Bh             ;Timer I interrupt.
TimerI: SETB    TstFlag         ;Set flag to indicate a Timer I interrupt.
        SETB    CLRTI           ;Clear Timer I to allow it to restart.
        RETI


Reset:  SETB    ETI             ;Enable Timer I interrupt.
        SETB    EA              ;Enable global interrupts.
        SETB    TIRUN           ;Start Timer I.

Loop:   CLR     TstFlag         ;Initialize interrupt flag.
Wait:   JNB     TstFlag,Wait    ;Wait for Timer I interrupt.
        SJMP    Loop

        END

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.