Configure Brown Out - PIC16F876

Status
Not open for further replies.

devonsc

Advanced Member level 4
Joined
Nov 30, 2004
Messages
115
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,298
Activity points
1,931
what is brown out protection

Hi there,

Would like to ask if you guys mind to give me some advice on how do I set up the brown out protection in the PIC 16F876.

Thanks in advance...
 

pic16f876 elenco fuses

devonsc said:
Hi there,

Would like to ask if you guys mind to give me some advice on how do I set up the brown out protection in the PIC 16F876.

Thanks in advance...

What would you like to know?

You can not do more then disable or enable brownout via program fuses ...

It is always a good idea to enable brownout detection if you are powering your PIC from +5V (the internal brownout will not work from 3.3V). Your PIC will get reset in case +5V drops during normal operation (see datasheet).

hope this helps and best regards
 

pic16f876 config

You can use the CONFIG directive:
i.e.:
__CONFIG _LVP_OFF & _CP_ALL & _WDT_ON & _BODEN_ON & _PWRTE_ON & _HS_OSC

bye wn.
 

Thanks C-Man, sorry for my unclear questions, I was trying to ask about what whitenoise wrote in here.

By the way, would like to ask if I could configure by simply writing the following in the program? Sorry if the following are nonsense:

LABEL EQU 200H ; the address

Then, I load a value and store in this address, where the value is based on which bit I intend to set as '1'.
Is this possible? I'm just asking, I will use the method you taught me though. Thanks.

By the wat, is there any difference between:

A EQU 0x02

and

A EQU 02

Are these both in hex? Thanks in advance...
 

devonsc said:
Hi there,

Would like to ask if you guys mind to give me some advice on how do I set up the brown out protection in the PIC 16F876.

Thanks in advance...

what is brown out protection?
 

banh said:
what is brown out protection?
a kind of reset logic if Vdd falls below a certain level.

from the manual:


Mik
 

devonsc

assuming that you are programming in assembler (MPLAB) you must use something like this:
#include "P16F628.inc" ; processor specific variable definitions


__idlocs H'0201' ; Version 02/01
; '__CONFIG' directive is used to embed configuration data within .asm file.
; The lables following the directive are located in the respective .inc file.
; See respective data sheet for additional information on configuration word.
__CONFIG _CP_ALL & _WDT_ON & _BODEN_ON & _PWRTE_ON & _INTRC_OSC_NOCLKOUT & _MCLRE_ON & _LVP_OFF

Look at the .inc file for the processor you are using and you will see which fuses are predifined.

best regards
 

A EQU 0x02
A EQU 02
A EQU 02H

Would like to ask again, is there any difference between the three statements as shown above? Sorry, newbie here, please don't get fed up of me. Thanks in advance
 

devonsc said:
A EQU 0x02
A EQU 02
A EQU 02H

Would like to ask again, is there any difference between the three statements as shown above? Sorry, newbie here, please don't get fed up of me. Thanks in advance

In case of 02 there is no difference

But imagine you are using 10 for example then 0x10 and 10H are the same (16 in decimal) but 10 could be hex 0A if your assembler uses decimal as default radix ...

hope this helps and best regards
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…