This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Does LPC2103 Timer/Counter MAT output always low after reset?

Hi all, I am using LPC2103 for the first time.

When I setup Timer/Counter with MAT as match output, it always init at logic low on the MATn.m pin.

So what is the purpose for setting the TnEMR register to "01 Clear the corresponding External Match bit/output to 0(MATn.m pin is LOW if pinned out)" if the output always start at logic low??

On the other hand, is there any way to make the MATn.m start with logic high when timer/counter restart?

Many many thanks!

Alan

  • The MATn.m pin will always start low on reset or power-up....thats the reset state of the pin controlled by the hardware in the chip...can't be changed.
    You can then change the state of the pin via software which will occur after match register = timer counter.
    In between the application(depends what your needs are), flexibilty of switching the MATn.m to be high or low or toggle is nice to have.
    You can set the pin high in your software(see table below) which will occur when match register = timer counter.

    Table 172: External match control
    EMR[11:10], EMR[9:8],EMR[7:6], or EMR[5:4]
    Function
    00 Do Nothing.
    01 Clear the corresponding External Match bit/output to 0 (MATn.m pin is LOW if pinned out).
    10 Set the corresponding External Match bit/output to 1 (MATn.m pin is HIGH if pinned out).
    11 Toggle the corresponding External Match bit/output.