[go: up one dir, main page]

0% found this document useful (0 votes)
83 views68 pages

PIC Microcontroller Based Wireless Notice Board MVJCE

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 68

PIC Microcontroller based Wireless Notice Board

MVJCE

ABSTRACT
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.

Wireless Notice Board Wireless notice board is an enhanced technology used in order to same time and convey the message with no delay. It provides a wireless data transfer capability between the PC and the notice board without the need of wiring on through a radio frequency link. This is a microcontroller based Embedded System which achieves wireless interface between a PC 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 hyper terminal of the PC and can be sent to the notice board using the RF link. The z8 microcontroller (F6423) based embedded system connected to the serial port of the PC receives the data send from the PC at the set baud rate and modulates it (ASK Modulation) and sends it to the display system through the wireless link. At the display side another z8 microcontroller (F6423) based embedded system receives the data through the RF receiver, demodulates it and sends to the display side. Need for wireless Notice Board Time saving: We can deliver the message instantly to any remote destination and as it is displayed in general the time is saved. Convenient: since the message is displayed in common its becomes economical and the delay in the message delivery is avoided. Multiple message and notice boards controlled from a single location

TeleCommunication

PIC Microcontroller based Wireless Notice Board

MVJCE

Technologies involved Radio Frequency Communication Embedded Controller Architecture and Programming Communication Protocols

Project Cycle Determining the requirements of the embedded system Designing the system architecture Selecting the Operating system 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

TeleCommunication

PIC Microcontroller based Wireless Notice Board

MVJCE

CONTENTS
1. INTRODUCTION....5 2. BLOCK DIAGRAM OF WNB...............7 2.1 Block diagram of WNB...8 2.2 Block diagram Description......9 2.2.1 PIC..9 2.2.2 Driver..9 2.2.3 Transceiver..................9 2.2.4 I2C Expander.10 2.2.5 Alphanumeric Display (LCD)..10

3. PIC16F877 MICROCONTROLLER DETAILS.11 3.1 Introduction to PIC MCU...12 3.1.1 What is MC? ........................................................12 3.1.2 Why 16F877? ..12 3.1.3 Features 13 3.2 PIC16F877 Architecture ...........14 3.2.1 ALU .15 3.2.2 Register.15 3.2.3 Control Unit..15 3.2.4 Memory 16 3.2.5 I/O Ports17 3.2.6 Status Register..18 3.2.7 Timers/Counters19 3.2.8 Interrupt Control (INTCON)19

TeleCommunication

PIC Microcontroller based Wireless Notice Board

MVJCE

4. ALPHANUMERIC LCD28 4.1 Introduction29 4.2 Types of dot matrix LCDs29 4.2.1 Alphanumeric LCD..29 4.3 Construction and nomenclature of LCD31 4.4 Interfacing the LCD module..32 4.5 PIN Description.33

5. I2C EXPANDER........36 5.1 Features..37 5.2 Block Diagram...38 5.3 Characteristics of I2C bus..39 5.4 Addressing the I2C expander.41

6. RF TRANSMITTER & RF RECEIVER.43 6.1 RF TXD and RXD44 6.1.1 ASK Modulation.........45 6.1.2 Encoding 46 6.2 RF Transmitter.47 6.3 RF Receiver..48 6.4 Applications of RF Transmitter and Receiver.48

7. MAX 232..49

8. CIRCUIT DIAGRAM OF TXD & RXD..52

9. SOFTWARE SECTION56 9.1 Software description57

TeleCommunication

PIC Microcontroller based Wireless Notice Board

MVJCE

10. APPLICATIONS..60

11. ENHANCEMENTS..63

12. CONCLUSION.67

BIBLOGRAPHY68

TeleCommunication

PIC Microcontroller based Wireless Notice Board

MVJCE

CHAPTER 1 INTRODUCTION

TeleCommunication

PIC Microcontroller based Wireless Notice Board

MVJCE

1. INTRODUCTION
The project aims at providing wireless (point to multi-point) data transfer capability between the PC and the notice board without the need of wiring. This is a microcontroller based Embedded System which achieves wireless interface between a PC and a Notice board. Here any display can be used as the notice board .The user can type the messages to be displayed on the remote display board using the hyper terminal of the PC and can be sent to the notice board using the RF link. The PIC microcontroller based Embedded System connected to the serial port of the PC receives the data sent from the PC at the baud rate set and modulates it (ASK Modulation) and sends it to the display system through the wireless link. At the display side another PIC microcontroller based Embedded System receives the data through the RF receiver, demodulates it and sends to the display side. Using existing radio wave frequencies, battery operated control panels allow for easier operation and maintenance of the display system. This project finds application in Educational Institutions and Offices, Display boards for advertisement, In Railway stations and Airports to intimate the passengers. Provides many advantages over the already existing display boards, as it avoids avoids the need of wiring, as and when needed information can be displayed, avoids the use of printer, time consumption is less and its user friendly.

TeleCommunication

PIC Microcontroller based Wireless Notice Board

MVJCE

CHAPTER 2 BLOCK DIAGRAM OF WNB

TeleCommunication

PIC Microcontroller based Wireless Notice Board

MVJCE

2.1 BLOCK DIAGRAM OF WIRELESS NOTICE BOARD (WNB)

Wireless Link

PC

Z8 C Based Embed ded System RS 232 Communication

RF Txr

RF Receiver

16 x 2 Alphanumeric Display

I2C Protocol

PIC C Based Embedded System

TeleCommunication

PIC Microcontroller based Wireless Notice Board

MVJCE

2.2 Block Diagram Description:2.2.1 Peripheral Interface Controller (PIC):


Microcontroller 16F877 is the heart of the project. It is an 8-bit microcontroller .It has 3KB of data memory, 8KB of flash memory, 2KB of EEPROM. In this project the features of PIC we make use of are, UART I2C

