Hi Cameron,
I wasn't sure whether you were using the rs-232 still but these invert the signal as well as increasing the voltage to 12V. Could this be your problem?
Mike
Hi Cameron,
I wasn't sure whether you were using the rs-232 still but these invert the signal as well as increasing the voltage to 12V. Could this be your problem?
Mike
Mike,
Since I now have communication between two microprocessors, i have no need for RS232 communications anymore. However, when they were being used before, the logic levels were stepped up using a MAX232 IC included in the dev board i am using, so that was taken care of for me.
The problem was that for some reason serout2 leaves the TX pin high at the end of whatever you are sending, at least when using driven true modes. I ended up just using driven inverted modes, and it seemed to alleviate the problem. However i do not know WHY it did so. Knowing WHY is like being taught how to fish. Knowing that it solved your problem is like being given a fish.
Cameron
RS-232 idles in steady MARK. The start bit is a SPACE bit. After the character has been sent the stop bit(s) are again MARK. MARK is defined as a negative voltage and SPACE is a positive voltage at the high level RS-232 interface.
The MAX-232 chips are inverters. In order to get a steady MARK after the character, SEROUT2 is doing the right thing and leaving the TTL line out of the PIC as a high (5V) level.
In order to get the correct state BEFORE sending a character with SEROUT, I find it pays to "condition" the line by setting the serout pin HIGH with a PAUSE longer than a character duration.
HIGH SeroutPin
PAUSE 10
SEROUT pin, mode, [data,data,data, etc]
HTH
Brian
Bookmarks