> Hey all,
> I've got some modem routines working on the F627 however they
> are not making use of the USART, so I thought I'd be more efficent
> and
> get the modem working with USART. However after many hours going
> through the datasheets and Tom McGahee's USART program I still can't
> get
> it up and running. I'm trying to avoid using interrupts if possible
> and
> I'm trying just to get TX working for now. Here's my code hope
> someone
> can help, Thanks.
> If I have both TXD and RXD set as outputs the RXD light will flash
> when
> I start my write routine by the TXD won't work. If RXD is an input
> nothing.
> The following code sets the port up.
> MOVLW d'25'
> movwf SPBRG
> BCF TXSTA, SYNC
> BCF RCSTA, SPEN
> BSF TXSTA, CSRC
> BSF TXSTA, TXEN
> movlw 0
> movwf TXREG
>
> My TX routine is:
> TX_MODEM
> movf dat_buf, w
> movwf TXREG
> ;wait_for_tx_to_end ; If I put this loop in it won't
> exit
> ;BTFSS TXSTA, TRMT ; The routine, so I put the delay
> in
> ;goto wait_for_tx_to_end
> movlw .5
> CALL DELAY_N_MS
> RETURN
>
>
> Thanks for an assistance in advance,
> Aaron
>
> --
>
http://www.piclist.com hint: PICList Posts must start with ONE topic:
> [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
>
>