《電子技術應用》
您所在的位置:首頁 > 模擬設計 > 設計應用 > 應用RC低通濾波器擴展微處理器輸出端口
應用RC低通濾波器擴展微處理器輸出端口
摘要: 摩爾定律形成一個幾乎必然的推論——下一年,微處理器將會擁有更多的功能,而軟件團隊則會提出更多創意。然而不幸的是,微處理器輸出端口仍保持原樣。找到一個用作測試、調試或是標準I/O口的空閑輸出端是件相當困難的事。
Abstract:
Key words :

  簡單的RC低通濾波器允許微處理器輸出端口擴展輸出位數

  摩爾定律形成一個幾乎必然的推論——下一年,微處理器將會擁有更多的功能,而軟件團隊則會提出更多創意。然而不幸的是,微處理器輸出端口仍保持原樣。找到一個用作測試、調試或是標準I/O口的空閑輸出端是件相當困難的事。外加簡單硬件,如圖1所示電路實現單端口“總線”,提供無限量的并行輸出端。

HC164外圍電路圖

圖1 HC164外圍電路圖

  帶RC低通濾波器的微處理器輸出端控制串并轉換器HC164。為了數據輸入到串并轉換器,每位都要由1-0-1的轉換組成,這種轉換數據低電平狀態長度是變化的。如果低電平狀態超出了低通濾波器的時間常數,一個零移進寄存器;如果低電平狀態短,一個1就移進寄存器。這樣,時鐘信號和數據信號就合并成為一個信號。低通濾波器可以分離時鐘信號和數據信號(如圖2)。

時鐘信號與數據信號合并成一個信號

圖2 時鐘信號與數據信號合并成一個信號

whip程序輸出功能

表1 whip程序輸出功能

 

  如表1所示,一個簡單的“whip”程序實現8位輸出功能。假定低通濾波器時間常數為3μs,使用4MHz或更高頻率晶振時,指令時間應該為1μs或更短。程序使用My_Port端口的My_ Bit輸出的位操作。

  如圖1中電路可以控制一些低速設備,例如繼電器或LCD,但是電路用于發光二極管時,HC164進行寫操作會產生令人討厭的閃爍。為解決這個問題,圖3電路使用另一款串入并出寄存器4096,這種芯片有濾波輸入功能,允許全部沒有達到臨時水準的輸出同時更新。兩個單穩態電路提供數據和濾波信號。這個電路可以用來控制并行設備,例如基于HD44780的顯示模塊。

 

 

 

串行輸入/并行輸出芯片4096外圍電路圖

圖3 串行輸入/并行輸出芯片4096外圍電路圖

       附英文原文:

  RC lowpass filter expands microcomputer’s output port

  A simple lowpass RC filter allows a single output pin of a microcontroller to expand the number of output bits.

  Rex Niven, Forty Trout Electronics, Eltham, Victoria, Australia; Edited by Charles H Small and Fran Granville -- EDN, 6/21/2007

  It’s almost a corollary to Moore’s Law: Next year, microcomputers will have more features, and the software team will have bigger ideas. Unfortunately, though, the number of output pins will stay the same. Finding even one spare output for diagnostics, test, or even standard I/O can be a tussle. The single-pin “bus” in Figure 1 can provide an unlimited number of parallel outputs with simple additional hardware. A microcomputer output with an RC lowpass filter controls serial-to-parallel converter HC164. To enter data into the serial-to-parallel converter, each bit consists of a one-to-zero-to-one transition, which alters the length of the low state. If the low state is longer than the lowpass filter’s time constant, a zero shifts into the register. If the low state is short, then a one shifts into the register. The clock and data signals thus combine into one signal. A lowpass filter separates the clock and data signals (Figure 2).

 

  Listing 1, a simple “Whip” routine, performs the output function for eight bits. Assume that the RC time constant is 3 µsec, and the instruction time should be 1 µsec or less at a crystal frequency of 4 MHz or greater. The routine uses bitwise manipulation of output My_Bit of port My_Port.

  Although the circuit in Figure 1 can control slow-reacting devices, such as relays or LCDs, using it with LEDs can give an annoying flicker when the HC164 is writing. To address tha

 

t problem, the circuit in Figure 3 uses another serial-in/parallel-out register, the 4094, which has a strobe input to allow simultaneous updates of all outputs without temporary levels. A twin monostable circuit supplies the data and strobe signals. This circuit should be able to control parallel devices, such as display modules based on HD44780 devices.

此內容為AET網站原創,未經授權禁止轉載。
主站蜘蛛池模板: 色悠久久久久久久综合网伊人 | 亚洲欧美日韩中文字幕网址| 青青青亚洲精品国产| 在线视频一二三区2021不卡| 久久久久高潮毛片免费全部播放 | 一级做a爱片特黄在线观看| 最近最好的中文字幕2019免费| 人妻无码一区二区三区四区| 色偷偷亚洲第一综合网| 国产欧美视频一区二区三区| 99精品视频在线观看免费| 我要看一级黄色毛片| 久久青草免费91线频观看不卡| 欧美色欧美亚洲高清在线视频| 动漫美女被到爽了流漫画| 韩国理伦片在线观看手机版 | 亚洲AV综合色区无码二区爱AV| 激情综合色五月丁香六月欧美| 四名学生毛还没长齐在线视频| 国产精品1024永久免费视频| 在线电影一区二区| 三级黄在线播放| 日本免费人成在线网站| 亚洲免费福利视频| 热久久99精品这里有精品| 又粗又硬又黄又爽的免费视频| 领导边摸边吃奶边做爽在线观看| 国产精品国语对白露脸在线播放| aaa免费毛片| 年轻人免费看电影网站| 久久久久国产一区二区三区| 欧洲精品码一区二区三区| 亚洲欧美日韩一区在线观看| 男生吃女生的jiojio| 台湾三级香港三级经典三在线| 韩国理论片中文字幕版电影| 国产欧美日韩综合精品一区二区 | 开心久久婷婷综合中文字幕| 久久免费观看视频| 最近中文字幕免费版在线3| 亚洲图片校园春色|