PDA

View Full Version : MPASM problems



BrianT
- 30th August 2007, 04:16
I am using MCSP 3.0.0.0. with PBP 2.47 and use a Melabs USB serial programmer or EPIC to load the MCS bootloader.

I have a simple 116 word BLINK program that works in the PIC 18F4550 when assembled with either MPASM or PM so I am fairly confident my setup is basicly correct.

I also have a 5k word program (attached) that works a treat with a 16F877A using the PM assembler but when I try to assemble for a 18F4550 with MPASM I get the following errors:-

Warning [220] .......... Address exceeds maximum range for this processor.

What is wrong - the '4550 has twice the code space of the '877A?

Also - what box should I tick under View\Compile and Program Options. I have the choice of INHX8M, INHX8S and INHX32. INHX8S tells me I should be using INHX32. Both INHX8M and INHX32 seem to work identically with the BLINK program. What do these selections do and why should I choose one over the other?

- all tips greatly appreciated.

Bruce
- 30th August 2007, 15:07
Hi Brian,

I just compiled the code you posted, with PBP v2.47, for the 18F4550, and it compiled with
no problems. MCS+ v3.0.0.0. MPASM v5.11.

Darrel Taylor
- 30th August 2007, 21:46
Yup, compiles here too.

Brian, can you open the .LST file for that program with Notepad.
Search for [220].

The lines immeadiately following the warning should indicate what the problem is from.
<br>

BrianT
- 31st August 2007, 00:51
Thanks guys,

I have changed the file name and paths around and now get different error messages (Warning [217] ...path\filename....Hex file format specified on command line.) so I suspect I am running into some path\filename length issues.

A challenge for the weekend.

Cheers
Brian

Darrel Taylor
- 31st August 2007, 01:29
Warning [217] is "Hex file format specified on command line."
The path\filename is just the file the error occured in.

INHX32 is required for the 4550, and the 18F4550.inc file specifies the format.



LIST p = 18F4550, r = dec, w = -311, f = inhx32


If specified on the command line, it throws the warning. Even if it's the same INHX32.

The odd part is that MSC doesn't set the command line option when you select INHX8M.
So selecting INHX8M in MCS should make the error go away.

You still end up with INHX32.
<br>