2.2.2 Driver:
The IC used to serve this purpose is MAX 232.It is a dual driver/receiver that includes a capacitive voltage generator to supply EIA-232 inputs to +5V TTL/CMOS levels. In this project the IC is an interface between the PC and the microcontroller. It receives +12V digitized serial data stream from the PC and thus converts the same to TTL/CMOS levels as required to be sent to microcontroller 16F877.

2.2.3 Tran-receiver (TLP 434A):


It is a transreceiver IC which sends data at a rate of 8kbps at an RF frequency of 433.92MHz. At the transmitter side, it receives the data stream from the microcontroller and performs ASK modulation. Then it transmits the modulated data stream at a frequency of 433.92 MHz. At the receiver side, it demodulates the received data stream and passes it to the microcontroller.

TeleCommunication

10

PIC Microcontroller based Wireless Notice Board

MVJCE

2.2.4 I2C Expander:


PCF8574 is an I2C parallel port expander. It is a silicon CMOS circuit that provides general purpose remote IO expansion for microcontroller via the two line bi-directional bus. In our project we are using it to communicate between microcontroller and the alphanumeric display (LCD) using the I2C bus, two way two line communication.

2.2.5 Alphanumeric Display (LCD):


LCD stands for Liquid Crystal Displays. "Liquid crystal" is neither solid nor liquid (an example is soapy water).Liquid crystals when stimulated by an external electrical charge will change the properties of light passing through the crystals. There are two ways to produce a liquid-crystal image with such cells: the segment driving method and the matrix driving method. The segment driving method displays characters and pictures with cells defined by patterned electrodes. The matrix driving method displays characters and pictures in sets of dots. In our project we are using 16x2 line matrix driven method display to display our messages.

TeleCommunication

11

PIC Microcontroller based Wireless Notice Board

MVJCE

CHAPTER 3 PIC16F877 MICROCONTROLLER DETAILS

TeleCommunication

12

PIC Microcontroller based Wireless Notice Board

MVJCE

3.1 Introduction To PIC MCU:


The microcontroller is making great impact on every activity of mankind and is playing and expected to play a very important role in the daily functioning of the developed and developing societies. In the early years of powerful computers, large computers were designed to solve complex, scientific and industrial problems and handles records of large corporations and government organizations. Only big industries and institute were able to purchase large computers .A trend started in middle of 60s to design smaller computers for smaller organizations and institutions. This situation gave birth to MICROCOMPUTERS. With the rapid advancements in the semiconductor technology, it becomes possible to fabricate the whole CPU of a digital computer on a single chip using LSI and VLSI technology, the LSI technology refers packing as many as 1000-10000 transistors on a single chip where as the VLSI refers to packing density of more than 10000 transistors on a single chip. A CPU build into a single LSI to VLSI chip is called MICROPROCESSOR.A digital computer having microprocessor has the CPU along with memory and IO devices is called MICROCOMPUTER.

3.1.1 What Is A Microcontroller?


A microprocessor with RAM, ROM and other peripherals chips together on a single chip is called a microcontroller. The term PIC, or Peripheral Interface Controller, has been coined by Microchip Technology to identify its single-chip microcontrollers. In the project we make use of two microcontrollers PIC 16F877(one in transmitter and one in the receiver) manufactured by Microchip Technology.

3.1.2 Why 16F877?


PIC 16F877 is a RISC machine; it consists of only 35 instructions, which makes programming very easy. Also this microcontroller has a large amount of

TeleCommunication

13

PIC Microcontroller based Wireless Notice Board

MVJCE

memory which will suffice our program requirements. PIC16F877 also has an inbuilt I2C module.

3.1.3 Features:
High performance RISC CPU Only 35 single word instructions to learn All single cycle instructions except for program branches which are two cycle Operating speed: DC - 20 MHz clock input DC - 200 ns instruction cycle Up to 8K x 14 words of FLASH Program Memory, Up to 368 x 8 bytes of Data Memory (RAM) Up to 256 x 8 bytes of EEPROM Data Memory Pin out compatible to the PIC16C73B/74B/76/77 Interrupt capability (up to 14 sources) Eight level deep hardware stack Direct, indirect and relative addressing modes Power-up Timer (PWRT) and Oscillator Start-up Timer (OST) Watchdog Timer (WDT) with its own on-chip RC oscillator for reliable operation Programmable code protection Power saving SLEEP mode Selectable oscillator options Low power, high speed CMOS FLASH/EEPROM technology Fully static design In-Circuit Serial Programming (ICSP) via two pins Single 5V In-Circuit Serial Programming capability In-Circuit Debugging via two pins Processor read/write access to program memory Wide operating voltage range: 2.0V to 5.5V High Sink/Source Current: 25 mA Commercial, Industrial and Extended temperature ranges Low-power consumption: - 0.6 mA typical @ 3V, 4 MHz - 20 A 3V, 32 kHz - 1 A typical standby current

TeleCommunication

14

PIC Microcontroller based Wireless Notice Board

MVJCE

3.2 PIC 167877 Architecture:

Fig 2: Architecture

TeleCommunication

15

PIC Microcontroller based Wireless Notice Board

MVJCE

It consists of three segments: ALU Registers Control Unit

3.2.1 Arithmetic Logic Unit (ALU):


The ALU includes electronic circuits (such as adder, comparator and flags) that are designed to perform logical & arithmetic operations such as addition, subtraction, logical AND, OR, EXOR. The register that is used to perform these functions is generally called the ACCUMULATOR. In this microcontroller this is called the working register (W Reg) and it is 8-bits wide.

3.2.2 Registers:
The register segment of the microcontroller includes various types of registers that are used to hold memory addresses. A few important registers are status register, file select register (FSR) and program counter. The program counter (PC) is a 13-bit register that holds that program memory address of the instruction that is to be read next. The MC uses the program counter as a memory pointer to fetch an instruction. FSRs are 8-bit registers that are used in indirect addressing.

3.2.3 Control Unit:


Control Unit is designed to provide timing and control signals to various read and write operations. This unit oversees the binary information flow between the MP memory and IO.

TeleCommunication

16

PIC Microcontroller based Wireless Notice Board

MVJCE

3.2.4 MEMORY:
Program Memory Organization There are three memory blocks in each of the PIC16F87X MCUs. The Program Memory and Data Memory have separate buses so that concurrent Access can occur.

Fig 3: Program memory and stack


The PIC16F87X devices have a 13-bit program counter capable of addressing an 8K x 14 program memory space. The PIC16F877 devices have 8K x 14 words of FLASH program memory. Accessing a location above the physically implemented address will cause a wraparound. The RESET vector is at 0000h and the interrupt vector is at 0004h.

TeleCommunication

17

PIC Microcontroller based Wireless Notice Board

MVJCE

Data Memory Organization: The data memory is partitioned into multiple banks which contain the General Purpose Registers and the Special Function Registers. Bits RP1 (STATUS<6>) and RP0 (STATUS<5>) are the bank select bits.

3.2.5 I/O Ports:


The 16F877 has 5 I/O ports identified by alphabetic letters such as PORT (A, B, C, D, and E). PORTA is 6-bit wide, PORT B, C, D is 8-bit wide and PORTE is 3-bit wide. All the ports are bi-directional i.e., each pin will be configured as input/output by writing the SFR TRIS.

TeleCommunication

18

PIC Microcontroller based Wireless Notice Board

MVJCE

3.2.6 Status Register:


The STATUS register contains the arithmetic status of the ALU, the RESET status and the bank select bits for data memory. The STATUS register can be the destination for any instruction, as with any other register. If the STATUS Register is the destination for an instruction that affects the Z, DC or C bits, and then the write to these three bits is disabled. These bits are set or cleared according to the device logic.

Bit 7 RP: Register Bank Select bit (used for indirect addressing) 1 = Bank 2, 3 (100h - 1FFh) 0 = Bank 0, 1 (00h - FFh) Bit 6-5 RP1:RP0: Register Bank Select bits (used for direct addressing) 11 = Bank 3 (180h - 1FFh) 10 = Bank 2 (100h - 17Fh) 01 = Bank 1 (80h - FFh) 00 = Bank 0 (00h - 7Fh) Each bank is 128 bytes Bit 4 TO: Time-out bit 1 = after power-up, CLRWDT instruction, or SLEEP instruction 0 = A WDT time-out occurred Bit 3 PD: Power-down bit 1 = after power-up or by the CLRWDT instruction 0 = by execution of the SLEEP instruction Bit 2 Z: Zero bit 1 = the result of an arithmetic or logic operation is zero 0 = the result of an arithmetic or logic operation is not zero Bit 1 DC: Digit carry/borrow bit (ADDWF, ADDLW, SUBLW, SUBWF I) 1 = A carry-out from the 4th low order bit of the result occurred

TeleCommunication

19

PIC Microcontroller based Wireless Notice Board

MVJCE

0 = No carry-out from the 4th low order bit of the result Bit 0 C: Carry/borrow bit (ADDWF, ADDLW, SUBLW, SUBWF) 1 = A carry-out from the Most Significant bit of the result occurred 0 = No carry-out from the Most Significant bit of the result occurred

3.2.7 Timers/Counters:
Timer0: 8-bit timer/counter with 8-bit prescaler. Timer1: 16-bit timer/counter with prescaler, can be incremented during SLEEP via external crystal/clock Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler.

3.2.8 INTERRUPT CONTROL (INTCON):

Bit 7 GIE: Global Interrupt Enable bit 1 = Enables all unmasked interrupts 0 = Disables all interrupts Bit 6 PEIE: Peripheral Interrupt Enable bit 1 = Enables all unmasked peripheral interrupts 0 = Disables all peripheral interrupts Bit 5 T0IE: TMR0 Overflow Interrupt Enable bit 1 = Enables the TMR0 interrupt 0 = Disables the TMR0 interrupt Bit 4 INTE: RB0/INT External Interrupt Enable bit 1 = Enables the RB0/INT external interrupt 0 = Disables the RB0/INT external interrupt Bit 3 RBIE: RB Port Change Interrupt Enable bit 1 = Enables the RB port change interrupt 0 = Disables the RB port change interrupt Bit 2 T0IF: TMR0 Overflow Interrupt Flag bit

TeleCommunication

20

PIC Microcontroller based Wireless Notice Board

MVJCE

1 = TMR0 register has overflowed (must be cleared in software) 0 = TMR0 register did not overflow Bit 1 INTF: RB0/INT External Interrupt Flag bit 1 = The RB0/INT external interrupt occurred (must be cleared in software) 0 = The RB0/INT external interrupt did not occur Bit 0 RBIF: RB Port Change Interrupt Flag bit 1 = At least one of the RB7:RB4 pins changed state; a mismatch condition will continue to set the bit. Reading PORTB will end the mismatch condition and allow the bit to be cleared (Must be cleared in

software).
0 = none of the RB7:RB4 pins have changed state PIE1 Register

Bit 7

PSPIE(1): Parallel Slave Port Read/Write Interrupt Enable bit 1 = Enables the PSP read/write interrupt 0 = Disables the PSP read/write interrupt

Bit 6 ADIE: A/D Converter Interrupt Enable bit 1 = Enables the A/D converter interrupt 0 = Disables the A/D converter interrupt Bit 5 RCIE: USART Receive Interrupt Enable bit 1 = Enables the USART receive interrupt 0 = Disables the USART receive interrupt Bit 4 TXIE: USART Transmit Interrupt Enable bit 1 = Enables the USART transmit interrupt 0 = Disables the USART transmit interrupt Bit 3 SSPIE: Synchronous Serial Port Interrupt Enable bit 1 = Enables the SSP interrupt 0 = Disables the SSP interrupt Bit 2 CCP1IE: CCP1 Interrupt Enable bit

TeleCommunication

21

PIC Microcontroller based Wireless Notice Board

