How to convert Atmel ATmega16 to PIC18F ?

Status
Not open for further replies.

blueray08

Newbie level 3
Joined
Oct 7, 2008
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,306
pic18f delay

Hello Everybody,

I am just a new beginner to learn assembly language. I had a short assembly language program ( lass than one page ). My instructor wanted me to convert it to PIC18F program.
I do not know anything about PIC18F
Could you help me do that? I really appreciate.

Here is the short program. It needs to convert to a PIC18F

.include "m16def.inc"
.org 0
rjmp start
.org $30
;*******************************************
start: ldi r16, high(ramend)
out sph,r16
ldi r16,low(ramend)
out spl,r16
ser r16
out ddrb,r16
LEDon:clr r16 ;active low on
out PORTb,r16
rcall delay
LEDoff:ser r16 active low off
out PORTb,r16
rcall delay
rjmp LEDon
;******************************************
delay: ldi r17,255
loop: ldi r18,255
loop2: nop
nop
nop
dec r18
brne loop2
dec 17
brne loop
ret


Thank you so very much. I really apprecitae.

blueray08
 

pic18 vs atmega

Hi,
it is your homework, not that of this group. This is how to go about it.
1. Understand what the program does for the AVR
2. Write a new program that does the same for PIC18
Not THAT difficult! If you disagree, consider a non-engineering career

Bob
 

atmel brne

Hi Bob,

Thank you for VERY KIND message. This is the first time i post it on EDAboard. I did not know where to post.
I am really shock on your message. You are so ...kind.

Added after 12 minutes:

I almost got it! I agreed with you, Bob It is not dificult. I just stayed focus. Because I have a lot more stuff to do for another classes.


Thanks for encouraging me, Bob
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…