【正文】
ALU is a core, in addition temporary storage device TMP, accumulator ACC, register B, program state symbol register PSW and Boolean processor. Accumulator ACC is eight registers, it is in CPU works the most frequent register. When carries on the arithmetic, the logic operation, accumulator ACC often temporarily stores before the operation an operand (for example addend), after but operates preserves its result (for example algebra and). Register B mainly uses in the multiplication and the division operation. Symbolized register PSW also is eight registers, uses for to deposit the operation result some characteristics, whether there is like carries, borrows and so on. Its each position concrete meaning as follows shows. PSW CY AC FO RS1 RS0 OV P says to the user, what is nicest is following four. 1 161。 The monolithic integrated circuit can carry out the plete instruction, is this monolithic integrated circuit mand system (Iustruction Set), the different type monolithic integrated circuit, its mand system is also different. Uses the monolithic machinehour, beforehand must the question which must solve form a series of instructions. These instructions must be the designation monolithic function recognition 畢業(yè)設(shè)計外文翻譯 and the execution instruction. The monolithic integrated circuit user for solves the instruction procedure which own question arranges, is called the source program (Source Program). The instruction usually divides into the operation code (Opcode) and the operand (Operand) two major parts. The operation code expressed the puter carries out any operation, namely instruction function。235。193。194。34, then subtracts it from the previous result, obtains the final result. Now, we use the monolithic integrated circuit to plete the above process, obviously, it first must have replaces the abacus to carry on the operation the part, this is the logic unit。34. Now must carry on the operation, first needs an abacus, next is the paper and the pen. We the question which must calculate record, then first step calculates first 163161。畢業(yè)設(shè)計外文翻譯 外文翻譯 英文版 monolithic integrated circuit position Monolithic confidential automatically pletes the putation, which should it have most important part? We take operate an abacus as the example putation together arithmetic topic. Example: 36 + 163161。194。194。156, the numeral 36 cannot at the same time enter the logic unit. Therefore needs to establish on the monolithic integrated circuit according to the controller order carries on the movement the gate, when the logic unit needs, lets the recent data enter. Or, when the logic unit obtains the final output, again this result output, but the intermediate result cannot be casual slips away the monolithic integrated circuit. This kind to inputs, the output data carries on the certain management the gate the electric circuit to be called the mouth in the monolithic integrated circuit (Port). In the monolithic integrated circuit, basically has three kind of information in to flow, a kind is a data, namely each kind of primary data (for example on in example 36, 163 and so on), intermediate result (for example 166161。182。200。 Fourth step: Result which adds together, delivers unit which assigns to the memory in. All these fetching, delivers the number, adds together, the balance and so on all is one kind of operation (Operation), we request each kind which the puter carries out to hold the function order the form to write down, this is an instruction. How but can distinguish and carry out these operations? This is by designs the personnel in the design monolithic machinehour to entrust with its mand system to decide. An instruction, is corresponding one kind of elementary operation eo。 operation number is at the address (namely operand deposits place serial number). Because the monolithic integrated circuit is one kind of programmable ponent, recognizes the binary code (0, 1). Wants the monolithic integrated circuit operation, in monolithic integrated circuit system all instructions, all must express by the binary code form. For example, in Intel in Corporation39。245。245。214。245。245。245。237?,F(xiàn)在要進(jìn)行運算,首先需要一把算盤,其次是紙和筆。這類器件就稱為 “ 存貯器 ” 。因此就需要在單片機上設(shè)置按控制器的命令進(jìn)行動作的 “ 門 ” ,當(dāng)運算器需要時,就讓新數(shù)據(jù)進(jìn)入。34 所得的商 余數(shù) 30 等)、程序(命令的集合)等。第三類信息是地址信息,其作用是告訴運算器和控制器在何處去取命令取數(shù)據(jù),將結(jié)果存放到什么地方,通過哪個口輸入和輸出信息等。 實際上,人們往往把運算器和控制器合并稱為中央處理單元 —— CPU。到這里為止,我們已經(jīng)知道了單片機的基本組成,即單片機是由中央處理器(即CPU 中的運算器和控制器)、只讀存貯器(通常表示為 ROM)、讀寫存貯器(又稱隨機存貯器通常表示為 RAM)、輸入 /輸出口(又分為并行口和串行口,表示為 I/O 口)等等組成。此總線有如大城市的 “ 干道 ” ,而 CPU、 ROM、 RAM、 I/O口、中斷系統(tǒng)等就分布在此 “ 總線 ” 的兩旁,并和它連通。但是,光有這樣的硬件,還只是有了實現(xiàn)計算和控制功能的可能性。單片機所以能自動地進(jìn)行運算和控制,正是由于人把實現(xiàn)計算和控制的步驟一步步地用命令 的形式,即一條條指令( Instruction)預(yù)先存入到存貯器中,單片機在 CPU 的控制下,將指令一條條地取出來,并加以翻譯和執(zhí)行。但是怎樣才能辨別和執(zhí)行這些操作呢?這是在設(shè)計單片機時由設(shè)計人員賦予它的指令系統(tǒng)所決定的。單片機用戶為解決自己的問題所編的指令程序,稱為源程序( Source Program)。要單片機運作,單片機系統(tǒng)中的所有指令,都必須以二進(jìn)制編碼的形式來表示。所以,在指令系統(tǒng)中有單字節(jié)指令,也有多字節(jié)指令。這樣,每條指令有明顯的動作特征,易于記憶和理解,也不容易出錯。由機器碼構(gòu)成的用戶程序一旦 “ 進(jìn)入 ” 了單片機,再 “ 啟動 ” 單片機,就可讓它執(zhí)行輸入程序所規(guī)定的任務(wù)。在進(jìn)行算術(shù)、邏輯運算時,累加器 ACC 往往在運算前暫存一個操作數(shù)(如被加數(shù)),而運算后又保存其結(jié)果(如代數(shù)和)。 PSW CY AC FO RS1 RS0 OV - P對用戶來講,最關(guān)心的是以下四位。 輔助進(jìn)位標(biāo)志 AC。 奇偶標(biāo)志 P。其功能在介紹位指令時再說明。單片機動作時應(yīng)按順序一條條取出指令來加以執(zhí)行。 8051 CPU碢 C指定的地址,從 ROM相應(yīng)單元中取出指令字節(jié)放在指令寄存器中寄存,然后,指令寄存器中的指 令代碼被譯碼器譯成各種形式的控制信號,這些信號與單片機時鐘振蕩器產(chǎn)生的時鐘脈沖在定時與控制電路中相結(jié)合,形成按一定時間節(jié)拍變化的電平和時鐘,即所謂控制信息,在 CPU 內(nèi)部協(xié)調(diào)寄存器之間的數(shù)據(jù)傳輸、運算等操作。存儲器的存儲單元地址和存儲單元的內(nèi)容是不同的兩個概念,不能混淆。程序存儲器可以放在片內(nèi)或片外,亦可片內(nèi)片外同時設(shè)置。當(dāng) EA為高電平時,用戶在 0000H 至 0FFFH 范圍內(nèi)使用內(nèi)部ROM,大于 0FFFH 后,單片機 CPU 自動訪問外部程序存儲器。實際使用時應(yīng)首先充分利用內(nèi)部存儲器,從使用角度講,搞清內(nèi)部數(shù)據(jù)存儲器的結(jié)構(gòu)和地址分配是十分重要的。在此 256 個字節(jié)中,還開辟有一個所謂 “ 位地址 ” 區(qū),該區(qū)域內(nèi)不但可按字節(jié)尋址,還可按 “ 位( bit) ” 尋址。在這兩位上放入不同的二進(jìn)制數(shù),即可選用不同的寄存器組,如附表 1 所示。各特殊功能寄存器的符號和地址見附表 2。這些特殊功能寄存器大體上分為兩類,一類與芯片的引腳有關(guān),另一類作片內(nèi)功能的控