MVJCE

1 = Enables the CCP1 interrupt 0 = Disables the CCP1 interrupt Bit 1 TMR2IE: TMR2 to PR2 Match Interrupt Enable bit 1 = Enables the TMR2 to PR2 match interrupt 0 = Disables the TMR2 to PR2 match interrupt Bit 0 TMR1IE: TMR1 Overflow Interrupt Enable bit 1 = Enables the TMR1 overflow interrupt 0 = Disables the TMR1 overflow interrupt

PIR1 REGISTER:

Bit 7

PSPIF(1): Parallel Slave Port Read/Write Interrupt Flag bit 1 = A read or a write operation has taken place 0 = No read or write has occurred

Bit 6

ADIF: A/D Converter Interrupt Flag bit 1 = An A/D conversion completed 0 = The A/D conversion is not complete

Bit 5 RCIF: USART Receive Interrupt Flag bit 1 = The USART receive buffer is full 0 = The USART receive buffer is empty Bit 4 TXIF: USART Transmit Interrupt Flag bit 1 = The USART transmit buffer is empty 0 = The USART transmit buffer is full Bit 3 SSPIF: Synchronous Serial Port (SSP) Interrupt Flag 1 = The SSP interrupt condition has occurred, and must be cleared in software before returning From the Interrupt Service Routine. The conditions that will set this bit are: SPI - A transmission/reception has taken place. I2C Slave

TeleCommunication

22

PIC Microcontroller based Wireless Notice Board

MVJCE

A transmission/reception has taken place.

I2C Master - A transmission/reception has taken place. - The initiated START condition was completed by the SSP module. - The initiated STOP condition was completed by the SSP module. - The initiated Restart condition was completed by the SSP module. - The initiated Acknowledge condition was completed by SSP module. - A START condition occurred while the SSP module was idle. - A STOP condition occurred while the SSP module was idle. 0 = No SSP interrupt condition has occurred Bit 2 CCP1IF: CCP1 Interrupt Flag bit Capture mode: 1 = A TMR1 register capture occurred (must be cleared in software) 0 = No TMR1 register capture occurred Compare mode: 1 = A TMR1 register compare match occurred 0 = No TMR1 register compare match occurred PWM mode: Unused in this mode Bit 1 TMR2IF: TMR2 to PR2 Match Interrupt Flag bit 1 = TMR2 to PR2 match occurred (must be cleared in software) 0 = No TMR2 to PR2 match occurred Bit 0 TMR1IF: TMR1 Overflow Interrupt Flag bit 1 = TMR1 register overflowed (must be cleared in software) 0 = TMR1 register did not overflow

SSPSTAT Register

Bit 7

SMP: Sample bit SPI Master Mode:

TeleCommunication

23

PIC Microcontroller based Wireless Notice Board

MVJCE

1 = Input data sampled at end of data output time 0 = Input data sampled at middle of data output time SPI Slave mode: SMP must be cleared when SPI is used in slave mode In I2 C Master or Slave mode: 1 = Slew rate control disabled for standard speed mode 0 = Slew rate control enabled for high speed mode Bit 6 CKE: SPI Clock Edge Select SPI mode: For CKP = 0 1 = Data transmitted on rising edge of SCK 0 = Data transmitted on falling edge of SCK For CKP = 1 1 = Data transmitted on falling edge of SCK 0 = Data transmitted on rising edge of SCK In I2 C Master or Slave mode: 1 = Input levels conform to SMBus spec 0 = Input levels conform to I2C specs Bit 5 D/A: Data/Address bit (I2C mode only) 1 = Indicates that the last byte received or transmitted was data 0 = Indicates that the last byte received or transmitted was address Bit 4 P: STOP bit (I2C mode only. This bit is cleared when the MSSP module is disabled, SSPEN is cleared.) 1 = Indicates that a STOP bit has been detected last (this bit is 0 on RESET) 0 = STOP bit was not detected last Bit 3 S: START bit (I2C mode only. This bit is cleared when the MSSP module is disabled, SSPEN is cleared.) 1 = Indicates that a START bit has been detected last (this bit is 0 on RESET) 0 = START bit was not detected last

TeleCommunication

24

PIC Microcontroller based Wireless Notice Board

MVJCE

Bit 2

R/W: Read/Write bit Information (I2C mode only) This bit holds the R/W bit information following the last address match. This bit is only valid from the address match to the next START bit, STOP bit or not ACK bit. In I2 C Slave mode: 1 = Read 0 = Write In I2 C Master Mode: 1 = Transmit is in progress 0 = Transmit is not in progress Logical OR of this bit with SEN, RSEN, PEN, RCEN, or ACKEN will indicate if the MSSP is in IDLE mode.

Bit 1

UA: Update Address (10-bit I2C mode only) 1 = Indicates that the user needs to update the address in the SSPADD

register 0 = Address does not need to be updated Bit 0 BF: Buffer Full Status bit Receive (SPI and I2 C modes): 1 = Receive complete, SSPBUF is full 0 = Receive not complete, SSPBUF is empty Transmit (I2 C mode only): 1 = Data transmit in progress (does not include the ACK and STOP bits), SSPBUF is full 0 = Data transmit complete (does not include the ACK and STOP bits), SSPBUF is empty.

TXSTA REGISTER:

Bit 7 CSRC: Clock Source Select bit Asynchronous mode:

TeleCommunication

25

PIC Microcontroller based Wireless Notice Board

MVJCE

Dont care Synchronous mode: 1 = Master mode (clock generated internally from BRG) 0 = Slave mode (clock from external source) Bit 6 TX9: 9-bit Transmit Enable bit 1 = Selects 9-bit transmission 0 = Selects 8-bit transmission Bit 5 TXEN: Transmit Enable bit 1 = Transmit enabled 0 = Transmit disabled Note: SREN/CREN overrides TXEN in SYNC mode. Bit 4 SYNC: USART Mode Select bit 1 = Synchronous mode 0 = Asynchronous mode Bit 3 Bit 2 Unimplemented: Read as '0' BRGH: High Baud Rate Select bit Asynchronous mode: 1 = High speed 0 = Low speed Synchronous mode: Unused in this mode Bit 1 TRMT: Transmit Shift Register Status bit 1 = TSR empty 0 = TSR full Bit 0 TX9D: 9th bit of Transmit Data, can be parity bit RCSTA

Bit 7

SPEN: Serial Port Enable bit 1 = Serial port enabled (configures RC7/RX/DT and RC6/TX/CK pins as

serial port pins)

TeleCommunication

26

PIC Microcontroller based Wireless Notice Board

MVJCE

0 = Serial port disabled Bit 6 RX9: 9-bit Receive Enable bit 1 = Selects 9-bit reception 0 = Selects 8-bit reception Bit 5 SREN: Single Receive Enable bit Asynchronous mode: Dont care Synchronous mode - master: 1 = Enables single receive 0 = Disables single receive This bit is cleared after reception is complete. Synchronous mode - slave: Dont care Bit 4 CREN: Continuous Receive Enable bit Asynchronous mode: 1 = Enables continuous receive 0 = Disables continuous receive Synchronous mode: 1 = Enables continuous receive until enable bit CREN is cleared (CREN overrides SREN) 0 = Disables continuous receive Bit 3 ADDEN: Address Detect Enable bit Asynchronous mode 9-bit (RX9 = 1): 1 = Enables address detection, enables interrupt and load of the receive buffer when RSR<8> is set 0 = Disables address detection, all bytes are received, and ninth bit can be used as parity bit Bit 2 FERR: Framing Error bit 1 = Framing error (can be updated by reading RCREG register and receive next valid byte) 0 = No framing error

TeleCommunication

27

PIC Microcontroller based Wireless Notice Board

MVJCE

Bit 1

OERR: Overrun Error bit 1 = Overrun error (can be cleared by clearing bit CREN) 0 = No overrun error

Bit 0 RX9D: 9th bit of Received Data (can be parity bit, but must be calculated by user firmware)

TeleCommunication

28

PIC Microcontroller based Wireless Notice Board

MVJCE

CHAPTER 4 ALPHANUMERIC LCD

TeleCommunication

29

PIC Microcontroller based Wireless Notice Board

MVJCE

4.1 Introduction To LCD:


LCD stands for Liquid Crystal Displays. Liquid crystal was discovered by the Austrian botanist Fredreich Rheinizer in 1888. "Liquid crystal" is neither solid nor liquid (an example is soapy water). In the mid-1960s, scientists showed that liquid crystals when stimulated by an external electrical charge could change the properties of light passing through the crystals. The most common liquid-crystal displays (LCDs) in use today rely on picture elements, or pixels, formed by liquid-crystal (LC) cells that change the polarization direction of light passing through them in response to an electrical voltage. As the polarization direction changes, more or less of the light is able to pass through a polarizing layer on the face of the display. Change the voltage, and the amount of light is changed. There are two ways to produce a liquidcrystal image with such cells: the segment driving method and the matrix driving method. The segment driving method displays characters and pictures with cells defined by patterned electrodes. The matrix driving method displays characters and pictures in sets of dots.

4.2 Types of dot-matrix LCDs:


There are two types of dot-matrix LCDs. Passive-matrix and active-matrix driving of LCD Monitors. Passive matrix is the less expensive of the two technologies. In passive-matrix LCDs (PMLCDs) there are no switching devices, and each pixel is addressed for more than one frame time. The passive matrix LCD has a grid of conductors with pixels located at each intersection in the grid.. The effective voltage applied to the LC must average the signal voltage pulses over several frame times, which results in a slow response time of greater than 150 msec and a reduction of the maximum contrast ratio. The addressing of a PMLCD also produces a kind of crosstalk that produces blurred images because non-selected pixels are driven through a secondary signal-voltage path. In active-matrix LCDs (AMLCDs), on the other hand, a switching device and a storage capacitor are integrated at the each cross point of the electrodes. The active addressing removes the multiplexing limitations by incorporating an

TeleCommunication

30

PIC Microcontroller based Wireless Notice Board

MVJCE

active switching element. The current in an active matrix display can be switched on and off more frequently; improving the screen refresh time. In contrast to passive-matrix LCDs, AMLCDs have no inherent limitation in the number of scan lines, and they present fewer cross-talk issues. There are many kinds of AMLCDs. For their integrated switching devices most use transistors made of deposited thin films, which are therefore called thin-film transistors (TFTs). The most common semi conducting layer is made of amorphous silicon (a-Si). A-Si TFTs are amenable to large-area fabrication using glass substrates in a low-temperature (300 to 400 process. An alternative TFT technology, C C) polycrystalline silicon - or polysilicon or p-Si-is costly to produce and especially difficult to fabricate when manufacturing large-area displays. Nearly all TFT LCDs are made from a-Si because of the technology's economy and maturity, but the electron mobility of a p-Si TFT is one or two orders of magnitude greater than that of an a-Si TFT. This makes the p-Si TFT a good candidate for TFT array containing integrated drivers, which is likely to be an attractive choice for

small, high definition displays such as view finders and projection displays.
LCD modules can be split into two groups: those that have built-in controller and driver chips, and those that have only driver chips. LCD displays that do not have controllers are typically used with powerful hardware, such as a laptop computer, where a video controller is available to generate the complex drive signals necessary to run the display. Most color and large (greater than 320x240) monochrome displays are of this type. The category of display modules that have built-in controllers can be split again into character LCD modules and graphic LCD modules. Character modules can display only text and perhaps some special symbols, while graphic modules can display lines, circles, squares, and patterns in addition to text. Some examples of graphic LCD controller chips are the Toshiba T6963, Seiko-Epson SED1330, and Hitachi HD61202.

TeleCommunication

31

PIC Microcontroller based Wireless Notice Board

