Searching \ for '[PIC] 18F1320 Brown out reset?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=18F
Search entire site for: '18F1320 Brown out reset?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] 18F1320 Brown out reset?'
2008\04\10@091548 by Carl Denk

flavicon
face
Using MPLAB 8.02 with C18 3.2

I have a 18f1320 that I would like to set the brown out reset to 4.5
volts since there are several sensors (Freescale MPX5700GP-ND and LM335)
attached that want 4.75 volt minimum and would prefer that CPU doesn't
reset below that 4.5 volts.

From the data sheet I find:
CONFIG2L register
Bits 3 -2  = BORV1: 00 for 4.5 volt
Bit 1 = BOR: 1 Brown out reset enabled
Bit 0 = PWRTEN (not) = 0 power up timer enabled

And from 18F1320.h file:

{Quote hidden}

Have tried
>
> #pragma config CONFIG2H_DEFAULT  =  0x02 // Brown out reset enabled at 4.5 volts

and
> #pragma config CONFIG2H  =  0x02 // Brown out reset enabled at 4.5 volts

C18 accepted both versions.

Then loading the hex file into Microengineering MELABS programmer 4.02,
with "update configuration from file" checked, and view configuration, I
see BOR 2.0 volts.

Several questions:
1: In MPLAB how can I verify the configuration, view CPU registers is
greyed out?
2: What would the correct or best way to accomplish the change?
3: I think I can make the change in the programmer, but would prefer the
change to be hard coded, if a different programmer was used.

Thanking in advance. :)

2008\04\10@133230 by John Temples

flavicon
face
On Thu, 10 Apr 2008, Carl Denk wrote:

> Using MPLAB 8.02 with C18 3.2
>
> I have a 18f1320 that I would like to set the brown out reset to 4.5
> volts since there are several sensors (Freescale MPX5700GP-ND and LM335)
> attached that want 4.75 volt minimum and would prefer that CPU doesn't
> reset below that 4.5 volts.
>
> From the data sheet I find:
> CONFIG2L register
> Bits 3 -2  = BORV1: 00 for 4.5 volt
> Bit 1 = BOR: 1 Brown out reset enabled
> Bit 0 = PWRTEN (not) = 0 power up timer enabled
>
> And from 18F1320.h file:

You want to be looking at the "PIC18 CONFIGURATION SETTINGS ADDENDUM"
that came with the compiler, not the header file.  This will show you
the correct directive is

#pragma BORV = 45

> 1: In MPLAB how can I verify the configuration, view CPU registers is
> greyed out?

Configure...Configuration bits

--
John W. Temples, III

2008\04\10@161829 by Carl Denk

flavicon
face
Thanks for the replies. I found the "PIC18 CONFIGURATION SETTINGS
ADDENDUM" file, and that cleared up a whole lot, don't know why I didn't
find it before ! :)

Still getting on the MELABS programmer, no change in the configuration
though. Is there another way I can verify what the actual config is?
I'll drop an E-mail to ME labs, and ask there, but thinking MPLAB should
have a view to the actual config.


John Temples wrote:
{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 2008 , 2009 only
- Today
- New search...