EmbeddedRelated.com
Forums

PIC to AVR

Started by Javier Chavez July 10, 2007
Hello All,

Sorry if this question has been asked before,
Is ther any program which can translate PIC ASM to AVR ASM?

Hopping you can help and thaks in advance,

Javier Chavez.
Not that I know of (not anything simple anyway). The basic architectures
are too different.

I have converted some assembler code I wrote for various PIC's to AVR ASM.
It was a long, tedious process.

Zack

On Tue, 10 Jul 2007, Javier Chavez wrote:

> Hello All,
>
> Sorry if this question has been asked before,
> Is ther any program which can translate PIC ASM to AVR ASM?
>
> Hopping you can help and thaks in advance,
>
> Javier Chavez.
--- In a..., "Javier Chavez"
wrote:
>
> Hello All,
>
> Sorry if this question has been asked before,
> Is ther any program which can translate PIC ASM to AVR ASM?
>
> Hopping you can help and thaks in advance,
>
> Javier Chavez.
>
Hi
I was looking for such a program or at least a table containing
equvalent codes of avr & pic ,but I couldn't find .so I began to do
this myself but soon I find out that it isn't right & my program
wasn't reliable . I recomand you to learn AVR & know the goals of
your pic program then write a new avr program
good luck
Been there done that (or tried anyway).

As I mentioned before, the devices in general have architectures which are
too different to do it automatically. Doing it by hand usually takes some
time but if you really understand the features of the two devices you're
using and the assembly languages for both, it can be done.

Zack

On Thu, 12 Jul 2007, Ayla wrote:

> --- In a..., "Javier Chavez"
> wrote:
>>
>> Hello All,
>>
>> Sorry if this question has been asked before,
>> Is ther any program which can translate PIC ASM to AVR ASM?
>>
>> Hopping you can help and thaks in advance,
>>
>> Javier Chavez.
>>
> Hi
> I was looking for such a program or at least a table containing
> equvalent codes of avr & pic ,but I couldn't find .so I began to do
> this myself but soon I find out that it isn't right & my program
> wasn't reliable . I recomand you to learn AVR & know the goals of
> your pic program then write a new avr program
> good luck
Zack,

Thank you very much and Yes, that's what I'm doing right now. I mean trying
to undertand some features of PIC, like.

addwf 18,0
addwf 18,1

In these instructions the destination goes to w first and in the second to
register 18. (I hope so)

I asked this question because I found some PIC code which was made to decode
DTMF tones. This code was made for C662 PIC by David Hedley.

So I was trying to understand the Goertzel Algorithm by reading the PIC code
(hard way).
Now I found a new problem:

What would be the external signal conditioning so that an AVR can handle
DTMF codes? (maybe using the ADC).

or

Is it something that was already made by someone else? I mean using our AVR

Javier

2007/7/12, Zack Widup :
> Been there done that (or tried anyway).
>
> As I mentioned before, the devices in general have architectures which are
>
> too different to do it automatically. Doing it by hand usually takes some
> time but if you really understand the features of the two devices you're
> using and the assembly languages for both, it can be done.
>
> Zack
>
> On Thu, 12 Jul 2007, Ayla wrote:
>
> > --- In a... , "Javier
> Chavez"
> > wrote:
> >>
> >> Hello All,
> >>
> >> Sorry if this question has been asked before,
> >> Is ther any program which can translate PIC ASM to AVR ASM?
> >>
> >> Hopping you can help and thaks in advance,
> >>
> >> Javier Chavez.
> >>
> >
> >
> > Hi
> > I was looking for such a program or at least a table containing
> > equvalent codes of avr & pic ,but I couldn't find .so I began to do
> > this myself but soon I find out that it isn't right & my program
> > wasn't reliable . I recomand you to learn AVR & know the goals of
> > your pic program then write a new avr program
> > good luck
> >
>