Searching \ for 'SERIAL CODE PROBLEM' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: 'SERIAL CODE PROBLEM'.

Truncated match.
PICList Thread
1997\05\17@173409 by eric naus

picon face
part 0 67 bytes
Attachment converted: wonderland:SERIAL.ASM (TEXT/MSIE) (00002DF9)

1997\05\19@062445 by STEENKAMP [M.ING E&E]

picon face

You do not call bit_delay after you have found the start bit.  This
causes all 8 data bits to be sampled in rapid succession.

Proposed correction:
start_bit   btfsc      ser_in,2
           goto       start_bit   ;look for start bit
           call       start_delay ;get centre of start bit
           btfsc      ser_in,2    ;look if still low
           goto       start_bit   ;false input start again

==>         call       bit_delay   ;Wait until middle of first data bit

           movlw      8           ;load counter for 8 bits
           movwf      bit_cntr
           clrf       rcv_byte    ;clear recieve byte
recieve     btfss      ser_in,2    ;get bit
           bcf        c,0         ;clear carry if bit is zero
           btfsc      ser_in,2
           bsf        c,0         ;set carry if bit is high
           rrf        rcv_byte,1  ;rotate carry to high bit in recieve

==>         call       bit_delay   ;Wait until middle of next data bit

           decfsz     bit_cntr,1  ;if counter not finished get next bit
           goto       recieve

Hope this helps!

1997\05\19@125158 by eric naus

picon face

Thanks for pointing it out.
Appreciate the quick help.


Eric naus

At 12:14 PM 5/19/97 GMT+0200, you wrote:
{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...