Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/15/08 08:22
Read: times


 
#153346 - this may be help
Responding to: ???'s previous message
when using interrupts facility of the 8051. u need to know several things..first we have to set the special function register called as INTERRUPT ENABLE. i think u know it.
in that SFR 7 th bit called EA should be select to enable any interrupt. then as u might know in this register ther are two bits called ET1 and ET0. these bits represent both external interrupt one and external interrupt 0. as u said these are the bits which is use full to you.since u want to set a bit when press a button u hav to use these external interrupts.sinse there are two buttons on your projects we have to use this two interrupts.each this two bits (ET0 and ET1)can be set high by connecting your buttons to p3.2 and p3.3 respectively of the 8051 chip. k remeber 8051 can only handle two external interrupt. more than that is impossible.

so first set the IE register and then write what u want to do at that interrupt service routine...

mov IE,#10001010b ;set EA,ET0,and ET0 bits

then under headings

org0003h ;for external interrupt 0
;write the program according to what u wish to do under this action
org0013h ;for external interrupt 1
;write the program according to what u wish to do under this action

put RET under each routine to return it to the main program
any way since your program start at 0800h assign the IE register at that origin as

org 0800h
mov IE,#10001010b ;set EA,ET0,and ET0 bits

k i think this might help u.pls study about the interrupts before doing thiese then u will feel some relax when doing these projects bye
aravinda
sri lanka

List of 18 messages in thread
TopicAuthorDate
8051 interrupt            01/01/70 00:00      
   what language?            01/01/70 00:00      
      8051            01/01/70 00:00      
         Ok            01/01/70 00:00      
            Re: OK            01/01/70 00:00      
               As mentioned            01/01/70 00:00      
                  High, higher, highest...            01/01/70 00:00      
                  Re: As mentioned            01/01/70 00:00      
                     My words are not casual......            01/01/70 00:00      
            It's assembler            01/01/70 00:00      
   this may be help            01/01/70 00:00      
      external trigger address            01/01/70 00:00      
         Read the tutorials...            01/01/70 00:00      
         Check the emulator manual            01/01/70 00:00      
            +800            01/01/70 00:00      
               read andy's post above            01/01/70 00:00      
               RE: Does this make sense to you?            01/01/70 00:00      
   I am sorted            01/01/70 00:00      

Back to Subject List