here is one suggestion from another forum. forcing the counter1 value to the saved vairable. Works once but on the next loop the value goes crazy.
while (Inconfig == 1)
{
//wait for keypress to move selector
ENC_SWstate = digitalRead(ENC_SW);
if (ENC_SWstate != prevENC_SWstate)
{
if (ENC_SWstate == LOW)
{
select += 1;
select = select % 4;
}
switch (select)
{
case 0:
noInterrupts();
Counter1 = w1Value;
interrupts();
break;
case 1:
noInterrupts();
Counter1 = w2Value;
interrupts();
break;
case 2:
noInterrupts();
Counter1 = pValue;
interrupts();
break;
}
prevENC_SWstate = ENC_SWstate;
}