Hello Leonel,
Leonel
Iīm sorry to start by a blinky light, but my english itīs not good to explain in detaill all things, so iīve put a simple question
That is fine Leonel... Even I have problems... so you and I are in the same boat together... We can wave flags at each other, and sink with the ship...at least we will have a little fun.
Iīm used to finish with endif, but if itīs better for my code space iīll follow your advise!
This is not a requirement Leonel... This is all up to you and your preference. You may code anyway that makes you understand it. I only made a suggestion, to show you a different way how to code. I have been corrected many times on my coding!... Sometimes I change, sometimes I don't. As long as the code compiles, and I understand it... its fine with me.
Just another question: my code after compiling gives me this warning " "Crossing page boundary -- ensure page bits are set." i donīt have to worry, because PBP takes care of this problem???!!! I donīt have any branch instruction so thatīs ok (pag.13 of PBP manual), my code will work great! Correct?
You shouldn't have to worry about crossing page boundary... PBP takes care of that... I only question is why??? I don't think you have 2 k of code there... but I could be wrong. But you should not have to worry about this warning.
Now about your code... If you notice my tag, one of the statements is: "Compile something that runs" There is no guarantee on your code (or my code) running to do the job you want it to do. Since I have no way how to test it, I can only give you code that is Close to what I think you are wanting.
Remember, the code I am giving you is a "shell" around your "Secret weapon" That shell is taking care of a blinky light, taking care of your 20 and 40 second timing, and also checking your switches. I noticed on your code, that my routine was used as a kind of subroutine. This may get you into a little trouble...with how your program works. But you can try it!...
Since you said the blinky light can be off by a few seconds, I made the code as a shell. A shell is the part that fits around your program and stuff. What will vary your blinky light, will be the code in my shell. But I am betting that the computer is so fast, that your code will not make that much difference between the blinky lights.
I also noticed you used a Pause 1000 . That is a 1 second delay...That means if you are pushing a button, you may have to hold it for at least 1 second! If this is ok with you, great.
My biggest question is:
Do you fully understand what my code is doing? Do you fully understand that it is a shell, and how it is taking care of the timing, switch checking, and blinky light? Do you know where to insert your code, so that my code will work like it should? I only ask these questions, because it seems you are using it as a kind of Subroutine. (I have not studied your code to fully comprehend it, but I just picked up on a few little things that made me wonder).
Dwayne
Last edited by Dwayne; - 30th June 2005 at 16:24.
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks