CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Reading inputs in time

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
newbie
Guest







Reading inputs in time
PostPosted: Sun Feb 02, 2003 3:23 pm     Reply with quote

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

View user's profile Send private message

Re: Reading inputs in time
PostPosted: Sun Feb 02, 2003 8:10 pm     Reply with quote

:=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
PostPosted: Mon Feb 03, 2003 11:04 am     Reply with quote

:=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
PostPosted: Mon Feb 03, 2003 11:48 am     Reply with quote

:=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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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