Jump to content

Fuses On P16f628a.h Include File


Recommended Posts

Hi,

 

During tests i have doing with SourceBoost, i found an issue on p16f628a.h include file.

 

Originaly include file have:

- #define _INTOSC_OSC_NOCL 0x3FFC

but lacks definition:

- INT OSC CLK OUT ON RA6

 

so i inserted on p16f628a.h:

#define _INTOSC_CLKOUT 0x3FFD

 

On my mainfile.h i have:

#pragma DATA _CONFIG, _PWRTE_ON & _WDT_OFF & _CP_ON & _LVP_OFF & _MCLRE_OFF & _INTOSC_CLKOUT

As my old compiler do, it gives me the freedom to define what i want, but Sourceboost gives me a compile error, after this include:

 

mainfile.c

error: invalid pragma DATA argument '_INTOSC_CLKOUT'

I think definition labels can have any name i like, since sintax and argument is consistent with rules.

 

can any body make light on my mind?

 

Thank you

Joli

Link to post
Share on other sites
Hi,

 

During tests i have doing with SourceBoost, i found an issue on p16f628a.h include file.

 

Originaly include file have:

- #define _INTOSC_OSC_NOCL 0x3FFC

but lacks definition:

- INT OSC CLK OUT ON RA6

 

so i inserted on p16f628a.h:

#define _INTOSC_CLKOUT 0x3FFD

 

On my mainfile.h i have:

#pragma DATA _CONFIG, _PWRTE_ON & _WDT_OFF & _CP_ON & _LVP_OFF & _MCLRE_OFF & _INTOSC_CLKOUT

As my old compiler do, it gives me the freedom to define what i want, but Sourceboost gives me a compile error, after this include:

 

mainfile.c

error: invalid pragma DATA argument '_INTOSC_CLKOUT'

I think definition labels can have any name i like, since sintax and argument is consistent with rules.

 

can any body make light on my mind?

 

Thank you

Joli

Best to use PIC16F628.h, the P prefix ones are for the old C2C compiler. If you include#<system.h> then it automatically includes the PIC prefixed header files.

 

Please let us know if there is a problem in PIC16F628.h so we can correct it.

 

Regards

Dave

Link to post
Share on other sites

Thank you Dave.

 

Meanwhile i included my own names and works as expected.

 

Related with pragma directives, i tried to use #PRAGMA DATA_EEPROM, 1, 2, 3, 4 ... as mentioned on the manual, but compiler result is:

 

C:\Programas\SourceBoost\boostc_pic16.exe -t PIC16F628A cofcgd.c

 

mainfile.h(6): warning: unknown or invalid pragma (ignored)

 

As mentioned days ago, my version is SourceBoost Full.

 

Any suggestions?

 

Thank you,

 

Joli

Link to post
Share on other sites
Related with pragma directives, i tried to use #PRAGMA DATA_EEPROM, 1, 2, 3, 4 ... as mentioned on the manual, but compiler result is:

Joli,

 

Try #pragma DATA _EEPROM, 1, 2, 3 ...

 

Regards

 

davidb

 

Thank you David,

Now i see my type mistake.

Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...