MVJCE

4.2.1 Alphanumeric LCDs:


Nearly every pixel-based alphanumeric LCD module made today uses the Hitachi HD44780 LCD controller chip, or a derivative such as the Seiko-Epson SED1278.This apparent standardization in character LCDs has become extremely beneficial to design engineers and hobbyists. Dozens of manufacturers produce literally hundreds of models of LCD modules using this controller chip. The smallest of these displays is only one line of 8 characters; the largest is four lines of 40 characters each. Other common sizes are 16x1, 16x2, 20x1, 20x2, 20x4, 40x1, and 40x2 (characters x lines).

4.3 LCD Construction And Nomenclature:


The figure below describes the nomenclature and the construction parts of an LCD

TeleCommunication

32

PIC Microcontroller based Wireless Notice Board

MVJCE

1) F substrate (glass) 2) Terminal 3) Segment electrode 4) Common electrode 5) B substrate (glass) 6) Upper polarizing plate 7) Orientation layer 8) Sealant

9) LC (liquid crystal) 10) Conducting material 11) Sealant 12) Inlet 13) Viewing area 14) Lower polarizing plate, or lower polarizing plate and reflecting plate

4.4 Interfacing the LCD module:


The microcontroller/microprocessor interface to HD44780 LCD modules is 14 pins. Table below shows the basic pin out. The first three pins provide power to the LCD module. Pin 1 is GND and should be grounded to the power supply. Pin 2 is VCC and should be connected to +5V power. Pin 3 is the LCD Display bias. By adjusting the voltage or duty cycle of pin 3, the contrast of the display can be adjusted. Most character LCDs can achieve good display contrast with a voltage between 5V and 0V on pin 3. Greater contrast comes with lower voltage and one should never apply a VLCD higher than VCC. The ASCII code to be displayed is eight bits long and is sent to the LCD either four or eight bits at a time. If four bit mode is used, two "nibbles" of data (Sent high four bits and then low four bits with an "E" Clock pulse with each nibble) are sent to make up a full eight bit transfer. The "E" Clock is used to initiate the data transfer within the LCD.

TeleCommunication

33

PIC Microcontroller based Wireless Notice Board

MVJCE

4.5 Pin Description:

The "R/S" bit is used to select whether data or an instruction is being transferred between the microcontroller and the LCD. If the Bit is set, then the byte at the current LCD "Cursor" Position can be read or written. When the Bit is reset, either an instruction is being sent to the LCD or the execution status of the last instruction is read back.

TeleCommunication

34

PIC Microcontroller based Wireless Notice Board

MVJCE

Instructions: The different instructions available for use with the 44780 are shown below:

TeleCommunication

35

PIC Microcontroller based Wireless Notice Board

MVJCE

Before sending commands or data to the LCD module, the Module must be initialized. For eight bit mode, this is done using the following series of operations: 1. Wait more than 15 msecs after power is applied. 2. Write 0x030 to LCD and wait 5 msecs for the instruction to complete 3. Write 0x030 to LCD and wait 160 secs for instruction to complete 4. Write 0x030 AGAIN to LCD and wait 160 secs or Poll the Busy Flag 5. Set the Operating Characteristics of the LCD
o o o o o o

Write "Set Interface Length" Write 0x010 to turn off the Display Write 0x001 to Clear the Display Write "Set Cursor Move Direction" Setting Cursor Behavior Bits

Write "Enable Display/Cursor" & enable Display and Optional Cursor

Once the initialization is complete, the LCD can be written to with data or instructions as required. Each character to display is written like the control bytes, except that the "R/S" line is set. During initialization, by setting the "S/C" bit during the "Move Cursor/Shift Display" command, after each character is sent to the LCD, the cursor built into the LCD will increment to the next position (either right or left). Normally, the "S/C" bit is set (equal to "1") along with the "R/L" bit in the "Move Cursor/Shift Display" command for characters to be written from left to right (as with a "Teletype" video display).

TeleCommunication

36

PIC Microcontroller based Wireless Notice Board

MVJCE

CHAPTER 5 I2C EXPANDER (PCF8574)

TeleCommunication

37

PIC Microcontroller based Wireless Notice Board

MVJCE

The PCF8574 is a silicon CMOS circuit. It provides general purpose remote I/O expansion for most microcontroller families via the two-line bidirectional bus (I2C-bus).The device consists of an 8-bit quasi-bidirectional port and an I2C-bus interface. The PCF8574 has a low current consumption and includes latched outputs with high current drive capability for directly driving LEDs. It also possesses an interrupt line (INT) which can be connected to the interrupt logic of the microcontroller. By sending an interrupt signal on this line, the remote I/O can inform the microcontroller if there is incoming data on its ports without having to communicate via the I2C-bus. This means that the PCF8574 can remain a simple slave device.

5.1 Features: Operating supply voltage 2.5 to 6 V Low standby current consumption of 10 mA maximum I2C-bus to parallel port expander Open-drain interrupts output 8-bit remote I/O port for the I2C-bus Compatible with most microcontrollers Latched outputs with high current drive capability for directly driving LEDs Address by 3 hardware address pins for use of up to 8 devices (up to 16 with PCF8574A)

TeleCommunication

38

PIC Microcontroller based Wireless Notice Board

MVJCE

5.2 Block Diagram:

Fig:- Block diagram of i2c

TeleCommunication

39

PIC Microcontroller based Wireless Notice Board

MVJCE

5.3 Characteristics Of The I2C Bus:


The I2C-bus is for 2-way, 2-line communication between different ICs or modules. The two lines are a serial data line (SDA) and a serial clock line (SCL). Both lines must be connected to a positive supply via a pull-up resistor when connected to the output stages of a device. Data transfer may be initiated only when the bus is not busy.

Bit transfer One data bit is transferred during each clock pulse. The data on the SDA line must remain stable during the HIGH period of the clock pulse as changes in the data line at this time will be interpreted as control signals.

