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.

Is there a compiler to convert PIC Assembly program to 8051?

Status
Not open for further replies.

hayder78

Member level 2
Member level 2
Joined
Mar 2, 2003
Messages
46
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Iraq
Visit site
Activity points
384
Pic to8051 compiler

Hi,

Does anybody knows a compiler to convert pic assembly programs to 8051 , I have a pic source code and I want to use it in 89c51 which I prefer in my projects and I don't know pic assembly.

Any suggestions ?

Thanx.
 

Re: Pic to8051 compiler

1. There is NO assembler compiler (o;

2. Instead of wasting time searching for a tool which most probaly doesn't exist by 99.9999% chance I would rather spend the time trying to understand the simple PIC assembler mnemonics...should be fairly easy to translate the mostly load/add/subtract/test/jump opcodes into 8051 assembly description.

3. I might be wrong (o;
 

Re: Pic to8051 compiler

Maybe it could be a good idea to program in C.
You could use your code on the PIC or the 8051 (or whatever CPU) with only minimal modifications.

If you have a complete project which uses a PIC I would stay with that CPU. If you must do some modifcations it could be simpler to learn PIC assembly (which is really simple) than to transfer the whole project to an 8051 based design.

These are just my personal thoughts, (I program on both platforms in C and if required in assembly for a few years now) hope this helps.

best regards
 

Re: Pic to8051 compiler

Hi
Try this

Microchip AN880


Converting from 8051 to Microchip Assembler: A Quick Reference
Name: AN880
Date: 10/08/2003
Author: Gaurang Kavaiya
Description: When migrating assembly language programs from one family of microcontrollers to another, the first question is almost always: “What’s the equivalent opcode?” Some operations, like addition and subtraction, are self-evident and practically universal. Other instructions may have some subtle differences in syntax or spelling that make direct conversions a bit trickier. Occasionally, some instructions simply don’t have a direct equivalent in the target set, or an equivalent exists but is explained in different terms. Another question that arises is that of addressing modes. Typically, Direct and Indirect Addressing modes are standard in all architectures. However, they tend to be different in limitations and feature set.
Keywords: 8051, MCS51, Architecture, Microcontroller, PIC, PIC16, PIC18, Assembler
 

Re: Pic to8051 compiler

I think he wants to go the other way around... Pic ->51
well i know some times you will like to migrate projects from one architecture to another without having to learn the old MCU or the new one or even both .. The thing is : you don't know if the assambler recovered was compiled C or other .. imagine having code that deals with pointers in the case of the 51 ... Now you need 3 languages(two assemblers + c for your micro ) and 2 architectures ..
So in general terms it can be a real problem .. I know of a company that tries to recover C source .. from a disassembled code ,with their decompiler , and you could "THEORETICALY use that code and recompile it to the new targer MCU .. nevertheless those programs are expensive .. they don't run the streets .. Do some searching here at electroda keyword: decompilers ... However i don't how good those programs could sythetize c code that was not originaly wriitten for c language .!
Anyways just look on the net for decompilers .. I assume that your program is at least 4k of code to be worthy to go trough this pain of looking for a shortcut !
 

Re: Pic to8051 compiler

i only have PIC 16C5x asm to AVR 1200 asm translator
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top