-----Original Message----- From: Olin Lathrop [mailto:olin_piclist@EMBEDINC.COM]=20 Sent: Friday, October 03, 2003 5:11 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: What am I doing wrong? >> RX_1 >> BANK0 ;TEST!! >> MOVLW Rx_Buffer ;Move Address of Rx_Buffer to W >> ADDWF Rx_Num, W ;Add Rx_Num to W >> MOVWF FSR ;Place W (Rx_Buffer + Rx_Num) into FSR >> MOVF RCREG,W ;moves RCREG into W >> BCF STATUS,IRP ;Clears IRP , Bank0 >> MOVWF INDF ;copies W into INDF >> INCF Rx_Num, F ;Adds 1 to Rx_Num >> MOVF Rx_Num, W ;Moves Rx_Num to W >> XORLW D'16' ;XOR's W with 16 >> BTFSS STATUS,Z ;Checks if we are at 16 >> GOTO RX_1 ;If not keep reading > >This loop will always flood the entire buffer with the received character. >For values of RX_NUM less than 15, it will immediately go back and write >the RCREG value into the next buffer location. Since there is no wait for >the next character to be received, RCREG still contains the previous >received character. I thought that because I had continuios receive enabled that ot would constantly read RCREG. I was looking at the RCSTA register and I didn't see any bit that would let me know when the register had changed states. How do making sure that the next write is reading the new RCREG value?. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu