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

kbhit(???)

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







kbhit(???)
PostPosted: Wed Jan 29, 2003 8:25 am     Reply with quote

Hi guys,

can I use a stream with kbhit(), e.g. kbhit(R485); to determine which of my two defined RS232 ports the incoming bit stream is coming from? My project uses RS485 and RS232 on a PIC15F872. The RS232 uses the hardware USART and the RS485 uses a software USART. I just need to get the RS485 data onto an RS232 device and the RS232 data onto the RS485 bus. If anyone has any known issues about this type of scheme I would be interested to here them.

Many thanks,

Jason.
___________________________
This message was ported from CCS's old forum
Original Post ID: 11092
Dale Botkin
Guest







Re: kbhit(???)
PostPosted: Wed Jan 29, 2003 1:59 pm     Reply with quote

How come nobody ever just tries this stuff to see if it works or not???

Yes, it appears to work with V3.124 at least. Nothing is mentioned about kbhit() supporting streams in any of the documentation (help or README.TXT) that I have, but a quick test and a look at the resulting list file shows it does:

#use rs232(rcv=PIN_A0,stream=stream1)
#use rs232(rcv=PIN_A1,stream=stream2)

.................... if(kbhit(stream2));
028D: BTFSC 05.1
028E: GOTO 28F
.................... if(kbhit(stream1));
028F: BTFSC 05.0
0290: GOTO 291

:=Hi guys,
:=
:=can I use a stream with kbhit(), e.g. kbhit(R485); to determine which of my two defined RS232 ports the incoming bit stream is coming from? My project uses RS485 and RS232 on a PIC15F872. The RS232 uses the hardware USART and the RS485 uses a software USART. I just need to get the RS485 data onto an RS232 device and the RS232 data onto the RS485 bus. If anyone has any known issues about this type of scheme I would be interested to here them.
:=
:=Many thanks,
:=
:=Jason.
___________________________
This message was ported from CCS's old forum
Original Post ID: 11111
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

Re: kbhit(???) ????
PostPosted: Wed Jan 29, 2003 4:37 pm     Reply with quote

You are rigth Dale !

I will never try to test it for the same reason you stated.

Humberto
___________________________
This message was ported from CCS's old forum
Original Post ID: 11117
_________________
Humberto
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