piclist 2003\03\02\161352a >
Thread: coding challenge: await
www.piclist.com/techref/microchip/devices.htm?key=pic
flavicon
face BY : Tony Kübekemail (remove spam text)



Hi,
I haven't read most if this thread so at the moment I have no
code to post, however I saw this bit from Scott Dattalo:
<snip>
>Here's a solution that saves one instruction:
>
>    rlf    TMR1L,W       ; read the msb of tmr1L --> Carry
>     incf   TMR1H,W       ;Assume that the low byte is about to
rollover
>     movwf  TMR1H_buff
>
>     movf   TMR1L,W
>     movwf  TMR1L_buff
>
>     skpnc                ;If TMR1L on the first read was < 0x80
>      btfsc TMR1L_buff,7  ;or if the both reads are between
>       decf TMR1H_buff,F  ;0x80 and 0xff then leave the high byte alone

Wouldn't the "incf TMR1H,W " possibly trash the carry ? (if TMR1H is
0xFF)


/Tony

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-request.....spammitvma.mit.edu>
<8A2A45D3D18D574484CFD980CDB73A31024BCA@flmail.dns.flintab.se> quoted-printable

See also: www.piclist.com/techref/microchip/devices.htm?key=pic
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) coding challenge: await

month overview.

new search...