PDA

View Full Version : Defining MCU with MPASM



Ioannis
- 24th May 2007, 09:53
I decided after a long time of resistance to leave PM assembler and start using MPASM. Up to this moment I could not find a way to define the use of PIC type in my program like the usual

@ device pic18fxxx

in PM assembler.

Thanks,
Ioannis

Acetronics2
- 24th May 2007, 10:14
HI, Ioannis

I didn't find nor ... that way.

BUT ... if you use The MPLAB Project Wizard ( you should !!! )... you define the processor there and do not need to define it in your program !!!

Alain

Ioannis
- 24th May 2007, 10:34
Thanks Alain. When using Mpasm, to assemble my program, it is funny, I cannot bootload it to the PIC. It seems that the mcu should be defined in the Basic program. I'll have to dig further and see what causes this to happen.

Ioannis

Acetronics2
- 24th May 2007, 11:07
Ha ! Bootloaders and Hex files ...

1) in MPLAB : Configure/Select Device

2) Select your programmer

2) " : FILE / Import " my bootloader.hex "

3) " : View / Program memory ( optionnal ... but useful !!! )

4) Program the bootloder ...


Here it is ...

Alain

Ioannis
- 24th May 2007, 11:34
Hi Alain.

I have already loaded the PIC with the appropriate bootloder hex code. It is working just fine with any program created from PBP with it's own assembler. But it is not working with Mpasm!

Of course I can always load the new hex file without Bootloader, but...

Ioannis

Acetronics2
- 24th May 2007, 12:39
I do not know any real Bootloading directly from MPLAB ...

download AN 851 and its softs from Microchip Website ... interesting - and useful !!!

do not forget to (copy into the "Program Files/P1618QP" directory)

: http://ww1.microchip.com/downloads/en/DeviceDoc/P1618QP_v1_1.zip

and select AN851 as a programmer ...

For REAL Bootloaders ( free ... ) see here :

http://www.etc.ugal.ro/cchiculita/software/picbootloader.htm

Alain

Ioannis
- 24th May 2007, 13:16
Thanks, I'll check it. Indeed interesting!

Ioannis