CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

MCLR behaviour on a 12F675

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Paul Holthuizen
Guest







MCLR behaviour on a 12F675
PostPosted: Sat Dec 07, 2002 2:53 pm     Reply with quote

Hi all,

I am experiencing something strange on a 12F628.
The application uses 4 io ports (GP0, GP1, GP2, GP4) and internal RC for a clock.
GP3 is not used. In the program I selected NOMCLR. In the programming word the actual MCLR bit (bit5) is a 0. That should disable the MCLR function and change GP3 into digital IO (although I understand that it can only be an input). As stated, GP3 is not used in the program. To make sure that voltages on that pin are 'known' I tied GP3 via a 2k2 to gnd.

To my surprise I found (when measuring something else on a nearby pin) that the device resets, when I touch GP3. This behaviour continues when I connect GP3 to +5v, either via a resistor or even direct.
When lowering the resistor value to gnd I found that it became less sensitive, till I came to a value of 100 Ohm, where I cannot get it to reset any more.

My question: What I understand from the datasheet is that the entire MCLR function should be disabled by clearing bit 5 of the config word. So why might I be seeing this?

Thanks for your time,

Paul
___________________________
This message was ported from CCS's old forum
Original Post ID: 9856
R.J.Hamlett
Guest







Re: MCLR behaviour on a 12F675
PostPosted: Sat Dec 07, 2002 3:50 pm     Reply with quote

:=Hi all,
:=
:=I am experiencing something strange on a 12F628.
:=The application uses 4 io ports (GP0, GP1, GP2, GP4) and internal RC for a clock.
:=GP3 is not used. In the program I selected NOMCLR. In the programming word the actual MCLR bit (bit5) is a 0. That should disable the MCLR function and change GP3 into digital IO (although I understand that it can only be an input). As stated, GP3 is not used in the program. To make sure that voltages on that pin are 'known' I tied GP3 via a 2k2 to gnd.
:=
:=To my surprise I found (when measuring something else on a nearby pin) that the device resets, when I touch GP3. This behaviour continues when I connect GP3 to +5v, either via a resistor or even direct.
:=When lowering the resistor value to gnd I found that it became less sensitive, till I came to a value of 100 Ohm, where I cannot get it to reset any more.
:=
:=My question: What I understand from the datasheet is that the entire MCLR function should be disabled by clearing bit 5 of the config word. So why might I be seeing this?
:=
:=Thanks for your time,
:=
The obvious thought, is that the reset is being caused by something else. Is it possible that you are actually getting a watchdog timeout, caused when anything is seen on GP3?.

Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 9857
Paul Holthuizen
Guest







Re: MCLR behaviour on a 12F675
PostPosted: Mon Dec 09, 2002 3:04 am     Reply with quote

:=:=Hi all,
:=:=
:=:=I am experiencing something strange on a 12F628.
:=:=The application uses 4 io ports (GP0, GP1, GP2, GP4) and internal RC for a clock.
:=:=GP3 is not used. In the program I selected NOMCLR. In the programming word the actual MCLR bit (bit5) is a 0. That should disable the MCLR function and change GP3 into digital IO (although I understand that it can only be an input). As stated, GP3 is not used in the program. To make sure that voltages on that pin are 'known' I tied GP3 via a 2k2 to gnd.
:=:=
:=:=To my surprise I found (when measuring something else on a nearby pin) that the device resets, when I touch GP3. This behaviour continues when I connect GP3 to +5v, either via a resistor or even direct.
:=:=When lowering the resistor value to gnd I found that it became less sensitive, till I came to a value of 100 Ohm, where I cannot get it to reset any more.
:=:=
:=:=My question: What I understand from the datasheet is that the entire MCLR function should be disabled by clearing bit 5 of the config word. So why might I be seeing this?
:=:=
:=:=Thanks for your time,
:=:=
:=The obvious thought, is that the reset is being caused by something else. Is it possible that you are actually getting a watchdog timeout, caused when anything is seen on GP3?.
:=
:=Best Wishes

Eh, not likely. The fuse setting is NOWDT. The resulting config word reads 3104, bit 3 is cleared -> no watchdog. Unless there's a way of connecting the watchdog interrupt to a pin that I do not know about, no, I can't see that the watchdog would be causing this.

Thanks,

Paul
___________________________
This message was ported from CCS's old forum
Original Post ID: 9871
R.J.Hamlett
Guest







Re: MCLR behaviour on a 12F675
PostPosted: Mon Dec 09, 2002 3:24 am     Reply with quote

:=:=:=Hi all,
:=:=:=
:=:=:=I am experiencing something strange on a 12F628.
:=:=:=The application uses 4 io ports (GP0, GP1, GP2, GP4) and internal RC for a clock.
:=:=:=GP3 is not used. In the program I selected NOMCLR. In the programming word the actual MCLR bit (bit5) is a 0. That should disable the MCLR function and change GP3 into digital IO (although I understand that it can only be an input). As stated, GP3 is not used in the program. To make sure that voltages on that pin are 'known' I tied GP3 via a 2k2 to gnd.
:=:=:=
:=:=:=To my surprise I found (when measuring something else on a nearby pin) that the device resets, when I touch GP3. This behaviour continues when I connect GP3 to +5v, either via a resistor or even direct.
:=:=:=When lowering the resistor value to gnd I found that it became less sensitive, till I came to a value of 100 Ohm, where I cannot get it to reset any more.
:=:=:=
:=:=:=My question: What I understand from the datasheet is that the entire MCLR function should be disabled by clearing bit 5 of the config word. So why might I be seeing this?
:=:=:=
:=:=:=Thanks for your time,
:=:=:=
:=:=The obvious thought, is that the reset is being caused by something else. Is it possible that you are actually getting a watchdog timeout, caused when anything is seen on GP3?.
:=:=
:=:=Best Wishes
:=
:=Eh, not likely. The fuse setting is NOWDT. The resulting config word reads 3104, bit 3 is cleared -> no watchdog. Unless there's a way of connecting the watchdog interrupt to a pin that I do not know about, no, I can't see that the watchdog would be causing this.
:=
:=Thanks,
Fair enough, you didn't list the options, so it was an idea...
I really would be investigating the possibility of a hardware problem. A line drifting to an indeterminate state, that is somehow influenced by the MCLR pin, or the obvious one of a faulty chip (I have had some very odd behaviours in the past, having a whole batch of 12C671 chips that exhibited a similar fault - Microchip replaced these with a batch from another factory, and these worked fine). I'd see if I could get another chip with a different batch number, to 'rule this out'.

Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 9873
Paul Holthuizen
Guest







Re: MCLR behaviour on a 12F675
PostPosted: Mon Dec 09, 2002 4:11 am     Reply with quote

:=:=:=:=Hi all,
:=:=:=:=
:=:=:=:=I am experiencing something strange on a 12F628.
:=:=:=:=The application uses 4 io ports (GP0, GP1, GP2, GP4) and internal RC for a clock.
:=:=:=:=GP3 is not used. In the program I selected NOMCLR. In the programming word the actual MCLR bit (bit5) is a 0. That should disable the MCLR function and change GP3 into digital IO (although I understand that it can only be an input). As stated, GP3 is not used in the program. To make sure that voltages on that pin are 'known' I tied GP3 via a 2k2 to gnd.
:=:=:=:=
:=:=:=:=To my surprise I found (when measuring something else on a nearby pin) that the device resets, when I touch GP3. This behaviour continues when I connect GP3 to +5v, either via a resistor or even direct.
:=:=:=:=When lowering the resistor value to gnd I found that it became less sensitive, till I came to a value of 100 Ohm, where I cannot get it to reset any more.
:=:=:=:=
:=:=:=:=My question: What I understand from the datasheet is that the entire MCLR function should be disabled by clearing bit 5 of the config word. So why might I be seeing this?
:=:=:=:=
:=:=:=:=Thanks for your time,
:=:=:=:=
:=:=:=The obvious thought, is that the reset is being caused by something else. Is it possible that you are actually getting a watchdog timeout, caused when anything is seen on GP3?.
:=:=:=
:=:=:=Best Wishes
:=:=
:=:=Eh, not likely. The fuse setting is NOWDT. The resulting config word reads 3104, bit 3 is cleared -> no watchdog. Unless there's a way of connecting the watchdog interrupt to a pin that I do not know about, no, I can't see that the watchdog would be causing this.
:=:=
:=:=Thanks,
:=Fair enough, you didn't list the options, so it was an idea...
:=I really would be investigating the possibility of a hardware problem. A line drifting to an indeterminate state, that is somehow influenced by the MCLR pin, or the obvious one of a faulty chip (I have had some very odd behaviours in the past, having a whole batch of 12C671 chips that exhibited a similar fault - Microchip replaced these with a batch from another factory, and these worked fine). I'd see if I could get another chip with a different batch number, to 'rule this out'.
:=
:=Best Wishes

Yep, my thought. I recreated the problem with an engineering sample as well as a production sample of the 12F675, and I can reproduce it on the breadboard as well as on the (version 0.1) pcb. Only difference is that it seems less sensitive on the breadboard. But if I pull the resistor to gnd and touch the pin with a wire, down it goes.
So I'm not completely clear what happens here.

Paul
___________________________
This message was ported from CCS's old forum
Original Post ID: 9875
R.J.Hamlett
Guest







Re: MCLR behaviour on a 12F675
PostPosted: Mon Dec 09, 2002 4:38 am     Reply with quote

:=:=:=:=:=Hi all,
:=:=:=:=:=
:=:=:=:=:=I am experiencing something strange on a 12F628.
:=:=:=:=:=The application uses 4 io ports (GP0, GP1, GP2, GP4) and internal RC for a clock.
:=:=:=:=:=GP3 is not used. In the program I selected NOMCLR. In the programming word the actual MCLR bit (bit5) is a 0. That should disable the MCLR function and change GP3 into digital IO (although I understand that it can only be an input). As stated, GP3 is not used in the program. To make sure that voltages on that pin are 'known' I tied GP3 via a 2k2 to gnd.
:=:=:=:=:=
:=:=:=:=:=To my surprise I found (when measuring something else on a nearby pin) that the device resets, when I touch GP3. This behaviour continues when I connect GP3 to +5v, either via a resistor or even direct.
:=:=:=:=:=When lowering the resistor value to gnd I found that it became less sensitive, till I came to a value of 100 Ohm, where I cannot get it to reset any more.
:=:=:=:=:=
:=:=:=:=:=My question: What I understand from the datasheet is that the entire MCLR function should be disabled by clearing bit 5 of the config word. So why might I be seeing this?
:=:=:=:=:=
:=:=:=:=:=Thanks for your time,
:=:=:=:=:=
:=:=:=:=The obvious thought, is that the reset is being caused by something else. Is it possible that you are actually getting a watchdog timeout, caused when anything is seen on GP3?.
:=:=:=:=
:=:=:=:=Best Wishes
:=:=:=
:=:=:=Eh, not likely. The fuse setting is NOWDT. The resulting config word reads 3104, bit 3 is cleared -> no watchdog. Unless there's a way of connecting the watchdog interrupt to a pin that I do not know about, no, I can't see that the watchdog would be causing this.
:=:=:=
:=:=:=Thanks,
:=:=Fair enough, you didn't list the options, so it was an idea...
:=:=I really would be investigating the possibility of a hardware problem. A line drifting to an indeterminate state, that is somehow influenced by the MCLR pin, or the obvious one of a faulty chip (I have had some very odd behaviours in the past, having a whole batch of 12C671 chips that exhibited a similar fault - Microchip replaced these with a batch from another factory, and these worked fine). I'd see if I could get another chip with a different batch number, to 'rule this out'.
:=:=
:=:=Best Wishes
:=
:=Yep, my thought. I recreated the problem with an engineering sample as well as a production sample of the 12F675, and I can reproduce it on the breadboard as well as on the (version 0.1) pcb. Only difference is that it seems less sensitive on the breadboard. But if I pull the resistor to gnd and touch the pin with a wire, down it goes.
:=So I'm not completely clear what happens here.
:=
One other thought. Have you actually verified what is in the chip, as opposed to what you think you are programming?. It'd be worth reading the contents of a programmed chip back as a hex file, and seeing if this has the correct patterns in the configuration fuses.
Paragraph 9.3.1 in the data sheet looks interesting. Combined with section 3.3.4, it tends to suggest that the possibility of a reset may exist, even if MCLR is disabled, in the event that the pin moves outside the supply rail range. Maybe there is some noise present giving this effect.

Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 9876
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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