saeed_pk
Full Member level 4
- Joined
- May 20, 2006
- Messages
- 237
- Helped
- 35
- Reputation
- 68
- Reaction score
- 28
- Trophy points
- 1,308
- Location
- Islamabad, Pakistan
- Activity points
- 2,655
pic18f assembleur rrf
hi all,
I have made a software routine in Assembly in Hi-Tech PICC for PIC16F877 i want to use this routine on PIC18F452 i made it using #asm directive
code is following,
This a Software UART Reception Function please help me in modifying this code for PIC18F452
[/code]
hi all,
I have made a software routine in Assembly in Hi-Tech PICC for PIC16F877 i want to use this routine on PIC18F452 i made it using #asm directive
code is following,
Code:
unsigned char Receive()
{
TRIS_RX = SET;
delayconstant = baudrate;
bitcount = 9;
#asm
btfsc RX_ASM
goto $-1
decfsz _delayconstant,f
goto $-1
movf _baudrate,w
movwf _delayconstant
decfsz _bitcount,f
goto $+2
goto $+6
bcf _STATUS,0
btfsc RX_ASM
bsf _STATUS,0
rrf _rxreg,f
goto $-11
#endasm
return rxreg;
}
This a Software UART Reception Function please help me in modifying this code for PIC18F452
[/code]