> I don't see a "BSF RCSTA, CREN" anywhere in your code, I think you need
> one.
>
> Cheers,
>
> Bob
>
>
> On Wed, 15 Apr 2009 15:04:27 -0500, "Tom Cassidy" <
.....tomcKILLspam
@spam@featherstep.com>
> said:
>
>> All,
>>
>> I cannot get the receiver portion of a PIC16F690 EUSART to work. I can
>> transmit fine, but am unable to receive characters.
>>
>> Since I can transmit, I'm assuming my baud rate generator settings are
>> correct.
>>
>> I have checked the signal at the RX pin and it is good- correct
>> polarity, correct baud rate, correct voltage level. I can see the RS232
>> signals arriving when sent from the PC. They compare exactly to those
>> from the TX pin when the PIC is sending the same character.
>>
>> I tried using source code from your "PIC Specific RS232 IO" page by
>> MaGahee et al. to no avail. (Love the code and comments btw- well done!)
>>
>> I tried using rs232.asm from Mark Torrens, also to no avail.
>>
>> I have a test board with only the PIC16F690 and a 3.6864MHz clock chip,
>> so nothing else should be interfering, hardware-wise. I also built out
>> two of the boards, so it probably isn't a fab issue. (I've got an
>> external RS232 to TTL converter.)
>>
>> At one point I noticed that the FERR bit always seemed to get set, even
>> if I cleared the queue and no characters were being sent to the PIC. I
>> never saw OERR asserted, only the FERR signal.
>>
>> Any suggestions or help would be greatly appreciated- I've already
>> wasted two days on this!
>>
>> Thanks,
>> Tom
>>
>> p.s. Here's my setup code:
>> __CONFIG _FCMEN_OFF & _IESO_OFF & _BOR_OFF & _CPD_OFF & _CP_OFF &
>> _MCLRE_ON & _PWRTE_ON & _WDT_OFF & _EC_OSC
>>
>> BANKSEL ANSEL
>> CLRF ANSEL ; Digital I/O
>> CLRF ANSELH ; Digital I/O
>>
>> BANKSEL TXSTA ; Select bank 1
>> CLRF TXSTA
>> BCF TXSTA, TX9 ; Select 8-bit
>> transmission
>> BCF TXSTA, TXEN ; Disable transmission
>> initially
>> BCF TXSTA, SYNC ; Asynchronous mode
>> ; BSF TXSTA, BRGH ; High baud rate
>> BCF TXSTA, BRGH ; low baud rate since
>> using extrnal 3.6864MHz clock.
>> BANKSEL SPBRG
>> MOVLW D'5' ; Baud rate counter value
>> MOVWF SPBRG ; for 9600 baud, 3.6864MHz
>> clock
>>
>> BANKSEL TXSTA
>> BSF TXSTA, TXEN ; Enable transmission
>> BANKSEL RCSTA BSF RCSTA,
>> SPEN ; Enable serial port
>>
>> movlw 'B'
>> btfss PIR1,TXIF
>> goto $-1
>> movwf TXREG ; send character- this works
>>
>>
>>