Brown-out reset with maximum setting / minimum setting?

Discuss with MikroElektronika software developers about current library development.
Post Reply
Author
Message
joh.nguyen
Posts: 30
Joined: 17 Jul 2013 16:35

Brown-out reset with maximum setting / minimum setting?

#1 Post by joh.nguyen » 14 Oct 2013 04:49

Hi everybody,

I want to enable brown-out reset in my PIC 18f4620 with the following configuration bits:

- Brown-out Reset: Enabled (1)

- Brown-out Reset voltage: Maximum Setting (2)

I don't understand the setting at (2). Please help me on this. By the way, please check setting at (1) is properly or not? Do I need to choose other setting include Brown-out Reset enabled in hardware only (SBOREN is disabled), Brown-out Reset enabled in hardware only and disabled in Sleep mode (SBOREN is disabled)?

Thanks too much.

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Re: Brown-out reset with maximum setting / minimum setting?

#2 Post by janni » 14 Oct 2013 12:03

Voltage values are given in Table 26.1 of processor datasheet (highest setting corresponds to voltage of 4.36 to 4.82V).
If you don't need to disable the Brown-out Reset in software then use the setting: enabled in hardware only (SBOREN is disabled), which is also the safest one.

User avatar
milos.vicentijevic
Posts: 965
Joined: 23 Apr 2013 08:09

Re: Brown-out reset with maximum setting / minimum setting?

#3 Post by milos.vicentijevic » 15 Oct 2013 15:07

Hello,

please try to do what Janni has suggested. It should work safe.

Best Regards,
Milos Vicentijevic

joh.nguyen
Posts: 30
Joined: 17 Jul 2013 16:35

Re: Brown-out reset with maximum setting / minimum setting?

#4 Post by joh.nguyen » 15 Oct 2013 15:54

milos.vicentijevic wrote:Hello,

please try to do what Janni has suggested. It should work safe.

Best Regards,
Milos Vicentijevic
Hi Milos,

Follow janni's suggestion, I need to enable option Brown-out Reset enabled in hardware only (SBOREN is disabled), Minimum setting. Will this settings be appropriate with value of BOR configuration is BOREN1:BOREN0 = 1:1 and threshold of voltage is 2.00V? (Once Vdd is less than 2V, Brown-out reset will be triggered and MCU reset well?). Please check to help me understand this right.

Thanks,

User avatar
milos.vicentijevic
Posts: 965
Joined: 23 Apr 2013 08:09

Re: Brown-out reset with maximum setting / minimum setting?

#5 Post by milos.vicentijevic » 16 Oct 2013 12:48

Hello,

BOREN1 and BOREN0 are bits for configuration of your Brown out protection. All possible scenarios you can find in datasheet's table 4-1 on page 46:

http://ww1.microchip.com/downloads/en/d ... 39626b.pdf

If you set BORV1 and BORV0 bits to 1, threshold will be set to approx. 2v. So if power supply goes below this value your MCU will reset automatically. Off course, you will need to have your BOREN1 and BOREN0 bits set properly so protection is Enabled.

Best Regards,
Milos Vicentijevic

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Re: Brown-out reset with maximum setting / minimum setting?

#6 Post by janni » 16 Oct 2013 15:11

Note that the lowest settings are available only for LF version. One cannot use them for plain PIC18F4620 as it may work only in 4.2-5.5V range.

joh.nguyen
Posts: 30
Joined: 17 Jul 2013 16:35

Re: Brown-out reset with maximum setting / minimum setting?

#7 Post by joh.nguyen » 16 Oct 2013 16:37

After reading Table 4.1 in page 46, i make a detail here for any body follow this topic.

BOREN1:BOREN0:status of BOREN = 0:0:Unavailable is approx. with Disabled option in Editor Project
BOREN1:BOREN0:status of BOREN = 0:1:Available is approx. with Enabled option in Editor Project
BOREN1:BOREN0:status of BOREN = 1:0:Unavailable is approx. with Brown-out Reset enabled in hardware only and disabled in Sleep mode (SBOREN is disabled)
BOREN1:BOREN0:status of BOREN = 1:1:Unavailable is approx. with Brown-out Reset enabled in hardware only (SBOREN is disabled).

That's all my understanding, hope it right.

joh.nguyen
Posts: 30
Joined: 17 Jul 2013 16:35

Re: Brown-out reset with maximum setting / minimum setting?

#8 Post by joh.nguyen » 16 Oct 2013 16:41

janni wrote:Note that the lowest settings are available only for LF version. One cannot use them for plain PIC18F4620 as it may work only in 4.2-5.5V range.
Dear Janni,

Thanks for your comment, I couldn't find datasheet of PIC18LF4620 that show your words, would you mind giving the spec of PIC18LF4620?

Regards,

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Re: Brown-out reset with maximum setting / minimum setting?

#9 Post by janni » 17 Oct 2013 02:21

It's the same datasheet for both versions. Just look at the table I've written about earlier and you'll have all the data.

Post Reply

Return to “Library Development Discussion”