General Coding Questions
rcm14
Posts: 11
For my project, I am using the Full Duplex Serial object for three aspects: 1) control an LCD, 2) control a line-of-sight infrared emitter/receiver pair, and 3) pass information to and from the computer screen. This is using 3 separate cogs, and (including these 3) am using all of the Propeller's 8 cogs. Is there anyway to consolidate the Full Duplex Serial so I'm not using so much space?
Also, I have had some trouble getting my 8th cog to start. I've scanned my code over and over and have only counted 8 cogs including cog 0 which is used to call the objects which contain the other cog calls. As of now my code is split into 3 sections: 1) Top Level File to control the setup of my system, 2) an LCD file to control my LCD operations, and 3) a serial communication file for the operation of the emitter/receiver pair. Again, is there anything I can do with my code to maybe help consolidate some space and possibly avoid problems with my cogs not starting?
Thank you for any help.
Also, I have had some trouble getting my 8th cog to start. I've scanned my code over and over and have only counted 8 cogs including cog 0 which is used to call the objects which contain the other cog calls. As of now my code is split into 3 sections: 1) Top Level File to control the setup of my system, 2) an LCD file to control my LCD operations, and 3) a serial communication file for the operation of the emitter/receiver pair. Again, is there anything I can do with my code to maybe help consolidate some space and possibly avoid problems with my cogs not starting?
Thank you for any help.
Comments
Also, what type of timing updates/requirements do you need for the 3 full duplex serial cogs? I've never had the need to use more than 1 full duplex serial object and I'm not a very efficient coder.
Can you post your code to give us a better understand of what you are dealing with? You can go into File --> Archive --> Project and create a compressed file of your project and upload it/attach it to a forum post.
I thought I would need three separate full duplex serial cogs since I had 3 separate tx/rx pin combinations that I needed to manage. But then again, that's why I'm asking this question.
I tried to upload an archived version, but for some reason the attachment manager couldn't find the file. Sorry. LaserTag.spin is the top file, and the other two are the main two objects other than the Full Duplex Serial.
gun_vest.spin
gunLCD.spin
LaserTag.spin
For instance, here is some code:
Let's say pin[0] is equal to 1, and the code is currently executing the waitcnt() command. Then while still executing the waitcnt() command, pin[0] goes to 0. Will the waitcnt() command finish before the repeat loop terminates?
http://forums.parallax.com/showthread.php?137349-yet-another-variant-fullDuplexSerial4portplus
Windows 7 doesn't like programs using the "Program Files" folder to store data. The OS then "hides" these data files (at least it seems like hiding to me) in the "VirtualStore".
On my computer, files often end up in "C:\Users\Duane\AppData\Local\VirtualStore\Program Files (x86)\Parallax Inc\".