Searching \ for '[PIC] Annoying Electric Field?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Annoying Electric Field?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Annoying Electric Field?'
2008\12\15@175507 by solarwind

picon face
So I finally got around to putting in my PIC16F886 in my breadboard today.

- I connected the power pins to my external power source.
- I made simple ICSP headers for my PICKIT2 using 90 degree bent staples.
- I hooked up one led and a resistor.

I wrote a simple program and loaded it up successfully. All it does is
turn on the LED.

It works. BUT. The LED keeps flickering and sometimes turns off and
sometimes stays on. When I move my hand near the PIC chip the LED
turns on. When I move my hand away, it turns off... I believe the chip
is being affected by some electric field around my hand? This is very
annoying. How do I fix this problem? The only code I wrote is this:





#include <htc.h>

typedef unsigned char byte;

__CONFIG(MCLRDIS & FCMDIS & BORDIS & PWRTDIS & WDTDIS & UNPROTECT &
IESODIS & INTIO);

void main() {        
       TRISC = 0x00;

       PORTC = 0xFF;        

       while(1) {
               
       }
}



All it does is make TRISC 0x00 (output) and turns PORTC to high to
light the LED. I cant wait to hook up my LCD but this problem has been
bugging me. Whats going on here?


--
..::[ solarwind ]::..

2008\12\15@180404 by Tamas Rudnai

face picon face
Where is your schematics? Did you put a 100nF decoupler in between Vdd and
Vss as close to the pin of the PIC as possible?

Tamas


On Mon, Dec 15, 2008 at 10:54 PM, solarwind <spam_OUTx.solarwind.xTakeThisOuTspamgmail.com> wrote:

{Quote hidden}

> -

2008\12\15@180746 by Jan-Erik Soderholm

face picon face
solarwind wrote:

> When I move my hand near the PIC chip the LED
> turns on. When I move my hand away, it turns off...
> Whats going on here?

Unconnected ("open") input pins are picking up
electric fields from the environment.

*Never* *Ever* leave CMOS inputs open !

2008\12\15@181144 by solarwind

picon face
On Mon, Dec 15, 2008 at 6:03 PM, Tamas Rudnai <.....tamas.rudnaiKILLspamspam@spam@gmail.com> wrote:
> Where is your schematics? Did you put a 100nF decoupler in between Vdd and
> Vss as close to the pin of the PIC as possible?
>
> Tamas

What is a decoupler? Well I stuck a small capacitor at the VDD and VSS
pins. Some random capacitor. And I don't have schematics. All it is is
a PIC with an LED and resistor. That's as simple as it is.


--
..::[ solarwind ]::..

2008\12\15@181344 by Nicola Perotto

picon face
The pic is resetting!
1) the Watchdog is disabled?
2) there is a resistor from pin 1 (/MCLR) to Vcc?
3) there is a capacitor of 100nF close to power pin?

Informations that we need also:
- you dont say witch compiler use
- the PICKIT2 is left hooked or not?
- which kind of power source are you using?
Dont forget the details!


solarwind wrote:
{Quote hidden}

2008\12\15@181435 by solarwind

picon face
On Mon, Dec 15, 2008 at 6:07 PM, Jan-Erik Soderholm
<jan-erik.soderholmspamKILLspamtelia.com> wrote:
> Unconnected ("open") input pins are picking up
> electric fields from the environment.
>
> *Never* *Ever* leave CMOS inputs open !

This problem is not happening on the Low Pin Count Demo Board that
came with the PICKIT2 and it has a few open ports. I also made all
ports TRIS = 0x00 so they are all forced output mode.

What is your recommendation?


--
..::[ solarwind ]::..

2008\12\15@181920 by solarwind

picon face
This problem is also occuring even when I drive the chip using the
power from the PICKIT2

2008\12\15@182253 by solarwind

picon face
On Mon, Dec 15, 2008 at 6:10 PM, Nicola Perotto <.....nicolaKILLspamspam.....nicolaperotto.it> wrote:
> The pic is resetting!
> 1) the Watchdog is disabled?
> 2) there is a resistor from pin 1 (/MCLR) to Vcc?
> 3) there is a capacitor of 100nF close to power pin?
>
> Informations that we need also:
> - you dont say witch compiler use
> - the PICKIT2 is left hooked or not?
> - which kind of power source are you using?
> Dont forget the details!

1. Yes, according to my source code it is. It's not the watchdog.
2. There is no resistor from /MCLR to VCC. Should there be one? Why?
How many ohms?
3. I don't know the value of the capacitor, I just found it in my junk
box. It seems to be a small capacitor. It *looks* like a ceramic
capacitor but it might not be.
4. Using HITECH PICC pro compiler. Worked perfectly on the Low Pin
Count Demo Board. This problem is only occuring when I'm using my
PIC16F886 on my own breadboard rather than the PIC16F690 on my Low Pin
Count Demo Board.
5. I don't know what "left hooked" means.
6. Regulated wall power supply. Also tried the power directly from the
PICKIT2. No difference.

--
..::[ solarwind ]::..

2008\12\15@182911 by Jan-Erik Soderholm

face picon face
solarwind wrote:
> On Mon, Dec 15, 2008 at 6:07 PM, Jan-Erik Soderholm
> <EraseMEjan-erik.soderholmspam_OUTspamTakeThisOuTtelia.com> wrote:
>> Unconnected ("open") input pins are picking up
>> electric fields from the environment.
>>
>> *Never* *Ever* leave CMOS inputs open !
>
> This problem is not happening on the Low Pin Count Demo Board that
> came with the PICKIT2 and it has a few open ports. I also made all
> ports TRIS = 0x00 so they are all forced output mode.

The code you showed only has "TRISC = 0x00;".
Where is TRISA and B ?
And a separate pullup on RE3, if "MCLRDIS" in your
code means "internal MCLR".

> What is your recommendation?

To fix your code.
To not use internal MCLR (if you does).

2008\12\15@183015 by PAUL James

picon face

Solarwind,

If you have another breadboard, try a different one.  A friend of mine,
and I both have had problems with the plug in breadboards before.
If you don't have another breadboard, try a different set of holes to
plug into.
That might prove or disporve whether it's the breadboard or not.

And about your capacitor, if it is ceramic, it probably hasn't got
enough capacitance
For low frequency bypassing (such as 60 Hz).  If you can find one, try
at least a 100 uF
Or higher capacitor.  


Regard,

Jim

{Original Message removed}

2008\12\15@183206 by Jan-Erik Soderholm

face picon face
solarwind wrote:
> This problem is also occuring even when I drive the chip using the
> power from the PICKIT2

Doesn't matter where the power comes from, as
long as the code isn't right.

What you describe (waving hands makes weird things happen)
is what is expected with open CMOS inputs.

2008\12\15@184211 by solarwind

picon face
On Mon, Dec 15, 2008 at 6:28 PM, Jan-Erik Soderholm
<jan-erik.soderholmspamspam_OUTtelia.com> wrote:
>
> The code you showed only has "TRISC = 0x00;".
> Where is TRISA and B ?
> And a separate pullup on RE3, if "MCLRDIS" in your
> code means "internal MCLR".
>
>> What is your recommendation?
>
> To fix your code.
> To not use internal MCLR (if you does).
>
> -

2008\12\15@191358 by Jinx

face picon face
> 2. There is no resistor from /MCLR to VCC. Should there be one? Why?
> How many ohms?

These are questions that can be answered by reading the 16F690 datasheet,
specifically Section 14.2

> On my PIC16F690 it says I/P
> On my PIC16F886 it says ES/P

I/P is Industrial Range (eg temperature), Plastic body
E/P is Extended Range (eg temperature), Plastic body


2008\12\15@191441 by solarwind

picon face
I just put everything on another breadboard. It works a lot better now
but sometimes still the same problem...

Is it safe to connect my LCD display?

2008\12\15@194833 by Jinx

face picon face
> I just put everything on another breadboard. It works a lot better
> now but sometimes still the same problem...
>
> Is it safe to connect my LCD display?

Probably but you should fix that problem. You'll have to eventually
and now is as good a time as any

- no floating inputs
- Mclr pulled high
- power supply decoupled. Something like a small ceramic cap, eg
10-100nF, and a small electrolytic, eg 10-100uF, both mounted as
close to the Vcc and Vss pins as practical

2008\12\15@202343 by Robert Bullock

flavicon
face
{Quote hidden}

It is hard to be convinced that your program is even running with this
behavior. If you could add a  little code to make the LED blink at a slow
rate, like a few times a second, then it would be a lot easier to know for
sure that it was running properly.

If this seems to hard, at least add a second LED, initialize one on and one
off, and verify. Then reverse that in the code and re-verify.

The behavior you describe sounds a lot like what CMOS inputs will do when
they are left floating (with no connection). A floating input can also draw
a lot of power, so you might check the supply voltage for large swings. If a
lot of your inputs were floating, and the supply current was quite limited,
this could easily happen.

A possible source of this problem could be your oscillator is not running
properly.

One thing I always encourage is to use the Microchip simulator to verify as
much of the code as you can. In your case, single step it through the
assembly, and when it hits the endless loop, stop and check all of the
configuration registers to see if they are what you expect.

I would not introduce the LCD until this is working perfectly. I have
breadboarded lots of circuits and it should work just fine. You still have a
problem. The good news is, this is where the serious learning occurs, it's
just painful sometimes :)

Bob Bullock

2008\12\15@210015 by peter green

flavicon
face

> eg
> 10-100nF
10nf seems very low for a power supply decoupling cap to me. Most PIC
designs i've seen seem to use 100nf ceramis or polyester for the low ESR
decoupling caps. There should also generally be a

