Searching \ for '[PIC]:pic16F877... driving me crazy ! Weird GO' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/devices.htm?key=16F
Search entire site for: 'pic16F877... driving me crazy ! Weird GO'.

No exact or substring matches. trying for part
PICList Thread
'[PIC]:pic16F877... driving me crazy ! Weird GOOD s'
2001\05\30@234203 by Patrick J

flavicon
face
update:
just as a little test i changed the output waveform from
___- (thats 1110)
too:
___--- (thats 111000)

And now all of a sudden the pic is rocksolid ! As in it doesnt crash when I probe it the worst i can Must have something to do with what Tony said
about BSF BCF type instructions
Below are the changes made: (just added two BSF)
LOOP
 BSF  PORTB, 7 ; port B, bit7:=High
 BSF  PORTB, 7 ; port B, bit7:=High
 BSF  PORTB, 7 ; port B, bit7:=High
 BCF  PORTB, 7 ; port B, bit7:=Low
GOTO  LOOP  ; Waveform:

sorry abut the stupid topics, but at 05.40 in the morning I prolly should be in bed instead of writing topics ;-)

Tony wrote:
> The LVP fuse bit will default to LVP mode so RB3 will be used for low
> voltage program enable. You must set it to '0' so that RB3 becomes a
> digital IO. At the moment, I gather the pin is unconnected so it will be
> floating on powerup and may cause problems.

That is the pin (36)  I now find is VERY sensitive to my scope probe.. when
thouched the pic crashes (same when touching the pin 1, MCLR) No other pins seems sensitive. All pins on portb are connected to LEDs. May be a problem in this noisy enviroment.

> BSF BCF type instructions are not recommended on ports one after the
> other. Place a NOP between them or write directly to the port.
> >   BSF  PORTB, 7 ; port B, bit7:=High
> >   BCF  PORTB, 7 ; port B, bit7:=Low

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


2001\05\31@011059 by Tony Nixon

flavicon
picon face
Patrick J wrote:

> And now all of a sudden the pic is rocksolid ! As in it doesnt crash when
> I probe it the worst i can Must have something to do with what Tony said
> about BSF BCF type instructions
>
> Below are the changes made: (just added two BSF)
> LOOP
>   BSF  PORTB, 7 ; port B, bit7:=High
>   BSF  PORTB, 7 ; port B, bit7:=High
>   BSF  PORTB, 7 ; port B, bit7:=High
>   BCF  PORTB, 7 ; port B, bit7:=Low
> GOTO  LOOP  ; Waveform:


I would change that to...

LOOP
  BSF  PORTB, 7 ; port B, bit7:=High
  NOP
  NOP
  BCF  PORTB, 7 ; port B, bit7:=Low
  GOTO  LOOP  ; Waveform:

>
> That is the pin (36)  I now find is VERY sensitive to my scope probe.. when
> thouched the pic crashes (same when touching the pin 1, MCLR)
> No other pins seems sensitive. All pins on portb are connected to LEDs.
> May be a problem in this noisy enviroment.

As I mentioned, it is probably in LVP mode.

All PORTA, PORTC, PORTD and PORTE are floating inputs according to your
code. If they are unconnected then just waving your hand over the PIC
can be enough to upset it.

--
Best regards

Tony

mICros
http://www.bubblesoftonline.com
.....salesKILLspamspam@spam@bubblesoftonline.com

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamKILLspammitvma.mit.edu


2001\05\31@170636 by Drew Vassallo

picon face
>Below are the changes made: (just added two BSF)
>LOOP
>   BSF  PORTB, 7 ; port B, bit7:=High
>   BSF  PORTB, 7 ; port B, bit7:=High
>   BSF  PORTB, 7 ; port B, bit7:=High
>   BCF  PORTB, 7 ; port B, bit7:=Low
>GOTO  LOOP  ; Waveform:

This is really still not great.  You are probably better off doing:

Loop
bsf PORTB, 7
nop
nop
bcf PORTB, 7
goto Loop

The last line is OK relative to BSF/BCF due to the 2-cycle goto instruction.

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam.....mitvma.mit.edu


2001\05\31@212446 by Patrick J

flavicon
face
mmm, i now know i should do the NOP thingy. The point here was that by adding the extra BSF instructions, suddently the very sensitive to the touch PIC is rocksolid ! Amasing that those 2 lines could make it immune to my scope probe...

Now that i know the putor is running this code goes down the toilet.
And the real code, along w the 'real' problems begin ;-)
[to be continued]


> This is really still not great.  You are probably better off doing:
> Loop
> bsf PORTB, 7
> nop
> nop
> bcf PORTB, 7
> goto Loop
>
> The last line is OK relative to BSF/BCF due to the 2-cycle goto instruction.

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu


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