cyb0rg777
New Member
I am trying to use the usart on a 16f628a to send a ps2 signal to my computer.
This short piece of Mikroc code is used to load the txreg and then wait for transmission.
txreg=byte;
while(!pir1.txif);
I also tried this in assembly
txreg=byte;
asm{
btfss PIR1,4 //check transmit bit txif
goto $-1
}
Both of these pieces of code stop transmission altogether,and I can't understand why.
:?
This short piece of Mikroc code is used to load the txreg and then wait for transmission.
txreg=byte;
while(!pir1.txif);
I also tried this in assembly
txreg=byte;
asm{
btfss PIR1,4 //check transmit bit txif
goto $-1
}
Both of these pieces of code stop transmission altogether,and I can't understand why.
:?