Hi Oliver, I have done a lot of 'PLC' programming. All in ladderal logic but never assembly, i m quite new to assembly coding. So all that u've explained below, just went right over my head. Can u please elaborate more (mayb w/ examples) or point to any reading material sources so that i can do a some catching up :-) many thnx tong Oliver Broad wrote: > Parallel operation can be achieved by 'cyclic' code. This is code that > constantly runs from start to finish. Code of this type is found on 'PLC' > systems, industrial controllers. > > Logic is performed by setting and clearing flags (bits) and performing tests > on them. Time delays can be implemented by down counters, one register per > timer. If you fix your execution time the timer code can be very simple. > Fixed execution (isochronous) code may be achieved by only using skip > instructions for flow control or by padding branches out with NOPs to make > them all take the same time. There is only ever one branch instruction, from > the end to the beginning. > > I've been meaning to write macros to implement this type of logic but never > found the time. > > Oliver. > > ----- Original Message ----- > From: TL > To: > Sent: Wednesday, August 02, 2000 12:12 AM > Subject: [PIC]: 16F84 coding question > > > Hi everyone, > > > > I have an application where the objective is to read input1 and input2. > > when the bit test condition is true, delay 2 seconds then turn the > > corresponding output (output1 or output2) off. > > > > this is what i have: > > > > input1 btfsc porta,1 > > goto input2 > > call delay ; 2 sec delay subroutine > > bcf portb,1 > > input2 btfsc porta,2 > > goto input1 > > call delay > > bcf portb,2 > > > > the problem with this code segment is that during the delay > > loop, the other input is not being scanned, in the event that > > bit test is true n the 2 second delay can be started to count > > down. > > > > Is there way to "parallel" the process? any help is greatly appreciated. > > i want to thank everyone in advance. > > > > tong > > > > > > ____________NetZero Free Internet Access and Email_________ > > Download Now http://www.netzero.net/download/index.html > > Request a CDROM 1-800-333-3633 > > ___________________________________________________________ > > > > -- > > http://www.piclist.com hint: To leave the PICList > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements _______________________________________________ Why pay for something you could get for free? NetZero provides FREE Internet Access and Email http://www.netzero.net/download/index.html -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics