简易计算器的pld实现毕业设计论文(编辑修改稿)内容摘要:
s store and manipulate data using the binary number system, which prises just two digits: 0 and 1. One wire (or register bit/memory element) can be used to represent two distinct binary values: 0 or 1。 two wires can represent four binary values: 00, 01, 10, and 11。 three wires can represent eight binary values: 000, 001, 010, 011, 100, 101, 110, and 111。 and so on. As our virtual puter has an 8bit data bus, this can be used to represent 256 different binary values numbered from 0 to 255 in decimal or %00000000 to %11111111 in binary(where the “%” symbol is used to indicate a binary value). The problem is that humans tend to find it difficult to think in terms of long strings of 0s or 1s. Thus, when working with puters, we tend to prefer the hexadecimal number system, which prises 16 digits: 0 through 9 and A through F as shown in Figure 2. Figure 2. Binary and hexadecimal In this case, we use “$” characters to indicate hexadecimal values. Each hexadecimal digit directly maps onto four binary digits (and vice versa of course). This explains why we noted earlier that our 16 bit address bus could be used to point to 216 = 65,536 different memory locations, which are numbered from $0000 to $FFFF in hexadecimal. The Accumulator (ACC) and Status Register (SR) There are just a couple more things we need to know before we plunge head first into the fray. Amongst other things, our CPU contains two 8bit registers called the accumulator (ACC) and the status register (SR). (In this context, the term “register” refers to a group of memory elements, each of which can store a single binary digit.) As its name implies, the accumulator is where the CPU gathers, or “accumulates”, intermediate results. In the case of the status register, each of its bits is called a status bit, but they are also monly referred to as status flags or condition codes, because they serve to signal (flag) that certain conditions have occurred. We will only concern ourselves with the carry(C) flag for the purposes of our example program. Since we may sometimes wish to load the status register from (or store it to) the memory, it is usual to regard this register as being the same width as the data bus (eight bits in the case of our virtual system). However, our CPU employs only five status flags, which occupy the five leastsignificant bits of the status register. This means that the three mostsignificant bits of the register exist only in our imaginations, so their nonexistent contents are, by definition, undefined. The Program Itself For the purposes of this article, we’re going to create a simple program that first clears the calculator’s main display, and then loops around waiting for us to click one or buttons on the keypad. If any of these buttons are part of the “0” through “9” or “A” through “F” set, we’re going to display these value on the main display. Let’s walk through this code stepbystep. The first thing we do is to declare some constant labels and associated them with certain values using. In the case of this program, the CLRCODE label is associated with a hexadecimal value of $10, which is a special code that will clear the calculator’s main display. By parison, the MAINDISP label is associated with the hexadecimal value $F031, which happens to be the address of the output port that drives the calculator’s main display. Similarly, the KEYPAD label is associated with the hexadecimal value $F011, which is the address of the input port that is connected to the calculator’s keypad. (Note that everything to the right of a “” character is treated as a ment and is therefore ignored by the assembler.) Following the EQU mands we see a ORG (“origin”) statement, which we use to specify $4000 as being the start address in our program. (The reason we use $4000 is that this is the first address in the DIY Calculator’s virtual RAM. When we e to run the program, the DIY Calculator will automatically start at this address.) Next, we use a LDA(“load accumulator”) instruction to load our special clear code into the accumulator, and then we use a STA (“store accumulator”) instruction to copy this value to the main display, thereby clearing it. Now we find ourselves at the LOOP address label, whi。简易计算器的pld实现毕业设计论文(编辑修改稿)
相关推荐
按照有关规定采用 防腐沥青缠玻璃丝布,防腐等级为加强。 工程量具体按照实际发生为准 (主材甲供 ) 接引疏水泵电源采用 VV50 3+1 电缆 100 米,安装控制柜一台,预下DN50 镀锌管 35 米。 (具体根据甲方要求施工 处理 ) 护坡、排水沟、砼地面施工 办公楼东侧泵房门外原土边坡,此次也一并进行扩建整改,边坡地势利用 人工 整平并 并按有关国家规定要求 夯实 处理,延
=2,使用寿命为 30000 小时,工作时有轻度振动。 选用材料 16 采用 7级精度软齿闭式圆柱直齿轮;小齿轮 40Cr 钢,锻件,调质, 1 270H HB ; 大齿轮 45 钢,锻件,调质, 2 250H HB ;齿面粗糙度。 接触疲劳强度设 计计算 因为是软齿轮,故根据机械设计 3 按接触疲劳强度设计计算 d1 3 21 12 H EHd
一次铣削,铣削深度 确定进给量 f: 根据《工艺手册》 ,表 966,确定 fz= ( mm/r) 切削速度: 根据相关手册,确定 v=76 m/min, 确定主轴转速: ns=dw1000π v= 761000= r/min 按照机床说明书,取 nw 150 r/min 故实际切削速度为: V= 1000nd wwπ = m/min 当 nw =75r/min,工作台每分钟进给量应为:
有特殊的菲尼尔滤光片,使环境的干扰受到明显的控制作用。 3)被动红外探头,其传感器包含两个互相串联或并联的热释电元。 而且制成 红外线原理 4 的两个电极化方向正好相反,环境背景辐射对两个热释元件几乎具有相同的作用,使其产生释电效应相互抵消,于是探测器无信号输出。 4)一旦人侵入探测区域内,人体红外辐射通过部分镜面聚焦,并被热释电元接收,但是两片热释电元接收到的热量不同,热释电也不同,不能抵消
5 图 3- 2 按键程序流程图 18 结论 设计的基于 pic16f877 单片机控制的电子负载,能够实现题目要求的基本功能,达到稳流的效果。 各个参数都能直观的在数码管上显示。 此电 子负载能很好的替代 传统的测试方法中一般采用的电阻、滑线变阻器、电阻箱等,更 简单、更快捷、更可靠地对电源、变压器、整流器等电子设备进行输出特性的测试。 但是,本设计还存在着很多不足,比如是功率消耗型器件
国经济文化事业的不断向前发展,家居市场容量 将不断壮大。 市场份额与发展趋势 据市场调查显示,目前家具,设计,装潢和建材市场的市场分额在 30%左右。 随着我国居民生活水平的提高,人们对住宅的消费观念发生了根本性的变化。 城镇居民的居住环境正在逐步改善,住房装修、购置新家具已成为一种时尚。 据20xx 年调查数据显示,中国城乡家庭有 亿户,每年约有 5%的家庭需要装修并购置家具,每户如果花费 1