View Single Post
Old 11-14-2012, 05:57 PM   PM User | #3
alykins
Senior Coder

 
alykins's Avatar
 
Join Date: Apr 2011
Posts: 1,608
Thanks: 37
Thanked 183 Times in 182 Posts
alykins will become famous soon enough
what are you trying to accomplish? I don't get what it is you're trying to do... how about something like
Code:
while(method_state_6 == true)
{
  do
  {
   ...
  }while(!anyinputfor6.Read());
}
but I am shooting in the dark here- can you make it clearer what your attempting?

Edit: It looks like you're trying to snake a value off that pin being tripped.... I haven't worked with that PIC so idk the API or the pinouts, but what about tying it high and then invoking the .Read()? You need something to hold that status true until you .Read() it and then flip it off; I imagine the PIC has that functionality. But are you trying to read it on the .Read() being true or false? Also what does the circuit look like on the tail end of that input? If you have nothing filtering the VS and it is rippling it could be flicking true-false-true-false-true-false etc. There are a lot more pieces here than just the code in play.

Edit Edit: Also from my xp here there are little to no EE's so without knowing about this from EE background (self) the amount of ppl looking at this that would know what it is you're even attempting is minimal if not null (in short need a lot more detail maybe post a pic of circuit as well)
__________________

I code C hash-tag .Net
Reference: W3C W3CWiki .Net Lib
Validate: html CSS
Debug: Chrome FireFox IE

Last edited by alykins; 11-14-2012 at 06:21 PM..
alykins is offline   Reply With Quote