PIC Vietnam

PIC Vietnam (http://www.picvietnam.com/forum/index.php)
-   Tổ dịch thuật (http://www.picvietnam.com/forum/forumdisplay.php?f=56)
-   -   Timer ticks and timer beats ??? (http://www.picvietnam.com/forum/showthread.php?t=1688)

dvkkt 07-11-2007 12:26 AM

Timer ticks and timer beats ???
 
__ If timer register (TMR0) is used to keep track of timer beats
__ the timer ticks as each instruction executes.

timer ticks và timer beats nghĩa nó khác nhau chổ nào, và nó nói về cái gì, các bác có thể giải thích rõ hơn không ??

bien_van_khat 07-11-2007 10:31 PM

Bạn nên cung cấp nguyên một văn cảnh bạn à, chỉ có một câu thì khó mà hiểu đúng lắm.

dvkkt 07-11-2007 11:41 PM

Nguyền văn như sau:
_ The actual implementation of a delay routine based on multi-byte counters presents some dificulties. If the timer register (TMR0) is used to keep track of timer beats, then detecting the end of the count poses a subtle problem. Intuitively, our program could detect timer overflow by reading the TMR0 and testing the zero flag in the STATUS register. Since the movf instruction affects the zero flag, one could be tempted to code:
wait
movf tmr0,w
btfss status,z
goto wait
_ But there is a problem: the timer ticks as each instruction executes. Since the goto instruction takes two machine cycles, it is possible that the timer overflows while the goto instruction is in progress; therefore the overflow condition would not be detected.

Jerry 08-11-2007 08:23 AM

[bold]Timer beat[/bold]: Nhịp của timer. "Thanh ghi TMR0 được dùng để giữ nhịp cho timer". Nghĩa là thanh ghi TMR0 được dùng để lưu giá trị của timer trong quá trình timer chạy. "Nhịp" ở đây được hiểu là xung clock làm cho timer tăng giá trị đếm lên 1.


[bold]Timer tick[/bold]: Từ "tick" ở đây không thể tìm được nghĩa tiếng Việt nào phù hợp. Với cái đồng hồ quả lắc, mỗi giây trôi qua nó sẽ kêu "tick" 1 cái, vì đơn vị đo nhỏ nhất của nó là giây. Còn với timer chúng ta đang nói đến thì đơn vị đo nhỏ nhất của nó là 1 chu kỳ lệnh. Có thể hiểu câu này là: "Timer sẽ đếm tăng sau mỗi chu kỳ lệnh".

Dieunhienxinhde 10-05-2018 11:02 AM

Bài viết hay mà

chuyen.dinh 05-06-2021 02:25 AM

one mo
 
https://accu-tierailsystem.com/2021/...online-casino/


Múi giờ GMT. Hiện tại là 03:39 AM.

Tên diễn đàn: vBulletin Version 3.8.11
Được sáng lập bởi Đoàn Hiệp.
Copyright © PIC Vietnam