Hello world not working (16F74)

Status
Not open for further replies.
What about checking the TRMT bit?

Code:
TXRDY:
    bsf STATUS,RP0          ; bank 1
Wait:
    btfss TXSTA, TRMT       ; transmission complete?
    goto Wait 
    bcf STATUS,RP0          ; bank 0
Send:
    movwf TXREG             ; send data 

    return
I would also provide a short delay after initialization of the USART module...
 

hi,
Quite right, clumsy coding
Eric
 

Bente Petersen using the same technic
 
Finally got it working , i used the xmit subroutine from Nigel and it works perfectly. Thanks guys for all the help
 

Hi,
You hav any routine for PIC C to do serial communication?
Thanks
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…