【正文】
因此系統(tǒng)設(shè)置了轉(zhuǎn)速 /頻率選擇功能。定時器的定時是斷續(xù)的,影響定時精度,繼而影響測速精度。當T2定時到 100 ms 時,向 8032 申請中斷。 S2和 S3開關(guān), S2開關(guān)為測速方法選擇鍵,選擇用 M/T 法測速,還是用定時法測速。 8032 屬于 MCS51 系列單片機,與常用的 8031 芯片相比, 8032 多了一個功能較強 的 T2 定時 /計數(shù)器和 128字節(jié)內(nèi)部 RAM,其中 T2 計數(shù)器具有 16 位自動重載和捕獲能力,既可作定時 /計數(shù)用,又可作為波特率發(fā)生器用。在光 電三極管 3DU5C 上加一適當偏壓,當 3DU5C 受紅外線照射時,處于導通狀態(tài), A點為低壓電平, 3DG6 截止, B點為高電平;當沒有紅外線照射時,光電三極管截止, A 點呈現(xiàn)高電平,使 3DG6 集電極 B 點為低電平, B 點的脈沖信號經(jīng)過反相器 2 的整形,再經(jīng)門 3 反相,便得到頻率與轉(zhuǎn)速大小相應成比例變化的轉(zhuǎn)速脈沖信號。 關(guān)鍵詞 :數(shù)字式測量儀器;轉(zhuǎn)速;單片機 轉(zhuǎn)動體的速度是工業(yè)測控系統(tǒng)中的重要參數(shù)之一。 when no infrared radiation, the photoelectric transistor closed A high point presentation, so 3DG6 low collector point B, B point of the pulse signal through the inverter 1,2 plastic, and then the door 3 RP, frequency and speed will be proportional to the size of the corresponding changes The speed pulse signal. Speed pulse signal into the 8032 microcontroller timer / counter, through the microcontroller to calculate speed software processing. Figure 1 Schematic photoelectric conversion When the machine used in the measurement speed M / T method and timing method were used. M/T M / T method is the detection time Tc, the time according to speed pulse m1 and m2 to calculate the speed pulse. If a fixed period Tc, the total time taken and pulse rotation pulse fp fc39。s Pulse on m1 and m2, timing pulse frequency f, rotor output pulses per revolution for the p, the speed n = 60fm1 / pm2 (r / min). Such as the speed measured over 1 s pulses for the m1, rotor output pulse number per revolution, that great number of p, the speed n = 60m1 / p (r / min). 2 hardware speed measurement instrument Figure 2 constitute the grounds of speed 8032 MCU measuring circuit. 8032 is MCS51 series single chip, pared with the mon 8031 chip, a feature more than 8032 strong T2 timer / counters and 128 bytes of internal RAM, which T2 counter with 16bit autoreload and capture, can for timer / counter with, but also used as a baud rate generator. The system used for time T2, which take into account regular pulse, regular pulse signal directly from the 8032 chip address latch signal ALE client leads, and through the 74LS74 dual D flipflop frequency, was two points. When using 6 MHz crystal oscillator, the time pulse frequency fc is MHz. T0 accrual speed pulse counter fp, T1 time pulse counter for taking into account fc, trigger DFF1, DFF2 and 1,2,3,4 ponent count and gate control circuit, can also start and stop counters T0 and T1. P0 port to allow control through the end of 8D with latch 74LS377 extends an 8bit output, as a five segment LED digital display of the data line selection code. , access switches S1 and S4, S1 for the very few P set selector switch, S4 input pulse for the very few keys. and are connected S2 and S3 sw