Pro Development Board Serial question
I have the propeller pro board usb connected to a Vista PC as Com3 and it is working fine for downloading and running Viewport.
I am new to the propeller and viewport and in the process of debugging ie learning I began to wonder if what I was seeing on
Viewport was right. I am not new to working with micros and realize it is more than likely me, the statement it is doing what your telling it
to do not what you think your telling it to do is most likely true.
I was trying something similar to what Jeff Martin does in Communicating between cogs with Spin and Assembly· web seminars.
Last night I decided to try using the Simple Serial object like Jeff did instead of Viewport just as a test to display the value of my
variable, which never seems to change.
Now my question after a bit of an introduction.
Should you be able to run the serial from Simple Serial over the same usb connection as the download connection
I wonder how he had his set up, I cannot click enable fast enough on the Parallax Serial terminal to see what is sent and when
I put in a loop to keep sending still nothing although I see the red led on the pro board flash once.
There is another serial setup on the pro board and later I am going to wire it up and see but I thought I would ask also.
Tom
·
I am new to the propeller and viewport and in the process of debugging ie learning I began to wonder if what I was seeing on
Viewport was right. I am not new to working with micros and realize it is more than likely me, the statement it is doing what your telling it
to do not what you think your telling it to do is most likely true.
I was trying something similar to what Jeff Martin does in Communicating between cogs with Spin and Assembly· web seminars.
Last night I decided to try using the Simple Serial object like Jeff did instead of Viewport just as a test to display the value of my
variable, which never seems to change.
Now my question after a bit of an introduction.
Should you be able to run the serial from Simple Serial over the same usb connection as the download connection
I wonder how he had his set up, I cannot click enable fast enough on the Parallax Serial terminal to see what is sent and when
I put in a loop to keep sending still nothing although I see the red led on the pro board flash once.
There is another serial setup on the pro board and later I am going to wire it up and see but I thought I would ask also.
Tom
·
Comments
Without seeing your source code, it's difficult to guess what's going on. Using the PC downloading connection for debugging does work.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
The code is very cobbled with me trying to use the serial output to see if the code gets to various locations I now need to
clean it up and start again.
I will post that after maybe with what I learned maybe with all right I give up Ha
Tom
·
I wanted to use the cogs counter A to measure the high time of an external signal. Set at 500us
That part is not working and only produces a zero but that will be my next learning exercise.
What I learned from the original code not working
·1. Do not forget the # in jmp #:loop. This (jmp :loop) was causing it to appear as if it was off to never never land
·2. I was originally using mov instrutions instead of rdlong and wrlong and then with a re-read of the manual I realized
··· rdlong and wrlong were the only two instructions that could access address space outside of the given cogs 512 long
··· address space. I am·looking for ·varification of this thought.
·3. I used the Globle constant PINNUM and for awhile it looked like you could not use it in the asm code. Mistake here was
··· not saying #PINNUM in the code at the beginning of the asm routine to set Pin 10 as an input. Since the counter part does
·· not work yet I am asking if is ok to use globle constants in the asm section and does the code to set up counter constants look right.
·4. After I had it working I rechecked if the usb serial port (com3) would work and it did not. I still needed to use the 9pin dshell serial on Com1.
··· My thought is the propeller tool has the com3 port and simple serial cannot get it. Viewport was able to work it appeared the other day.
At this point the program writes an 'A' then every 500ms writes a zero to the terminal and lights the led attached to Pin 1 indicating all is working
execpt the calculation of high time.
My thoughts on the counter were to set it up to measue High Time with an increment of 1us and then wait for a negitive edge to indicate it was done.
Waiting for an edge works as if I dissconnect the signal it waits until I connect it. Trailing or leading edge is untested right now I set it up for falling Ha.
Again the key concept is that the asm instructions work in the cog's 512 long address space except for rdlong and wrlong. Y/N and are there any other
asm instructions ??
Thank's
Tom
2) There are no instructions other than those documented in the Propeller datasheet and Propeller Manual.
3) The last 16 locations in the cog's memory have special uses which are all documented in the Propeller datasheet and the Propeller Manual. Some of these locations (like INA, CNT, PAR) can only be accessed using the source field of an instruction. If you attempt to access them using the destination field, you will get a "shadow" memory location rather than the hardware register normally associated with that address. Some I/O drivers make use of these "shadow" locations for some of their storage.