Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Timer Interrupt operations

Status
Not open for further replies.

imranahmed

Advanced Member level 3
Advanced Member level 3
Joined
Dec 4, 2011
Messages
817
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
Karachi,Pakistan
Activity points
6,493
Please let me know about the function of Timer 1 or 0 interrupt.And what is the purpose of command using 0 after interrupt.
Is it possible to generate 1 sec delay by using timer interrupt 3 in 89c52?
 
Last edited:

go through this following link for timer 1 and timer 0 operation



for second question
i think the timer 2 is also 16 bit timer which can produce a maximum delay of .07 sec delay

to produce a 1 sec delay it better produce a delay of .05 seconds using one of the timer and repeat that for 20 times which gives 1 second delay.........
 
Please let me know what is the purpose of command "USING 0" in the interrupt.Like this
' void good() interrupt 0 using 0 '.
 

the 0 defines the interrupt vector

for example:

0 External0
1 Timer0
2 External1
3 Timer1
4 Serial


when u make interrupt 0 then that is a ISR of the external interrupt 0

if interrupt 2 then that is a ISR of the external interrupt 1

if interrupt 1 then that is a ISR of the timer 0

and same

hope this was help full
 

the command using is an assembler directive instructing the microcontroller to make use of the "register bank 0"...
 
How to know that how many register bank in 89c52 or any microcontroller ?
 

just go through the data sheet of the corresponding data sheet and normally if u are using c programming language then the banking is take care by the compiler itself.........
 
Please let me know i wrote attached interrupt 1 (Timer 0) code it is working good, but when delay_ms function is used the timer interrupt connected LED does not

blink to proper timing.Please can anyone know about this problem?

I want to use both timer interrupt function and delay_ms function.I used Timer 0 in timer interrupt and Timer 1 in delay_ms function both on MODE 1.
 

Attachments

  • ATCLK.txt
    594 bytes · Views: 102

am not a "C" coder but if you so wish i can upload a code in assembly language. so from there of u can convert it to "C"....
sequel
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top