Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC Microcontroller 12F675

Status
Not open for further replies.

nirmala h

Member level 1
Joined
Jan 18, 2011
Messages
36
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,288
Location
Bangalore, India
Activity points
1,530
Can anybody explain the configuration bits of a PIC Microcontroller (PIC 12F675)?
Ex: BODEN, WDT, MCLRE etc.. what does it mean & how to set/reset all these ?
 

g_shyam1682

Full Member level 4
Joined
Jan 11, 2010
Messages
206
Helped
53
Reputation
106
Reaction score
43
Trophy points
1,308
Location
Udaipur-Rajshan-India
Activity points
2,551
Hi friend

For configuration bits of PIC12F675,

Go to Page no.54(Section 9) of PIC12F675 Datasheet.

BODEN: Brown-out Detect Enable bit(4)
1 = BOD enabled
0 = BOD disabled

WDTE: Watchdog Timer Enable bit
1 = WDT enabled
0 = WDT disabled

MCLRE: GP3/MCLR Pin Function Select bit(5)
1 = GP3/MCLR pin function is MCLR
0 = GP3/MCLR pin function is digital I/O, MCLR internally tied to VDD

Hope this is help you
Shyam
 

nirmala h

Member level 1
Joined
Jan 18, 2011
Messages
36
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,288
Location
Bangalore, India
Activity points
1,530
Hi,

Thank you for the information...

I have read this...

If you could explain what is the significance of each & every bits then it will be very helpful...
 

PaulHolland

Advanced Member level 2
Joined
Jan 15, 2003
Messages
664
Helped
95
Reputation
190
Reaction score
34
Trophy points
1,308
Location
Holland
Activity points
4,841
BODEN: Brown-out Detect Enable bit(4)
1 = BOD enabled
0 = BOD disabled
This Bit is switching on a special circuit that will put your microcontroller PIC12F675 in reset state when the voltage is below a level. This is very usefull for battery power applications !.


WDTE: Watchdog Timer Enable bit
1 = WDT enabled
0 = WDT disabled
Watchdog is a circuit that is timing and if you do not reset this timer in software it will reset the PIC. This is usefull for software that can potentially hang in a loop waiting for an event that will never will come.


MCLRE: GP3/MCLR Pin Function Select bit(5)
1 = GP3/MCLR pin function is MCLR
0 = GP3/MCLR pin function is digital I/O, MCLR internally tied to VDD
GP3 pin can be configure as RESET INPUT OR as normal Input only pin. I always use GP3 as input pin since external reset is most of the time not needed.
 

don diego

Junior Member level 3
Joined
Nov 27, 2008
Messages
27
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,401
...
GP3 pin can be configure as RESET INPUT OR as normal Input only pin. I always use GP3 as input pin since external reset is most of the time not needed.
Hi PaulHolland,

Could you please share with your experience about using MCLR as an input pin? I would like to use it in PIC10F222 and I would be thankful for any tips. I'm using ICD2 clone to program and I'm wondering if there could be a problem with programming after external RESET disable. Are you using some delay at the beginning of your programs to allow enter in programming mode?

Thanks in advance,
don diego
 

g_shyam1682

Full Member level 4
Joined
Jan 11, 2010
Messages
206
Helped
53
Reputation
106
Reaction score
43
Trophy points
1,308
Location
Udaipur-Rajshan-India
Activity points
2,551
Hi Friend

I would like to use it in PIC10F222 and I would be thankful for any tips. I'm using ICD2 clone to program and I'm wondering if there could be a problem with programming after external RESET disable.

if you are use ICD2 Clone for programming purpose,
you can't use GP3/MCLR Pin as input pin.
Because this pin is use as MCLR in ICSP programming.
and after programming done, you can't change function of this pin.

so if you want to use this pin as GP3,
you must used another Programmer like MPLAB PM3 Device Programmer.

Hope this is help you
Shyam
 

PaulHolland

Advanced Member level 2
Joined
Jan 15, 2003
Messages
664
Helped
95
Reputation
190
Reaction score
34
Trophy points
1,308
Location
Holland
Activity points
4,841
Hi PaulHolland,

Could you please share with your experience about using MCLR as an input pin? I would like to use it in PIC10F222 and I would be thankful for any tips. I'm using ICD2 clone to program and I'm wondering if there could be a problem with programming after external RESET disable. Are you using some delay at the beginning of your programs to allow enter in programming mode?

Thanks in advance,
don diego

Hi Don,

You simply set the config word to use GP3 as input pin and on your hardware side you need to put a resistor of 10K -- 33K in between you logic that is driving your GP3 pin. Now you connect th GP3 pin in the normal way to you programmer, ICD2, Clone's or ICD3 / RealICE and you simply program the device. You will get a warning #0033 which you should ignore. I develop this way already for years and in production we do run 50.000 units/year this way.
No matter what others are telling its simply working. The only thing that is not possible is in circuit debugging but if you take the same chip in the microchip line with more pins this is even possible. No software modifications are needed. If your programmer is using the normal high voltage programming mode it works, only programming with low voltage does not work but all icd2 and clone's are using high voltage programming.

regards, PaulHolland
 
Last edited:

don diego

Junior Member level 3
Joined
Nov 27, 2008
Messages
27
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,401
Thanks for answer Paul. I have checked reprogramming with different MCLR configuration and there was no problem :)
 

PaulHolland

Advanced Member level 2
Joined
Jan 15, 2003
Messages
664
Helped
95
Reputation
190
Reaction score
34
Trophy points
1,308
Location
Holland
Activity points
4,841
Keep in mind that GP3 does not have a pull-up resistor inside and no latch-up diode to Vcc so ALWAYS make sure the voltage on this pin is not more than vcc otherwise the pic will go into programming mode :)
 

don diego

Junior Member level 3
Joined
Nov 27, 2008
Messages
27
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,401
Keep in mind that GP3 does not have a pull-up resistor inside and no latch-up diode to Vcc so ALWAYS make sure the voltage on this pin is not more than vcc otherwise the pic will go into programming mode :)

Good point about this voltage. I didn't know that. I have external pull-up resistor and in my project GP3 is used only to read a state of switch, which is shorting to ground.
 

Kandeepan

Junior Member level 1
Joined
Nov 18, 2010
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,436
Hi, Could any one help me to program to flash two LEDs alternatively.I'm using PIC12F675. 90 Flashes per minute. using CCS compiler.Thank you in advance.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top