安全系统控制与MAXQ2000-Security Syste
[09-13 17:04:28] 来源:http://www.88dzw.com 控制技术 阅读:8633次
文章摘要:STATEP6.0P6.1P6.2P6.3P6.4P6.5P7.0P7.11Input - 1Input - 4Input - 7Input - *lowtri-statetri-statetri-state2Input - 2Input - 5Input - 8Input - 0tri-statelowtri-statetri-state3Input - 3Input - 6Input - 9Input - #tri-statetri-statelowtri-state4Input - AInput - BInput - CInput - Dtri-statetri-statetri-sta
安全系统控制与MAXQ2000-Security Syste,标签:计算机控制技术,工厂电气控制技术,http://www.88dzw.comSTATE | P6.0 | P6.1 | P6.2 | P6.3 | P6.4 | P6.5 | P7.0 | P7.1 |
1 | Input - 1 | Input - 4 | Input - 7 | Input - * | low | tri-state | tri-state | tri-state |
2 | Input - 2 | Input - 5 | Input - 8 | Input - 0 | tri-state | low | tri-state | tri-state |
3 | Input - 3 | Input - 6 | Input - 9 | Input - # | tri-state | tri-state | low | tri-state |
4 | Input - A | Input - B | Input - C | Input - D | tri-state | tri-state | tri-state | low |
Figure 3. The MAXQ2000 pulls column 1 low to read the state of the first four keypad switches.
An Interrupt-Driven State Machine
The four columns must be strobed quickly so that any keypress has time to be read before it is released. Additionally, to prevent a switch's bouncing contacts from registering multiple presses, a key must be held down for a certain amount of time before it registers. Both of these factors can be done at once by making a timer-driven interrupt routine the heart of the application. This allows the application to scan through each one of the four columns in a periodic manner and to count the length of time a key has been depressed.RELOAD equ 0FF00h StartTimer: move IIR.3, #1 ; Enable interrupts for module 3 move IMR.3, #1 move T2V0, #RELOAD move T2R0, #0h move T2C0, #0h move Acc, T2CFG0 ; Set timer 0 to run from HFClk/128 and #08Fh or #070h move T2CFG0, Acc move T2CNA0.3, #1 ; Start timer 0 move T2CNA0.7, #1 ; Enable timer 0 interrupts retThe reload value for the timer controls how often the interrupt will fire. This value must be short enough so that all keypresses are recognized. Additionally, to ensure that key response is not sluggish, the reload value must also be long enough so that it does not occupy an excessive amount of processing time. The value 0FF00h shown above (once about every 2.4ms) was reached through experimentation.
Once the column line for a group of four switches is driven low, some time may be required for the connection operating through a depressed switch to pull its input line low. This time is affected by the switch's on-resistance and by how many column switches are depressed at once. To avoid having to delay the interrupt service routine between pulling the column line low and reading the four switches, the column line for a given state is driven low in the previous state (Figure 4).
上一页 [1] [2] [3] [4] [5] [6] 下一页
Tag:控制技术,计算机控制技术,工厂电气控制技术,控制技术
- 上一篇:利用MAXQ3210进行环境监视
《安全系统控制与MAXQ2000-Security Syste》相关文章
- › 安全系统控制与MAXQ2000-Security Syste
- › FPGA单芯片四核二乘二取二的安全系统
- 在百度中搜索相关文章:安全系统控制与MAXQ2000-Security Syste
- 在谷歌中搜索相关文章:安全系统控制与MAXQ2000-Security Syste
- 在soso中搜索相关文章:安全系统控制与MAXQ2000-Security Syste
- 在搜狗中搜索相关文章:安全系统控制与MAXQ2000-Security Syste
分类导航
最新更新