I need to initialize my serial routine before i can use it, below is the code:
However, I am using OCS2 pin instead of port A or B. How to define it using OSC2? Thank you.
serial_init: banksel SPBRG ;bank 1 movlw 2580 ;set baud rate movwf SPBRG movlw b'00100100' ;8-bit transmit, transmitter enabled, movwf TXSTA ;asynchronous mode, high speed mode banksel PORTA ;bank 0 movlw b'10010000' ;8-bit receive, receiver enabled, movwf RCSTB ;serial port enabled return