buzzlightyear
Member
I have a scenario where I want an input high/low to make output pins do high/low transitions according to set lists, for example like this "LLHHLHLHLHLLHLHL" or "LHHLHHHLL" so the lists of high/low and the number of high/low events will vary according to the list selected. The input pin on each high will advance through the list, so in other words a low on the input does nothing, for example the input is "HLHLHLHLHLHLHLHL" the output might be "HHLLHHLH"
Now in addition the high on the outputs will need to be a set duration lets say 10ms then go low, and also I want to have multiple output pins each with their own list, for example
Output 1 "LHLHHLHL"
Output 2 "LLLLHHLHHLHL"
Output 3 "LHLHLLLHLHLHLHLH"
At each completion of 1 pass through the list they would loop around back to the first position of the selected list, I plan on using a pot to select via readadc which list for each output. Probably will use a 20M2 eventually but will start with an 08M2 to get the initial concept working with just a single output.
I'm pretty sure this will be possible but as I am new to all this the terminology and structuring is a bit of a struggle, I'm guessing that I will need to use gosub or case but not sure how to tie it all together, I apologise if my use of terms is not correct but hopefully someone will know what I mean and put me on the right path.
Moderators - feel free to correct the post title with correct description if mine is wrong. Thanks.
Now in addition the high on the outputs will need to be a set duration lets say 10ms then go low, and also I want to have multiple output pins each with their own list, for example
Output 1 "LHLHHLHL"
Output 2 "LLLLHHLHHLHL"
Output 3 "LHLHLLLHLHLHLHLH"
At each completion of 1 pass through the list they would loop around back to the first position of the selected list, I plan on using a pot to select via readadc which list for each output. Probably will use a 20M2 eventually but will start with an 08M2 to get the initial concept working with just a single output.
I'm pretty sure this will be possible but as I am new to all this the terminology and structuring is a bit of a struggle, I'm guessing that I will need to use gosub or case but not sure how to tie it all together, I apologise if my use of terms is not correct but hopefully someone will know what I mean and put me on the right path.
Moderators - feel free to correct the post title with correct description if mine is wrong. Thanks.