Start and stop conditions Both data and clock lines remain HIGH when the bus is not busy. A HIGH-to-LOW transition of the data line, while the clock is HIGH is defined as the start condition (S). A LOW-to-HIGH transition of the data line while the clock is HIGH is defined as the stop condition (P).

TeleCommunication

40

PIC Microcontroller based Wireless Notice Board

MVJCE

System configuration A device generating a message is a transmitter, a device receiving is the receiver. The device that controls the message is the master and the devices which are controlled by the master are the slaves.

Acknowledge The number of data bytes transferred between the start and the stop conditions from transmitter to receiver is not limited. Each byte of eight bits is followed by one acknowledge bit (see Fig.8). The acknowledge bit is a HIGH level put on the bus by the transmitter whereas the master generates an extra acknowledge related clock pulse .A slave receiver which is addressed must generate an acknowledge after the reception of each byte. Also a master must generate an acknowledge after the reception of each byte that has been clocked out of the slave transmitter. The device that acknowledges has to pull down the SDA line during the acknowledge clock pulse, so that the SDA line is stable LOW during the HIGH period of the acknowledge related clock pulse, set-up and hold times must be taken into account. A master receiver must signal an end of data to the transmitter by not generating an acknowledge on the last byte that has been clocked out of the slave. In this event the transmitter must leave the data line HIGH to enable the master to generate a stop condition.

TeleCommunication

41

PIC Microcontroller based Wireless Notice Board

MVJCE

F ig.8 Acknowledgment on the I2C-bus. 5.4 ADDRESSING I2C EXPANDER:

Each of the PCF8574s eight I/Os can be independently used as an input or output. Input data is transferred from the port to the microcontroller by the READ mode . Output data is transmitted to the port by the WRITE mode.

Fig: - Write Mode (Output)

TeleCommunication

42

PIC Microcontroller based Wireless Notice Board

MVJCE

Fig: Read Mode (Output)

TeleCommunication

43

PIC Microcontroller based Wireless Notice Board

MVJCE

CHAPTER 6 RF TRANSMITTER AND RECEIVER

TeleCommunication

44

PIC Microcontroller based Wireless Notice Board

MVJCE

6.1

RF Transmitter and Receiver


RF transmitter and receiver are one of the important components used in our

project to give a wider touch, where these RF transmitter and receiver are used to obtain a wireless application for our project. It plays a vital role for all wireless devices and application. We are going for RF ASK Low Cost Hybrid Modules TPL434 and RLP434 for transmitter and receiver application. Both of them employ ASK (amplitude shift keying) modulation, which is linear and sensitive to atmosphere and also they are inexpensive.

Fig 6: - Basic block diagram showing RF Transmitter and Receiver. Above block diagram represents the basic of RF Transmitter and receiver where a single antenna is working for both transmission and receiving propose. An input digital signal is given to DAC stage which converts the digital input signal to analog signal, so generated analog signal is feed to LPF block. The output from LPF is given to down convertor and Local oscillator (L.O) combination which works as super heterodyne. Here the analog signal is converted to a particular frequency range at which the transmitter is supposed to operate. So obtained

TeleCommunication

45

PIC Microcontroller based Wireless Notice Board

MVJCE

signal is passed through low noise amplifier (LNA) and given to Duplexer from where it is transmitted on the medium using antenna. While the Receiver part operates exactly vice versa. Here on receiving signals from the medium Antenna gives it to LNA from where it is given to super heterodyne receiver i.e. a combination of local oscillator and down convertor. Here the signal is driven back into its original range. And the ADC converts it back to its original digital form. This is how a general RF Transmitter and Receiver works as explained

6.1.1 ASK Modulation


Amplitude-shift keying (ASK) is a form of modulation that represents digital data as variations in the amplitude of a carrier wave. The amplitude of an analog carrier signal varies in accordance with the bit stream (modulating signal), keeping frequency and phase constant. The level of amplitude can be used to represent binary logic 0s and 1s. We can think of a carrier signal as an ON or OFF switch. In the modulated signal, logic 0 is represented by the absence of a carrier, thus giving OFF/ON keying operation and hence the name given. ASK is linear and sensitive to atmospheric noise, distortions, propagation conditions on different routes in PSTN, etc. Both ASK modulation and demodulation processes are relatively inexpensive. The ASK technique is also commonly used to transmit digital data over optical fiber. For LED transmitters, binary 1 is represented by a short pulse of light and binary 0 by the absence of light. Laser transmitters normally have a fixed "bias" current that causes the device to emit a low light level. This low level represents binary 0, while a higheramplitude light wave represents binary 1.

TeleCommunication

46

PIC Microcontroller based Wireless Notice Board

MVJCE

Fig 1.1: - (a) Modulated signal and (b) ASK Signal.

6.1.2 Encoding:
The simplest and most common form of ASK operates as a switch, using the presence of a carrier wave to indicate a binary one and its absence to indicate a binary zero. This type of modulation is called on-off keying, and is used at radio frequencies to transmit Morse code (referred to as continuous wave operation). More sophisticated encoding schemes have been developed which represent data in groups using additional amplitude levels. For instance, a four-level encoding scheme can represent two bits with each shift in amplitude; an eightlevel scheme can represent three bits; and so on. These forms of amplitude-shift keying require a high signal-to-noise ratio for their recovery.

TeleCommunication

47

PIC Microcontroller based Wireless Notice Board

MVJCE

6.2 Radio Frequency Transmitter:

SPECIFICATIONS: Frequency : 433.92 MHZ Modulation: ASK Circuit Shape: SAW Date Rate: 8K bps Supply Voltage: +5V Power Supply range for I/O pins: 0 to 5 V Non-Operating Case Temperature: -20 to +85 C Soldering Temperature ( 10 Seconds ) : 230 C

TeleCommunication

48

PIC Microcontroller based Wireless Notice Board

MVJCE

6.3 RADIO FREQUENCY RECEIVER:

