|
|
View previous topic :: View next topic |
Author |
Message |
newbie Guest
|
Reading inputs in time |
Posted: Sun Feb 02, 2003 3:23 pm |
|
|
I have a 16F876 and I am monitoring th RS232 port and woking on the data that comes in. I also need to monitor four other TTL inputs but I sometimes miss the event because the PIC is busy working with the RS232 Data.
Is there some sort of 4bit latch that when a input goes high the output stays high until I reset it.
Thanks.
___________________________
This message was ported from CCS's old forum
Original Post ID: 11210 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: Reading inputs in time |
Posted: Sun Feb 02, 2003 8:10 pm |
|
|
:=I have a 16F876 and I am monitoring th RS232 port and woking on the data that comes in. I also need to monitor four other TTL inputs but I sometimes miss the event because the PIC is busy working with the RS232 Data.
:=
:=Is there some sort of 4bit latch that when a input goes high the output stays high until I reset it.
:=
-----------------------------------------------------------
How long do these inputs go high ? (What's the pulse length ?)
Let's assume they're at least 100 us.
It seems to me, that you can have an interrupt driven receive
buffer for the incoming RS-232 characters. Then handle the
characters in the foreground (ie., inside a loop, in main() ).
Then, use the "interrupt on change" feature of Port B, and
when you get a "change", then go to an int_rb_isr() function
and read port B. Save the value in a global variable, and
process it later, in main().
___________________________
This message was ported from CCS's old forum
Original Post ID: 11217 |
|
|
Sherpa Doug Guest
|
Re: Reading inputs in time |
Posted: Mon Feb 03, 2003 11:04 am |
|
|
:=I have a 16F876 and I am monitoring th RS232 port and woking on the data that comes in. I also need to monitor four other TTL inputs but I sometimes miss the event because the PIC is busy working with the RS232 Data.
:=
:=Is there some sort of 4bit latch that when a input goes high the output stays high until I reset it.
:=
:=Thanks.
Look at a 74LS688. It has no latch and may be a little big (8 bits), but that may be the direction you should look.
___________________________
This message was ported from CCS's old forum
Original Post ID: 11235 |
|
|
R.J.Hamlett Guest
|
Re: Reading inputs in time |
Posted: Mon Feb 03, 2003 11:48 am |
|
|
:=I have a 16F876 and I am monitoring th RS232 port and woking on the data that comes in. I also need to monitor four other TTL inputs but I sometimes miss the event because the PIC is busy working with the RS232 Data.
:=
:=Is there some sort of 4bit latch that when a input goes high the output stays high until I reset it.
:=
:=Thanks.
Look at the 4043.
It has four outputs (enabled by a single 'enable' pin, which can be left permanently on), four 'set' inputs (which can be connected to your four input signals), and four 'reset' inputs (which can be connected together, and wired to a single 'reset' output from the PIC). If the 'reset' inputs are low, when an input goes high, the output will go high, and stay high, till cleared.
Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 11236 |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|