gnupic: Re: Interesting interaction between PORTE and PORTC


Previous by date: 18 Nov 2002 00:25:49 -0000 Re: ICD, Alessandro Zummo
Next by date: 18 Nov 2002 00:25:49 -0000 Re: ICD, Barry Gershenfeld
Previous in thread:
Next in thread: 18 Nov 2002 00:25:49 -0000 Re: Interesting interaction between PORTE and PORTC, Rick Mann

Subject: [PIC]: Interesting interaction between PORTE and PORTC
From: Rick Mann ####@####.####
Date: 18 Nov 2002 00:25:49 -0000
Message-Id: <B9FD7106.F449%rmann@latencyzero.com>

I'm using a PIC16F877 to decode IR (among other things) using the CCP2
module (which is tied to a pin on PORTC). The pin is set to be an input
early on and never changed.

After setting up a bunch of stuff, I in my main code loop all I do is a
poor-man's PWM of the display LEDs. I basically load a pattern of lit LEDs
on PORTD from a register, write it to PORTD, do a bunch of NOPs, then clrf
PORTD, do a bunch more NOPs, then loop and do it all over again.

In the same place I also set PORTE the same way. PORTE is used for
additional display LEDs.

What's odd is that the first 50ms or so that clrf PORTE happens (or movlw
0x00, movwf PORTE), it's toggling the output of the PORTC:1 pin (which
should be an input). The rate is sporadic, but does appear to settle on
about a 50% duty cycle with a period of under 1ms. Before it's done, that
periodicity does change.

It only happens for about 50 ms, and then it's done. If I comment out the
clrf PORTE, the behavior does not occur at all.

Any ideas?

TIA,

-- 
Rick


Previous by date: 18 Nov 2002 00:25:49 -0000 Re: ICD, Alessandro Zummo
Next by date: 18 Nov 2002 00:25:49 -0000 Re: ICD, Barry Gershenfeld
Previous in thread:
Next in thread: 18 Nov 2002 00:25:49 -0000 Re: Interesting interaction between PORTE and PORTC, Rick Mann


Powered by ezmlm-browse 0.20.