Question

program Timer2 in C to toggle Pin RB3 when it counts up from 0 to 200....

program Timer2 in C to toggle Pin RB3 when it counts up from 0 to 200. assume Xtal=10 MHz.
pic18

you can use any input or output
0 0
Add a comment Improve this question Transcribed image text
Answer #1

SOLUTION:-

Program in assembly language:

BCF TRISB , 3

BCF PORTB , 3

CLRF T2CON

CLRF TMR2

MOVLW OXC8 ; 200

MOVWF PR2

BCF PIR1 , TMR2IF

START:

BTFSS PIRI , TMR2IF

GOTO START

BYG PORTB , 3

GOTO START

THANK YOU,If any queries please leave your valuable comment on comment box.....

Add a comment
Know the answer?
Add Answer to:
program Timer2 in C to toggle Pin RB3 when it counts up from 0 to 200....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT