BNZ is probably a macro used by Andrew. Just translate: BNZ xxxx To: SKPZ GOTO xxxx Where SKPZ is a pseudomnemonic for: BTFSS STATUS,Z Bob Ammerman RAm Systems ----- Original Message ----- From: "Michael Johnston" To: Sent: Wednesday, May 08, 2002 11:57 PM Subject: Re: a 16c54 clock desigin. > Andrew > thanks for the code i tried this but ive ran into some problems for one > thing is the bnz mnemonic usable with the c54 parts > Michael Johnston > ----- Original Message ----- > From: "Andrew Warren" > To: > Sent: Wednesday, May 08, 2002 6:29 PM > Subject: Re: a 16c54 clock desigin. > > > > Michael Johnston wrote: > > > > > i am couting a 60hz at ra3 in a 16c54. I am simulating this for > > > right now. My problem is that i count this pulse and then it is > > > suppose to increment a counter. Which it is doing fine but when i > > > get to 60 this timer is supposed to reset to zero and increnment > > > another counter.this next counter is supposed to count up to 60 > > > also. then it is supposed to increment a third counter which is > > > supposed to count up to 12 then reset to one but instead of doing > > > that it just increments the all three counters and keeps going up > > > to 255.then it resets. > > > > Mike: > > > > WAITFORLO: > > BTFSC PORTA,3 > > GOTO WAITFORLO > > > > WAITFORHI: > > BTFSS PORTA,3 > > GOTO WAITFORHI > > > > ; At this point, we've just seen a rising edge on the 60Hz input. > > > > INCF SIXTIETHS ;Increment the 1/60-second counter. > > MOVLW 60 ;Compare it to 60. > > XORWF SIXTIETHS,W ; > > BNZ DONE ;If it hasn't reached 60 yet, exit. > > > > MOVWF SIXTIETHS ;Otherwise, reset the counter to 0. > > > > INCF SECONDS ;Increment the seconds counter. > > MOVLW 60 ;Compare it to 60. > > XORWF SECONDS,W ; > > BNZ DONE ; etc.... > > > > MOVWF SECONDS > > > > INCF MINUTES > > MOVLW 60 > > XORWF MINUTES,W > > BNZ DONE > > > > MOVWF MINUTES > > > > INCF HOURS > > MOVLW 12 > > XORWF HOURS,W > > BNZ DONE > > > > MOVLW 1 > > MOVWF HOURS > > > > DONE: > > > > -Andrew > > > > === Andrew Warren -- aiw@cypress.com > > === Principal Design Engineer > > === Cypress Semiconductor Corporation > > === > > === Opinions expressed above do not > > === necessarily represent those of > > === Cypress Semiconductor Corporation > > > > -- > > 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 > > > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.