SPECIFICATIONS: Frequency : 433.92 MHZ Modulation: ASK Circuit Shape: LC Date Rate: 4800 bps Sensitivity: -106 dBm Supply Voltage: +5V Power Supply range for I/O pins: 0 to 5 V Non-Operating Case Temperature: -20 to +85 C Soldering Temperature ( 10 Seconds ) : 230 C High sensitivity passive design Simple to apply with low current

6.4 Application of RF Transmitter and Receiver:


Wireless security system Car alarms Remote gate control controls Remote sensing Data communication Remote water/ Electric switch Pager system PDA data communication

TeleCommunication

49

PIC Microcontroller based Wireless Notice Board

MVJCE

CHAPTER 7 MAX 232

TeleCommunication

50

PIC Microcontroller based Wireless Notice Board

MVJCE

The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply TIA/EIA-232-Fvoltage levels from a single 5-V supply. Each receiver converts TIA/EIA-232-F inputs to 5-V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V, a typical hysteresis of 0.5 V, and can accept 30-V inputs. Each driver converts TTL/CMOS input levels into TIA/EIA-232-F levels..

Fig: Max 232

TeleCommunication

51

PIC Microcontroller based Wireless Notice Board

MVJCE

Fig :- Typical Operating Circuit

Input voltage range, VI: Driver . . . . . . . . . . . . . . . . . . . . . . 0.3 V to VCC + 0.3 V Receiver . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 V Output voltage range, VO: T1OUT, T2OUT . . . . . .VS 0.3 V to VS+ + .3V R1OUT, R2OUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... . 0.3 V to VCC + 0.3 V Short-circuit duration: T1OUT, T2OUT . . . . . . . . . . . . . . . . Unlimited

TeleCommunication

52

PIC Microcontroller based Wireless Notice Board

MVJCE

CHAPTER 8 CIRCUIT DIAGRAM OF TRANSMITTER & RECEIVER

TeleCommunication

53

PIC Microcontroller based Wireless Notice Board

MVJCE

Fig: Microcontroller Interface Circuit Diagram-TXD

TeleCommunication

54

PIC Microcontroller based Wireless Notice Board

MVJCE

Fig: Power Supply-TXD

TeleCommunication

55

PIC Microcontroller based Wireless Notice Board

MVJCE

Fig: Microcontroller interface circuit diagram-RXD

TeleCommunication

56

PIC Microcontroller based Wireless Notice Board

MVJCE

Fig: Power Supply-RXD

TeleCommunication

57

PIC Microcontroller based Wireless Notice Board

MVJCE

CHAPTER 9 SOFTWARE SECTION

TeleCommunication

58

PIC Microcontroller based Wireless Notice Board

MVJCE

9.1 Software description:


In our project the software section consists of assembly language program meeting the requirements of our project. This can be explained by dividing the program into transmitter and receiver. The flowchart for transmitter and receiver is as shown below.

START

INTIALISE MICRO CONTROLLE

RECEIVE THE DATA SERIALLY

STORE IN MICRO CONTROLLE

TRANSMIT THROUGH SERIAL PORT TO TRANSMITT

END

Fig: Flowchart of Transmitter

TeleCommunication

59

PIC Microcontroller based Wireless Notice Board

MVJCE

START

INITIALISE MICROCONTROLLER

RECEIVE THE DATA THROUGH RECEIVE PIN OF MC

IS RECEIVED DATA VALID?

TRANSMIT DATA TO LCD USING I2C

END

Fig: Flowchart of Receiver

TeleCommunication

60

PIC Microcontroller based Wireless Notice Board

MVJCE

CHAPTER 10 APPLICATIONS

TeleCommunication

61

PIC Microcontroller based Wireless Notice Board

MVJCE

APPLICATIONS 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.

Uses in Banks 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.

Uses for Traffic Control 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 other wise 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.

Uses for advertisement 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.

Uses in Educational sector 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

TeleCommunication

62

PIC Microcontroller based Wireless Notice Board

MVJCE

replaced by remote controlled notice boards at the colleges and universities, also at the time of examination scheduling and result publishing etc.

Information purpose 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.

Stock Exchange 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.

Organizations 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.

TeleCommunication

63

PIC Microcontroller based Wireless Notice Board

MVJCE

CHAPTER 11 ENHANCEMENTS

TeleCommunication

64

PIC Microcontroller based Wireless Notice Board

MVJCE

ENHANCEMENTS
This technology can be used for broader application with the help of Further Enhancements. Such as: It can be used to cover a wider range by the use of Effective RF Transmitter and Receiver. 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. As the RF Transmitters and Receivers are temperature sensitive we can make a proper use of them to overcome its sensitivity. 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. 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? As mobile has become the major device to give the access to the information and to get connected with desired people and communication world which directly relates to almost all of the people and it seems like impossible to keep track of everything without the help of mobile we should be able to do further enhancement in mobile and communication. Lets take an example of combination of microcontrollers and mobile technology, where we can deploy the feature of SMS to the mobile along with LCD display. This adds to one of the major Further Enhancement, which have wider application to the present world. Even it has a scope of sending and receiving e-mails on this device, which gives a wider view and application.

TeleCommunication

65

PIC Microcontroller based Wireless Notice Board

MVJCE

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.

TeleCommunication

66

PIC Microcontroller based Wireless Notice Board

MVJCE

Conclusion:
Form this article we conclude implementing Wireless Notice Board that:-

It eliminates the use of a printer. It is user friendly i.e., any layman can operate it. Messages can be sent anytime & corrected instantaneously. Messages lasts until the power in switched off. Finally the cost of module comes to Rs.4000/-

TeleCommunication

67

PIC Microcontroller based Wireless Notice Board

MVJCE

BIBLOGRAPHY
1. DESIGN WITH PIC MICROCONTROLLERSJOHN.B.PEATMAN 2. ANALOG AND DIGITAL COMMUNICATIONSIMON 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

TeleCommunication

68

You might also like