Trying to make a Object that will let you see the state of a input / output pins only
sam_sam_sam
Posts: 2,286
Using the Parallax Serial Terminal object with the Parallax Serial Terminal if there is one in Spin
Can some one give me a link to it
Thanks
Can some one give me a link to it
Thanks
Comments
Hanno Sander has created a PC-Tool that transferes values of variables at a high speed into a PC-app
One seprate cog is used to transfer the variable values. So all you have to do is assign the value of the IO-register
to a variable inside of your main-code.
you can download it here
http://hannoware.com/ezlog/
Follow the instructions given in the example-files
If you have problems to get it running come back with a detailed description what you want to do
and your COMPLETE source-code as a propeller-tool-zip-archive
Anyway if you want to debug code I recommend adding titled debug-output to you code and using PST.EXE.
If the values are titled with fixed coded text you just read the deub-output
You don't have to think about what is bit no 17 and what does it mean if it has value 1 at this part of the code
You put this information into the title of debug-output
best regards
Stefan
Thank you for your reply
If not to much trouble could you show me how to use this in this code demo
Thanks for your help
Thank you for your reply
If it is not to much trouble could you show me how to use this in this code demo above
Anyway if you want to debug code I recommend adding titled debug-output to you code and using PST.EXE.
Please example this more
Thanks for your help
But I have not found a simple one for the output pins status
What would I need to add to this routine to see the output status in this example
Thanks
Normally OUTA is only written to but it can also be read from to retrieve the current I/O pin output latch states. This is ONLY the cog’s output latch states, not necessarily the actual output states of the Propeller chip’s I/O pins, as they can be further affected by other cogs or even this cog’s other I/O hardware (Video Generator, Count A, etc.). The following assumes Temp is a variable created elsewhere:
Temp := OUTA[15..13] 'Get output latch state of P15 to P13
The above sets Temp equal to OUTA bits 15, 14, and 13; i.e.: the lower 3 bits of Temp are now equal to OUTA15:13 and the other bits of Temp are cleared to zero.
John Abshier
I am learing allot but I still new to this
I am using the Propeller Professional Development Board
This might not be the best example to use but this is a simple one for me to learn from
Also this might not be the best way to write this code But I am looking for something simple one for me to learn from
Feel free to write this a better way but still use this part as the main thing you are going by outa[6] := ina[9] ' Copy P9 input to P6 ouput and using the
Parallax Serial Terminal so I can see both Input and output satus at the same time
Thanks
Here all of the code routine
What do I need to add or change to make this a stand a lone object
I want to able to look at any pin whether it is an input pin or a output pin and how to call up the that part of routine
Should have the Input as one routine and the output as another routine
Here is the same code but with two button and two LEDs
Read chapter 6 in the Propeller Education Kit Lab - Fundamentals. You can open the manual form the Propeller Tool - Help - Propeller Education Kit.