|
|
View previous topic :: View next topic |
Author |
Message |
jamesjl Guest
|
kbhit(???) |
Posted: Wed Jan 29, 2003 8:25 am |
|
|
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(???) |
Posted: Wed Jan 29, 2003 1:59 pm |
|
|
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
|
Re: kbhit(???) ???? |
Posted: Wed Jan 29, 2003 4:37 pm |
|
|
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 _________________ Humber |
|
|
|
|
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
|