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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/14/03 11:22
Read: times


 
#50654 - RE: First Step..........
Responding to: ???'s previous message
Hi!
I connected the ckt in the following order:
START ->STOP->O/L Contacts->K1 relay

......Start..Stop...O/L contact...K1 Relay
......P1.0...P1.1....P1.2.........P2.0
|-----||-----||----||----------( )----|
Tried out the program, working OK,Now I like to
add - NO contact of K1 for (holding On the relay),
another NO contact for remote indication light and
one NC contact as a interlock in Auto start.

Tried to add in the subroutines the following but it did not work.
MOV C,ACC.0
ORL C,p2.0
ANL C,ACC.1

Program:
ORG 2000H ;Start assembly at 0000h
LJMP MAIN ;Jump to the main routine

ORG 001Bh ;This is where Timer 1 Interrupt
Routine starts
CLR TR1 ;Turn off timer 1 as we reset the value
MOV TH1,#0DCH ;Set the high byte ofthe reset value
MOV TL1,#0FFH ;Set the low byte of the reset value
SETB TR1 ;Restart timer 1 it has been initialized

JMP START
RETI ;Exit the interrupt routine

MAIN: MOV TH1,#0DCH ;Initialize timer high-byte
MOV TL1,#0FFH ;Initialize timer low-byte
MOV TMOD,#10h ;Set timer 1 to 16-bit mode
SETB TR1 ;Start timer 1 running
SETB EA ;Initialize interrupts
SETB ET1 ;Initialize Timer 1 interrupt
MOV P1,#0FFH ;P1 as input port
AGAIN:JMP AGAIN
;SUB-ROUTINES
START:MOV A,P1
CPL A
MOV C,ACC.0
ANL C,ACC.1
ANL C,ACC.2
JNC OVER1
CLR P2.0
JMP OVER
OVER1:SETB P2.0
OVER: RETI
END



List of 53 messages in thread
TopicAuthorDate
PUT A PLC INTO YOUR MICROCONTROLLER !            01/01/70 00:00      
   RE: PUT A PLC INTO YOUR MICROCONTROLLER !            01/01/70 00:00      
      RE: PUT A into B!            01/01/70 00:00      
         RE: PUT A into B!            01/01/70 00:00      
            RE: PUT A into B!            01/01/70 00:00      
               RE: PUT A into B! Murugan & Rob            01/01/70 00:00      
         RE: PUT A into B!            01/01/70 00:00      
   RE: PUT A PLC INTO YOUR MICROCONTROLLER !            01/01/70 00:00      
      RE: How u did it Mr. Mahmood ?!            01/01/70 00:00      
         RE: How u did it Mr. Mahmood ?!            01/01/70 00:00      
            RE: How about interal relays?            01/01/70 00:00      
               RE: How about interal relays?            01/01/70 00:00      
               RE: How about interal relays?            01/01/70 00:00      
   RE: PUT A PLC INTO YOUR MICROCONTROLLER !            01/01/70 00:00      
   RE: PUT A PLC ... the skinny            01/01/70 00:00      
      RE: PUT A PLC ... the skinny            01/01/70 00:00      
         RE: PUT A PLC ... the skinny            01/01/70 00:00      
            RE: PUT A PLC ... the skinny / Erik            01/01/70 00:00      
   PLC vs Microcontrollers            01/01/70 00:00      
      RE: PLC vs Microcontrollers            01/01/70 00:00      
         RE: I/O Summary            01/01/70 00:00      
            RE: I/O Summary            01/01/70 00:00      
               RE: I/O Summary            01/01/70 00:00      
                  RE: I/O Summary            01/01/70 00:00      
               RE: I/O Summary            01/01/70 00:00      
                  RE: I/O Summary            01/01/70 00:00      
                     RE: First Project            01/01/70 00:00      
                        RE: First Project            01/01/70 00:00      
                           RE: First Project            01/01/70 00:00      
                              RE: First Project            01/01/70 00:00      
                                 RE: First Project            01/01/70 00:00      
                                    RE: First Project            01/01/70 00:00      
                              RE: First Project            01/01/70 00:00      
                                 RE: First Project            01/01/70 00:00      
                                    RE: First Project            01/01/70 00:00      
                                       RE: First Project - no 82c55            01/01/70 00:00      
                              RE: First Project -move forward            01/01/70 00:00      
                                 RE: First Project -move forward            01/01/70 00:00      
               RE: I/O Summary            01/01/70 00:00      
                  RE: I/O Summary            01/01/70 00:00      
      RE: PLC vs Microcontrollers            01/01/70 00:00      
         RE: ladder.inc- Fedia Buznik            01/01/70 00:00      
            RE: ladder.inc- Fedia Buznik            01/01/70 00:00      
               RE: ladder.inc- Fedia Buznik            01/01/70 00:00      
                  RE: ladder.inc- Fedia Buznik            01/01/70 00:00      
   RE: First Step..........            01/01/70 00:00      
      RE: First Step..........            01/01/70 00:00      
         RE: First Step....Mr. Fedia            01/01/70 00:00      
            RE: First Step....Mr. Fedia            01/01/70 00:00      
               RE: First Step....Mr. Fedia            01/01/70 00:00      
                  RE: Boolean Variable Manipulation            01/01/70 00:00      
                     RE: Boolean Variable Manipulation            01/01/70 00:00      
   RE: Thanks!            01/01/70 00:00      

Back to Subject List