Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ESINIT MOVLW B'00100000' ; Enable transmit and choose low baud rate
- MOVWF TXSTA ; write to reg
- MOVLW B'10010000' ; Enable recieve and serial port itself
- MOVWF RCSTA
- MOVLW D'15' ; 9600 bps (Fosc / (64 * Speed) - 1)
- MOVWF SPBRG ; write to reg
- BCF TRISC, TX ; Make TX pin of PORTC output
- BSF TRISC, RX ; Make RX pin of PORTC input
- BSF RCSTA, SPEN ; Enable the serial port
- BSF PIE1, RCIE ; Enable recice interrupt enable
- BSF INTCON, PEIE ; Enable peripheral interrupt enable
- RETURN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement