|
|
View previous topic :: View next topic |
Author |
Message |
scanan
Joined: 13 Aug 2004 Posts: 60 Location: Turkey
|
NOMCLR no master clear question? |
Posted: Thu Oct 02, 2014 6:57 am |
|
|
Hi everybody,
I designed a board with pic18f6310,
my CCS compiler model 4.114
my fuse configuration is like that:
#include <18F6310.h>
#device adc=8
#FUSES WDT64
#FUSES INTRC_IO //High speed osc with HW enabled 4X PLL
#FUSES NOBROWNOUT //Reset when brownout detected
#FUSES PUT //No Power Up Timer
#FUSES NOSTVREN //Stack full/underflow will cause reset
#FUSES NODEBUG //No Debug mode for ICD
#FUSES NOIESO //Internal External Switch Over mode enabled
#FUSES NOFCMEN //Fail-safe clock monitor enabled
#FUSES NOXINST //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
#FUSES PROTECT //Code not protected from reading
#FUSES NOLPT1OSC //Timer1 configured for low-power operation
#FUSES NOMCLR //Master Clear pin disabled
and I also connected the mcrl pin of the CPU to Vcc by using 4K7.
and I do this test.
using a metalik object only touching the mclr pin or route. the CPU resets.
this question is why the CPU resets?, it is supposed that by the fuse configuration that Master clear pin is disabled
seems that here the FUSE configuration has no effect
any suggestions ?
Cheers _________________ Dr Suleyman CANAN
R&D Electronic Engineer
https://suleymancanan.wordpress.com
Do whatever you do with amateur spirit -
But always feel professional. |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Thu Oct 02, 2014 7:21 am |
|
|
Hi,
According to the datasheet for the 18f6310: "the MCLR input can be disabled with the MCLRE Configuration bit. When MCLR is disabled, the pin becomes a digital input."
So, the first thing I would do is to make sure that MCLR is *really* being disabled. To do that, I would look at how the configuration bits are actually being set by the compiler. You can do that by looking at the bottom of the .lst file. If the correct configuration is being set, then you can assume that the MCLR pin is just a digital input. At that point, I would see if any other pins show the same behavior. The problem might just be spurious noise pickup on *any* pin?
And, as a friendly suggestion, your signature line would sure be a lot more impressive if you hadn't misspelled the word 'professional'. I know you are not a native English speaker, so that is why I'm mentioning it!
John |
|
|
scanan
Joined: 13 Aug 2004 Posts: 60 Location: Turkey
|
|
Posted: Thu Oct 02, 2014 7:42 am |
|
|
ezflyr wrote: | Hi,
According to the datasheet for the 18f6310: "the MCLR input can be disabled with the MCLRE Configuration bit. When MCLR is disabled, the pin becomes a digital input."
So, the first thing I would do is to make sure that MCLR is *really* being disabled. To do that, I would look at how the configuration bits are actually being set by the compiler. You can do that by looking at the bottom of the .lst file. If the correct configuration is being set, then you can assume that the MCLR pin is just a digital input. At that point, I would see if any other pins show the same behavior. The problem might just be spurious noise pickup on *any* pin?
And, as a friendly suggestion, your signature line would sure be a lot more impressive if you hadn't misspelled the word 'professional'. I know you are not a native English speaker, so that is why I'm mentioning it!
John |
The fuse configuration in the LST file is as follows:
Configuration Fuses:
Word 1: 0800 INTRC_IO NOFCMEN NOIESO
Word 2: 0D18 PUT NOBROWNOUT BORV20 WDT WDT64
Word 3: 01C3 CCP2C1 NOLPT1OSC NOMCLR
Word 4: 0080 NOSTVREN NOXINST NODEBUG
Word 5: 0000 PROTECT
Word 6: 0000
Word 7: 0001
the test was to see if the pin really turn into input or not. in this case no.
and thanks for your professional suggestions. _________________ Dr Suleyman CANAN
R&D Electronic Engineer
https://suleymancanan.wordpress.com
Do whatever you do with amateur spirit -
But always feel professional. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19554
|
|
Posted: Thu Oct 02, 2014 8:22 am |
|
|
You have to be very careful with the MCLR pin....
Unlike other pins, it is also the Vpp pin. As such it does not have any protection diodes built in, and will reset the chip even if disabled, if it goes above the Vdd voltage. If you want to use it as an input pin, I suggest adding your own protection diode to Vdd, when using it.
This has been recorded here in past threads on other chips.
It only functions as a normal I/O pin, if it is 'inside' the normal supply range. So touching it can almost certainly trigger a reset.
Basically it has three circuits present. The 'normal' operation circuit. The MCLR circuit, and the Vpp circuit. If it goes outside the normal supply range, internal leakage can cause the MCLR circuit to operate even if disabled. Go high enough, and the Vpp circuit will start to operate...
I use it on a couple of chips, and for reliable operation as I/O, always have a jumper to connect a protection diode, when not programming.
It is fine, if connected to circuitry that ensures it is inside the supply range. |
|
|
stinky
Joined: 05 Mar 2012 Posts: 99 Location: Central Illinois
|
|
Posted: Thu Oct 02, 2014 10:20 am |
|
|
Ttelmah, is your comment about the MCLR pin not having diode protection specific to the OP's device? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19554
|
|
Posted: Thu Oct 02, 2014 10:54 am |
|
|
No. Applies to all where it is also the Vpp pin.
Think about it Vpp has to go up to typically something like 12v.... |
|
|
|
|
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
|