The low ESR decoupling caps should be as close to each pair of power
pins on the pic as reasonable (if the pic has multiple pairs of power
pins there should generally be one per pair of power pins. When
breadboarding I reccomend getting decoupling caps with a 0.1 inch pin
spacing so they will sit nicely in the breadboard right next to the chip.

BTW if you ever forget a decoupling cap in a PCB design it is fairly
easy to solder an 0603 capacitor accross two pads for a DIL chip.

>and a small electrolytic, eg 10-100uF

Right though this is not as important as the low ESR caps mentioned above.

2008\12\15@211222 by Jinx

face picon face
> > 10-100nF
> 10nf seems very low for a power supply decoupling cap to me

10nF would be the minimum. As you say, 47nF or 100nF are more common

> BTW if you ever forget a decoupling cap in a PCB design it is fairly
> easy to solder an 0603 capacitor accross two pads for a DIL chip.

I always make Vcc and Vss pads a little larger or route tracks to do just that.
Many scrap logic boards will have small decoupling caps to scavenge

>  >and a small electrolytic, eg 10-100uF
>
> Right though this is not as important as the low ESR caps mentioned above

100uF can help in battery-powered circuits, especially as battery impedance
goes up. For a prototype, IMVHO, it's best to throw everything in and then
see what can be removed when the circuit's working

2008\12\15@222217 by solarwind

picon face
My question is why is this happening on my breadboard but on on my low
pin count demo board?

2008\12\15@222236 by solarwind

picon face
But NOT* on my low pin count demo board?

On Mon, Dec 15, 2008 at 10:21 PM, solarwind <@spam@x.solarwind.xKILLspamspamgmail.com> wrote:
> My question is why is this happening on my breadboard but on on my low
> pin count demo board?
>



--
..::[ solarwind ]::..

2008\12\15@233106 by Jinx

face picon face
> My question is why is this happening on my breadboard but not on my
> low pin count demo board?

The obvious answer, without trying to be smart, is that something's different

As only you have both in front of you, only you can find out what. Start with
the suggestions for basic running (no floating inputs etc) and work from there

Do not assume anything, justify every line of code, read the datasheet, look
in every corner no matter how irrelevant

It's character building, trust me ;-)

2008\12\15@233107 by solarwind

picon face
Update:

I took the PIC16F690 from my LPC Demo Board and put it in my bread
board. I only attached it to power, ground, and a few LEDs with
current limiting resistors. It worked flawlessly. No fancy decoupling
capacitors or pull up resistors or anything like that...

I then took my other PIC16F886 and tried the same thing (I have two
16F886s, this is the second one I'm trying). Same problem as the first
chip.

Either both the 16F886s are damaged or I'm missing something in my
code... I highly doubt they're damaged. I put the 16F690 through all
sorts of torture and its functioning flawlessly. This is the first
time I'm messing with the 16F886s and they're giving me problems...

It's gotta be something in my code.

Can anyone write a simple program that sets PORTC high in assembler
for 16F886? I want to see if that will work...

2008\12\15@233256 by Bob Blick

face
flavicon
face
solarwind wrote:
> My question is why is this happening on my breadboard but on on my low
> pin count demo board?

I know you don't want to hear this, but you post a lot more questions to
the piclist than anyone else, and I'm sure quite a few people are
starting to ignore your posts and the threads they start.

Why? Because when you post it sounds like you are too lazy to explain
what you have already done to investigate the problem. And it's obvious
that you also don't RTFM.

You should do a lot more work before you post a question here. But I
believe other people have already said this to you, so perhaps what you
are doing is intentional, and you only want responses from people
willing to peel every grape for your mouth?

Have you looked at the schematic for your demo board? There's a pullup
on VPP/MCLR.

That's why the demo board doesn't reset all by itself.

Cheerful regards,

Bob



2008\12\15@233941 by solarwind

picon face
On Mon, Dec 15, 2008 at 11:32 PM, Bob Blick <KILLspambobblickKILLspamspamftml.net> wrote:
{Quote hidden}

I'm sure you don't want to hear this either, but you should RTFP.

I've stated that the same 16F690 chip when pulled from the demo board
and inserted onto the breadboard works flawlessly. No fancy pullup
resistors or decoupling capacitors.



--
..::[ solarwind ]::..

2008\12\15@234100 by solarwind

picon face
@Bob and it's obvious that you don't RTFP. You should read before
writing a response. But I believe others have already stated this, so
perhaps what you are doing is intentional and you only want people to
peel every grape for your mouth.

2008\12\15@234747 by Bob Blick

face
flavicon
face
I read the thread. You ignored the advice about MCLRDIS.

-Bob

solarwind wrote:
> @Bob and it's obvious that you don't RTFP. You should read before
> writing a response. But I believe others have already stated this, so
> perhaps what you are doing is intentional and you only want people to
> peel every grape for your mouth.

2008\12\15@235910 by Bob Blick

face
flavicon
face
And you still need to keep the VPP/MCLR pin restrained no matter if it
is enabled or not. Because if it goes over some number of volts you
enter programming mode. But you know that already, right?

Oh, and you already know about the low voltage programming pin, too, right?

-Bob

Bob Blick wrote:
> I read the thread. You ignored the advice about MCLRDIS.
>
> -Bob
>
> solarwind wrote:
>> @Bob and it's obvious that you don't RTFP. You should read before
>> writing a response. But I believe others have already stated this, so
>> perhaps what you are doing is intentional and you only want people to
>> peel every grape for your mouth.

2008\12\16@000615 by solarwind

picon face
On Mon, Dec 15, 2008 at 11:58 PM, Bob Blick <RemoveMEbobblickTakeThisOuTspamftml.net> wrote:
> And you still need to keep the VPP/MCLR pin restrained no matter if it
> is enabled or not. Because if it goes over some number of volts you
> enter programming mode. But you know that already, right?

Yes.

> Oh, and you already know about the low voltage programming pin, too, right?

Yes. Seriously I did because I read the part on ICSP when I was
setting up the ICSP on my breadboard.



--
..::[ solarwind ]::..

2008\12\16@001856 by Bob Blick

face
flavicon
face
solarwind wrote:
>
>> Oh, and you already know about the low voltage programming pin, too, right?
>
> Yes. Seriously I did because I read the part on ICSP when I was
> setting up the ICSP on my breadboard.

So you tied the LVP pin (RB3) to ground on your breadboard? Because I
didn't see LVP disabled in your code.

-Bob

2008\12\16@043650 by Jan-Erik Soderholm

face picon face
solarwind wrote:

> On Mon, Dec 15, 2008 at 11:32 PM, Bob Blick <spamBeGonebobblickspamBeGonespamftml.net> wrote:
>
>> Why? Because when you post it sounds like you are too lazy to explain
>> what you have already done to investigate the problem. And it's obvious
>> that you also don't RTFM.
>>
>> ...
>
> I'm sure you don't want to hear this either, but you should RTFP.
>
> I've stated that the same 16F690 chip when pulled from the demo board
> and inserted onto the breadboard works flawlessly...

Completly irrelevant !
That's anothor PIC with another datasheet.
I'm not going to begin reading that one also.
I've read the one for the 886 and explained what
you are doing wrong with *that* PIC.

As I have said from my first post, fix your code !

> No fancy pullup
> resistors or decoupling capacitors.

Which is wrong, of course, and doesn't prove anything.

2008\12\16@044113 by Jan-Erik Soderholm

face picon face
solarwind wrote:
> On Mon, Dec 15, 2008 at 6:28 PM, Jan-Erik Soderholm
> <TakeThisOuTjan-erik.soderholmEraseMEspamspam_OUTtelia.com> wrote:
>> The code you showed only has "TRISC = 0x00;".
>> Where is TRISA and B ?
>> And a separate pullup on RE3, if "MCLRDIS" in your
>> code means "internal MCLR".
>>
>>> What is your recommendation?
>> To fix your code.
>> To not use internal MCLR (if you does).
>>
>> --

2008\12\16@080958 by olin piclist

face picon face
solarwind wrote:
> When I move my hand near the PIC chip the LED
> turns on. When I move my hand away, it turns off...

You left low voltage programming enabled and forgot to tie PGM low.  You can
also create this problem by leaving MCLR floating, but that's less likely
since it will be connected to the programmer.

LVP is a bad idea, and there is no need for it in your case, so disable it
in the config bits.  In addition, you should still put 100Kohms or so to
ground on PGM and make sure PGM is not driven high by the external circuit
during programming.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2008\12\16@081313 by olin piclist

face picon face
solarwind wrote:
> And I don't have schematics.

Then make one.

> All it is is
> a PIC with an LED and resistor. That's as simple as it is.

Clearly not.  Power has to come from somewhere, and there are various ways
to connect a LED and resistor to a PIC.  We want to see what you actually
did, not your verbal description of it.  In any case, if the hookup is as
simple as you say, then it would take very little time to draw a schematic.
Even better would be to use the free version of Eagle or some other
electrical design package and draw the schematic.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2008\12\16@081731 by olin piclist

face picon face
solarwind wrote:
> On Mon, Dec 15, 2008 at 6:07 PM, Jan-Erik Soderholm
>> *Never* *Ever* leave CMOS inputs open !
>
> This problem is not happening on the Low Pin Count Demo Board that
> came with the PICKIT2 and it has a few open ports. I also made all
> ports TRIS = 0x00 so they are all forced output mode.

How about doing what Jan-Erik says instead of trying to explain why it
doesn't apply.  You are making incorrect assumptions above.

> What is your recommendation?

He already told you, don't ever leave a CMOS input floating.  Carefully go
thru every pin on the PIC and make sure it's either an output or it's tied
low or high.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2008\12\16@081943 by olin piclist

face picon face
solarwind wrote:
> That code works perfectly fine on the low pin count demo board.

But you're not running it on the low pin count demo board (duh).


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2008\12\16@082458 by olin piclist

face picon face
solarwind wrote:
> I just put everything on another breadboard. It works a lot better now
> but sometimes still the same problem...

Not surprising since I haven't heard any evidence you've fixed the real
problem.  The new breadboard probably just has different capactive coupling
to your environment and maybe some leakage somewhere.

Things will continue to be flaky until you disable LVP in the config bits,
tie PGM low, tie MCLR high, and put a 10nF to 1uF ceramic cap accross the
Vdd to Vss pins as close as possible to the PIC.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2008\12\16@083455 by olin piclist

face picon face
peter green wrote:
> 10nf seems very low for a power supply decoupling cap to me.

I'd rather see 100nF than 10nF, but he doesn't have a lot of parts around.
10nF right at the PIC pins would still be useful and probably sufficient.

I remember when 10nF ceramic disk caps were standard for decoupling at each
TTL chip.  That was because the state of the technology would have made
larger caps physically too big, and 10nF was good enough if done religiously
at each chip.  Many systems were produced with this scheme.  It worked just
fine if done right.

Nowadays I use 1uF 10V small SMD caps for this.  These have better frequency
response and lower inductance than even the 100nF leaded disk caps of a few
years back.  You can now get significantly more capacitance at 10V in the
same package, but these don't have the same high end frequency response of
the 1uF ones, and 1uF is really more than enough for power supply
decoupling.  Anything more than that can be aggregated at the power supply
if on the same board, or where the power comes into the board.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2008\12\16@083855 by olin piclist

face picon face
solarwind wrote:
> My question is why is this happening on my breadboard but on on my low
> pin count demo board?

Finally the right question instead of trying to tell us why we're wrong.

I haven't looked at the low pin count demo board and don't plan to, but I
suspect that there are pullups/pulldowns on the appropriate pins, MCLR is
properly driven, and the power supply is properly bypassed and regulated.
Do they have a pulldown on PGM?


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2008\12\16@085241 by olin piclist

face picon face
solarwind wrote:
> I took the PIC16F690 from my LPC Demo Board and put it in my bread
> board. I only attached it to power, ground, and a few LEDs with
> current limiting resistors. It worked flawlessly. No fancy decoupling
> capacitors or pull up resistors or anything like that...
>
> I then took my other PIC16F886 and tried the same thing (I have two
> 16F886s, this is the second one I'm trying). Same problem as the first
> chip.

So far so good.  You are doing some meaningful experiments.

> Either both the 16F886s are damaged or I'm missing something in my
> code...

Now you're back to jumping to conclusions.  There are other possibilities.

> I highly doubt they're damaged.

I agree.  I would proceed on the assumption they are working fine.

> It's gotta be something in my code.

More jumping to conclusions.

You are here asking because you can't figure out the problem yourself.  So
stop trying to tell us what it is or isn't.  If you were so great at
diagnosing problems you wouldn't be here.  Give us the symptoms and spare us
your analisys.  Do exactly as we say whether you think it makes sense or
not.  You may not always know at first why something is suggested.  It's
often easier to say <do this>, then explain in detail after the results are
collected.  It's OK to ask why, but stop already with the telling us what it
is or isn't, at least until you've definitely solved the problem.

> Can anyone write a simple program that sets PORTC high in assembler
> for 16F886?

Of course, but why can't you do it?  As has already been said here several
times, you should do your first few things with PICs in assembler, even if
your aim is to eventually use C for "real" projects.  Being able to write a
simple program to set a I/O port to a fixed value is something you need to
be able to do.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2008\12\16@085556 by olin piclist

face picon face
solarwind wrote:
> I'm sure you don't want to hear this either, but you should RTFP.

You are waaaay out of line here.  If I were a admin, I would now suspend
your account for a week.

No more help for you until you learn some humility.

> I've stated that the same 16F690 chip when pulled from the demo board
> and inserted onto the breadboard works flawlessly. No fancy pullup
> resistors or decoupling capacitors.

More wrong conclusions, but I don't feel like explaining right now.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2008\12\16@085559 by David Novak

picon face
Haven't been following closely, so hopefully I'm not repeating, but you may
have a poor connection in the circuit. Make sure all conductors are in place
and secure, especially grounds.

David


> {Original Message removed}

2008\12\16@085728 by olin piclist

face picon face
solarwind wrote:
> @Bob and it's obvious that you don't RTFP. You should read before
> writing a response. But I believe others have already stated this, so
> perhaps what you are doing is intentional and you only want people to
> peel every grape for your mouth.

I think we need some admin intervention here.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2008\12\16@090811 by KPL

picon face
I would recommend reading some pic tutorial (or a few of them) before
trying anything else.
It helps, been there, done that:)

On Tue, Dec 16, 2008 at 3:55 PM, David Novak <RemoveMEnovakdspamTakeThisOuTdajac.com> wrote:
> Haven't been following closely, so hopefully I'm not repeating, but you may
> have a poor connection in the circuit. Make sure all conductors are in place
> and secure, especially grounds.
>
> David
>
>

--
KPL

2008\12\16@092320 by SME

picon face
> I think we need some admin intervention here.

This can be taken as admin input.
Was posted in OT on a related thread.

__________________________


Looks around in bottom drawer for admin hat that he may or may not actually
have ...
Clears throat.

Ahem ...

Polite request: Would EVERYONE who is sniping at each other without any
pretense of technical content, please stop immediately.
If possible please also desist from doing it with pretence of technical
content as well.

If Y'All must get picky over things when there is a genuine or apparently
genuine or possibly genuine technical matter being discussed then try not to
overdo it.
BUT the " ... vote ... go away ..." stuff is inappropriate to list and
member survival. If you must flame each other, please do so only offlist If
you have a legitimate request or complaint about list member behaviour
please make it offlist to list admins - PICList-OwnerEraseMEspam.....mit.edu

I'm sounding like James :-).
Must be doing something right, then.


     Russell

2008\12\16@092942 by Joe Bento

face
flavicon
face
solarwind wrote:
> My question is why is this happening on my breadboard but on on my low
> pin count demo board?
>  
Because the low pin count board has all the necessary bypass capacitors
that people are suggesting you add to your breadboard.

Joe

2008\12\16@093528 by Joe Bento

face
flavicon
face
solarwind wrote:
>
>
> I'm sure you don't want to hear this either, but you should RTFP.
>
> I've stated that the same 16F690 chip when pulled from the demo board
> and inserted onto the breadboard works flawlessly. No fancy pullup
> resistors or decoupling capacitors.
>
>
>  


I wouldn't call those 'fancy' components.  Less than 0.05 cents worth of
parts that should be part of EVERY circuit design whether it be on a PCB
or breadboard.  If you have multiple chips, there should be a 0.1uf cap
at EVERY VCC/VSS line at EVERY chip, as close to the chip as possible.  
This is common engineering practice.  Don't 'Muntz' your circuits.  
(Look that word up.  Interesting story behind the name.)

Joe


2008\12\16@195005 by Sean Breheny

face picon face
Could it be that your demo board has a resistor from MCLR to Vcc? I've
had the exact same problem you have when MCLR was left floating.

Sean


On Mon, Dec 15, 2008 at 10:22 PM, solarwind <EraseMEx.solarwind.xspamgmail.com> wrote:
{Quote hidden}

> -

2008\12\16@223537 by solarwind

picon face
On Mon, Dec 15, 2008 at 11:22 PM, Sean Breheny <RemoveMEshb7spam_OUTspamKILLspamcornell.edu> wrote:
> Could it be that your demo board has a resistor from MCLR to Vcc? I've
> had the exact same problem you have when MCLR was left floating.
>
> Sean

According to the LPC Demo Board Users' Guide schematics, there is no
such resistor. There is a 0.1 uF ceramic capacitor though. Funny thing
is, as I've already stated, the chip works perfectly fine even when in
my breadboard. No capacitor, no resistor, no MCLRE tied to VCC.

--
..::[ solarwind ]::..

2008\12\16@225808 by Bob Blick

face
flavicon
face
solarwind wrote:
> On Mon, Dec 15, 2008 at 11:22 PM, Sean Breheny <RemoveMEshb7TakeThisOuTspamspamcornell.edu> wrote:
>> Could it be that your demo board has a resistor from MCLR to Vcc? I've
>> had the exact same problem you have when MCLR was left floating.
>>
>> Sean
>
> According to the LPC Demo Board Users' Guide schematics, there is no
> such resistor. There is a 0.1 uF ceramic capacitor though. Funny thing
> is, as I've already stated, the chip works perfectly fine even when in
> my breadboard. No capacitor, no resistor, no MCLRE tied to VCC.


So what would R1 be doing through R2, if it's not pulling up MCLR?

2008\12\16@225850 by Dr Skip

picon face
Check again..... Top right on the schematic, with sw1 and JP5... It's how you
reset on the LPC board.

solarwind wrote:
> On Mon, Dec 15, 2008 at 11:22 PM, Sean Breheny <EraseMEshb7spamspamspamBeGonecornell.edu> wrote:
>
> According to the LPC Demo Board Users' Guide schematics, there is no
> such resistor. There is a 0.1 uF ceramic capacitor though. Funny thing
> is, as I've already stated, the chip works perfectly fine even when in
> my breadboard. No capacitor, no resistor, no MCLRE tied to VCC.
>

2008\12\16@232057 by jim

flavicon
face
Solarwind,

I don't want you to take this the wrong way, but there have been many
suggestions on things to do and to try that will determine what you need to
do next.   Also, many things that are just good engineering practice.  But
it seems to me, (and maybe to others too), that you are bound and determined
to operate your circuit without pullups and/or caps, and who knows what
else.
It is difficult to help anyone that won't take the advice given them, and at
least apply it to see if it changes the symptoms that they are seeing.  If
this were to be done, it might give a clue as to what the actual problem is,
or was.  And it would also give a clue as to what to do next.

However, you appear to not want to try any of the suggestions that have been
given.  You just tell everyone that caps and pullups are not the problem.
If I may be so bold, you don't know that for sure.  I know from experience
that a breadboard can and does act differently than a pc board for the same
circuit.  And the difference gets bigger with increasing frequency of
operation.  Just because a PC board doesn't have a given component on it,
doesn't mean you don't have to add one on a breadboard.  And as I've stated
before in a different email, caps and pullups, among other things, are just
good engineering practice.  In other words, you try to design a circuit to
withstand virtually any type of interference mother nature or man can throw
at it and still function as it was intended.  You try to design a circuit so
that if Mr. Murphy comes and tries to get in, he is completely locked out.
You try to design a circuit so that it is as bulletproof as you can make it,
and still be economical to manufacture.  If you were to look at a
commercially built electronic device or system, you'd see a lot of
components that may look superficial.  However, I'm willing to be that if
you knew the circuit or the market it is supposed to work in, you'd better
understand why all those seemingly superficial components are there.  In
short, they are there to allow the circuit to function as it was intended to
function, regardless of the environment.   Of course, you can only do so
much, so it might not work in all situations, but you do the best you can to
make it so it will work in all circumstances.


So, with all of that said, either try the suggestions given, or else stop
asking for help because you won't accept any of the answers given to you.

It's sort of like going to the doctor, and having him tell you you have the
flu , but you tell the doctor it can't be the flu because my wife doesn't
have it, and we live in the same house, eat the same foods, etc.  Therefore
that can't be the problem.
And then you go back to the same doctor and ask the same question, and you
get the same answer, and again you tell the doctor that what he told you
can't be the problem.   It's sort of like that movle "Groundhog Day".

Anyway, at least try the suggestions given to you.  If they work, your
problem is solved and you have learned something.   If they don't work, you
can ask for further suggestions, and you have learned something.  Either
way, you're closer to the actual problem, and you have learned something to
try if that same thing happens to you again with a different circuit.

I guess I'm done now, so the ball is now in your court.

And again, this is not a rant,  It is meant to alert you to how I perceive
your response to the advice given to you regarding your question about your
circuit.  So if you want to flame me, so be it.
Just don't do it on the list.

Regards,   Jim






{Original Message removed}

2008\12\16@234620 by solarwind

picon face
I tried the capacitors and the pull up resistors. No difference.

2008\12\16@235331 by Bob Blick

face
flavicon
face
But did you ground the LVP pin, or properly disable it in your code?

solarwind wrote:
> I tried the capacitors and the pull up resistors. No difference.

2008\12\17@001718 by solarwind

picon face
On Tue, Dec 16, 2008 at 11:53 PM, Bob Blick <RemoveMEbobblickKILLspamspamftml.net> wrote:
> But did you ground the LVP pin, or properly disable it in your code?
>

Yes I did tie it to ground.

--
..::[ solarwind ]::..

2008\12\17@025332 by Luis.Moreira

picon face
Hi Guys,
Why are you still wasting your breath? Is obvious he is not listening
hence shall we just stop posting on this?
This as been one of the most annoying set of posts in ages.
Thanks
       Luis



{Original Message removed}

2008\12\17@025823 by Luis.Moreira

picon face
Solarwind please just go away!!!

Best Regards
               Luis

-----Original Message-----
From: piclist-bouncesSTOPspamspamspam_OUTmit.edu [spamBeGonepiclist-bouncesSTOPspamspamEraseMEmit.edu] On Behalf
Of solarwind
Sent: 17 December 2008 03:35
To: Microcontroller discussion list - Public.
Subject: Re: [PIC] Annoying Electric Field?

On Mon, Dec 15, 2008 at 11:22 PM, Sean Breheny <KILLspamshb7spamBeGonespamcornell.edu> wrote:
> Could it be that your demo board has a resistor from MCLR to Vcc? I've
> had the exact same problem you have when MCLR was left floating.
>
> Sean

According to the LPC Demo Board Users' Guide schematics, there is no
such resistor. There is a 0.1 uF ceramic capacitor though. Funny thing
is, as I've already stated, the chip works perfectly fine even when in
my breadboard. No capacitor, no resistor, no MCLRE tied to VCC.

--
..::[ solarwind ]::..

2008\12\17@030549 by solarwind

picon face
Luis please go jump off a cliff! (Or stand in the middle of a highway,
either one's fine).


--
..::[ solarwind ]::..

2008\12\17@031811 by Tamas Rudnai

face picon face
Guys, this kind of argument is nothing to do with engineering!

Solarwind, can you attach your schematics? Without that we cannot see where
the problem can be.

Tamas


On Wed, Dec 17, 2008 at 8:05 AM, solarwind <EraseMEx.solarwind.xspamEraseMEgmail.com> wrote:

> Luis please go jump off a cliff! (Or stand in the middle of a highway,
> either one's fine).
>
>
> --
> ..::[ solarwind ]::..
> -

2008\12\17@032022 by Luis.Moreira

picon face
Solarwind I can only assume that you are a small kid somewhere in your
room, by the way you behave, and I have to tell you that coming to a
list full of people with a lot of experience on micros and
systematically ignore there help, is a very, very bad way going trough
life. You can get everything here but you need to do some work to!
Off course if you are a grown Man/Woman then you learned nothing in the
course of your life and I expect you never will.
I will not be posting on this again, so give it your best shot.
Best Regards
               Luis  



-----Original Message-----
From: @spam@piclist-bounces@spam@spamspam_OUTmit.edu [spamBeGonepiclist-bouncesspamKILLspammit.edu] On Behalf
Of solarwind
Sent: 17 December 2008 08:05
To: Microcontroller discussion list - Public.
Subject: Re: [PIC] Annoying Electric Field?

Luis please go jump off a cliff! (Or stand in the middle of a highway,
either one's fine).


--
..::[ solarwind ]::..

2008\12\17@034733 by solarwind

picon face
Updated:

http://img249.imageshack.us/img249/3056/screenshotus2.png

Forgot to add capacitor. It's some random small capacitor. Looks like
it's ceramic but it might not be. Markins on the thing are hard to
see.

2008\12\17@040702 by Wouter van Ooijen

face picon face
> http://img249.imageshack.us/img249/3056/screenshotus2.png

not very readable, but much better than nothing.

> Forgot to add capacitor.

do add it, so we know where you put is.

> It's some random small capacitor.

I don't understand how you expect things to work if you add a random
capacitor? A 22pF capacitor can, except for the markings, look identical
to a 100nF cap.

Put a resistor in the MCLR line, and in the LVP line. Connecting such
pins directly to ground or power is bad karma.

OK now that you gave an approximate circuit diagram, what code is in the
chip? Read it from the chip, and give the resulting .hex file. The one
read from the chip, not the one you put into it.

--

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu

2008\12\17@040726 by Jinx

face picon face
Do you have _MCLRE_ON in your CONFIG ?

2008\12\17@040835 by Forrest W Christian

flavicon
face
solarwind wrote:
> Yes I did tie it to ground.
>  
Ok, let's back up here....

First, let me say that I have spent weeks hunting down a floating pin
problem on a 16f886... and everything which you have been told pin-wise
is 100% accurate.   Plus, there are other pins on the '886 that need to
be tied up/down or set differently which aren't immediately obvious.  
Or, in other words, setting the tris direction registers to output may
not be enough to actually set everything correctly on an '886.   In my
case, I had missed that the LVP fuse was not actually being set.  On
another PIC processor, it was some weirdness with one of the "other
functions" on one of the ports which needed to be disabled before I
could set the port to an output.

Please verify the following:

That the vdd pin is tied to +5V
That the vss pins (there are two of them) are tied to GND.
That mclr is pulled high through a 47K resistor to VCC.
That LVP is disabled in fuses, and ideally the LVP pin is pulled low
through a resistor.
That you are using the INTERNAL OSCILLATOR, not an external XTAL or
other clock source (if you are not using the intosc, then there are
other questions as well).

That should cover the basics which should be the same on all
schematics.   How you connect the remaining pins really depends on what
you are wanting to do with the PIC.  HOWEVER, what people have been
trying to tell you is that your hand-waving is actually enough to change
the value of one or more pins on the PIC since the inputs are so
sensitive to voltage variations.    And in some cases, the value is
actually not fully on or fully off, but in-between, which causes all
sorts of weirdness.

The good engineering way to solve this problem is to add 10K resistors
from each of the unused pins to either VCC or GND.  This will ensure the
circuit will operate no matter what the settings of the PIC are.

Trust me, and others, when we say that there are *lots* of causes for
this, and there is no way to know what the cause is without trying.  
The other option is to go completely through the datasheet and read how
to set *every* pin to a digital output.  And there are lots of pins
which the answer is more than setting the tris appropriately.

-forrest

2008\12\17@042428 by solarwind

picon face
On Wed, Dec 17, 2008 at 4:05 AM, Wouter van Ooijen <.....wouterspam_OUTspamvoti.nl> wrote:
> I don't understand how you expect things to work if you add a random
> capacitor? A 22pF capacitor can, except for the markings, look identical
> to a 100nF cap.

I'm going to do some shopping soon and get a whole load of components.

> Put a resistor in the MCLR line, and in the LVP line. Connecting such
> pins directly to ground or power is bad karma.

Yes sir!

> OK now that you gave an approximate circuit diagram, what code is in the
> chip? Read it from the chip, and give the resulting .hex file. The one
> read from the chip, not the one you put into it.

I see where you're heading with this... Are you suggesting that the
code got corrupted on its way into the chip? But I checked the verify
option in winbloze... I'll have to take a look at the pk2cmd in Linux
though...

> Wouter van Ooijen

..::[ solarwind ]::..

2008\12\17@042452 by solarwind

picon face
On Wed, Dec 17, 2008 at 4:06 AM, Jinx <TakeThisOuTjoecolquitt.....spamTakeThisOuTclear.net.nz> wrote:
> Do you have _MCLRE_ON in your CONFIG ?

Will check that tomorrow.



--
..::[ solarwind ]::..

2008\12\17@042849 by solarwind

picon face
On Wed, Dec 17, 2008 at 4:10 AM, Forrest W Christian <TakeThisOuTforrestcKILLspamspamspamimach.com> wrote:
> Ok, let's back up here....
>
> First, let me say that I have spent weeks hunting down a floating pin
> problem on a 16f886... and everything which you have been told pin-wise
> is 100% accurate.   Plus, there are other pins on the '886 that need to
> be tied up/down or set differently which aren't immediately obvious.
> Or, in other words, setting the tris direction registers to output may
> not be enough to actually set everything correctly on an '886.   In my
> case, I had missed that the LVP fuse was not actually being set.  On
> another PIC processor, it was some weirdness with one of the "other
> functions" on one of the ports which needed to be disabled before I
> could set the port to an output.
>
> Please verify the following:
>
> That the vdd pin is tied to +5V

Done.

> That the vss pins (there are two of them) are tied to GND.

Done.

> That mclr is pulled high through a 47K resistor to VCC.

Just need to add the resistor in there, I just put a wire there for now.

> That LVP is disabled in fuses, and ideally the LVP pin is pulled low
> through a resistor.

I don't understand what you mean by "That LVP is disabled in fuses".

> That you are using the INTERNAL OSCILLATOR, not an external XTAL or
> other clock source (if you are not using the intosc, then there are
> other questions as well).

Using internal oscillator.

> That should cover the basics which should be the same on all
> schematics.   How you connect the remaining pins really depends on what
> you are wanting to do with the PIC.  HOWEVER, what people have been
> trying to tell you is that your hand-waving is actually enough to change
> the value of one or more pins on the PIC since the inputs are so
> sensitive to voltage variations.    And in some cases, the value is
> actually not fully on or fully off, but in-between, which causes all
> sorts of weirdness.

Yeah, happned to me before when I was fooling around with NAND gat ICs.

> The good engineering way to solve this problem is to add 10K resistors
> from each of the unused pins to either VCC or GND.  This will ensure the
> circuit will operate no matter what the settings of the PIC are.

This is going to be loads of fun when I get around to my 100 pin PIC32
TQFP chip...

> Trust me, and others, when we say that there are *lots* of causes for
> this, and there is no way to know what the cause is without trying.
> The other option is to go completely through the datasheet and read how
> to set *every* pin to a digital output.  And there are lots of pins
> which the answer is more than setting the tris appropriately.
>
> -forrest

Very helpful! Thanks! Going to try this tomorrow.


--
..::[ solarwind ]::..

2008\12\17@044039 by Jinx

face picon face
> I don't understand what you mean by "That LVP is disabled in fuses".

_LVP_OFF in CONFIG

2008\12\17@044137 by Bob Ammerman

picon face
Solarwind,


FUSES is another (old?) name for CONFIG settings. Making sure you have them
all correct is important.

Also, the last source you posted (or at least the last version I saw only
"TRIS"ed one port.

Please (re-)post the latest version of your C code. It should include
TRISing everything, disabling analog inputs and comparators and your CONFIG
settings.

-- Bob Ammerman
RAm Systems


2008\12\17@044545 by Tamas Rudnai

face picon face
Take a look at this chapter on the free book from MikroElektronika
(especiall the note on MCLR on the bottom):

http://www.mikroe.com/en/books/picmcubook/ch8/

Also take a look at some examples in the same book (especially the Example
1):

http://www.mikroe.com/en/books/picmcubook/appb/

Note that I'd put that 100nF in betveen Vcc and Vss, and as many of this
list already told you it is a good practise to put that decoupler capacitor
to every one of each controller, memory or other main components on your
board.

Oh, btw: Make sure that the decoupler is a ceramic or any other low ESR one
- a random capacitor may not do the trick. A component has many parameters,
not just the main one and sometimes have to take that into account other
parameters as well. That is because the components are phisical elements
with obeying the law of phisics. That includes many things like the
parameters are changing by temperature, humidity or even by time. And
because of that most of the times you need to make compromise when you
desing a circuit. I'd say it is the opposite as what a software engineer is
seeing day by day.

Tamas
PS: It is a good idea I think to read that book from the beginning to the
end.


On Wed, Dec 17, 2008 at 8:47 AM, solarwind <.....x.solarwind.xspamRemoveMEgmail.com> wrote:

> Updated:
>
> http://img249.imageshack.us/img249/3056/screenshotus2.png
>
> Forgot to add capacitor. It's some random small capacitor. Looks like
> it's ceramic but it might not be. Markins on the thing are hard to
> see.
> -

2008\12\17@044547 by KPL

picon face
>
> I see where you're heading with this... Are you suggesting that the
> code got corrupted on its way into the chip? But I checked the verify
> option in winbloze... I'll have to take a look at the pk2cmd in Linux
> though...
>


I would recommend to read pk2cmd manual, and enable options like erase
and verify on every programming. It will slow down things a bit but
You will remove some variables from the problem. I had a lot of times
when programming went wrong for unknown reason and was OK on the next
try. Had to reconnect Pickit into another usb port sometimes.

Prepare such a tested command line for you, and store it for future,
or create a script or an alias. I was typing it in a shell window of
piklab so not to switch windows all the time.

--
KPL

2008\12\17@045337 by apptech

face
flavicon
face
**** ADMIN WARNING ****

**** DO NOT REPLY TO THIS THREAD OR ANY MATERIAL ON IT. ****

DO NOT POST PERSONAL ABUSE TO THE LIST

IGNORING THIS WARNING COULD LEAD TO A QUIETER THAN EXPECTED EMAIL INBOX THIS
CHRISTMAS

Offlist comment sent to various participants.

2008\12\17@045339 by apptech

face
flavicon
face
**** ADMIN WARNING ****

**** DO NOT REPLY TO THIS THREAD OR ANY MATERIAL ON IT. ****

DO NOT POST PERSONAL ABUSE TO THE LIST

IGNORING THIS WARNING COULD LEAD TO A QUIETER THAN EXPECTED EMAIL INBOX THIS
CHRISTMAS

Offlist comment sent to various participants.



----- Original Message -----
From: "Luis Moreira" <RemoveMELuis.MoreiraspamspamBeGonejet.uk>
To: "Microcontroller discussion list - Public." <spamBeGonepiclist@spam@spamspam_OUTmit.edu>
Sent: Wednesday, December 17, 2008 8:57 PM
Subject: RE: [PIC] Annoying Electric Field?


> Solarwind please just go away!!!
>
> Best Regards
> Luis
>
> {Original Message removed}

2008\12\17@045339 by apptech

face
flavicon
face
**** ADMIN WARNING ****

**** DO NOT REPLY TO THIS THREAD OR ANY MATERIAL ON IT. ****

DO NOT POST PERSONAL ABUSE TO THE LIST

IGNORING THIS WARNING COULD LEAD TO A QUIETER THAN EXPECTED EMAIL INBOX THIS
CHRISTMAS

Offlist comment sent to various participants.


----- Original Message -----
From: "Luis Moreira" <TakeThisOuTLuis.Moreiraspamspamjet.uk>
To: "Microcontroller discussion list - Public." <piclistEraseMEspammit.edu>
Sent: Wednesday, December 17, 2008 8:53 PM
Subject: RE: [PIC] Annoying Electric Field?


> Hi Guys,
> Why are you still wasting your breath? Is obvious he is not listening
> hence shall we just stop posting on this?
> This as been one of the most annoying set of posts in ages.
> Thanks
> Luis
>
>
>
> {Original Message removed}

2008\12\17@045405 by apptech

face
flavicon
face
**** ADMIN WARNING ****

**** DO NOT REPLY TO THIS THREAD OR ANY MATERIAL ON IT. ****

DO NOT POST PERSONAL ABUSE TO THE LIST

IGNORING THIS WARNING COULD LEAD TO A QUIETER THAN EXPECTED EMAIL INBOX THIS
CHRISTMAS

Offlist comment sent to various participants.



----- Original Message -----
From: "solarwind" <RemoveMEx.solarwind.xEraseMEspamspam_OUTgmail.com>
To: "Microcontroller discussion list - Public." <@spam@piclistRemoveMEspamEraseMEmit.edu>
Sent: Wednesday, December 17, 2008 9:05 PM
Subject: Re: [PIC] Annoying Electric Field?


> Luis please go jump off a cliff! (Or stand in the middle of a highway,
> either one's fine).
>
>
> --
> ..::[ solarwind ]::..
> --

2008\12\17@045413 by Forrest W Christian

flavicon
face
solarwind wrote:
> I don't understand what you mean by "That LVP is disabled in fuses".
Somewhere there is a way in your compiler to disable LVP.   In the tools
I use, it is almost always called fuses.  For instance, the fuses I have
set on my '886 are:

This is in CCS C, by the way:

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES INTRC_IO                 //Internal RC Osc, no CLKOUT
#FUSES PUT                      //Power Up Timer
#FUSES MCLR                     //Master Clear pin enabled
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NOCPD                    //No EE protection
#FUSES BROWNOUT                 //Reset when brownout detected
#FUSES NOIESO                     //Internal External Switch Over mode
enabled
#FUSES FCMEN                    //Fail-safe clock monitor enabled
#FUSES NOLVP                      //Low Voltage Programming on B3(PIC16)
or B5(PIC18)
#FUSES NODEBUG                  //No Debug mode for ICD
#FUSES NOWRT                    //Program memory not write protected
#FUSES BORV21                   //Brownout reset at 2.1V
#FUSES INTRC_IO                 //Internal RC oscillator

Note that the comments may not match the exact state of the comments...  
for instance NOIESO really means Internal External Switch Over mode
disabled, not enabled...  That comes from me being lazy and not changing
the comments from the default that was generated by CCS.   Generally if
I'm writing comments I'll not include the state itself in the comments.

Also, in regards to pullups on every pin:
> This is going to be loads of fun when I get around to my 100 pin PIC32
> TQFP chip...
>  
Yep, if you really need to do it.

In my case, because I really didn't want to populate the board with ~20
resistors that I didn't need on thousands of devices, I spent the time
to go through every pin and every fuse and read the datasheet and
understand the ramifications of each setting which affects that pin.  
In the end, I discovered that LVP was not set correctly and I hadn't
grounded PGM.   On another product, I discovered that there was an
additional pin function on one of the pins which was a digital input
which was really sensitive to floating, but was buried in the datasheet
that it was in that mode by default.

If you, for sure, set every unused pin to an output, and you are willing
to risk that a floating pin will cause the processor not to run long
enough to actually set the pins to outputs (and as a result, your
application will not start on occasion), then, yes you can skip the
resistors.   Otherwise, they all should be there.  That also doesn't
eliminate the requirement to go through the datasheet pin by pin and
make sure everything is disabled or enabled correctly.

-forrest

2008\12\17@045500 by Wouter van Ooijen

face picon face
>> OK now that you gave an approximate circuit diagram, what code is in the
>> chip? Read it from the chip, and give the resulting .hex file. The one
>> read from the chip, not the one you put into it.
>
> I see where you're heading with this... Are you suggesting that the
> code got corrupted on its way into the chip?

You have tried to get it work, so I assume that you tried everything
that was (in your opinion) probable. So the next candidates are the
things that you deem unprobable.

Reading back the code and posting it here serves checks a lot of things

- did the code really get into that chip (great fun in class: two
students have their USB cables crossed and are wondering why their
target boards do not work as expected)

- do you have fuses info (and the correct fuses info) in your chip (when
there is no fuses info in a .hex file some programmers/pc software will
not complain, and leave you with a non-configured chip)

- others can load the .hex into a chip to see whether it works

- if your code is simple the .hex can easily be read and interpreted

--

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu

2008\12\17@045512 by Jan-Erik Soderholm

face picon face
Jinx wrote:
>> I don't understand what you mean by "That LVP is disabled in fuses".
>
> _LVP_OFF in CONFIG
>

Note that (as could be seen from the one of the earlier
posts) he don't uses ASM, and that the CONFIG symbols
are not spelled like that.

> __CONFIG(MCLRDIS & FCMDIS & BORDIS & PWRTDIS & WDTDIS
>          & UNPROTECT & IESODIS & INTIO);

The LVP seems to be missing anyway, but I've no idea
what it should be called in this/his tool...

2008\12\17@045844 by apptech

face
flavicon
face
Admin warning.

(Please)

**** Stop posting personal abuse onlist.****





on this

----- Original Message -----
From: "Luis Moreira" <EraseMELuis.Moreiraspam@spam@jet.uk>
To: "Microcontroller discussion list - Public." <@spam@piclistspam_OUTspam.....mit.edu>
Sent: Wednesday, December 17, 2008 8:53 PM
Subject: RE: [PIC] Annoying Electric Field?


> Hi Guys,
> Why are you still wasting your breath? Is obvious he is not listening
> hence shall we just stop posting on this?
> This as been one of the most annoying set of posts in ages.
> Thanks
> Luis
>
>
>
> {Original Message removed}

2008\12\17@045925 by solarwind

picon face
On Wed, Dec 17, 2008 at 4:45 AM, KPL <spamBeGonekpl.listesEraseMEspamgmail.com> wrote:
> I would recommend to read pk2cmd manual, and enable options like erase
> and verify on every programming. It will slow down things a bit but
> You will remove some variables from the problem. I had a lot of times
> when programming went wrong for unknown reason and was OK on the next
> try. Had to reconnect Pickit into another usb port sometimes.
>
> Prepare such a tested command line for you, and store it for future,
> or create a script or an alias. I was typing it in a shell window of
> piklab so not to switch windows all the time.
>
> --
> KPL

I enabled verify in windows version though. Same issue. I don't think
it's the programming.


--
..::[ solarwind ]::..

2008\12\17@051342 by solarwind

picon face
Ok, time to go back to assembler. That way more people on this list
will like looking at my code xD

I'm going to retry all this. This time, I'll take the following extra
precautions as suggested:

- Use assembler
- Post the HEX file read from the chip
- Make it as simple as possible (hardware and software)
- Put a resistor from MCLR to VDD
- Tie LVP to ground
- Disable LVP in config bits - I thought "fuses" were literally these,
lol: http://en.wikipedia.org/wiki/Fuse_(electrical)
- Put a proper ceramic capacitor (0.1 uF) between VDD and VSS.

By the way, I normally use HITECH C PRO compiler, but I'm going to try
GPUTILS and the normal MPLAB asm toolsuite now.

@ Forrest W. Christian, thanks for this:

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES INTRC_IO                 //Internal RC Osc, no CLKOUT
#FUSES PUT                      //Power Up Timer
#FUSES MCLR                     //Master Clear pin enabled
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NOCPD                    //No EE protection
#FUSES BROWNOUT                 //Reset when brownout detected
#FUSES NOIESO                     //Internal External Switch Over mode
enabled
#FUSES FCMEN                    //Fail-safe clock monitor enabled
#FUSES NOLVP                      //Low Voltage Programming on B3(PIC16)
or B5(PIC18)
#FUSES NODEBUG                  //No Debug mode for ICD
#FUSES NOWRT                    //Program memory not write protected
#FUSES BORV21                   //Brownout reset at 2.1V
#FUSES INTRC_IO                 //Internal RC oscillator

I'm going to conver it and put it in my ASM code now. I'd use CCS C
compiler but it's not as optimizing as I would like it to be. What are
your opinions on this?

I'll try all this out tomorrow. It's 5 in the morning. Biology
homework is killing me. Time to go to sleep, lol.

2008\12\17@051531 by solarwind

picon face
Did I miss anything?

2008\12\17@052308 by Wouter van Ooijen

face picon face
> I enabled verify in windows version though. Same issue. I don't think
> it's the programming.

If the problem were something you think it is you would have solved it
by now.


--

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu

2008\12\17@072022 by olin piclist

face picon face
solarwind wrote:
> Luis please go jump off a cliff! (Or stand in the middle of a highway,
> either one's fine).

Admins, how long are you going to let this go on without even word, let
alone some real action?


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2008\12\17@075636 by olin piclist

face picon face
solarwind wrote:
> I'll try all this out tomorrow. It's 5 in the morning. Biology
> homework is killing me. Time to go to sleep, lol.

Where are you located?


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2008\12\17@075805 by olin piclist

face picon face
solarwind wrote:
> Did I miss anything?

Maybe.

********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2008\12\17@080947 by apptech

face
flavicon
face
> Admins, how long are you going to let this go on without even word, let
> alone some real action?

PLEASE DO NOT REACT ONLIST TO THIS POST

If you want to raise admin related matters please address them to
PICLIST-ownerspamBeGonespammit.edu

________________

It is not normal admin policy to respond to such issues when raised on list
in this way.
I feel that it may be useful to make some comment here.

All list admins who read their email are aware of the issues raised here.
People have been asked on list not to comment about personal issues on this
thread or indeed on any thread.
A number of people who have some involvement in this matter have been
emailed offlist with a view to trying to put out the fires rather than fan
them.

There have been 20+ posts on this thread since the unfortunate exchange that
is being quoted. People have settled down and moved on. Dredging up old
provocative material risks keeping a running firefight going indefinitely.
If this is what is desired please find a list that this is acceptable on and
do it there. If this is not what is desired then PLEASE - if you see a
provocative post, read all the mail befoe responding and then, if reaction
is required, keep personal material offlist. Everyone's lives will be more
plesant if we do this as well as we can.

A major factor in such squabbles is the distributed space-time nature of an
international list. If people respond to 'old history' hat happens while
they are asleep or working or whatever then the 'waves' can surge to and fro
for days. Cooperation in helping this not happen would be appreciated.


  felice navidad


             Russell


{Original Message removed}

2008\12\17@150050 by Jinx

face picon face
> http://img249.imageshack.us/img249/3056/screenshotus2.png

On some PICs, Mclr is a dedicated pin. On others it's not and
you should use a resistor

Did you actually measure 5V at Mclr ?

2008\12\17@173138 by solarwind

picon face
On Wed, Dec 17, 2008 at 4:55 AM, Forrest W Christian <RemoveMEforrestc@spam@spamspamBeGoneimach.com> wrote:
> This is in CCS C, by the way:
>
> #FUSES NOWDT                    //No Watch Dog Timer

Check

> #FUSES INTRC_IO                 //Internal RC Osc, no CLKOUT

Check

> #FUSES PUT                      //Power Up Timer

Shouldn't this be *disabled*?

> #FUSES MCLR                     //Master Clear pin enabled

Check

> #FUSES NOPROTECT                //Code not protected from reading

Check

> #FUSES NOCPD                    //No EE protection

Check

> #FUSES BROWNOUT                 //Reset when brownout detected

Why would we need this?

> #FUSES NOIESO                     //Internal External Switch Over mode

Why would we need this?

> #FUSES FCMEN                    //Fail-safe clock monitor enabled

Check

> #FUSES NOLVP                      //Low Voltage Programming on B3(PIC16)
> or B5(PIC18)

Check

> #FUSES NODEBUG                  //No Debug mode for ICD

Check

> #FUSES NOWRT                    //Program memory not write protected

Check

> #FUSES BORV21                   //Brownout reset at 2.1V

Again, why is it needed?

> #FUSES INTRC_IO                 //Internal RC oscillator

Isn't this the default?

> -forrest



--
..::[ solarwind ]::..

2008\12\17@180754 by Jan-Erik Soderholm

face picon face
solarwind wrote:

>> #FUSES PUT                      //Power Up Timer
>
> Shouldn't this be *disabled*?

If you specificaly do not need to start as fast
as possible, it's better to have the power on
timer enabled.

>> #FUSES BROWNOUT                 //Reset when brownout detected
>
> Why would we need this?

Gives safer startup when one have a power supply
with slow voltage rise. For one thing. It doesn't harm
either.

>
>> #FUSES NOIESO                     //Internal External Switch Over mode
>
> Why would we need this?

Don't know. read about it and decide if you want it or not.

>> #FUSES BORV21                   //Brownout reset at 2.1V
>
> Again, why is it needed?

Again, read about it and set it as you want.

>> #FUSES INTRC_IO                 //Internal RC oscillator
>
> Isn't this the default?

The point here is to show that you've actualy thought
about it. What is the default doesn't matter.


More... (looser matching)
- Last day of these posts
- In 2008 , 2009 only
- Today
- New search...