FullDuplexSerial - send data back to pc
Hello,
The idea is that the Propeller will return everything I type in on the computer.
But when I type ten times "AA", the Propeller returns ten different things.
Here is my program:
Am I missing something?
Or am I saving the rx in a wrong variable?
Kind regards,
Robot Freak
The idea is that the Propeller will return everything I type in on the computer.
But when I type ten times "AA", the Propeller returns ten different things.
Here is my program:
CON _clkmode = xtal1 + pll16x 'set clock frequency _xinfreq = 5_000_000 VAR byte temp OBJ serial : "FullDuplexSerial" 'fullduplexserial object PUB main serial.start(31, 30, 1, 9600) 'start fullduplexserial on the programming pins, with inverted communications, at a baudrate of 9600 serial.str(string("Hello World!")) 'transmit the string Hello World! repeat temp := serial.rx if !(temp == $00) serial.bin(temp,8) waitcnt(50_000 + cnt)
Am I missing something?
Or am I saving the rx in a wrong variable?
Kind regards,
Robot Freak
Comments
After resetting the prop, I get this:
So it looks like there isn't any pattern...
I tried changing the mode parameter, and 0 seems to work.
Thanks for mentioning it!