Abstract:
A circuit structure for a timer counter counting the cycles of the pulse width of a digital signal corresponding to a clock signal is provided, wherein the signal type of the digital signal is Non-return to zero code. The timer counter circuit structure includes a first counter module and a second counter module. The first counter module receives the digital signal and the clock signal and counts the cycles of the pulse width of the digital signal corresponding to the clock signal while the logic of the digital signal is high. The second counter module receives the inverted digital signal and the clock signal and counts the cycles of pulse width of the inverted digital signal corresponding to the clock signal while the logic of the inverted digital signal is low.
Abstract:
A method for locking data of a program memory embedded in a microcontroller is provided. The method keeps the data stored in the program memory from being dumped. The program memory consists of a one-time-programmable read only memory and is configured into a plurality of storage sectors. The method, according to the present invention, first receives a lock command in which the lock command corresponds to a specific storage sector of the program memory. Next, according to the lock command, which storage sector is the specific sector is recognized. Finally, an access lock module is activated for locking the specific storage sector.