Processor Expert is a high level programming tool with all advantages (easy to use, save time...) and disadvantages (the programmer does not have full control over the code, it's difficult to do "unexpected" things...).
Of course, we can combine the PE code with our own code. But we have to make sure that our code doesn't impact the PE code, i.e. rewriting the registers...
Without PE is's very easy, just a few lines of code...
With PE I would use some bean that enables the free running timer (FC161 for example, as you mentioned earlier) and enable the timer overflow ISR. Then I would create own global variable that should be incremented in the timer overflow ISR. The rest is the same as I described in my previous reply... 作者: fjczd 时间: 2009-1-5 10:57