fdserial between two propeller 'flip' modules.; ABANDONED
I having lots of problems with fdserial with two flips. I am using propeller C. Flip1 is running a program which uses 5 switches, 1 for speed and four for directions. The final output sends four bytes(0-255) by means of
fdserial_txChar(RmotorPin); fdserial_txChar(RdirPin); fdserial_txChar(DmotorPin); fdserial_txChar(DdirPin);now my understanding is that the commands send a byte to the transmit buffer. the next question is do I setup the buffers in the (MAIN) or not.When the second flip reads the input (rxpin) nothing happens.Sending the files. Can you please check them. I think I may need a receive buffer.
Comments
Based on the master program do you have pin 3 (TX) on master wired to pin 0 (RX) on slave flip wired together. Data send by master program will be send and received to an internal buffer on the receiving flip. No buffers required.
Mike
Mike
On the master flip set pin 3 high and on the slave flip read the state of pin 0. If you see it does return a high value then it worked.
Now change the master program and set pin 3 low and see if you can see a low value on pin 0. If this all works then serial should work as well.
Master program test
Slave program test
The Slave program will output the state of pin 0 every second on the terminal screen.
Mike
2; I have two new flips,should not have any damages unless factory defects.
3; will try the new tests
Mike
The Arduino code has to worry about Input, Output, Pull up, Pull down, Analog, Digital as some pins have special functions and can be connected to internal timers.
There are two programs. One to run on the master and the other to run on the slave flip. The master will set the pin state that is wired to the slave and the slave program will tell you what the state of that pin is. If everything is wired up correctly the state of the pin will change as the master program runs. Sort of like serial data running in slow motion.
Mike
Your choice.
Mike
Mike
So pin 3 on master would be your transmit(tx) pin 3 and pin 0 on the slave would be the receive(rx).
Mike
These program will run two test. The first is as before setting a pin high and then low.
The second test actually send a character using serial.
In the program is a define for TEST which can be set to 0 for test 1 or 1 for test 2. Each program will display what it is doing.
MASTER:
SLAVE
Mike