engr_joni_ee
Advanced Member level 3
Hi,
I am working on a program which has the following task to do every second
Turn ON pin B1 as output and wait for 100 ms
Read another pin B2 as input
Send a string to UART
Turn OFF the pin B1
Read again B2
Send a string to UART
Wait until the next second is over and then start again the process
Can I use timer in this case ? i.e., just hold the program until the next second using timer and then start the process again
I am working on a program which has the following task to do every second
Turn ON pin B1 as output and wait for 100 ms
Read another pin B2 as input
Send a string to UART
Turn OFF the pin B1
Read again B2
Send a string to UART
Wait until the next second is over and then start again the process
Can I use timer in this case ? i.e., just hold the program until the next second using timer and then start the process again