Академический Документы
Профессиональный Документы
Культура Документы
1. Introduction:
Multi-parameter measurement and control system using PIC microcontroller is an interesting proposition. This project aids in the measurement and control of various Global Parameters and a serial interface to the PC. The features of the system are: 1. It allows us to view all the parameter readings simultaneously on the screen. The Graph drawn on the screen keeps on tracking the changes on the parameter. 2. 3. 4. It allows us to maintain a data-base of the The control application may vary among simple It allows us to control the parameters using relay changes encountered in the parameter. on/off operation. circuitry when they exceed their specified limits. The main building block of this project is the PIC microcontroller. For the microcontroller to communicate with the PC we use a RS232 cable which is ideal for serial communication. We use relays which are basically electro-magnetic switches to switch the load on/off whenever a control signal is passed by the microcontroller. We are using MICROSOFT VISUAL BASIC as a front end and C program as a back end for this project.
CPU
Serial Port
RS232 Interface
Voice Output
Microcontroller Board
Relay Drivers
DC Current Temperature
Power Supply
1 2 3 0 4 V
15 A C 8
Figure 2
Specifications: D1, D2, D3, D4: IN4007 diodes Rectifier: LM7805 C1: 2200F/10V C2: 104 C3: 10F/10V R1, R2: 330/W Any invention of latest technology cannot be activated without the source of power. So in this fast moving world we deliberately need a proper power source which will be apt for a particular requirement. All the electronic components starting from diode to Intel ICs only work with a DC supply ranging from 5v to 12. We are utilizing for the same, the cheapest and commonly available energy source of 230v-50Hz and stepping down, rectifying, filtering and regulating the voltage.
5
2.1.1 Transformer:
A bridge rectifier coupled with a step down transformer is used for our design. The voltage rating of transformer used is 0-12V and the current rating is 500mA. When AC voltage of 230V is applied across the primary winding an output AC voltage of 12V is obtained. One alteration of input causes the top of the transformer to be positive and the bottom negative. The next alteration will temporarily cause the reverse.
2.1.2 Rectifier:
In the power supply unit, rectification is normally achieved using a solid state diode. Diode has the property that will let the electron flow easily in one direction at proper biasing condition. A commonly used circuit for supplying large amounts of DC power is the bridge rectifier. A bridge rectifier of four diodes (4*IN4007) are used to achieve full wave rectification. Two diodes will conduct during the negative cycle and the other two will conduct during the positive half cycle. The DC voltage appearing across the output terminals of the bridge rectifier will be somewhat less than 90% of the applied rms value. Normally one alteration of the input voltage will reverse the polarities. Opposite ends of the transformer will therefore always be 180 deg out of phase with each other. For a positive cycle, two diodes are connected to the positive voltage at the top winding and only one diode conducts. At the same time one of the other two diodes conducts for the negative voltage that is applied from the bottom winding due to the forward bias for that diode. In this circuit due to positive half cycleD1 & D2 will conduct to give 10.8v pulsating DC. The DC
6
output has a ripple frequency of 100Hz. Since each altercation produces a resulting output pulse, frequency = 2*50 Hz. The output obtained is not a pure DC and therefore filtration has to be done.
2.1.4 Regulators:
The voltage regulators play an important role in any power supply unit. The primary purpose of a regulator is to aid the rectifier and filter circuit in providing a constant DC voltage to the device. Power supplies without regulators have an inherent problem of changing DC voltage values due to variations in the load or due to fluctuations in the AC line voltage. With a regulator connected to the DC output, the voltage can be maintained within a close tolerant region of the desired output. IC 7805 regulator is used in this project for providing a DC voltage of +5V.
2.1.5 Specifications:
Resistors R1 and R2 maintain line load regulation. At the secondary side of the transformer, Applied voltage = 12V Conducting drop across the diodes = 2*0.6 = 1.2V Without capacitor: V avg = (12-1.2) V = 10.8V pulsating DC Frequency = 100Hz With capacitor: V=V avg *1.414(form factor) = 15.51V Frequency = o Hz With 7805 voltage regulator: V0= +05V
7 8 1 2
O U 3 T R C 3 C 5 D 5 1 R 3
A C
I N
L M
Figure 3
7 9 1 2
Specifications: D1, D2, D3, D4: IN4007 diodes Rectifier: LM7812, LM7912 C1, C2: 2200F/25V C3, C4: 10F/25V C5, C6: 104F
2.2.1 Transformer:
A full wave rectifier coupled with a center-tapped transformer is used for our design. When AC is applied to the primary winding of the power transformer it can either be stepped down or up depending on the value of DC needed. In our circuit the transformer of 230v/15-0-15v is used to perform the step down operation where a 230V AC appears as 15V AC across the secondary winding. One alteration of input causes the top of the transformer
to be positive and the bottom negative. The next alteration will temporarily cause the reverse. The current rating of the transformer used in our project is 2A. Apart from stepping down AC voltages, it gives isolation between the power source and power supply circuitries.
2.2.2 Rectifier:
Here, we use bridge rectifier with four diodes (4*In4007). The current ratings of the diode should be twice the maximum load current that will be drawn.
2.2.4 Regulators:
With a regulator connected to the DC output, the voltage can be maintained within a close tolerant region of the desired output. IC7812 and 7912 is used in this project for providing +12v and 12v DC supply.
10
2.2.5 Specifications:
Resistors R1 and R2 maintain line load regulation. At the secondary side of the transformer, Applied voltage = 15v Conducting drop across the diodes = 2*0.6 = 1.2v Without capacitor: Vavg = (15-1.2) v = 13.8c pulsating DC Frequency = 100Hz With capacitor: V=Vavg *1.414(fiormfactor) = 19.51v Frequency = oHz With 7812 voltage regulator: V0= +12v With 7912 voltage regulator: V0= -12v
11
Microcontrolle r
12
3. Microcontroller:
The microcontroller is a complete microprocessor system built on a single integrated circuit. Microcontrollers were developed with the purpose to build a complete microprocessor system that substantially reduces the cost of building simple products. Microcontrollers are named as they perform control functions. The microcontroller is very commonly used in variety of intelligent products. For example, most personal computer keyboards are implemented with the microcontroller. It replaces scanning, matrix decoding and serial transmission circuits. Many low-cost products such as toys, microwave ovens, VCRs, and industrial products are based on microcontroller. From microwaves to automatic braking system, they are around us making our lives more comfortable and safer. Unlike our desktop computer, microcontrollers interact with other machines rather than humans. A microcontroller may be used to measure the temperature of our toast at breakfast and when the temperature reaches a pre-determined value, the toaster could be turned off. Embedded systems have become a part of our life. Using this small device we have developed a microcontroller based system development kit. We can program the EPROM according to the application needed. Once it is programmed it can be used as a dedicated system for that application. The user cannot access the program memory
13
once the code has been written in the ROM. We can attach other accessories through the I/O slots provided in the kit. The programs for testing the design and performance of the kit also have been included.
14
Timer1: 16-bit timer/counter with prescaler, can be incremented during SLEEP Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler 10-bit multi-channel Analog-to-Digital converter Synchronous Serial Port (SSP) with SPI (Master mode) and IC (Master/Slave) Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI) with 9-bit address detection Parallel Slave Port (PSP) 8-bits wide, with external RD, WR and CS controls (40/44-pin only)
15
Figure 4
16
Figure 5 17
Table 1
18
19
A single control bit can turn on all the pull-ups. This is performed by clearing bit RBPU (OPTION_REG<7>). The weak pull-up is automatically turned off when the port pin is configured as an output. The pull-ups are disabled on a Power-on Reset. This interrupt can wake the device from SLEEP. The user, in the Interrupt Service Routine, can clear the interrupt in the following manner: a) any read or write of PORTB. This will end the mismatch condition. b) Clear flag bit RBIF.A mismatch condition will continue to set flag bit RBIF. Reading PORTB will end the mismatch condition and allow flag bit RBIF to be cleared. The interrupt-on-change feature is recommended for wake-up on key depression operation and operations where PORTB is only used for the interrupt-on-change feature. Polling of PORTB is not recommended while using the interrupt-on-change feature. This interrupt-on-mismatch feature, together with software configurable pull-ups on these four pins, allow easy interface to a keypad and make it possible for wake-up on key depression. Refer to the Embedded Control Handbook, Implementing Wake-up on Key Strokes (AN552). RB0/INT is an external interrupt input pin and is configured using the INTEDG bit (OPTION_REG<6>).
20
When enabling peripheral functions, care should be taken in defining TRIS bits for each PORTC pin. Some peripherals override the TRIS bit to make a pin an output, while other peripherals override the TRIS bit to make a pin an input. Since the TRIS bit override is in effect while the peripheral is enabled, read-modify write instructions (BSF, BCF, and XORWF) with TRISC as destination, should be avoided. The user should refer to the corresponding peripheral section for the correct TRIS bit settings.
21
22
operate in SLEEP, the A/D clock must be derived from the A/Ds internal RC oscillator. The A/D module has four registers. These registers are: A/D Result High Register (ADRESH) A/D Result Low Register (ADRESL) A/D Control Register0 (ADCON0) A/D Control Register1 (ADCON1) The ADCON0 register, shown in Register 11-1, controls the operation of the A/D module. The ADCON1 register, shown in Register 112, configures the functions of the port pins. The port pins can be configured as analog inputs (RA3 can also be the voltage reference), or as digital I/O. Additional information on using the A/D module can be found in the PICmicro Mid-Range MCU Family Reference Manual (DS33023). ADCON0 Register (Address: 1Fh)
R/W-0 R/W-0 ADSC1 ADSC0 bit7 R/W-0 CHS2 R/W-0 CHS1 R/W-0 CHS0 R/W-0 GO/De U-0 R/W-0 ADON bit0
Table 2
bit 7-6 ADCS1:ADCS0: A/D Conversion Clock Select bits 00 = FOSC/2 01 = FOSC/8 10 = FOSC/32 11 = FRC (clock derived from the internal A/D module RC oscillator) bit 5-3 CHS2:CHS0: Analog Channel Select bits 000 = channel 0, (RA0/AN0) 001 = channel 1, (RA1/AN1) 010 = channel 2, (RA2/AN2) 011 = channel 3, (RA3/AN3) 100 = channel 4, (RA5/AN4)
23
101 = channel 5, (RE0/AN5) (1) 110 = channel 6, (RE1/AN6) (1) 111 = channel 7, (RE2/AN7) (1) bit 2 GO/DONE: A/D Conversion Status bit If ADON = 1: 1 = A/D conversion in progress (setting this bit starts the A/D conversion) 0 = A/D conversion not in progress (this bit is automatically cleared by hardware when the A/D conversion is complete) bit 1 Unimplemented: Read as '0' bit 0 ADON: A/D On bit 1 = A/D converter module is operating 0 = A/D converter module is shut-off and consumes no operating current ADCON1 Register (Address 9Fh)
U-0 ADFM bit7 U-0 R/W-0 U-0 R/W-0 PCFG3 Table 3 R/W-0 PCFG2 R/W-0 PCFG1 R/W-0 PCFG0 bit0
bit 7 ADFM: A/D Result Format Select bit 1 = Right justified. 6 Most Significant bits of ADRESH are read as 0. 0 = Left justified. 6 Least Significant bits of ADRESL are read as 0. bit 6-4 Unimplemented: Read as '0' bit 3-0 PCFG3:PCFG0: A/D Port Configuration Control bits
24
25
Table 4
26
Figure 6
27
3.8.3 Clock:
The PIC16F877 can be operated in Four Different oscillator modes. The user can program two configuration bits FOSC1 and FOSC0 to select one of these four modes. *LP Low Power crystal *XT crystal / resonator *HS High speed crystal/resonator *RC Resistor capacitor The clock we have used is 10 MHZ which fall under HS category.
3.8.4 MCLR/VPP:
This is master clear input pin to the IC. A logic low signal will generate a reset signal to the microcontroller. So we have tied this pin to VCC for the proper operation of the microcontroller.
28
Hardware Description
29
Figure 7
These receivers have a nominal threshold of 1.3V, a typical hysterisis of 0.5V and can operate up to + 30V input. 1. Suitable for all RS232 communications. 2. +12V power supplies required. 3. Voltage quadruples for input voltage up to 5.5V (used in power supply Section of computers, peripherals, and modems). Three main sections of MAX232 are 1. A dual transmitter 2. A dual receiver 3. +5V to + 10V dual charge pump voltage converter.
31
32
The TTL\CMOS compatible output of receiver will be low whenever the RS232 input is greater than 2.4V. The receiver output will be high when input is floating or driven between +0.8V and 30V.
1 2 3 4 5 6 7 8
33
16
M AM XA
X 2 23 2
15 14 13 12 11 10 9
3 2
VT2 out
T1 in T2 in
R2 in
Figure 8
R2 out
4.3 Relay:
Relays are electromagnetic switches used as protective devices, indicating devices and as transmitting devices. Protective relay protect good component from the effects of the circuit components that have failed. Transmission relay are used in communication systems. Indicating relay may be used to identify a component which has failed. The relay is one of the most widely used components in industrial electronic. In combination with transistors, electron tubes and other circuit elements, this electromagnetic device performs countless tasks. Relays are electro magnetically operated remote controlled switches with one or more sets of contacts. When energized, the relay operates to open or close its contacts or to open some contacts and close others. Contacts which are opened when energized are called Normally Open (NO) or simply open contacts. Contacts which are closed when energized are called Normally Closed (NC) or simply open contacts. Normally open contacts are referred to as a contacts. Normally closed contacts are sometimes referred to as b contacts. There are certain terms associated with relays. The relay is said to pick up when it is energized and trips, and this pick up value is the smallest value of the fluctuating current required to close a contact or open b contact or closing b contact is said to reset or dropout.
34
Relay contact are held in their normal position by either springs or by some gravity-activated mechanism. An adjustment or adjustments are usually provided to set the restraining force to cause the relay to operate within predetermined conditions. Relay operates on one of the two different principles namely electromagnetic attraction or electromagnetic induction. Electromagnetic attraction type relays, which may either be AC or DC actuated, consists of an electromagnet having a core and winding.
Figure 9
The current needed to operate the relay coil is more then that can be supplied by most chips (op. amps etc), so a transistor is usually needed to drive the relay coil. A diode is used to short circuit the high voltage back emf induced when current flowing through the coil is suddenly switched off.
35
Here, we use PIC microcontroller that can not supply the required voltage to operate the relay coil. So we use a relay driver.
36
Figure 10
In the rectifier circuit, A1 is an inverting unity gain amplifier. The output from A1 is added to the original input signal in A2 (inverting summing mixed gain amplifier). In this circuit, the diode D2 is always in conducting mode and diode D1 is kept at virtual ground. E in feeds A2 through a 20Kohm resistor and A1 through a 10Kohm resistor. During positive half cycle, the output of an Op-Amp A1 is 5V because it is an inverting unity gain amplifier and hence the diode D2 is forward biased. Since it is a continuously conducting diode there is no potential drop in the diode. So we get 5V at the output E2. Since the OpAmp A2 is an inverting summing mixed gain amplifier the output voltage will be E3 = - (20/10)*(-5) + (10/10)*(-5) = +10 5 = +5V During negative half cycle of input voltage E in, there is no output from Op-Amp A1 due to rectification (i.e.) the output of the Op-Amp A1 is +5V and the output of the diode D1 is 5V. The voltage from A1 gets cancelled with the voltage from D1. So diode D2 remains open for the negative half cycle. The output from the Op-Amp A2 is +5V. Thus we get a constant pulsating DC for both the half cycles. This voltage is passed through a buffer amplifier with provision of filtering out the ripples. Thus at the output of the buffer circuit we get pure DC of 5V.
37
discharging times. This provides instantaneous displaying of parameters and zeroing of parameters whenever inputs are switched off. A low pass filter is also used to prevent high frequency noises, which may be generated by motor centers.
Parameter Measurement
38
39
40
R 1 3 3 0
h m
D D
1 I O D E Z E N L E D R R
o h m
Figure 11
a resistor which is made of material that varies its resistance in accordance to temperature. If the device is heated to a temperature more than the prescribed limit, then the respective bulb is tripped off using the relay. The diagram for the temperature detecting circuit is given as below
5 V
2 K T H
o h m s E R M
I I S
T O
3 3 0
o h m
Figure 12
Figure 13
Four open wires will be provided at four different levels. One at ground and other three as indicated in the figure.
42
As the water level raises and reaches each level, conduction occurs through the water and indication will be there as shown above. As the water reaches the final level the given load is tripped off. The tripping of the load is obtained using the relay circuitry.
43
Software Description
6. Software Description:
PC sends data to PC in four formats. They are: 1. Initialization of ports [1 ff ff 80 00]. 2. Read the current port values from microcontroller [2]. 3. Write data to microcontroller [3 ff ff 80 00]. 4. ADC read command [4x]. The following flowchart gives the description about how the PIC microcontroller receives the input from the analog sources and gives the corresponding control functions and signals to the PC for the display of the parameters that have been measured. There are two parts in the program. They are: 1. 2. Interrupt Program Main Program
44
Interrupt Program
START
No
RETURN
Yes
No
IF SYNC_FLAG==0
Yes
IF RCREG=='['
No
RETURN
No
IF RCREG==']' Yes
Yes
FSR=0X30 SET FIRST BIT OF SYNC_FLAG
No
CHECK IF RCREG CONTAINS NUMBER OR ALPHABET
Alphabet
Number
RCREG=RCREG AND 0X0F RCEG=RCREG AND 0X0F RCREG=RCREG + 0X09
RETFIE
START
45
INITIALIZE PORT REGISTERS,CONFIGURE ADC AND
Main Program
START
IF Rrdy flag==1
YES
IF Rbufo ==1
YES
GET DATA FROM NEXT LOC,AND SAVE IT TO TRIS REGISTERS CLEAR Rrdy flag
No
IF Rbufo ==2
YES
READ PORT VALUES CONVERT TO ASCII SENDS IT TO PC. CLEAR Rrdy flag
NO YES
IF Rbufo ==3 GET DATA FROM NEXT LOC AND SAVE IT TO PORT REGISTERS. CLEAR Rrdy flag
NO YES
IF Rbufo ==4 SET ADC FOR CONVERSION.GET RESULTS AFTER CONVERSION TO ASCII. SEND IT TO PC.CLEAR Rrdy flag C
46
According to the measured data, the control signals are again sent to the PC wherever necessary. If the measured value exceeds the threshold value, the load may be switched off.
47
48
7.2 Application:
This Project can be implemented in any of the process industries where there is a need for simultaneous and fast acquiring of data and control. The devices like motor , heater may be introduced instead of the lamps and may be turned on or tripped off accordingly
49
50
51
Conclusion
52
9. Conclusion:
To conclude we would like to say that we benefited a lot from this project as we learnt the value of team work, co-operation, and coordination besides the concepts of embedded technology. Multi-parameter measurement and control system is necessary in many situations. Using this, you can measure and control various global parameters like current, voltage, light intensity, temperature, etc. these parameters can be measured simultaneously as well as the graphs of the changes in the parameter can be viewed online. You can turn ON or OFF the water pumping motor, heater, garden light, or any other electrical appliance at home which are represented by bulbs in our project kit. The system is particularly suitable for use at industries and homes. It is simple to operate and is user-friendly. In the present world science and technology are at their peak and man has started depending on the intellect of machines rather than on the intellect of human brain, it springs no surprise that we have come to stage when all the processes are being controlled by embedded systems. Controlling of the processes is mostly done using microcontroller, and thus man power required to handle these complicated processes is reduced, and thereby the risks to human in hostile environment. The future seems well inclined towards embedded technology
53
Appendices
54
55
SPBRG = 64; TXEN = 1; // Enable transmit BRGH = 1; // ; Select high baud rate
SPEN = 1; //Enable Serial Port CREN = 1; // Enable continuous reception RCIF = 0; // Clear RCIF Interrupt Flag RCIE = 1; // Set RCIE Interrupt Enable
PEIE = 1; // Enable peripheral interrupts GIE = 1; // ; Enable global interrupts Send_Mess(); for(;;) {
Rbuf[1] <<= 4; Rbuf[2] |= Rbuf[1]; Rbuf[2] &= 0x10; Rbuf[2] |= 0xef; TRISA = Rbuf[2]; Rbuf[3] <<= 4; Rbuf[4] |= Rbuf[3]; TRISB = Rbuf[4]; Rbuf[5] <<= 4; Rbuf[6] |= Rbuf[5]; Rbuf[6] &= 0xbf; Rbuf[6] |= 0x80; TRISC = Rbuf[6]; Rbuf[7] <<= 4; Rbuf[8] |= Rbuf[7]; TRISD = Rbuf[8]; } if(Rbuf[0] == 2) { while(!TXIF) continue; TXREG = '{'; DelayUs(25);
57
while(!TXIF) continue; Ch = PORTA >> 4; Ch &= 0x0f; Rchar = RetAscii(Ch); TXREG = Rchar; DelayUs(25); while(!TXIF) continue; Ch = PORTA & 0x0f; Rchar = RetAscii(Ch); TXREG = Rchar; DelayUs(25);
while(!TXIF) continue; Ch = PORTB >> 4; Ch &= 0x0f; Rchar = RetAscii(Ch); TXREG = Rchar; DelayUs(25); while(!TXIF) continue; Ch = PORTB & 0x0f; Rchar = RetAscii(Ch); TXREG = Rchar; DelayUs(25);
58
while(!TXIF) continue; Ch = PORTC >> 4; Ch &= 0x0f; Rchar = RetAscii(Ch); TXREG = Rchar; DelayUs(25); while(!TXIF) continue; Ch = PORTC & 0x0f; Rchar = RetAscii(Ch); TXREG = Rchar; DelayUs(25); while(!TXIF) continue; Ch = PORTD >> 4; Ch &= 0x0f; Rchar = RetAscii(Ch); TXREG = Rchar; DelayUs(25); while(!TXIF) continue; Ch = PORTD & 0x0f; Rchar = RetAscii(Ch); TXREG = Rchar; DelayUs(25);
59
} if(Rbuf[0] == 3) { Rbuf[1] <<= 4; Rbuf[2] |= Rbuf[1]; PORTA = Rbuf[2]; Rbuf[3] <<= 4; Rbuf[4] |= Rbuf[3]; PORTB = Rbuf[4]; Rbuf[5] <<= 4; Rbuf[6] |= Rbuf[5]; PORTC = Rbuf[6]; Rbuf[7] <<= 4; Rbuf[8] |= Rbuf[7]; PORTD = Rbuf[8]; } if(Rbuf[0] == 4) {
60
Rbuf[1] <<= 3; Rbuf[1] |= 0x81; ADCON0 = Rbuf[1]; DelayUs(25); ADGO = 1; while(ADGO) continue;
while(!TXIF) continue; TXREG = '{'; DelayUs(25); while(!TXIF) continue; Ch = ADRESH >> 4; Ch &= 0x0f; Rchar = RetAscii(Ch); TXREG = Rchar; DelayUs(25); while(!TXIF) continue; Ch = ADRESH & 0x0f; Rchar = RetAscii(Ch); TXREG = Rchar; DelayUs(25);
61
while(!TXIF) continue; Ch = ADRESL>> 4; Ch &= 0x0f; Rchar = RetAscii(Ch); TXREG = Rchar; DelayUs(25); while(!TXIF) continue; Ch = ADRESL & 0x0f; Rchar = RetAscii(Ch); TXREG = Rchar; DelayUs(25); while(!TXIF) continue; TXREG = '}'; DelayUs(25); } } } } void Send_Mess()
62
{ while(!TXIF) continue; TXREG = 'P'; DelayUs(25); while(!TXIF) continue; TXREG = 'i'; DelayUs(25); while(!TXIF) continue; TXREG = 'c'; DelayUs(25); while(!TXIF) continue; TXREG = '1'; DelayUs(25); while(!TXIF) continue; TXREG = '6'; DelayUs(25); while(!TXIF) continue; TXREG = 'F'; DelayUs(25); while(!TXIF) continue;
63
TXREG = '8'; DelayUs(25); while(!TXIF) continue; TXREG = '7'; DelayUs(25); while(!TXIF) continue; TXREG = '7'; DelayUs(25); }
static void interrupt Int() { if(RCIF) { RCIF = 0; if(Sync_Flag != 0) { if(RCREG == ']') { Rrdy_Flag = 1; Sync_Flag = 0;
64
} else { if(RCREG >= '0' && RCREG <= '9') { Rbuf[Ptr++] = (RCREG & 0x0f); } if((RCREG >= 'a' && RCREG <= 'f') || (RCREG >= 'A' && RCREG <= 'F')) { Rbuf[Ptr++] = ((RCREG & 0x0f)+0x09); } } } else { if(RCREG == '[') { Sync_Flag = 1; Ptr = 0; } } } }
65
char RetAscii(int c) { switch(c) { case 0: return('0'); break; case 1: return('1'); break; case 2: return('2'); break; case 3: return('3'); break; case 4: return('4'); break; case 5: return('5'); break; case 6: return('6'); break; case 7:
66
return('7'); break; case 8: return('8'); break; case 9: return('9'); break; case 0x0a: return('A'); break; case 0x0b: return('B'); break; case 0x0c: return('C'); break; case 0x0d: return('D'); break; case 0x0e: return('E'); break; case 0x0f: return('F'); break; }
67
Table 5
68
Table 6
69
70
Figure 14
71
Table 7
72
Table 8
73
Table 9
74
References:
BOOKS: JOHN B. PEATMAN : DESIGN WITH MICROCONTROLLERS, MCGRAW HILL, 1988. ROY CHOUDHURY, ET.AL LINEAR INTEGRATED CIRCUITS, NEW AGE INTERNATIONAL, 1998. MILLMAN AND HALKIAS ELECTRONIC DEVICES AND CIRCUITS, MCGRAW HILL. MAGAZINES: ELECTRONICS FOR YOU ELECTOR ELECTRONICS WEBSITES: WWW.MICROCHIP.COM WWW.ELECTRONICSFORYOU.COM WWW.HOWSTUFFWORKS.COM WWW.AMAZON.COM WWW.MIKROELEKTRONIKA.CO.YU
75