« Home « Chủ đề giao tiếp ngoại vi

Chủ đề : giao tiếp ngoại vi


Có 20+ tài liệu thuộc chủ đề "giao tiếp ngoại vi"

Interfacing PIC Microcontrollers 31

tailieu.vn

Bridge Else_IPM-BATES_Answers.qxd PM Page 286. A B C D Else_IPM-BATES_Answers.qxd PM Page 287. time Else_IPM-BATES_Answers.qxd PM Page 288. CHARACTERISTIC Else_IPM-BATES_Answers.qxd PM Page 289. Else_IPM-BATES_Answers.qxd PM Page 290. ADDLW (add literal to W) instruction, 19 Address, 5. Assembler directives, 41 Assembler syntax, 39 Assembly language, 12, 37 Else_IPM-BATES_index.qxd PM Page 291. BCD to ASCII conversion, 109 BCD to binary conversion, 108...

Interfacing PIC Microcontrollers 1

tailieu.vn

A catalogue record for this book is available from the British Library Library of Congress Cataloging-in-Publication Data. A catalog record for this book is available from the Library of Congress For information on all Newnes publications. I have my students to thank for this book

Interfacing PIC Microcontrollers 2

tailieu.vn

Manufacturer of the PIC microcontroller range and MPLAB IDE Custom Computer Services, Inc.. It is one of the most important developments in electronics since the invention of the microprocessor itself. To keep things simple, we will concentrate on just one device, the PIC 16F877, which has a good range of features and allows most of the essential techniques to be...

Interfacing PIC Microcontrollers 3

tailieu.vn

In a game, input from the switches on the control pad are processed and used to modify the screen. In this case, speed of the system is a critical factor.. Volatile memory loses its data when switched off, but can be written by the CPU to store current data. this is RAM (Random Access Memory). So why not put the...

Interfacing PIC Microcontrollers 4

tailieu.vn

Program memory may also be written from within the program itself, so that data tables or error checking data can be modified. Obviously, this needs some care, and this option can be disabled via the WRT bit. Data EEPROM may also be protected from external reads in the same way via the CPD bit, while inter- nal read and write...

Interfacing PIC Microcontrollers 5

tailieu.vn

Again, remember that the carry flag must be set before a subtraction operation, so that a borrow can be detected as C ⫽ 0.. A file register can be seen as containing 8 individual bits, or 1 byte. It can also be used as 2 ⫻ 4-bit nibbles (a small byte. Each nibble can be represented as 1 hex digit...

Interfacing PIC Microcontrollers 6

tailieu.vn

Source Code Edit &. File Register Display. this means, program execution in the chip itself can be controlled from MPLAB. The program can be stopped, started and single stepped in the same way as in software simulation mode. The program can thus be tested within the target hardware, a much more realistic and powerful option.. MPLAB can be downloaded free...

Interfacing PIC Microcontrollers 7

tailieu.vn

Structure charts are also more suited to more complex programs, but the con- cept can be illustrated as in Figure 2.4.. Each program component is included under standard headings: inputs, processes and outputs, and can be broken down further in more complex pro- grams, so that components can be created independently and then integrated.. Figure 2.4 BIN4 structure chart. It...

Interfacing PIC Microcontrollers 8

tailieu.vn

The power dissipated in the re- sistor is given by P = IV. For AC signals, RMS voltages are used so that the same model can be applied. Reactive components need the frequency of the signal to be included, so V = IX is used, where X is the reactance. For a capac- itor, the magnitude of the reactance is...

Interfacing PIC Microcontrollers 9

tailieu.vn

The complete list of tools available and how to use them is pro- vided in the Proteus VSM help files.. Voltmeters and ammeters may be added to the circuit to measure volt drop across a component or absolute voltage at a point (relative to 0 V) (Figure 3.8).. As an example, the current and voltage around one of the LEDs...

Interfacing PIC Microcontrollers 10

tailieu.vn

should be received in the list file. Else_IPM-BATES_ch003.qxd PM Page 76. Else_IPM-BATES_CH004.qxd AM Page 77. We have seen in the BINX hardware how a simple push button or switch is interfaced with a pull-up resistor. Else_IPM-BATES_CH004.qxd AM Page 79. When the switch is open, the output voltage of the circuit is pulled up to ⫹5 V via the resistor. Another...

Interfacing PIC Microcontrollers 11

tailieu.vn

When the timer times out, the program jumps to the interrupt service routine at address 004, resets the time out flag, and returns. Figure 4.4 Timer0 operation. In the KEYPAD circuit in Figure 4.6, the 7 keypad pins are connected to Port D. A simple way to achieve this result is to increment a count of keys tested when each...

Interfacing PIC Microcontrollers 12

tailieu.vn

The fixed messages are generated from program data tables using ADDWF PCL to jump into the table using the number in W, and RETLW to return the ASCII codes. The assembler generates the ASCII code in response to the sin- gle quotes which enclose the character. To fetch the required code, the table pointer is added to the program counter...

Interfacing PIC Microcontrollers 13

tailieu.vn

The decimal part is called the mantissa and the range multiplier the exponent.. We have to decide on the number of bits to use, which in turn deter- mines the precision and range of the number itself. 32-bit numbers are suffi- cient for most purposes, but the bits available must be allocated in groups as mantissa, sign, exponent and exponent...

Interfacing PIC Microcontrollers 14

tailieu.vn

The number obtained by decrementing a register from 0 is called the 2s complement of the corresponding positive number seen in the right column.. The 7 is subtracted from plus 100 16 borrow in) to give the 2s complement result.. If a positive number is added to a 2s complement negative number, the answer is correct if the carry out...

Interfacing PIC Microcontrollers 15

tailieu.vn

and send code RETURN. Program 6.1 Continued. and send Msd GOTO scan . The input key is displayed, and the program then jumps to a routine to handle each input in a sequence of five buttons (Num1, Operation, Num2, Equals and Clear). Pulse Output. The hardware configuration is shown in Figure 6.3, as a screenshot. The pulse output is generated...

Interfacing PIC Microcontrollers 16

tailieu.vn

Get high byte. Get low byte MOVWF Hibyte . get low byte to sub BSF STATUS,C . sub 10h from low byte BTFSC STATUS,C . no - sub high byte MOVF Hibyte,F . yes - check high byte BTFSS STATUS,Z . yes - load low byte to add BCF STATUS,C . restore low byte GOTO subE8 . get high byte...

Interfacing PIC Microcontrollers 17

tailieu.vn

Correct borrow handling between the high and low byte is particularly important. The hundreds digit is calculated in a similar way, but the tens calculation is a little easier as the maximum remainder from the previous stage is 99, so the high byte borrow handling is not necessary. Calculate hundreds digit Calculate tens digit Remainder = ones digit Display on...

Interfacing PIC Microcontrollers 18

tailieu.vn

Some op-amps are designed specifi- cally to operate with a single supply, such as the LM324 type used in the examples here. The output does not usually reach the supply values due to residual volt drops across internal components. The 8-bit range in the demo circuits is limited to 2.56 V, so that the amp outputs are op- erating comfortably...

Interfacing PIC Microcontrollers 19

tailieu.vn

The output transistor switching circuit has to be completed by an external pull-up (load) resistor. This allows the output switching voltage to be different from the comparator supply voltage, which is useful for interfacing circuits operating at, say. The switching speed can be increased by using a lower value pull-up resistor, at the cost of higher power consumption. Three types...