Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

asm Code for migrating from PIC16->PIC18 in Hi-Tech PICC

Status
Not open for further replies.

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,

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]
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top