Using RC Low-pass Filter to Expand Microprocessor Output Ports

Publisher:人妙果华Latest update time:2015-04-22 Source: eechina Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Moore's Law forms an almost inevitable corollary - next year, microprocessors will have more functions, and software teams will come up with more ideas. Unfortunately, however, microprocessor output ports remain the same. It is quite difficult to find a free output port for testing, debugging or standard I/O ports. With the addition of simple hardware, the circuit shown in Figure 1 realizes a single-port "bus" and provides an unlimited number of parallel output ports. 

Figure 1 HC164 peripheral circuit diagram 

The microprocessor output port with RC low-pass filter controls the serial-to-parallel converter HC164. For data input to the serial-to-parallel converter, each bit must consist of a 1-0-1 transition, and the length of the low-level state of this transition data is variable. If the low-level state exceeds the time constant of the low-pass filter, a zero is shifted into the register; if the low-level state is short, a 1 is shifted into the register. In this way, the clock signal and the data signal are combined into one signal. The low-pass filter can separate the clock signal and the data signal (Figure 2). 



Figure 2 The clock signal and the data signal are combined into one signal 



Table 1 whip program output function 

As shown in Table 1, a simple "whip" program implements 8-bit output function. Assuming a low-pass filter time constant of 3μs, the instruction time should be 1μs or less when using a 4MHz or higher frequency crystal. The program uses bit operations on the My_Bit output of the My_Port port. The 

circuit in Figure 1 can control some low-speed devices, such as relays or LCDs, but when the circuit is used for light-emitting diodes, the HC164 will produce annoying flickering when performing write operations. To solve this problem, the circuit in Figure 3 uses another serial input and parallel output register 4096. This chip has a filtered input function, allowing all outputs that have not reached a temporary level to be updated simultaneously. Two monostable circuits provide data and filtered signals. This circuit can be used to control parallel devices, such as a display module based on HD44780. 



Figure 3 Peripheral circuit diagram of serial input/parallel output chip 4096
Reference address:Using RC Low-pass Filter to Expand Microprocessor Output Ports

Previous article:Detailed explanation of circuit design of wireless test terminal system for articles
Next article:SoC Power Optimization Design in Processor Memory Subsystem

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号