| Electronic Components Datasheet Search |
|
17017 Datasheet(PDF) 97 Page - Renesas Technology Corp |
|
|
|||||||||||||||||||||||||||||
17017 Datasheet(HTML) 97 Page - Renesas Technology Corp |
|
97 / 326 page ![]() µPD17016, 17017 95 11.3.5 Example of using timer with BTM0CY flag Here is an example program. Example M1 MEM 0.10H ; 1-second counter INITFLG NOT BTM0CK1, BTM0CK0 ; Embedded macro ; Sets set time of timer carry FF to 250 ms LOOP: SKT1 BTM0CY ; Embedded macro ; Tests BTM0CY flag; if “0”, branches to NEXT BR NEXT ADD M1, #0100B ; Adds 4 to data memory M1 SKT1 CY ; Embedded macro ; Tests CY flag and, BR NEXT ; if “0”, branches to NEXT ; if “1”, executes processing A Processing A NEXT Processing B ; Executes processing B and branches to LOOP BR LOOP This program executes processing A every 1 second. In developing a program, the following point must be noted. Caution Keep the time interval at which the BTM0CY flag is detected shorter than the time interval at which the timer carry FF is set to 1. This is because, in the above example, if the execution time of processing B is longer than 250 ms, setting of the timer carry FF is not detected. Figure 11-4. Detection of BTM0CY Flag and Timer Carry FF H L 1 0 Timer carry FF setting pulse BTM0CY flag <1> <2> SKT1 BTM0CY SKT1 BTM0CY SKT1 BTM0CY Processing B Processing B' Because the execution time of processing B' is long, after the BTM0CY flag set in <2> has been detected, the status of BTM0CY flag that is set in <3> is not detected. <3> <4> <5> |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |