|
|
View previous topic :: View next topic |
Author |
Message |
Guest
|
how to configure different brown-out voltage with #fuse |
Posted: Thu Feb 19, 2009 8:43 pm |
|
|
MPLAB: V8.20
Device: PIC184520
C complier: CCS V4.0
i use "#fuse brownout" to enable brownout function,check configuration bits, and find below:
300002 1F Power Up TimerDisabled
Brown Out DetectEnabled in hardware, SBOREN disabled
Brown Out Voltage2.0V
From the spec of PIC18F4520,we knwo there are four kinds of brown out voltage depends on BORV1 and BORV0 of CONFIG2L.
If want to set Brown out voltage to be 2.79V(BORV1:BORV0=10),how to configure with #fuse? or how to configure with CCS? |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
|
Posted: Thu Feb 19, 2009 8:48 pm |
|
|
See the 18F4520 device header file:
//////// Fuses: BORV20,BORV27,BORV42
//////// Fuses: BORV45 |
|
|
Guest
|
how to configure different brown-out voltage with #fuse |
Posted: Thu Feb 19, 2009 10:44 pm |
|
|
Thanks.
I've checked the 18F4520 device header file on my computer ,don't find BORV27 and only see below
Code: | ////////////////////////////////////////////////////////////////// VREF
// Constants used in setup_low_volt_detect() are:
//
#define LVD_LVDIN 0x1F
#define LVD_45 0x1E
#define LVD_42 0x1D
#define LVD_40 0x1C
#define LVD_38 0x1B
#define LVD_36 0x1A
#define LVD_35 0x19
#define LVD_33 0x18
#define LVD_30 0x17
#define LVD_28 0x16
#define LVD_27 0x15
#define LVD_25 0x14
#define LVD_24 0x13
#define LVD_23 0x12
#define LVD_22 0x11
#define LVD_21 0x10
#define LVD_TRIGGER_BELOW 0
#define LVD_TRIGGER_ABOVE 0x80 |
if LVD_27 is same function as BORV27? |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
|
Posted: Thu Feb 19, 2009 10:53 pm |
|
|
Mine is version 4.081. What version is yours?
You asked about the four Brownout Fuses. Here is what the fuses section looks like in the 4.081 version device header file:
Quote: |
//////// Standard Header file for the PIC18F4520 device ////////////////
#device PIC18F4520
#nolist
//////// Program memory: 16384x16 Data RAM: 1536 Stack: 31
//////// I/O: 36 Analog Pins: 13
//////// Data EEPROM: 256
//////// C Scratch area: 00 ID Location: 200000
//////// Fuses: LP,XT,HS,RC,EC,EC_IO,H4,RC_IO,PROTECT,NOPROTECT
//////// Fuses: BROWNOUT_NOSL,BROWNOUT_SW,NOBROWNOUT,BROWNOUT,WDT1,WDT2,WDT4
//////// Fuses: WDT8,WDT16,WDT32,WDT64,WDT128,WDT,NOWDT,BORV20,BORV27,BORV42
//////// Fuses: BORV45,PUT,NOPUT,CPD,NOCPD,NOSTVREN,STVREN,NODEBUG,DEBUG
//////// Fuses: NOLVP,LVP,WRT,NOWRT,WRTD,NOWRTD,IESO,NOIESO,FCMEN,NOFCMEN
//////// Fuses: PBADEN,NOPBADEN,CCP2B3,CCP2C1,WRTC,NOWRTC,WRTB,NOWRTB,EBTR
//////// Fuses: NOEBTR,EBTRB,NOEBTRB,CPB,NOCPB,LPT1OSC,NOLPT1OSC,MCLR,NOMCLR
//////// Fuses: XINST,NOXINST,INTRC,INTRC_IO,WDT256,WDT512,WDT1024,WDT2048
//////// Fuses: WDT4096,WDT8192,WDT16384,WDT32768,RC
|
|
|
|
Guest
|
|
Posted: Fri Feb 20, 2009 12:09 am |
|
|
Very thanks.I've seen the information you attach in my head file. |
|
|
Ttelmah Guest
|
|
Posted: Fri Feb 20, 2009 3:49 am |
|
|
The chip has both a brownout circuit (configurable by the fuses, which are listed right at the top of the include file, and now 'found'), and separately a LVD 'detection' module, which doesn't trigger a reset, but instead an interrupt, allowing you to tidy up 'cleanly' as power drops. This is controlled by the LVD defines.
Hence the two sets of information.
Best Wishes |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|