executed on " />
參數(shù)資料
型號: 101-0412
廠商: Rabbit Semiconductor
文件頁數(shù): 83/90頁
文件大?。?/td> 0K
描述: INTERFACE PROG 12KEY DISP OP6700
標準包裝: 25
系列: SBC
模塊/板類型: 單板計算機模塊
適用于相關產(chǎn)品: OP6700
80
Intellicom (OP6600/OP6700)
The statement at (3) waits for a time delay, in this case 200 ms. The costatement is being
executed on each pass through the big loop. When a waitfor condition is encountered
the first time, the current value of MS_TIMER is saved and then on each subsequent pass
the saved value is compared to the current value. If a waitfor condition is not encoun-
tered, then a jump is made to the end of the costatement (4), and on the next pass of the
loop, when the execution thread reaches the beginning of the costatement, execution
passes directly to the waitfor statement. Once 200 ms has passed, the statement after the
waitfor is executed. The costatement has the property that it can wait for long periods of
time, but not use a lot of execution time. Each costatement is a little program with its own
statement pointer that advances in response to conditions. On each pass through the big
loop, as little as one statement in the costatement is executed, starting at the current posi-
tion of the costatement’s statement pointer. Consult the Dynamic C User’s Manual for
more details.
The second costatement in the program debounces the switch and maintains the variable
vswitch
. Debouncing is performed by making sure that the switch is either on or off for a
long enough period of time to ensure that high-frequency electrical hash generated when
the switch contacts open or close does not affect the state of the switch. The abort state-
ment is illustrated at (5). If executed, the internal statement pointer is set back to the first
statement within the costatement, and a jump to the closing brace of the costatement is
made.
At (6) a use for a shadow register is illustrated. A shadow register is used to keep track of
the contents of an I/O port that is write only - it can’t be read back. If every time a write is
made to the port the same bits are set in the shadow register, then the shadow register has
the same data as the port register. In this case a test is made to see the state of the LED and
make it agree with the state of vswitch. This test is not strictly necessary, the output regis-
ter could be set every time to agree with vswitch, but it is placed here to illustrate the con-
cept of a shadow register.
To illustrate the use of snooping, use the watch window to observe vswitch while the
program is running. Add the variable vswitch to the list of watch expressions. Then tog-
gle vswitch and the LED. Then type <ctrl-U> to observe vswitch again.
D.2.3 Advantages of Cooperative Multitasking
Cooperative multitasking, as implemented with language extensions, has the advantage of
being intuitive. Unlike preemptive multitasking, variables can be shared between different
tasks without having to take elaborate precautions. Sharing variables between tasks is the
greatest cause of bugs in programs that use preemptive multitasking. It might seem that
the biggest problem would be response time because of the big loop time becoming long
as the program grows. Our solution for that is a device caused slicing that is further
described in the Dynamic C User’s Manual.
相關PDF資料
PDF描述
14FMN-BMT-A-TF CONN FMN HSNG 14POS SNGL NOR SMD
101-0497 MODULAR RABBIT CORE OP6810
18FMN-BMTTN-A-TF CONN FMN HSNG 18POS STAG NOR SMD
101-0599 COMPUTER SNGLBD BL2500 512K FLSH
20-101-0497 MODULE OP6810 W/O ETH/MEM EXPANS
相關代理商/技術參數(shù)
參數(shù)描述
101-0413 功能描述:開發(fā)軟件 DYNAMIC C SOFTWARE RoHS:否 制造商:Atollic Inc. 產(chǎn)品:Compilers/Debuggers 用于:ARM7, ARM9, Cortex-A, Cortex-M, Cortex-R Processors
101-0414 功能描述:界面開發(fā)工具 OP6700 RoHS:否 制造商:Bourns 產(chǎn)品:Evaluation Boards 類型:RS-485 工具用于評估:ADM3485E 接口類型:RS-485 工作電源電壓:3.3 V
101-0415 功能描述:KIT TOOL FOR OP6700 INTL RoHS:否 類別:編程器,開發(fā)系統(tǒng) >> 評估演示板和套件 系列:Intellicom 產(chǎn)品培訓模塊:Obsolescence Mitigation Program 標準包裝:1 系列:- 主要目的:電源管理,電池充電器 嵌入式:否 已用 IC / 零件:MAX8903A 主要屬性:1 芯鋰離子電池 次要屬性:狀態(tài) LED 已供物品:板
101-0416-000 制造商:ITT Interconnect Solutions 功能描述:INSUL CA-KE18-1P FR / 101-0416-000 / Circular
101-0417 功能描述:開發(fā)板和工具包 - 其他處理器 USE 694-101-0580 RoHS:否 制造商:Freescale Semiconductor 產(chǎn)品:Development Systems 工具用于評估:P3041 核心:e500mc 接口類型:I2C, SPI, USB 工作電源電壓: