For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.
On a Pic16f887 if you use RS232 from the hardware Port C6 &7 and it transmit & receive successfully and you change the uart to software and move tx & rx pins to Port C0 & C1 should the program still function normal with RXInt or must I change something else
I need 2 x RS232 ports but can not get software uart to work with RXInt.
RXINT will work only currently with hardware USART. you can use Ben's following idea..
The software UARTs are very reliable for sending data out but not so good for receiving data. You can improve the receive functionality by using an external interrupt to synchronise the read function with the incoming start bit.
The GSM will need data to be sent and received reliably so it might be easier to use the hardware UART for the GSM and the software UART for the barcode reader. If you also enable a port change or INT interrupt in your program for the RX pin this should ensure you dont miss any incoming bytes from the barcode reader.
Hi,
I am suggesting to use software USART for PC communication and RXINT using hardware usart for other one..
Do you want to have RXINT for both RS232?
I’m receiving from one & sending to another weighing Instrument so on the receiving side I'll use RXint & on the TX side I'll use software TX I just hope a 4MHz crystal will be fast enough with a 9600baud.
Hi,
You can simply use data pin of your software RS232 as RB0/INT. If you configure RB0 INT on falling edge it will allow you to detect the start bit. In asynchronous usart communication (which RS232 uses), the start bit is sent first which is default 0 and then 8/9 bit data is sent and then stop bit. Normally data pin will be held high if no transmission in there..so whenever any transmission occurs, the data line held low for one bit-time which is start bit. So if you are waiting for falling edge in RBo iNT to trigger, you can easily know when there is a RS232 transmission. so you can receive data reliably.