Help with serial I/O
SamMishal
Posts: 468
Hi all,
Has any one managed to communicate the propeller using the FullDuplexSerial.spin object with
any thing other than the ParallaxSerialTerminal.exe????? If so what settings??
I have a program that uses the object·and commuinicates with the SerialTerminal.exe no problem.
I am just sending text.
However when I wrote a program with RobotBASIC to receive from the same propeller program, it does not work.
With·FullDuplexSerial.spin you can set the baud rate and the Tx and RX pins but not
the NumBits ,Parity ,StopBits , Hand shaking Protocol.....what are these set to????
I am interested to hear from any one who has communicated the Prop using the above spin object
to anything other than the exe above.......and what did you do to make it work???
If the FullDuplexeSerial.Spin does not work with other things.....then is there a spin object I can use
to do so.........???
Please help!!
Samuel
Post Edited (SamMishal) : 5/31/2009 7:06:13 AM GMT
Has any one managed to communicate the propeller using the FullDuplexSerial.spin object with
any thing other than the ParallaxSerialTerminal.exe????? If so what settings??
I have a program that uses the object·and commuinicates with the SerialTerminal.exe no problem.
I am just sending text.
However when I wrote a program with RobotBASIC to receive from the same propeller program, it does not work.
With·FullDuplexSerial.spin you can set the baud rate and the Tx and RX pins but not
the NumBits ,Parity ,StopBits , Hand shaking Protocol.....what are these set to????
I am interested to hear from any one who has communicated the Prop using the above spin object
to anything other than the exe above.......and what did you do to make it work???
If the FullDuplexeSerial.Spin does not work with other things.....then is there a spin object I can use
to do so.........???
Please help!!
Samuel
Post Edited (SamMishal) : 5/31/2009 7:06:13 AM GMT
Comments
FDS using 8N1 -- pretty common stuff. Perhaps R/B is doing something with DTR which is resetting the Propeller.
THANKS A LOT.........that was exactly the problem......DTR is also the Reset button and RB
puts it low to start with and that is resetting the Prop.....and I had the program in ram only
so obviously no program to run.....
I fixed the problem by using different pins to do the Tx and Rx and it works like a dream........
Fantastic........
But it would have been convenient to use the same serial as the programmer port.....but it is better
this way anyway since I have to use it the way it would normally be used with other devices......
Also I can use the ParallaxSerialTerminal also at the same time to do debugging ......I think this works out
quite fine.
I love it.....I can now write my RobotBASIC program to do serial Io with the Prop just like I did for the
Bs2. I will be writing about all this soon.......showing a program that sends numbers from RB to
spin and then back to RB with display on both sides......Just like in the BS2.
Thanks again...............
Samuel
If RobotBASIC is going to force a reset you may not be able to do a RAM only test; the TX and RX pins have nothing to do with reset, that connects to another pin.
Post Edited (JonnyMac) : 5/31/2009 5:51:54 AM GMT
So did you do this test in Ram or in Rom??
I see you used the 31 and 30 pins....so that means you were able to use the
programming port......so did it work for you because you burnt the program to Rom????
I am sure it is to do with what you said about DTR .....RB sets it to low to start with
when it connects to the Com port.....and that will of course reset the Prop.....but then
it seems that if the program is in Rom then it will work any way.......
I am going to try this now.....
I am sooooooooo glad that you picked RB·and wrote a program like you did in no time at all.
Are you sure you never used RB before?????? Did you figure out all the commands from the help file??
That makes me sooo happy that someone (albeit·an expert)·can do that......
I am now able to send and receive data but I am using P25 and P26 connected to a second Com port
on the PC to avoid the programming Com port......But it is nice to see that it can be done with the programming
Port if the program is in Rom....(I think I am going to try).....
Thanks much
Sam
Post Edited (SamMishal) : 5/31/2009 2:15:52 PM GMT
You are a great guy to do all this work on my behalf....THANKS!!!!!
It is exactly what you said. When I burnt the program to ROM....it worked
PERFECTLY with the P31 and P30 i.e. programming Com port.
So If I had to I can use the same com port as the Prop Plug and I do not have
to use another com port at all.....only disadvantage is:
1- I have to burn to rom
2- I cannot use the ParallaxSerialTerminal.exe to do debugging at the same time
3- I cannot start the RB program until after the IDE has finished with programming the prop
So in reality I am better off to use another com port with pins other than 30 and 31
BUT...it is nice to know that it can be done but with caveat 1 above.......nice to know
that it can be done IF someone cannot create a second com port.
GREAT.....stuff
THANKS again
Samuel
P.S. I am still amazed that you could write a program like the one you did in RB having
never used it before.........you must be an expert.........and even though that is another topic
but it is people like you who prove that REAL programmers can program in ANY LANGUAGE
and they can do it well......
Post Edited (SamMishal) : 5/31/2009 7:12:52 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ D Rat
Dave Ratcliff· N6YEE
·
Thank YOU for being such an Evil Genius and using RobotBASIC with
such dexterity, illustrating that in the hands of REAL programmers
RobotBASIC can be yet one more tool in their built.
Most people·whine about this or that language being better than this or that
but that is just like insisting on using a 10 iron to play an entire game of golf
from the T to the hole........
·
Horses for courses I say.....and RB is definitely one of the horses out there........
And under a good jockey like people in this forum it can even carry you to the finish line
better than some thoroughbreds........I personally prefer a quarter horse...because
I cannot afford a full one....
·
So the real thanks should go to you Ratronics for being a REAL PROGRAMMER.
·
Samuel
Post Edited (SamMishal) : 5/31/2009 2:06:21 PM GMT
Yes, I have been programming for a while (since 1978). I simply found an R/B example that did serial comms and followed suit -- nothing magical. When dealing with serial programs I always dump them into the EEPROM to avoid the possibility of a DTR reset problem.
BTW, since you write you may want to change the phrase "burn ROM" to "rewrite the EEPROM" as that's actually what is happening. The Propeller's program ROM is masked and cannot be "burned."
Glad you got everything working -- should provide for some interesting projects.
of course not in cricuit, you then had to put it back in the circuit and then find out that it was wrong so you had to
throw it away and start with a new one.......EProms then came on the market ....still 12 volts etc. But being able to
reuse it after a few hours under an ultraviolet was SUCH a heavenly ability..........
When EEProms came along they still needed higher voltage and initially could not be programmed in circuit but what
a concept, you can just wire a couple of jumpers to make it an incircuit in a way........heavenly..........
People nowadays just do not know the "pleasures" we used to have............I am sure they are glad about that....
Since 1978...hmm My first programming was done on a Ti59 ( http://en.wikipedia.org/wiki/TI-59) when I was 16 then
on the PDP11 a couple of years later....good old days.............·15 years ago
Sam
Post Edited (SamMishal) : 5/31/2009 3:41:04 PM GMT
FWIW, my column (originally started by Scott Edwards) in Nuts & Volts has be changed from "Stamp Applications" to "The Spin Zone - Adventures in Propeller Programming" so I will probably have a Propeller/RB experiment at some point down the road.
to solve concrete design formulas. Even though I had to·program the formulas and algorithms from scratch it was still
faster to do so than having to wait for the Mainframe output. The partners in the firm I worked for were all bowled over.
·
A computer on some junior engineer’s desk .........what a concept.......
·
Regarding the articles.........I would be eternally grateful...........
·
RB can do Internet Communications........maybe something that involves this ability............see this PDF
http://www.robotbasic.org/resources/RobotBASIC_Networking.pdf
·
The programs in this·zip may also be of interest.....they do instrumentation Bi-directional sending and receiving
over the internet and also can even do chat....I actually used the chat to chat with a friend·from Australia to the USA.
http://www.robotbasic.org/resources/TCP_Demo.zip
·
The programs in this zip were used to control a robot (simulated) from the USA to Australia and to send snap shots
(screen shots) of the robot's environment...
http://www.robotbasic.org/resources/TCP_Robot.zip
·
Just some ideas.......I would love to see RobotBASIC being used with the Propeller to do the above stuff using
a real robot with a propeller and a Wifi (but serial radio is good too, or bluetooth) connection to control a real
robot with some interesting AI being carried out by RB.
·
What ratronic is doing is definitely worthy of an article too......I wish he would write it.....Servo is always interested
in good stuff like that.
·
Samuel
Post Edited (SamMishal) : 5/31/2009 3:50:12 PM GMT