Professional Documents
Culture Documents
INTRODUCTION
SIT, Tumkur
Chapter 1 INTRODUCTION
Wireless systems are gaining popularity rapidly, as people attempt to do away with complicate and confusing wiring operations. Using existing radio wave frequencies, battery operated control panels allow for easier operation and maintenance of the display system.
This is a microcontroller based Embedded System which achieves wireless interface between a hex keypad and a Notice board. Here a 16x2 alphanumeric display can be used as the notice board .The user can type the messages to be displayed in the remote LCD using the hex keypad and can be sent to the notice board using the ZigBee module. The 8051 microcontroller (P89V51RD2) based embedded system connected to the hex keypad receives the data typed on it and sends it to the display system through the wireless link. At the display side another 8051 microcontroller (P89V51RD2) based embedded system receives the data through the ZigBee receiver and sends to the display side.
SIT, Tumkur
Procedure:
y y y y y y y y y y y Determining the requirements of the embedded system Designing the system architecture Choosing the processor and the associated peripherals Choosing the development platform Coding the application and optimizing the code Verification of the software on the host system Circuit Designing PCB Layout Device Test Verification of the software on the target system Documentation
SIT, Tumkur
SIT, Tumkur
Crystal
Reset
Bridge Rectifier
Filter Circuit
SIT, Tumkur
Antenna
Zigbee Module
8 0 MAX 232 C 5 1
16 X 2 LCD
Crystal
Reset
Bridge Rectifier
Filter Circuit
SIT, Tumkur
Pull-Up resistors are included, together with a standard easy to connect IDCC connector for interfacing. This board can be used with any microcontroller, with each pin separately polled or by using a series of interrupt pins to monitor the keys.
The Keypad Mini Board will work with any of our controllers and is an easy to use solution for data entry or simply as a series of switches.
Features * 16 Keys Included for Hex and Numeric Input * Keys Arranged in Standard Matrix Format * Pull-Up Resistors Included * Standard IDCC connector for easy connection * Compact and Easy To Mount * Ideal for use with all our Development and Control Boards * Board Dimensions: 45 x 55 mm
Microcontroller:
The microprocessor is the core of computer systems. Nowadays many communication, digital entertainment, portable devices, are controlled by them. A designer should know what types of components he needs, ways to reduce production costs and product reliable. In this project we are using 8051 microcontroller.
SIT, Tumkur
Transmitter:
Remote diagnosis ZigBee is a communications standard that provides a Wireless autopilot control short-range cost effective networking capability. It has been developed with the emphasis on low-cost battery National Marine Electronics powered applications, such as, building automation, Association standard data industrial and commercial
controls, marine wireless, over ZigBee personal healthcare and advanced tagging. ZigBee has been introduced by the IEEE and the ZigBee Alliance to security provide the first general standard for these applications.
Receiver:
Remote diagnosis ZigBee is a communications standard that provides a Wireless
autopilot control short-range cost effective networking capability. It has been developed with the emphasis on low-cost battery National Marine Electronics powered applications, such as, building automation, Association standard data industrial and commercial
controls, marine wireless, over ZigBee personal healthcare and advanced tagging. ZigBee has been introduced by the IEEE and the ZigBee Alliance to Security provide the first general standard for these applications.
Power:
In this project the microcontroller requires +5v power supply. The design description of power supply is given above.
Dept. of Telecommunication Engg. SIT, Tumkur
HARDWARE DETAILS
SIT, Tumkur
10
SIT, Tumkur
11
3.1.1 LCD Pin Descriptions The LCD discussed in this section has 14 pins. The function of each pin is given in Table 6.1.0. Figure 6.2a shows the pin positions for various LCDs.
Pin 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Symbol VSS VCC VEE RS R/W E DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7
I/O ---I I I/O I/O I/O I/O I/O I/O I/O I/O I/O Ground
Description +5V power supply Power supply to control contrast RS=0 to select command register, RS=1 to select data register R/W=0 for write, R/W=1 for read Enable The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus
Table 1 Pin Descriptions for LCD VCC, VSS and VEE While VCC, and VSS provide +5V and ground respectively, VEE is used for controlling LCD contrast. RS, Register select There are two very important registers inside the LCD. The RS pin is used for their selection as follows. If RS = 0, the instruction command code register is selected, allowing the user to send a command such as clear display, cursor at home, etc. If RS = 1 the data register is selected, allowing the user to send data to be displayed on the LCD.
Dept. of Telecommunication Engg. SIT, Tumkur
12
R/W, Read/Write R/W input allows the user to write information to the LCD or read information from it, R/W = 1 when reading : R/W = 0 when writing.
E, enable The enable pin is used by the LCD to latch information presented to its data pins. When data is supplied to data pins, a high-to-low pulse must be applied to this pin in order for the LCD to latch in the data present at the data pins. This pulse must be a minimum of 450 ns wide.
Code (Hex) 1 2 4 6 5 7 8 A C E F 10 14 18 1C 80 C0
Command to LCD Instruction Register Clear display screen Return home Decrement cursor (shift cursor to left) Increment cursor (shift cursor to right) Shift display right Shift display left Display off, cursor off Display off, cursor on Display on, cursor off Display on, cursor blinking Display on, cursor blinking Shift cursor position to left Shift cursor position to right Shift the entire display to the left Shift the entire display to the right Force cursor to beginning of 1st line Force cursor to beginning of 2nd line Table 2 LCD Command Codes
D0 D7 The 8-bit data pins, D0 D7, are used to send information to the LCD or read the contents of the LCDs internal registers.
Dept. of Telecommunication Engg. SIT, Tumkur
PHP IH5 4 4 4 $ 4 4 % 5 $ # @ E $ # # 9 % $ # # # E $ # # # # $ # # # # # # # # # # # # # # # # #
' ' "!7 '' 2 ("' 0 "& )'& ( 0 7! C31" 2 G"& ' '( '7 " ) '& ( 72 ("' ! 1 6!F A 0 A B "! 0! A "&C( "' B% @@898 D ! 1 B )'& ( &&' 7! @@898 )'& ( 72 ! ! " 7 !( "' "! ( 6!3 ! 1 3! 2 ! 1 "1 3! 2 ! 1 "1 0 )'& ( &&' '&% "!
To display letters and numbers, we send ASCII codes for the letters A Z, a z and
SIT, Tumkur 13
# # # # # # #
$ # # # # # #
14
3.1.2 Addressing Scheme of 2 x 16 LCD The following table shows the addressing scheme of the 2 x 16 LCD screen. 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
3.2 DB 9 CONNECTOR
Pin 1 2 3 4 5 6 7 8 9
Description Data Carrier Detect (DCD) Received Data (RxD) Transmitted Data (TxD) Data Terminal Ready (DTR) Signal Ground (GND) Data Set Ready (DSR) Request to send (RTS) Clear To Send (CTS) Ring Indicator (RI)
SIT, Tumkur
15
When the terminal (or a PC COM port) is turned on, after going through a self-test, it sends out signal DTR to indicate that it is ready for communication. If there is something wrong with the COM port, this signal will not be activated.
3.2.2. DSR (Data Set Ready) When DCE (modem) is turned on and has gone through the self-test, it asserts DSR to indicate that it is ready to communicate. Thus, it is an output from the modem (DCE) and input to the PC (DTE). This is an active low signal.
3.2.3. RTS (Request To Send) When the DTE device (such as a PC) has a byte to transmit, it asserts RTS to signal the modem that it has a byte of data to transmit. RTS is an active-low output from the DTE and an input to the modem.
3.2.4 CTS (Clear To Send) In response to RTS, when the modem has memory for storing the data it is to receive, it sends out signal CTS to the DTE (PC) to indicate that it can receive the data now. This input signal to the DTE is used by the DTE to start transmission. RTS and CTS are also referred to as hardware control flow signals.
3.2.5. DCD (Carrier detect or Data Carrier Detect). The modem asserts signal DCD to inform the DTE (PC) that a valid carrier has been detected and that contact between it and the other modem is established. Therefore, DCD is an output from the modem and an input to the PC (DTE).
An output from the modem (DCE) and an input to a PC (DTE) indicates that the telephone is ringing. It goes on and off in synchronization with the ringing sound.
SIT, Tumkur
16
RxD pin is used to receive data and TxD is used to transmit data serially. GND is the ground connection for the cable.
SIT, Tumkur
17
SIT, Tumkur
18
SIT, Tumkur
19
3.3.2 Features
1) 80C51 Central Processing Unit 2) 5 V operating voltage from 0 to 40 MHz 3) 64 KB of on-chip Flash program memory with ISP (In-System Programming) and IAP (In-Application Programming) 4) Supports 12-clock (default) or 6-clock mode selection via software or ISP PCA (Programmable Counter Array) with PWM and Capture/Compare functions 5) Four 8-bit I/O ports with three high-current Port 1 pins (16 mA each) 6) Three 16-bit timers/counters 7) Programmable Watchdog timer (WDT) 8) Eight interrupt sources with four priority levels 9) Second DPTR register 10) Low EMI mode (ALE inhibit) 11) TTL- and CMOS-compatible logic levels 12) Brown-out detection 13) Low power modes 14) Power-down mode with external interrupt wake-up dle mode 15) PDIP40, PLCC44 and TQFP44 packages
SIT, Tumkur
20
SIT, Tumkur
21
Port 0
Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In this mode P0 has internal pull-ups. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pull-ups are required during program verification. With external pull-up resistors connected upon reset, port 0 is configured as an output port.
Port 1
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 1 also receives the low-order address bytes during Flash programming and verification.
Port 2
Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are
Dept. of Telecommunication Engg. SIT, Tumkur
22
externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX @ DPTR). In this application, it uses strong internal pull-ups when emitting 1s. During accesses to external data memory that uses 8-bit addresses (MOVX @ RI); Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification.
Port 3:
Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current because of the pull-ups. Port 3 also serves the functions of various special features of the AT89C51 as listed in table 3.1.
SIT, Tumkur
23
Memory organization The device has separate address spaces for program and data memory. Flash program memory There are two internal ash memory blocks in the device. Block 0 has 64 kbytes and contains the users code. Block 1 contains the Philips-provided ISP/IAP routines and may be enabled such that it overlays the rst 8 Kbytes of the user code memory. The 64 kB Block 0 is organized as 512 sectors, each sector consists of 128 bytes. Access to the IAP routines may be enabled by clearing the BSEL bit in the FCF register. However, caution must be taken when dynamically changing the BSEL bit. Since this will cause different physical memory to be mapped to the logical program address space, the user must avoid clearing the BSEL bit when executing user code within the address range 0000H to 1FFFH. Data RAM memory The data RAM has 1024 bytes of internal memory. The device can also address up to 64 kB for external data memory. Expanded data RAM addressing The P89V51RD2 has 1 kB of RAM. The device has four sections of internal data memory: 1. The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly addressable. 2. The higher 128 bytes of RAM (80H to FFH) are indirectly addressable. 3. The special function registers (80H to FFH) are directly addressable only. 4. The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable by the move
external instruction (MOVX) and clearing the EXTRAM bit. Since the upper 128 bytes occupy the same addresses as the SFRs, the RAM must be accessed indirectly. The RAM and SFRs space are physically separate even though they have the same addresses.
When instructions access addresses in the upper 128 bytes (above 7FH), the MCU determines whether to access the SFRs or RAM by the type of instruction given. If it is
Dept. of Telecommunication Engg. SIT, Tumkur
24
indirect, then RAM is accessed. If it is direct, then an SFR is accessed. See the examples below. Indirect Access: MOV@R0, #data; R0 contains 90H.Register R0 points to 90H which is located in the upper address range. Data in #data is written to RAM location 90H rather than port 1. Direct Access: MOV90H, #data; write data to P1. Data in #data is written to port 1. Instructions that write directly to the address write to the SFRs. To access the expanded RAM, the EXTRAM bit must be cleared and MOVX instructions must be used. The extra 768 bytes of memory is physically located on the chip and logically occupies the rst 768 bytes of external memory (addresses 000H to 2FFH). When EXTRAM = 0, the expanded RAM is indirectly addressed using the MOVX instruction in combination with any of the registers R0, R1 of the selected bank or DPTR. Accessing the expanded RAM does not affect ports P0, P3.6 (WR), P3.7 (RD), or P2. With EXTRAM = 0, the expanded RAM can be accessed as in the following example. Expanded RAM Access (Indirect Addressing only): MOVX@DPTR, A DPTR contains 0A0H DPTR points to 0A0H and data in A is written to address 0A0H of the expanded RAM rather than external memory. Access to external memory higher than 2FFH using the MOVX instruction will access external memory (0300H to FFFFH) and will perform in the same way as the standard 8051, with P0 and P2 as data/address bus, and P3.6 and P3.7 as write and read timing signals. When EXTRAM = 1, MOVX @Ri and MOVX @DPTR will be similar to the standard 8051. Using MOVX @Ri provides an 8-bit address with multiplexed data on Port 0. Other output port pins can be used to output higher order address bits. This provides external paging capabilities. Using MOVX @DPTR generates a 16-bit address. This allows external addressing up the 64 kB. Port 2 provides the high-order eight address bits (DPH), and Port 0 multiplexes the low order eight address bits (DPL) with data. Both MOVX @Ri and MOVX @DPTR generates the necessary read and write signals (P3.6 - WR and P3.7 - RD) for external memory use. Table 7 shows external data memory RD, WR operation with EXTRAM bit. The stack pointer (SP) can be located anywhere within the 256 bytes of internal RAM (lower 128 bytes and upper 128 bytes). The stack pointer may not be located in any part of the expanded RAM.
Dept. of Telecommunication Engg. SIT, Tumkur
25
Dual data pointers This device has two 16-bit data pointers. The DPTR Select (DPS) bit in AUXR1 determines which of the two data pointers is accessed. When DPS = 0, DPTR0 is selected; when DPS = 1, DPTR1 is selected. Quickly switching between the two data pointers can be accomplished by a single INC instruction on AUXR1.
SIT, Tumkur
26
SIT, Tumkur
27
Just arrived our new Keypad Mini Board, this board includes 16 keys for Hex or standard Numeric Data Entry. Positive contact tactile switches are included in a standard matrix arrangement. An 8-bit data bus is required for pulsing and monitoring the keys. Pull-Up resistors are included, together with a standard easy to connect IDCC connector for interfacing. This board can be used with any microcontroller, with each pin separately polled or by using a series of interrupt pins to monitor the keys. The Keypad Mini Board will work with any of our controllers and is an easy to use solution for data entry or simply as a series of switches.
SIT, Tumkur
28
Features:
* 16 Keys Included for Hex and Numeric Input * Keys Arranged in Standard Matrix Format * Pull-Up Resistors Included * Standard IDCC connector for easy connection * Compact and Easy To Mount * Ideal for use with all our Development and Control Boards * Board Dimensions: 45 x 55 mm
SIT, Tumkur
29
3.5 ZigBee
3.5.1 About ZigBee Remote diagnosis ZigBee is a communications standard that provides a wireless autopilot
control short-range cost effective networking capability. It has been developed with the emphasis on low-cost battery National Marine Electronics powered applications, such as, building automation, Association standard data industrial and commercial controls, marine wireless, over ZigBee personal healthcare and advanced tagging. ZigBee has been introduced by the IEEE and the ZigBee Alliance to provide security the first general standard for these applications. 3.5.2 Benefits of ZigBee With a tenth of the processor memory requirements of Lighting Bluetooth and a fraction of the MIPS needed for 802.11 Fire and safety systems networking devices, ZigBee is the best solution for low data rate, short-range communications. 3.5.3 ZigBee also offers y
Low power consumption optimized for maintenance logging battery operation.
A well proven and researched standard that has been developed by some of the most experienced companies in the world.
Small size the developed solution will be less than 9mm x 9mm. SIT, Tumkur
30
periodically to another unit installed above ground. A GSM modem transmits the data back to base.
2) In-building Control ZigBee- enabled switches and lights can reduce installation costs in new buildings by eliminating the meeting current ZigBee protocols. Need to route light control through the walls, and remove the need to call in a qualified electrician when switches need to be relocated. Thermostats and air-conditioning controls can also be placed anywhere, free of any wiring constraints.
C-COORDINATORS
Dept. of Telecommunication Engg.
R-ROUTERS
E-END DEVICES
SIT, Tumkur
31
SOFTWARE SECTION
SIT, Tumkur
32
SIT, Tumkur
33
SIT, Tumkur
34
MAX 232
SIT, Tumkur
35
Figure MAX232
Dept. of Telecommunication Engg. SIT, Tumkur
36
Since the RS232 is not compatible with todays micro processors and microcontroller, we need a line driver (voltage converter) to convert the RS232 signals to TTL voltage level that will be acceptable to the 8052s TxD and RxD pins. One example of such a converter is MAX232. The MAX232 converts from RS232 voltage levels to TTL voltage levels and vice versa. One advantage of MAX232 chip is that it uses +5V power source, which is the same as the source voltage for the 8052.
SIT, Tumkur
37
APPLICATIONS
SIT, Tumkur
38
Chapter 6 APPLICATIONS
6.1 Uses in hospitals As in the hospitals we have to keep track of so many things like management of the resources and the scheduling of everyone and everything. There are different types of labs and the devices for diagnosis of the different kinds of disease. By using this technology we can make proper utilization of resources, timely and proper management of people without any hassles.
There is a huge mass of population which depends upon the banks for all their monetary transactions. To keep a proper track of such huge mass of people and their transactions this technology helps with certain degree of effectiveness.
Its known to all of us that traffic are the good servants of the people and also the major invention to help people but only if it is managed well otherwise we all know Bangalores traffic how ridiculous and irritating it can be. So with the use of this technology we can maintain the flow of traffic according to the needs of the people and also considering the availability of roads.
We can make use of this technology to display the different advertisement on display panels to reach the larger number of people at a time and in the populated places like shopping malls, road sides as well as at the theaters, discos, hotels, motels, restaurants etc about their products and features
SIT, Tumkur
39
Currently in India we are relying on the old style of displaying news by hanging bare time consuming papers on the notice board which can be replaced by remote controlled notice boards at the colleges and universities, also at the time of examination scheduling and result publishing.
It would be wiser to make a use of this technology for information purpose like news and its updates, real time reporting, live telecasting, inclusive of various information which adds to the advanced and busy life on daily basis.
The stock exchange is the hot topic nowadays. There are millions of sales of shares every hours and it is very necessary to maintain the real time services with the certain measures of reliability because it deals with the money large number of the small or bigger investors. With the help of this technology we can make it far easier and reliable.
6.7 Organization
Every organization has large number of employees who are assigned to accomplish the various tasks and each and everything should be documented for the future reference purpose. And also their schedules work, reports, leaves, presentation as well as distribution of salary etc
SIT, Tumkur
40
ENHANCEMENTS
SIT, Tumkur
41
Chapter 7 ENHANCEMENTS
This technology can be used for broader application with the help of further enhancements such as 1) It can be used to cover a wider range by the use of effective RF transmitter and receiver. 2) Even we can increase the size of LCD so that it will be more practical and advanced with its various features like wireless communication, remote controlling and monitoring. 3) As the RF Transmitters and Receivers are temperature sensitive we can make a proper use of them to overcome its sensitivity. 4) Even if we see in wider application we can use it for the display of symbols, signs and figures which can be easily understood and followed by normal non technical and general people, mean while it also aids to the time utilization as time is the most important factor in daily lives 5) On the other hand we have got the freedom to make it as two way communication medium. Which adds to one of the essential further enhancement, as communication and information interchange has become one of the essential tools for the researches and innovations? 6) Even it has a scope of sending and receiving e-mails on this device, which gives a wider view and application with the help of mobile.
As we see from the above discussion it has the wide and extensive further enhancements which add to the wider application, deployment of information technology, which can change the face of present communication system providing better services in the communication field to the people and organization.
SIT, Tumkur
42
CONCLUSION
SIT, Tumkur
43
Chapter 8 CONCLUSION
Form this article we conclude implementing Wireless Notice Board that:-
1) It eliminates the use of a printer. 2) It is user friendly i.e., any layman can operate it. 3) Messages can be sent anytime & corrected instantaneously. 4) Messages lasts until the power in switched off. 5) Finally the cost of module comes in very low cost.
SIT, Tumkur
44
BIBLIOGRAPHY
SIT, Tumkur
45
Chapter 9 BIBLIOGRAPHY
1. DESIGN WITH PIC MICROCONTROLLERS - JOHN.B.PEATMAN
2. ANALOG AND DIGITAL COMMUNICATION - SIMON HAYKINS 3. EMBEDDED SYSTEM DESIGN - FRANK VAHID & TONY GIVARGIS WEBSITES
www.microchip.com www.laipac.com www.howstuffworks.com www.u2.semiconductors.philips.com/i2c/facts/ www.wikipedia.com www.kartoo.com www.google.com
SIT, Tumkur