News:

Let's find out together what makes a PIC Tick!

Main Menu

Problem on config 2

Started by Giuseppe, Dec 29, 2023, 06:08 PM

Previous topic - Next topic

Giuseppe


When I go to select the BORV_LO item I always encounter an error during compilation.
I'm using a pic 16f1827.

Device = 16F1827

Config1 FOSC_INTOSC, WDTE_OFF, PWRTE_ON, MCLRE_OFF, CP_ON, CPD_ON, BOREN_ON, CLKOUTEN_OFF, IESO_OFF, FCMEN_OFF
Config2 WRT_OFF, PLLEN_OFF, STVREN_OFF,LVP_OFF ',BORV_LO

Error that comes up during compilation is invalid fuse setting
How to solve the problem?

trastikata

Use BORV_19 or BORV_25 instead.

Giuseppe

Thanks, tried it, works great.
Happy holidays everyone

Teo

Hi,
I had the same problem with PIC12F1840 and now it works properly. 
Thanks a lot Trastikata

John Lawton

Quote from: Giuseppe on Dec 29, 2023, 06:08 PMError that comes up during compilation is invalid fuse setting
How to solve the problem?

Look at the P16F1827.ppi file which is on my PC is in the C:\Program Files (x86)\ProtonIDE\PDS\Includes\PPI directory.

Search for instances of BORV and you'll see the listed options are as Trastikata noted.

keytapper

I suspect that the plugin used to configure the fuses it's not maintained for the supplied IDE.
Furthermore the PPIs  to be changed are (almost) all for the enhanced midrange family.
Ignorance comes with a cost

david

Quote from: trastikata on Dec 29, 2023, 06:14 PMUse BORV_19 or BORV_25 instead.

So is BORV_19 and BORV_25 supposed to represent voltage levels of 1.9V and 2.5V respectively? 
I got caught up in this a few weeks back with a 12F1840 which has the voltages as follows-

bit 10             BORV: Brown-out Reset Voltage Selection bit
PIC12F1840:
1 = Brown-out Reset voltage set to 2.4V (typical)
0 = Brown-out Reset voltage set to 2.7V (typical)

Should it be BORV_24 and BORV_27 instead?  (But won't work)

David

trastikata

#7
Quote from: david on Jan 01, 2024, 12:22 AMShould it be BORV_24 and BORV_27 instead?  (But won't work)

Hello David,

as @John Lawton said look in the PPI files - that's what I do whenever there is a mismatch in the fuse settings. In this case it's again :

BORV_25 EQU 0XFBFF ; Brown-out Reset Voltage (VBOR) set to 2.5 V
BORV_19 EQU 0XFFFF ; Brown-out Reset Voltage (VBOR) set to 1.9 V

Don't mind the voltage numbers written there, they only represent High and Low BOR voltage in the fuse settings bits.

Rgards.

david

Hello trastikata,
Thanks for your reply.   I was specifically looking for a high brown out reset value and so did my homework by reading the datasheet and thought that's the one I want (BORV_27), plugged it in only to have it rejected at compile time.  I did track it down using the assembler file but was left a little confused as to what the actual level was that had been selected.

Cheers,
David

Stephen Moss

Quote from: david on Jan 01, 2024, 12:22 AMSo is BORV_19 and BORV_25 supposed to represent voltage levels of 1.9V and 2.5V respectively? 
I got caught up in this a few weeks back with a 12F1840 which has the voltages as follows-

bit 10             BORV: Brown-out Reset Voltage Selection bit
PIC12F1840:
1 = Brown-out Reset voltage set to 2.4V (typical)
0 = Brown-out Reset voltage set to 2.7V (typical)

Should it be BORV_24 and BORV_27 instead?  (But won't work)

David
Sometimes there is a difference between the name used by the compiler and the Fuse Configurator, usually as a result of Microchip making later changes to the names/values. This is not a new thing and is likely to continue to occur as even with a number of people it would be very time consuming to keep checking hundreds of PPI files against  datasheets for changes, and impossible for Les to do on his own.

I find the simplest solution is to set the Fuse Configurator to produce the ASM output and leave it there, in this mode the configuration values are directly written to the applicable register instead of requiring the compiler to interpret the fuse setting into the appropriate configuration values, thus it does not matter if the use Fuse names in the configurator and the compiler are not the same and so no compiler error will be generated as a result.

Giuseppe

Well, I'm happy that talking about my problem was also useful to others. Happy 2024 to everyone