> Hi all.. > > I'am programming MIcrochip PIC16C73 and have problems with data > transmission using USART registers?. First, I enable Tx,Rx pines with SPEN > at RCSTA, then set TXSTA for async mode finally BRG register. When I send > a character it looks like there is no transmission. > > Some suggestions please? > > Thanks!! Here's some cut-and-paste from a little project I finished recently. Maybe it will help... ;+++ Initialize ports clrf PORTB ; Set all outputs low for now clrf PORTC BANK1 ; Define i/o port direction movlw B'11010000' ; SDI and RX/TX are inputs (really!) movwf TRISC ; for port C. movlw B'00000000' ; All pins are outputs movwf TRISB ; for port B. movwf ADCON1 ; Enable AN0-AN4 with Vref=Vdd movlw 0xff ; All pins are inputs movwf TRISA ; for port A. BANK0 ;+++ Start SCI BANK1 movlw D'25' ; 9600 baud movwf SPBRG movlw B'00100110' ; Asnyc, 8 bit, TX on, hi speed movwf TXSTA BANK0 movlw B'10010000' ; Enable UART and receiver movwf RCSTA SCI_CHAR_OUT: ; Send an ascii character out theSCI ; Enter with char to be sent in W SCI_DL: btfss PIR1,TXIF ; Is TXREG ready? goto SCI_DL ; No, wait movwf TXREG ; Yes, send the character return ; Done.