I don't know about the LABX1 board, so cannot help you on that.
About the other matter, as stated, and if I understood it correctly, you need to have a clean frequency at the output while checking the keyboard with PBP interrupts?
I think it is not going to work as expected, since the PBP interrupts are slow and will introduce jitter at the output.
I believe it would be easier to use just four inputs and 4 buttons and check these while you have the output High or low and you are waiting for the respective time to exprire.
Like this:
loop:
High output
gosub check_buttons
pause xx msec (you have to find the best value here)
low output
pause yy msec (you have to find the best value here)
goto loop
check_buttons
if but1=0 then
xx=value1:yy=value1a
return
endif
if but2=0 then
xx=value2:yy=value2a
return
endif
if but3=0 then
xx=value3:yy=value3a
return
endif
if but4=0 then
xx=value4:yy=value4a
return
endif
return
Now you have to find by trial and error the most accurate values for the value1 through value4a
P.S. Experienced programmers might laugh at the above example, but I think you have to start with something simple before jump into interrupts. If you really need interrupts, consider Darrel Taylors Instant Interrupts. The definite solution.
Ioannis
Bookmarks