Discussion:
[PIC] 18Fxxxx Instructions
Anthony Nixon
2017-09-27 09:33:31 UTC
Permalink
Hi all,

It's been a long time since asking a question here :-)

I've started to use a 18F47K40 chip for a project and I'm still using
assembler for it.

In the other PIC families you could omit the destination bit (F) from
an instruction as the assembler sets it as default.

I gather this is not the case for 18F series when you can have a
destination and RAM access bit

Eg. ADDWF MyReg,W,A

Do all instructions have to be fully written in this way?

I am porting a 16F application to 18F because I need the extra ROM
space. If this is the case then I will have to rewrite and qualify
every instruction.

cheers

Tony
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Jan-Erik Söderholm
2017-09-27 09:50:24 UTC
Permalink
Hi.

I think there are defaults for both the W and the A bit.
So, as long as the defaults match your needs, technically
you should not need to specify them. But of course, the
code gets clearer if they are spelled out...

Jan-Erik.




-----Ursprungligt meddelande-----
Från: piclist-***@mit.edu [mailto:piclist-***@mit.edu] För Anthony
Nixon
Skickat: den 27 september 2017 11:34
Till: Microcontroller discussion list - Public. <***@mit.edu>
Ämne: [PIC] 18Fxxxx Instructions

Hi all,

It's been a long time since asking a question here :-)

I've started to use a 18F47K40 chip for a project and I'm still using
assembler for it.

In the other PIC families you could omit the destination bit (F) from an
instruction as the assembler sets it as default.

I gather this is not the case for 18F series when you can have a destination
and RAM access bit

Eg. ADDWF MyReg,W,A

Do all instructions have to be fully written in this way?

I am porting a 16F application to 18F because I need the extra ROM space. If
this is the case then I will have to rewrite and qualify every instruction.

cheers

Tony
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change
your membership options at http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Anthony Nixon
2017-09-27 19:44:45 UTC
Permalink
Thanks :-)

Tony

On Wed, Sep 27, 2017 at 7:50 PM, Jan-Erik Söderholm
Post by Jan-Erik Söderholm
Hi.
I think there are defaults for both the W and the A bit.
So, as long as the defaults match your needs, technically
you should not need to specify them. But of course, the
code gets clearer if they are spelled out...
Jan-Erik.
-----Ursprungligt meddelande-----
Nixon
Skickat: den 27 september 2017 11:34
Ämne: [PIC] 18Fxxxx Instructions
Hi all,
It's been a long time since asking a question here :-)
I've started to use a 18F47K40 chip for a project and I'm still using
assembler for it.
In the other PIC families you could omit the destination bit (F) from an
instruction as the assembler sets it as default.
I gather this is not the case for 18F series when you can have a destination
and RAM access bit
Eg. ADDWF MyReg,W,A
Do all instructions have to be fully written in this way?
I am porting a 16F application to 18F because I need the extra ROM space. If
this is the case then I will have to rewrite and qualify every instruction.
cheers
Tony
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change
your membership options at http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo
Anthony Nixon
2017-09-28 04:48:39 UTC
Permalink
Hi all,

I was trying to include EEPROM data from an include file which is
built by a Windows program I created to pack some data.

MPLABX is complaining that....

'.org_5' can not fit the absolute section

This is the offending org, which is just some basic data for testing

org 0xF00000
de 0x0000

This is what I understand the EEPROM declarations should be.

Any ideas?

cheers

Tony
Post by Anthony Nixon
Thanks :-)
Tony
On Wed, Sep 27, 2017 at 7:50 PM, Jan-Erik Söderholm
Post by Jan-Erik Söderholm
Hi.
I think there are defaults for both the W and the A bit.
So, as long as the defaults match your needs, technically
you should not need to specify them. But of course, the
code gets clearer if they are spelled out...
Jan-Erik.
-----Ursprungligt meddelande-----
Nixon
Skickat: den 27 september 2017 11:34
Ämne: [PIC] 18Fxxxx Instructions
Hi all,
It's been a long time since asking a question here :-)
I've started to use a 18F47K40 chip for a project and I'm still using
assembler for it.
In the other PIC families you could omit the destination bit (F) from an
instruction as the assembler sets it as default.
I gather this is not the case for 18F series when you can have a destination
and RAM access bit
Eg. ADDWF MyReg,W,A
Do all instructions have to be fully written in this way?
I am porting a 16F application to 18F because I need the extra ROM space. If
this is the case then I will have to rewrite and qualify every instruction.
cheers
Tony
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change
your membership options at http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu
Anthony Nixon
2017-09-28 06:05:10 UTC
Permalink
Sorry, I jumped the gun on previous post.

I looked in the 18f4xK40 programming data sheet and it mentions
310000h as the EEPROM programming address start.

MPLABX seems to like that.

cheers

Tony
Post by Anthony Nixon
Hi all,
I was trying to include EEPROM data from an include file which is
built by a Windows program I created to pack some data.
MPLABX is complaining that....
'.org_5' can not fit the absolute section
This is the offending org, which is just some basic data for testing
org 0xF00000
de 0x0000
This is what I understand the EEPROM declarations should be.
Any ideas?
cheers
Tony
Post by Anthony Nixon
Thanks :-)
Tony
On Wed, Sep 27, 2017 at 7:50 PM, Jan-Erik Söderholm
Post by Jan-Erik Söderholm
Hi.
I think there are defaults for both the W and the A bit.
So, as long as the defaults match your needs, technically
you should not need to specify them. But of course, the
code gets clearer if they are spelled out...
Jan-Erik.
-----Ursprungligt meddelande-----
Nixon
Skickat: den 27 september 2017 11:34
Ämne: [PIC] 18Fxxxx Instructions
Hi all,
It's been a long time since asking a question here :-)
I've started to use a 18F47K40 chip for a project and I'm still using
assembler for it.
In the other PIC families you could omit the destination bit (F) from an
instruction as the assembler sets it as default.
I gather this is not the case for 18F series when you can have a destination
and RAM access bit
Eg. ADDWF MyReg,W,A
Do all instructions have to be fully written in this way?
I am porting a 16F application to 18F because I need the extra ROM space. If
this is the case then I will have to rewrite and qualify every instruction.
cheers
Tony
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change
your membership options at http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership option
Loading...