I am adding new code to a PIC16F877A that has already been placed on board that can not be changed so I am forced to write my code to the way the hardware has been done (I did not do the hardware either).
Lets say I need for right now read the data coming in from a RS485 chip and be able to transmit a packet back out.
That would not be a problem except the current hardware Tx UART pin is already wired to something else. According to the board layout I have to make C5 the Tx and C7 the Rx with B2 as the enable pin. Is there a way that I can setup the hardware UART so i can use INT_RDA and just use a software UART for the tx?
If you had this problem how would you go about doing it in software? I am not too familiar with bitbanging communication links but looks like it will need to be done. Also FYI the data out from the RS485 chip comes into a digital switch IC that is controlled by pin C1 from the microcontroller, so in other words, as long as C1 is high the data should pass on to pin C7.
The system has a 18.432 MHz clock and a baud rate of 38400. Currently i will not be sending large amounts of data, probably rx 4 bytes and tx 4 bytes. Eventually after this is working it will need to rx about 4 bytes and tx up to 50 bytes.
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