Hi,
I got help with a section of code but even though it works, I have no idea how. I want to understand exactly what is going on with this code, and see if I can re-code it in a way I can better understand.
It is designed to send the character stored in the working register through RS232 on the pics UART.
Here is the code:
I got help with a section of code but even though it works, I have no idea how. I want to understand exactly what is going on with this code, and see if I can re-code it in a way I can better understand.
It is designed to send the character stored in the working register through RS232 on the pics UART.
Here is the code:
Code:
send:
banksel TXREG
movwf TXREG ; send data in W
TransWt bsf STATUS,RP0 ; RAM PAGE 1
banksel TXSTA
WtHere btfss TXSTA,TRMT ; (1) transmission is complete if hi
goto WtHere
bcf STATUS,RP0 ; RAM PAGE 0
return