Assembly language Compiling problem...pls help

Thread Starter

melathj

Joined Apr 21, 2009
12
I,ve been doing a project which requires programming of Microcontroller. I got the program from a site http://www.hamradio.cc/projects/morse_code_decoder/picmrsrc.asm

When I went to burn this program to Microcontroller (PIC 16F84), technician told me that program shows error related to memory mapping (He says memory assigned is not enough). He doesnt know more about assembly language programming. So guys if any of u have program for compiling this, please help me by correcting the mistake (Email ID is mjamsheed@gmail.com)...or atleast suggest a person from whom I can get help...thanks.
 

jpanhalt

Joined Jan 18, 2008
11,087
First, the program is written for the 16F84A; you are trying to use a 16F84. At a minimum, you need to change the header.

Second, be sure your programmer can program the 16F84.

Finally, check page 78 or so of the 16f84A datasheet for a table of differences (http://ww1.microchip.com/downloads/en/devicedoc/35007b.pdf). There also used to be a migration document to go from the 16F84 to the 16F84A that described the differences. I did not find it right off, though.

John
 

AlexR

Joined Jan 16, 2008
732
If you go to the page that links to your code http://www.hamradio.cc/projects/Morse_Code_Decoder_Circuit.php you will see that the original assembler code has become scrambled. The poster identified one area of duplicated code and removed it but as far as I can gather he has not actually tested this modified code so there is no guarantee that is does not contain more errors.

The code is written in very poorly commented assembler and would take a lot of time and effort to unravel the author's intentions and then debug the actual code. Certainly more more time and effort than I would be prepared to devote to it.
 
Last edited:

Thread Starter

melathj

Joined Apr 21, 2009
12
Thanks for the reply. Once I compiled this, it specifically shown that error was related to memory mapping. So can any one please check only that memory mapping?
 

AlexR

Joined Jan 16, 2008
732
I got the program to compile but whether its going to work is anybodies guess.

The problem is in the RAM allocation, line 43 "org 0x0c" should read "udata 0x0c".
Also make sure that in the menu "Project > Build Options > Project" under the MPASM tab, you select the "Generate relocatable code" button.
 
Top