Searching \ for '!!portB interrupts still a problem' 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/ints.htm?key=interrupt
Search entire site for: '!!portB interrupts still a problem'.

Truncated match.
PICList Thread
'!!portB interrupts still a problem'
1996\03\13@071346 by Moshe Fish

flavicon
face
On Tue, 12 Mar 1996 12:22:46 -0800  Scott Dattalo wrote:
>
>The code looks O.K.  Perhaps there is another, simpler problem. For example, do
you know if your
>'65 is running? Are you using an in-circuit emulator? If not, are you sure the
part is getting
>programmed correctly? When you use the scope to look at the signal, do you have
a storage
>oscilloscope? If not, you'll never see anything unless you use the Port A
output as the trigger
>source; in which case you'll at best see a faint trace across the screen.
>
>Suggestions
>1) Verify your test set up is functional. The easiest way I can think is to
create two versions of
>your code: the first outputs a logic 1 to port A<0> and the second a logic 0.
If they both perform
>the same then hmmm....
>
>2) Instead of pulsing port A, why not toggle it? This way, you can at least see
the current
>state with a DMM if you want.
>
>
>Without more info, this is the best I can do.
>
>Hope this helps
>
>Scott
>
Hi Scott
Thanks for replying
I have tried to take the same code (to which I added a GIE) and delete all parts
of the code which relate to port B and the other ports leaving only Port A
setup and the test. The code works perfectly and I can see it on the scope
(which by the way is a Tektronix digital scope). This leads me to believe at
this stage that somewhere in the portB setup there is something that is
affecting port A. By the way the simulator (I do not have an emulator) shows it
working fine on the code with the portB interrupts.
I still remain mystified although I am sure that when I discover what it is I
will fell like an idiot.
Moshe
PS anyone else out there got any suggestions?
-------------------------------------
Name   :Moshe Fish
E-mail :spam_OUTmfishTakeThisOuTspamnetvision.net.il
Date   :03/13/96
Time   :14:15:28

1996\03\13@170445 by Scott Dattalo

face
flavicon
face
Moshe Fish wrote:
>
> I have tried to take the same code (to which I added a GIE) and delete all
parts
>  of the code which relate to port B and the other ports leaving only Port A
>  setup and the test. The code works perfectly and I can see it on the scope
>  (which by the way is a Tektronix digital scope).

Hard to go wrong there...

>                                          This leads me to believe at
>  this stage that somewhere in the portB setup there is something that is
>  affecting port A. By the way the simulator (I do not have an emulator) shows
it
>  working fine on the code with the portB interrupts.

Here are a few more ideas. 1) Are you certain that your pic include
file P16C65.INC is O.K.? Specifically, it's possible that your PORT B
definitions
may be fubarred. 2) Have you tried another target PIC16C65? Maybe you have a bad
chip. 3) Where in your code did you enable GIE? Since the interrupt routine does
not save the STATUS register and reinitialize it for its on use, there's a
chance
that RP0 is in the wrong state when the interrupt occurs. Consequently, your
write
to PORTB would instead be going to TRISB; ditto for the PORTA write. This could
change the PORTB inputs to outputs!


> I still remain mystified although I am sure that when I discover what
> it is I will fell like an idiot..............->feel? or fail?

That's O.K. all idiots eventually fell (fail). However, I'm sure your no idiot!

Scott

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