need timer interrupt using assembly language.
Fri Sep 18 2009, 10:56 am
i am attaching u my program can u guide me how i multiply 3 digit no 132. so kindly look into this
Sat Sep 19 2009, 04:52 pm
well 132 is a 8-bit number and ADC values is also 8-bit so just multiply both using MUL AB instruction in 8051.
put ADC value in A
132 in B
AxB = BA => B(MSB), A(LSB)
a 16-bit value.. you can easily manipulate the result for display.
put ADC value in A
132 in B
AxB = BA => B(MSB), A(LSB)
a 16-bit value.. you can easily manipulate the result for display.
Sun Sep 20 2009, 04:26 pm
THANK YOU FOR UR HELP BUT NOW I AM FINDING DIFFICULTY IN DIVIDING 16 BIT BY 8 BIT HOPE U GIVE ME A EXPLANATION. COZ AS U DO IT USING SUBTRACTION I GONE THRU UR PROGRAM BUT HOPE U GIVE ME EXAMPLE OF ATLEAST ONE CYCLE MEANS IF I WANNA CONVERT FFH TO 336V.
THANK YOU.
THANK YOU.
Wed Sep 23 2009, 02:19 am
i think you can find 16 bit division in code section..
check this link:
http://www.8051projects.net/downloads35.html
check this link:
http://www.8051projects.net/downloads35.html
Thu Oct 01 2009, 08:04 pm
what value xtal are you using ? direct 5 sec delay is not possible, you'd have to first do a delay for 50millisec and then a counter for 100 times , 50 millisec X 100 times = 5000 msec or 5 seconds.
Arun
Fri Oct 02 2009, 06:03 pm
i want an example of timer interrupt in assembly language if u can coz i have completed with display to show 336 vdc on 7 segment display.
Sat Oct 03 2009, 12:30 pm
here is a small example of timer 0 interrupt
org 0H sjmp main org 0BH ;ISR location for Timer 0 interrupt sjmp T0_ISR ;Main routine main: mov TH0,#00 ;delay value mov TL0,#00 clr TF0 ;clear timer flag setb ET0 ;enable timer0 interrupt setb EA ;enable global interrupt setb TR0 ; enable timer sjmp $ T0_ISR: clr TF0 ;clear interrupt ;do something in ISR RETI end
Powered by e107 Forum System