Parallax Serial Terminal
Vega256
Posts: 197
Hey,
I've been using the Propeller Tool for a while now; I suppose about two years. I always opened up the serial communicator, but not really knowing what it was for. I knew I could reset the Prop from the PC, but that was it. I see now that there is a serial communications object here for comm between the Prop and the serial terminal in the Prop Tool. Could this be used for debugging?
I've been using the Propeller Tool for a while now; I suppose about two years. I always opened up the serial communicator, but not really knowing what it was for. I knew I could reset the Prop from the PC, but that was it. I see now that there is a serial communications object here for comm between the Prop and the serial terminal in the Prop Tool. Could this be used for debugging?
Comments
You can not only receive serial data to it, but you can also send to it if you write code to handle the received bytes.
To write to the terminal you have to attach the pst object that I've attached to this post as an object in your code
then you start the object like so
then to write strings it is
for characters it is
for numbers it is
for hex it is
for binary it is
and for a carriage return it is
How have you debugged in the past?
I guess I've been just struggling in the dark. Thanks; this just might make things a lot easier.
I've made all of the mistakes that you could possibly make, so post here if you have questions.
Under preferences, I bump the max buffer lines to 8192 so that I can go further back when the code is scrolling 100 lines a second. I also uncheck the box to automatically disable/close port when inactive. This unfortunately removes the functionality that allows the pst to wait up to 10 seconds after clicking the enable button, for the IDE to finish sending the code to the chip, but however it allows you to run the pst when the pst is not the foreground. This second suggestion is purely a suggestion and something I like, but it's subjective of course.
This also allows me to use 2 pst windows at the same time, as you can launch more then one copy of the application if you are debugging 2 propellers simultaneously. There are other options under preferences as well and other functions under the pst object.
Good lord yes. I write such God-awful code that I can't exist without constant care and feeding from the serial terminal. If you ever get to the point that you need to debug multiple cogs at the same time then SerialMirror is an awesome object that can be included in multiple cogs and allow them all to write data to the terminal window.
Sounds like you've been putting together a jigsaw puzzle in the dark.
You want easier, try propforth with teraterm. The whole things is from the command line, and interactive. This should feel more like putting together a jigsaw puzzle with bright lights, and a picture of the solution in front of you.