Searching \ for '[PIC]:RB0 int pin' 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=pic
Search entire site for: 'RB0 int pin'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]:RB0 int pin'
2000\12\28@041227 by brah

flavicon
face
I'm presently using portb to drive 3 seven seg displays, multiplexed
with common drives from porta 0,1 & 2.
I need an external interrupt, and I've tried using RB7, with poor
results, mainly due to determining the polarity of the interrupt signal.
I'd like to try RB0 as an interrupt, because of it's settable edge
triggering facility. (I need to interrupt on a falling edge only.)
However, when RB7 is not used as an interrupt, or anything else - it's
not connected - I only have to copy a full byte to the port, and it's
done. What happens to RB7 doesn't matter.
OK - but if I, say, configure RB0 as an input, the rest outputs, setup
RB) as an interrupt pin, set the edge triggering correctly, then get my
byte of data for the 7 segment led, and RLF once (garbage in bit0) and
then write it to portb, I'll be OK on the leds, but what's the effect on
RB0?
I've read a lot on this, and I may have attention deficiency syndrome
(an accute possibility) but I can't find out exactly what happens if you
write to an port bit that's configured as an input.  E.G. if the port
bit is held up, a byte is written to the whole port, and the bit in
question just happens to be low.  Does the port bit input buffer go low
momentarily, then get pulled back high again once the write operation is
over?  If it doesn't then OK, but if it does, would that trigger an
interrupt?
However, even if I don't have an interrupt problem looming, I'd like to
know what happens anyway.
Regards to you all,
Howard.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2000\12\28@065723 by Bob Ammerman

picon face
----- Original Message -----
From: brah <spam_OUTbrahTakeThisOuTspamULTRA.NET.AU>
To: <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU>
Sent: Thursday, December 28, 2000 4:15 AM
Subject: [PIC]:RB0 int pin


{Quote hidden}

Just remember this:

When you read you read the pin.

When you write you write the port latch.

This means that you'll trash the port latch for RB0 each time you RLF the
port, but you will _NOT_ affect the pin value, nor (AFAIK and I'm pretty
sure) will you have any trouble with interrupts.

The place to watch out is that if you then change RB0 from an input to an
output it will immediately start outputting the last value written to the
port latch.

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2000\12\28@090518 by Olin Lathrop

face picon face
> if the port
> bit is held up, a byte is written to the whole port, and the bit in
> question just happens to be low.  Does the port bit input buffer go low
> momentarily, then get pulled back high again once the write operation is
> over?  If it doesn't then OK, but if it does, would that trigger an
> interrupt?

The output latch is set whenever a bit is written, but this is only used to
drive the pin if the bit is configured as an output.  Any read, which
includes lots of intructions you might not think of, will copy the value of
an input pin to the output latch, even though the bit wasn't "written" to.
This only matters when you are switching a pin from being an input to an
ouput.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, olinspamKILLspamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2000\12\28@092844 by Andrew Kunz

flavicon
face
>This only matters when you are switching a pin from being an input to an
ouput.

... or are driving a pin with a heavy load.

Andy

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2000\12\28@093702 by James Paul

flavicon
face
Brah,

I believe nothing would happen, and you would not get an interrupt.
But if it were me, instead of spending so much time trying to figure
out would would happen in theory, I'd write the code to make it
happen and try it out.   That way, I'd know for sure.

And if by some chance an interrupt did occur, I'd turn of the
interrupt capability until after I had written to the port.
One of the nice things about microcontrollers in general, and PIC's
in particular, you can reconfigure a lot of things on the fly.
This makes then very versatile, as I'm sure you're already aware.

                                              Regards,

                                                Jim




On Thu, 28 December 2000, brah wrote:

{Quote hidden}

.....jimKILLspamspam.....jpes.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


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