| 数据搜索系统,热门电子元器件搜索 |
|
AN1828 数据表(PDF) 13 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1828 数据表(HTML) 13 Page - STMicroelectronics |
|
13 / 17 page ![]() 13/17 PIR (PASSIVE INFRARED) DETECTOR USING ST7FLITE05/09/SUPERLITE 2.2 SCI IMPLEMENTATION USING THE MICROCONTROLLER STANDARD I/O PORTS A Serial Communications Interface (SCI) is used to allow the user to check different variables while the application is running. The value of the variables can be displayed on a PC with the Hyperterminal application. SCI is implemented using standard I/O ports. We just need to transmit the data from the microcontroller to a PC, so only SCI transmit is implemented for 4800 or 2400 baud rate (selectable by a macro in the software). This is implemented as fol- lows: 1. Convert the variable to be transmitted into ASCII data. This is required because Hyperter- minal displays ASCII data only. 2. The ASCII data is transmitted bit-by-bit with a bit duration depending on the Baud Rate selected in the software. For example: 1 bit duration = 416µs (1/2400 seconds) for 2400 baud = 208µs (1/4800 seconds) 4800 baud This bit duration is calculated with the help of the Timer interrupt which is configured for 52µs. So we can change the status of PA5 Pin after 416µs(52x8) or 208µs(52x4). The time period for each data bit will be the same. 3. Transmit the Start bit. To do this, hold the PA5 pin LOW for 1 bit time. 4. After the start bit, change the PA5 pin level according to the data (ASCII) to be transmitted. 5. Then, transmit the Stop bit. To do this, hold the PA5 pin HIGH for 1 bit time. |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |