PST on other pins?
jimgolden
Posts: 4
Hello, I was wondering if the pst could be used on other pins? I went thru the library and found
PUB StartRxTx(rxpin, txpin, mode, baudrate) : okay {{Start serial communication with designated pins, mode, and baud. Parameters: rxpin - input pin; receives signals from external device's TX pin. txpin - output pin; sends signals to external device's RX pin. mode - signaling mode (4-bit pattern). bit 0 - inverts rx. bit 1 - inverts tx. bit 2 - open drain/source tx. bit 3 - ignore tx echo on rx. baudrate - bits per second. Returns : True (non-zero) if cog started, or False (0) if no cog is available.}} stop longfill(@rx_head, 0, 4) longmove(@rx_pin, @rxpin, 3) bit_ticks := clkfreq / baudrate buffer_ptr := @rx_buffer okay := cog := cognew(@entry, @rx_head) + 1So I tried it setting the pins to 12 and 13 and mode 0 and 9600 baud. It did not work, so I went back to just the psd.Start(9600) and hooked up to the tx line on the propeller to the Rx line on my chipkit32 uno and it worked(I did have both of them connected to a commor ground) I was just sending an "a" waiting 3 seconds, then an "s" and it worked great. While nothing was being transmitted I received a "-1" which is great because there will never be any negitive numbers sent. So that gives me a free "i am idle" character, Next I will try going from the chipkit to the propeller. Then on to sending strings and stuff to see what I can do!
Comments
Try .Dec instead.