UNIVERSITY OF NAIROBI FACULTY OF ENGINEERING DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING

Size: px
Start display at page:

Download "UNIVERSITY OF NAIROBI FACULTY OF ENGINEERING DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING"

Transcription

1 UNIVERSITY OF NAIROBI FACULTY OF ENGINEERING DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING PROJECT: A MICROCONTROLLER BASED WIRELESS E-NOTICE BOARD PROJECT INDEX: 06 NAME: LUBANGA DENNIS WASIOYA REG. NO: F17/1353/2010 SUPERVISOR: PROF. ELIJAH MWANGI EXAMINER: MR. C. OMBURA A project report submitted to the Department of Electrical and Information Engineering in partial fulfillment of the requirements for the award of the Degree of Bachelor of Science in Electrical and Electronic Engineering of the University of Nairobi Submitted on: 24 TH APRIL 2015 i

2 NAME: DECLARATION OF ORIGINALITY LUBANGA DENNIS WASIOYA REGISTRATION NUMBER: COLLEGE: FACULTY: DEPARTMENT: F17/1353/2010 College Of Architecture and Engineering Engineering Electrical and Information Engineering COURSE: Bachelor of Science in Electrical and Electronic Engineering PROJECT NAME: A Microcontroller Based Wireless E-Notice Board 1. I understand what plagiarism is and I am aware of the university policy in this regard. 2. I declare that this final year project report is my original work and has not been submitted elsewhere for examination, award of a degree or publication. Where other people s work or my own work has been used, this has properly been acknowledged and referenced in accordance with the University of Nairobi s requirements. 3. I have not sought or used the services of any professional agencies to produce this work. 4. I have not allowed, and shall not allow anyone to copy my work with the intention of passing it off as his/her own work. 5. I understand that any false claim in respect of this work shall result in disciplinary action, in accordance with University anti-plagiarism policy. Signature:. Date:. i

3 DEDICATION This project is dedicated to my dad, who financially and emotionally supported me through my entire academic life, and my mom for being there for me always. ii

4 ACKNOWLEDGEMENT First of all, I would like to sincerely express my gratitude to the almighty God who gave me life, strength and opportunity to get this far in my academic life. I would also like to thank my supervisor, Prof. Elijah Mwangi, for his insight and valuable assistance he provided me to make this project work. I also express my gratitude to the department and especially the electronics laboratory technicians for the assistance they gave me in completion of my project. Lastly, I would like to thank my friends and classmates for their educational and any other related insight they afforded me during the period I was undertaking this project. iii

5 ABSTRACT Notice boards are vital in all institutions as they are used to relay vital information to all the concerned persons in the given institution. They are also common with advertising agencies. The GSM based electronic notice board discussed in this paper presents a way to do away with paper base notices. The GSM notice board enables notices to be posted without the authorized person being physically at the location of the board as the notices are sent as text messages. The GSM E notice board can set to only gives authorized access to the board so that the content going to the board is controlled. iv

6 TABLE OF CONTENTS DECLARATION OF ORIGINALITY... I DEDICATION... II ACKNOWLEDGEMENT... III ABSTRACT... IV TABLE OF CONTENTS... V ABBREVIATIONS AND ACRONYMS... VII LIST OF FIGURES... VIII LIST OF TABLES... IX CHAPTER INTRODUCTION BACKGROUND PROBLEM STATEMENT OBJECTIVES SCOPE OF WORK ORGANISATION OF THE PROJECT... 2 CHAPTER LITERATURE REVIEW THE MICROCONTROLLER Classification of microcontrollers Applications of Microcontrollers The PIC 16F GSM MODEM DISPLAY UNIT Classification of LCD s POWER SUPPLY PROGRAMMING LANGUAGE AND SOFTWARE Programming Language Tools and Computer Software CHAPTER DESIGN AND IMPLEMENTATION SOFTWARE DESIGN The Microcontroller Unit LCD Screen Computer Software Used v

7 3.2 HARDWARE IMPLEMENTATION LCD Connections GSM connections PIC connections The Power Supply Unit CHAPTER RESULTS AND ANALYSIS STARTUP DISPLAY GSM MESSAGE DISPLAY CHAPTER CONCLUSION AND RECOMMENDATIONS CONCLUSIONS REALIZATION ON LARGER SCREEN RECOMMENDATIONS BIBLIOGRAPHY APPENDIX A. MICROCONTROLLER CODE B. PIC16F690 INTERNAL ARCHITECTURE C. CIRCUIT DIAGRAM D. COST OF MATERIALS vi

8 GSM SIM PIC LCD LED TFT RX TX GND ALU CISC RISC PC IDE ASCII ETSI 2G EEPROM ROM ISR USART ABBREVIATIONS AND ACRONYMS Global System of Mobile Subscriber Identification Module Peripheral interface Control Liquid Crystal Display Light Emitting Diode Thin Film Transistor receiver Transmitter Ground Arithmetic and Logic Unit Complex Instruction Set Computing Reduced Instruction Set Computing Personal Computer Integrated development Environment American Standard Code for Information Interchange European Telecommunications standards Institute Second Generation Electrically Erasable Programmable Read Only Memory Read only Memory Interrupt Service Routine Universal Synchronous Asynchronous Receiver Transmitter vii

9 LIST OF FIGURES Figure 2. 1 Types of Microcontrollers... 3 Figure 2. 2 Transmitting data using USART module [3]... 8 Figure 2. 3 The GSM MODEM Figure 2. 4 Internal structure of the LCD screen Figure 2. 5 A 20 by 4 LCD screen Figure 2. 6 Pickit Figure 3. 1 Software design flowchart Figure 3. 2 The STATUS register [9] Figure 3. 3The OSCCON register [9] Figure 3. 4 The INTCON Register [9] Figure 3. 5 The PIE1 Register [9] Figure 3. 6 Block Diagram of the Project Figure 3. 7 Level Shifter Circuit [12] Figure 3. 8 Pin Diagram of the Microcontroller [2] Figure 3. 9 Voltage Stabilizer Circuit [6] Figure 4. 1 Proteus Simulation Figure 4. 2 Practical Result Appendix Figure 1. 1 Internal Architecture of PIC16F690 [3] Appendix Figure 1. 2 Proteus Circuit Diagram viii

10 LIST OF TABLES Table 3. 1: Bank Selection Table 3. 2: LCD Instructions Table 3. 3: Internal Clock setting Table 3. 4: Baud Rate setting [12] Table 3. 5: LCD pin Connections ix

11 x

12 CHAPTER 1 INTRODUCTION 1.1 Background Microcontrollers have become an integral part of modern systems as they provide the ability to create stand alone systems which have revolutionize the technological world. The ability to program microcontrollers to perform a given task under a certain circumstance and react differently in another situation has made our work easier in many ways. In order to create any system, a microcontroller is interfaced with several peripheral devices depending on what the system designer wants to create. For example, to create a notice board as in this project, a display unit and a GSM MODEM are connected to the microcontroller. The GSM MODEM is responsible for the reception of the notices and sends the information to the microcontroller which in turn sends the message to the display unit [1]. This is just one example of the systems that can be actualized by connecting a microcontroller to some other devices. There are many systems that can be made using microcontrollers. This project discusses the making of a wireless notice board and explains how it can be implemented on a larger and economically viable way. 1.2 Problem Statement A notice board is an important item in any institution as it is used to pass any information to people in the institution. They are also very important in the advertising field as companies market their products and services on these boards. All along, the notice boards have been physical with the notices printed on a piece of paper and posted on the boards. The wireless E notice board provides the unique opportunity of posting notices remotely from any location in the world provided there area has GSM network coverage. However, notice boards can distract motorists on the roads and lead to accidents. It is therefore important to regulate the information one puts on these boards so as to ensure they are less distractive. 1.3 Objectives The objectives of this project is to design a GSM E-Notice board based on the PIC microcontroller that will have the following functionalities; Receive a text message sent through the GSM network Display the message on a LCD screen Discuss how the project can be realized using the more economically practical TFT LCD and LED screens 1

13 1.4 Scope of Work The project covers the following areas; Using a PIC microcontroller to display text on an LCD screen Connecting a GSM MODEM to a microcontroller and receive text messages from a mobile phone through the GSM Network If the received text is from an authorized source, display the text on the LCD screen, if not authorized, discard the text message The other functionalities of the GSM MODEM such as receiving calls and checking the signal strength of the GSM network are not within the scope of this project 1.5 Organisation of the Project The project is organized into five chapters as follows: the introduction, the literature review, design and implementation, results then the conclusions and recommendations. After the chapters there are the references and lastly the appendix. The introduction to the project discusses the background of the project, problem statement, objectives and the project scope. The literature review section is where the various components of the project are discussed. These components include the GSM MODEM, the microcontroller, the power supply and also the programming language and the software used. The design and implementation chapter focuses on the software and hardware implementation of the project. The software part discusses how the modules are interfaced in the program code and the hardware design focuses on the physical creation of the wireless E-Notice board system. The fourth chapter is where the results of the project are presented and their analysis given. The results of the project are divided into; simulated and practical. The simulated results are seen from the software in the PC and the practical results are seen on the Breadboard from actual circuitry. The fifth chapter concludes the findings of the entire project and recommends what should be done for further works in line with that project. References of the project are given after the fifth chapter. The appendix has the MCU code used, the circuit diagram, important figures and the breakdown of the project cost. 2

14 CHAPTER 2 LITERATURE REVIEW This chapter discusses the various components and aspects that have been used in this project. These are the microcontroller, the LCD screen, the GSM/GPRS MODEM, the power supply, software and other tools used. 2.1 The Microcontroller By definition, a microcontroller is simply a computer on a chip. To be able to produce any system, like a GSM E-Notice board, several peripheral devices are to be interfaced with the microcontroller and a code is programmed into the microcontroller to enable the peripherals to work in a certain way so that the system is complete [2]. The microcontrollers are of different types and they are classified in different ways Classification of microcontrollers Microcontrollers can be classified into many types based of various aspects some of them being; bus width, instruction set, memory architecture, instruction set and family. Here we shall look at all these classification aspects with special reference to the PIC 16F690. Figure 2.1 shows one way of classifying microcontrollers. Figure 2. 1 Types of Microcontrollers [1] 3

15 Memory Architecture Architecture is the conceptual design and operational structure of the microcontroller. There are two main architectural designs which are considered to classify any microcontroller, the Von Neumann and the Harvard architectures. The two architectural designs differ in the way data and programs are accessed and stored Harvard Architecture In this memory architecture, the program memory is completely separated from the data memory. All PIC microcontrollers have the Harvard architecture. With the separate physical memories, each memory has its special dedicated bus used for instruction and data flow. This allows faster execution of commands and parallel flow of data is possible [2] Von Neumann Architecture In this design, the controller can either read an instruction or write one but not read and write at the same time as the two processes use a single bus for instruction and data transfer. The advantage of the von Neumann architecture is that it can handle both a program with very large program memory requirements but little data space or one with very little program memory requirement with very large data amount without any problem. It is also able to optimize memory for both cases. The architecture, however, has many disadvantages thus making it not very common among the microcontrollers. First, since the memory is the same for the entire chip, if you happen to misplace the place holder of the instruction to be executed next your computer may hang. Also, some program data may be moved to the next memory location if it doesn t fit in the desired destination. This next location can contain data from another program and hence this will intentionally overrun the data memory with program instructions [2] Bus Width Classifications according to the width of the internal data bus of the microcontroller lead to the following types: bit Microcontroller A microcontroller is regarded as an 8-bit microcontroller when the ALU performs its operations on a byte at an instruction. This simply means that the internal bus width is 8-bit long. Examples of 8-bit microcontrollers are Intel 8051 family and Motorola MC68HC11 family. The PIC16F690 microcontroller which is used in this project falls under this category bit microcontroller The data bus width of this family of microcontrollers is 16- bit as the names suggest. Examples of 16-bit microcontrollers are Intel 8096 family and Motorola MC68HC12 and MC68332 families. The capabilities of this microcontroller family are greatly improved as compared to the earlier family. 4

16 bit microcontroller As the name suggest, the internal bus width is 32 bits long. Examples of this family are the Intel family and Motorola M683xx and Intel/Atmel 251 family Again their capabilities greatly surpass those of the 16 bit bus width Instruction Set Classification made taking into account the instruction sets, results in three distinct types of microcontrollers i.e. CISC, RISC and SISC CISC This is an acronym for Complex Instruction Set Computing. This architecture contains a large set of instruction ranging from very complex to very simple. The disadvantage of the CISC architecture is that it is easier to compute these complex computations by using short instructions instead of the complex ones making the CISC architecture inefficient. This led to the development of the RISC to efficiently work out the inefficiencies of the CISC. Examples of systems with this architecture are the Intel Pentium processors [2] RISC RISC architecture, which stands for the Reduced Instruction Set computer, uses a small, highly organized set of instructions as opposed to the complex instructions used by the CISC architecture. This now the most common architecture used in microcontrollers [2]. Another possible architecture based on the instruction set is the SISC architecture which stands for Special Instruction Set Computing. This type is not as common as the other two Memory Devices This classification yields two types of microcontrollers; embedded memory microcontroller and external memory microcontroller Embedded Memory This is a microcontroller which has all the functional blocks available on a chip. These functional blocks are the data memory, I/O ports, Serial communication, counters and timers as well as interrupts External Memory Not all the functional blocks are available on the same chip. An example of such is the Intel 8031 where the program memory is not available on the chip and hence an external memory has to be connected. 5

17 Microcontrollers can also be classified by the family which is based on the manufacturer of the microcontroller leading to a number of microcontroller types. The main types are AVR and PIC. PIC,made by Microchip, is used in this project Applications of Microcontrollers Microcontrollers are vital in the building of various devices across the technological divide. The applications of the microcontroller include: Light sensing and control devices Temperature sensing and control devices Fire detection and safety devices Industrial instrumentation devices Process control devices Voltage, current and power measurement Measuring revolving objects Hand held metering systems Among many other applications The PIC 16F690 The PIC 16F690 is a 20 pin microcontroller. This PIC belongs to the 16 series 8-bit mid-range class of PIC microcontrollers with a typical range of interfaces which includes; Digital input/output Analog inputs (12 pins) Multimode timers (3) Serial ports An internal clock (4MHz) The chip has 4K of program memory, 256 bytes of SRAM and another 256 bytes of EEPROM.The chip can be initialized to provide 18 I/O pins and the other two are for V DD and V SS. The 18 pins are grouped into three ports, A (6pins), B (4 pins) and C (8 pins) [3]. 6

18 Other important features of the PIC16 F690 that are instrumental in the construction of the E- Notice board are; Serial ports (mostly the USART) Interrupts EEPROM Data Memory Serial Ports Serial ports allow the PIC to communicate with a wide range of other devices; in our case we want the microcontroller to communicate with the LCDs and the GSM MODEM so as to send messages to the Notice Board. The USART stands for Universal Synchronous/Asynchronous Receiver/Transmitter. The use of the USART involves sending or receiving an 8-bit or 9-bit packet of data i.e. a byte of data plus a parity bit where the parity bit is used for error checking the byte sent. The error checking mechanism works such that if there are an odd number of ones in the data byte sent or received then the parity bit will be 1 and if the number of 1s is even then the parity bit will be 0. If there is an error in the sent or received data then the parity bits of the two will not match and hence the receiver will detect an error [4]. The USART module has two modes of operation i.e. asynchronous operation and synchronous operation. In Asynchronous operation, the RX pin of the PIC microcontroller is connected to the TX pin of the device (in our case the GSM MODEM) and the data is swapped. This connection is referred to as Full Duplex connection. In synchronous operation, clock and data lines are shared between a number of devices with the master device responsible for providing the clock. In both these modes, the rate at which data is sent by the transmitter should be equal to the rate at which the receiver expects the same data. This rate is known as the Baud Rate, which for this project is set at The baud rate is set using register SPBRG which is located in Bank 1. In the PIC microcontrollers, the registers responsible for receiving and transmission of data are the RCSTA (located in Bank 0) and the TXSTA (located in Bank 1). Data read is stored in the RCREG register (located in Bank 1) whereas data to be transmitted is stored in the TXREG register also in Bank 1 When the USART is to send data (8 OR 9- Bits long) the module adds a start bit (usually a 0) to the front of the data to be sent and a stop bit (usually a 1) to the end of the data resulting in a 10 or 11-bit long data. This is then moved to the shift register which rotates the bits onto the transmission pin (TX). 7

19 This is shown on the figure below: Figure 2. 2 Transmitting data using USART module [4] The receiver module will constantly check the state of the RX pin to see if any data is received. The RX pin is normally HIGH and the start bit of the sent data is a LOW. If the RX pin goes LOW, this means the sent data has reached the RX pin. Three samples are taken in the middle of the bit to ensure it really is the start bit then other samples of the subsequent bits are taken with three samples in the middle of each bit. The timing of the sampling is dictated by the Baud Rate of the devices. The stop bit must read a 1 otherwise the data is declared a Badly Framed and an error is registered. When a HyperTerminal (like the GSM MODEM) is connected to the serial port, whatever character is entered is sent as ASCII through the serial port. These characters can then be displayed on the LCD. Both modes (Synchronous and Asynchronous) support a feature called the Address Detect which allows a number of devices to be connected to the PIC. In order to transmit, an address byte must first be sent out to identify the intended recipient [4] Interrupts An interrupt is an externally or internally generated signal which forces the processor to suspend its current operation and execute the Interrupt Service Routine (ISR). This is because the ISR is given a higher priority than the background processes. In the programming of the E-Notice board, an incoming message is viewed as an interrupt. Once the message is received, the 8

20 processor leaves whatever it was doing, displays the message if it is from an authorized source or discards the message if the source is not authorized [5] EEPROM Data Memory The EEPROM is a collection of General Purpose file registers whose contents remain intact even when power to the microcontroller is cut off. Information that is vital to the functioning of a system like the passwords and authorized phone numbers are stored in the EEPROM. The file register EEADR (located in Bank 3) holds the address in the EEPROM which you wish to read from or writes to while EEDATA file register holds the data you have just read or wish to write in the EEPROM. The writing process involves the use of registers EECON1 and EECON2, both of which are located in Bank 3. EECON1 is used to hold setting of the EEPROM whereas the EECON2 is a special function register used in the EEPROM writing process. In the creating of the Notice board, it is important that only authorized persons get to display notices on the board. The EEPROM is important to this function as the programmer gets to give certain users this opportunity by storing their phone numbers in the EEPROM. As mentioned earlier the EEPROM memory for the PIC 16F690 is 256 bytes [5]. 2.2 GSM MODEM GSM, acronym for the Global System of Mobile Communication, are standards set by the European Telecommunications Standard Institute (ETSI) to describe the protocols of the 2G digital cellular networks used for mobile phones. By the year 2014, the GSM network was the default mobile communication system in the world with over 90% of the market share for mobile communication which translates to coverage in 219 countries and territories. Since the GSM network covers our entire country, a GSM MODEM will be appropriate for use in this project. The GSM MODEM is a specialized MODEM that accepts a SIM card and operates via subscription to a mobile operator just like a mobile phone. The SIM card used in the GSM MODEM is from the wireless carriers such as Safaricom, Airtel or Orange. The GSM MODEM has the following capabilities when used in a system; Reading, writing and deleting of messages Sending of text messages Monitoring the signal strength Reading writing and searching entries in the phonebook The GSM MODEM used in this project is the SIM 900 Mini Wireless Data Transmission Module GSM/GPRS board kit w/antenna. 9

21 The figure 2.3 below shows the GSM MODEM that will be used in this project Figure 2. 3 The GSM MODEM [6] 2.3 Display Unit In this project, the display of the messages/notices is handled by the LCD, an acronym that stands for Liquid Crystal Display. The LCD screen is an output device which enables the messages or notice to be displayed for the intended audience to see it. The display on the screen can be ASCII characters or dot based graphics depending on the message to be displayed. The LCD screen is made up of a layer of pneumatic crystals sandwiched between two layers polarized glass with a perpendicular axis of polarity. The angle of light vibration determines the amount of light that passes through the layers and hence the characters displayed on the LCD. Figure 2.4 shows the internal Structure of the LCD screen Figure 2. 4 Internal structure of the LCD screen [7] 10

22 The electric current supplied to the LCD affect the angle of twist of the liquid crystal hence the amount of light that passes through the LCD. This is how the display of the different characters is achieved using the LCD screen Classification of LCD s There are three criteria with which LCDs are classified by with each criterion resulting in several types of LCDs According to how they are illuminated LCDs can be illuminated either from the back, from an external source or from a combination of the two methods When the pixels of the LCDs are illuminated from behind the monitor screen and the LCD is viewed from the front then the LCD is said to be transmissive. Transmissive LCDs are common in appliances which require high level illumination such as laptop computers and television sets. When the pixels are illuminated from the front of the screen, the same side as the user is said to be a reflective LCD. This type of LCD is suitable for low power consumption applications and is therefore common in digital watches and calculators. This is the type of LCD which is used in this project. When the pixels can either be illuminated from the front or from the back of the screen then the LCD is said to be transflective. The term transflective is used to show that this particular LCD is a combination of both the transmissive and the reflective LCDs. This LCD works either as a reflective or a transmissive LCD depending on the ambient lighting available Colour or Monochrome LCDs In the color LCDs, each pixel contains cells which are red, green or blue. A pixel can have sub pixels each of which contain the three colors which are independently controlled and as a result the LCD is capable of showing millions of colors for each pixel The monochrome LCD is the most commonly used with microcontrollers According to Display Technology Basic on this criterion, LCDs are either alphanumeric or dot addressable. There are three electrode configuration used for this display using the LCD. The alphanumeric type, which uses a matrix composed of linear segments, is most common in microcontroller applications. The seven and sixteen segment electrode configurations as shown below are suitable for small digital devices such as watches and calculators. The dot addressable type is necessary when there is need to display an entire character or for graphical display. This type of LCD has more addressable elements hence its more complex that 11

23 the earlier mentioned LCD. The microcontroller circuits. matrix format LCD display is the most common in The LCD that is used for this project is LCD screen which is shown in Figure 2.5 Figure 2. 5 A 20 by 4 LCD screen [7] 2.4 Power Supply The PIC16F690 used in this project requires a constant +5V voltage to operate and this is supplied by the mains supply. An adapter converts the 240V ac into a 12V dc which is then passed through a voltage regulator circuit to produce a stable 5V dc supply suitable for the working of this project [8] [9]. 2.5 Programming Language and Software This section is divided into two parts; programming language used and the tools/computer software used in the project development Programming Language A programming language is a constructed language designed to communicate instructions to a machine. They are used to create programs that control how a machine functions in different circumstances. This project is done in assembler language. This is a low level programming language for a microcontroller or other programmable device. The assembler language has a very strong association with the architecture of the microcontroller hence a good understanding of the microprocessor architecture is required when programming using assembler [10]. Programming in assembler language has the following advantages: Requires less memory and execution time. Allows hardware specific complex jobs easier Suits time sensitive jobs 12

24 2.5.2 Tools and Computer Software These are the hardware and computer software used during the project in various sections of building the prototype and the eventual finished project. The tool used is the Pickit 3 whereas the software programs used are MPLAB and Proteus MPLAB This is software, developed by Microchip, which gives a platform for the writing and debugging of the assembler language. The MPLAB software is furnished with an IDE which allows the user to develop software of embedded systems. Software for an embedded system is referred to as firmware as it cannot be easily changed and requires special equipment i.e. the programmer to put it on the system it was designed for. The only disadvantage of the MPLAB software is that it was designed PC. A user on Mac, UNIX or Linux systems cannot use MPLAB. This is however not a problem to us because the project was done on a PC [12] Proteus Proteus is simulation software which enables us to see if the code that has been written serves the intended purpose. The Proteus software enables us to draw the circuit of the particular project including all the passive and active components required to make the circuit work. The code for the particular section is input and when the circuit is run, experimental results of the project are obtained. The only disadvantage of using Proteus is that it assumes all the components are ideal and hence the experimental results are not necessary the same as the practical ones. This force the designer to be as close as possible to the experimental results hence a good quality product is obtained [12] Programmer Relating to microcontroller technology, the process by which a program is transferred to a chip is called burning or blowing the chip. A device that burns a program onto a chip is called a programmer. A programmer contains the following components: A software package to run on a PC A cable connecting the PC to the programmer A programmer device In this project the Pickit 3, which is designed specifically for MPLAB and the PIC microcontrollers, was used. 13

25 A photo of the Pickit 3 with its accessories is shown in figure 2.6 Figure 2. 6 Pickit 3 [11] 14

26 CHAPTER 3 DESIGN AND IMPLEMENTATION This section discusses how the wireless Electronic Notice board was designed and implemented using the PIC 16F690. The section is broken down into the: Software module. Hardware module. 3.1 Software Design Software design involves the use of software in the development of the project. The flowchart shown in figure 3.1 outlines the software design procedure that was used to develop this system Figure 3. 1 Software design flowchart 15

27 Software design was divided into four parts namely; the Microcontroller Unit, the LCD screen, the USART functions and the Computer software used The Microcontroller Unit For a microcontroller to function, it has to be connected to peripheral devices which are connected to the ports of the microcontroller. The first thing to do in PIC programming is the initialization of the ports and pin function assignment. Initializing the ports of the PIC microcontroller is done by the use of two Special Function Registers (SFRs); TRIS and PORT. Each port contain a number of pins and for the PIC 16F690 there are three ports A, B and C which contain 6, 4 and 8 pins respectively. A pin can be set, becomes an input, or cleared, becomes an output, depending on what you want to connect to the microcontroller. The block of code below is responsible for the initializing of PORTC which is where the LCD Screen is connected: Bcf STATUS, RP0 Clear PORTC Bsf STATUS, RP0 Clear TRISC Bcf STATUS, RP0 In the above piece of code, the first line selects the bank where the register PORTC is found i.e. Bank0. Clearing the port, done with line two, initializes the port. The third line is responsible for moving to Bank1 where the TRIS register is found, clearing TRIS means all the pins of port are outputs (the direction of data is to the LCD), and finally the last line moves back to the default Bank0. Bits 5 and 6 of the status register are responsible for the bank selection as shown in figure 3.2. Figure 3. 2 The STATUS register [12] 16

28 Using the Status register, the selection of the bank is as shown in the table one below [12] Table 3. 1: Bank Selection RP1 RP0 BANK SELECTED 0 0 Bank0 0 1 Bank1 1 0 Bank2 1 1 Bank3 Similar blocks of codes are written for PORTs A and B depending on the function allocated to each pin. In the project, PORTC has the LCD screen connected in 8-bit mode hence all the 8 pins of PORT C are used up by the LCD. PORT A has the E and RW pins of the LCD and finally PORT B is where the GSM MODEM is connected because the TX and RX pins of the microcontroller are located in this port LCD Screen The LCD is made up of 16 pins which control the working of the unit. There are two pins (labeled A and K) which are responsible for the backlight of the LCD, 8 data pins, D0 to D7, which are connected to PORT C and finally 3 control pins which are connected to PORT A. The working of the LCD makes use three different subroutines, called at different times to perform different tasks. The first subroutine used is the delay, called before anything else in order to allow the LCD to settle after power is supplied to the LCD. The other two subroutines are for sending commands to the LCD and for displaying characters on the screen. The difference between sending commands and sending data to the LCD is due to the state of the RS pin of the LCD. When the pin is cleared, commands are sent to the LCD whereas setting the pin allows data to be transferred to the LCD. The E pin is responsible for latching. The R/W pin is always cleared as the LCD is only used in this project as an output [13]. 17

29 The following table shows LCD commands and how they are used in the LCD initialization Process. Table 3. 2: LCD Instructions Hex value Binary equivalent Description 0x Clear display 0x Set 8-bit, 4 lines, 5x7 matrix 0x0C Display ON, cursor OFF, NO blinking 0x Set first line, Shift 5 spaces to the right 0x0C Second line, shift 3 spaces to the right 0x Third line, Shift 5 spaces to the right 0x0D Forth line, 5 spaces to the right The USART function The GSM MODEM is responsible for the reception of data sent via the GSM Network and converting it to a format which the microcontroller can display via the LCD screen. In the initialization of this module, PORT B is first initialized, the pins of this port are selected such that TX is an output and RX is an input, configure the Internal clock then finally the Baud rate is set [9]. For this project the internal clock is set at 4MHz and this is done by the OSCCON register. The OSCCON register is made up of 3 frequency selection bits (IRCF2, IRCF1 and IRCF0), 2 frequency status bit (HTS and LTS) and 2 system clock control bits (OSTS and SCS) 18

30 Figure 3. 3The OSCCON register [12] The 6 th, 5 th and the 4 th bits are responsible for the calibration of the internal clock and the table below enables the generation of the binary value stored in the OSCCON register [3] [12]. Table 3. 3: Internal Clock setting IRCF2 IRCF1 IRCF0 Frequency MHz MHz MHz MHz MHz MHz MHz MHz Bit 0 of the OSCCON register is set to tell the microprocessor that the internal oscillator is used. The binary value stored in the OSCCON register to effect this configuration is The Baud rate for the working of the GSM MODEM is set at 9600 which is standard for USART functionalities using microcontrollers. The setting of the Baud rate is done by the help of three SFRs; Transmit Status and Control (TXSTA), Baud Rate Control (BAUDCTL) and Serial Port Baud Rate Generator (SPBRG). To set the Baud Rate, the SNYC bit of the TXSTA register is cleared, the BRGH bit and the BRG16 bit both of the BAUDCTL register are set. Using the value calibrated for the internal clock and the formulae below, the baud rate is set and that value saved in the SPBRG register. 19

31 The following equations are used in the calculation and setting of the Baud Rate [3] [12] Eq. 3.1 Eq. 3.2 Eq. 3.3 Using these formulae and the table below the baud rate of 9600 was set using the decimal value 25 which was sent to the SPBRG register [3] [12]. Table 3. 4: Baud Rate setting [12] Interrupts are used to receive and display the incoming message on the LCD. The INTCON register is responsible for the initialization of the ISRs Figure 3. 4 The INTCON Register [12] 20

32 Bits 7 (GIE) and bit 6 (PEIE) of the INTCON register are set to enable interrupts from peripheral devices, in this case the GSM MODEM. Once peripheral interrupts are set, it is necessary to specify the nature of the interrupt which is done using the PIE1 register. Figure 3. 5 The PIE1 Register [12] Setting the fifth bit (RCIE) of the PIE1 register results in any incoming message register as an interrupt prompting the ISR subroutine to execute. All incoming messages were stored in the RCSTA which sends them to the RCREG registered and from there the LCD subroutines were used to send the contents of this register to the Screen Computer Software Used The code for the microcontroller and how the peripherals are connected to each other was written, cleaned and build in the MPLAB software. In this environment, the code is written either in assembler or in C because MPLAB has compilers for both these languages. For this project, only assembler was used and the eventual code was saved as.asm file which is a file extension associated with assembler code. When the assembler code is compiled, a Hex file is generated. The Proteus software is where the simulated circuit is drawn using ideal components. The Hex file produced from compiling is loaded to the PIC microcontroller and the system is run. Once the system is run successfully on Proteus, it can now be transferred onto a breadboard. 21

33 3.2 Hardware Implementation The block diagram for the hardware implementation is shown in figure 3.6. Figure 3. 6 Block Diagram of the Project The hardware section can be subdivided into; the display unit, the GSM MODEM Connections, the power supply and the microcontroller LCD Connections The data pins of the LCD module are connected to PORT C of the microcontroller whereas the command lines are connected to PORT A. the R/W pin is grounded because the LCD is always the output and never an input in this project [14]. 22

34 The exact connections between the LCD and the PIC microcontroller are tabulated here: Table 3. 5: LCD pin Connections LCD Terminal PIC Terminal (pin number) Description DO RC0 (16) Data pin D1 RC1 (15) Data pin D2 RC2 (14) Data pin D3 RC3 (7) Data pin D4 RC4 (6) Data pin D5 RC5 (5) Data pin D6 RC6 (8) Data pin D7 RC7 (9) Data pin RS RA5 (2) Control Pin E RA1 (19) Control Pin R/W GND (20) Control pin V DD 5V (1) Power V SS GND (20) Power V O Connected to POT Display contrast Control A 5V (1) Backlight Control K GND (20) Backlight Control GSM connections The GSM MODEM is connected to PORT B of the microcontroller because the TX and RX pins of the microcontroller are located in this port. The TX terminal of the GSM MODEM is connected to the RX pin of the microcontroller. From the TX pin of the GSM MODEM, the incoming message arrives at the RX pin (pin 12) as a voltage which is about 3V. This voltage is registered by the microcontroller as logic LOW and therefore nothing is received. To correct 23

35 this, GSM is connected to the PIC through a level shifter circuit which is responsible for raising the voltage of the incoming voltage to 5V. The level shifter circuit is shown in figure 3.7 below. Figure 3. 7 Level Shifter Circuit [15] PIC connections The pin diagram of the 16F690 is shown in figure 3.8 below Figure 3. 8 Pin Diagram of the Microcontroller [3] The pins used in connecting the microcontroller to the peripherals are as described below. Pins 1 and 20 of the microcontroller are V DD and V SS respectively where the V DD supplies the 5V required to power the PIC and the V SS is the Ground connection for the PIC. The data pins of the LCD screen are connected to PORTC of the microcontroller. These pins are denoted as RC0 to RC7 and their pin numbers are as indicated on the pin diagram of the 24

36 PIC16F690 shown in figure 3.8. The control pins of the LCD are connected on PORTA of the microcontroller with E terminal of the LCD connected to pin 18 of the PIC and the RS terminal connected to pin 2 of the PIC. The R/W terminal of the LCD is grounded because we are always writing to the LCD and never reading from the screen. The LCD receives its power from the V DD and the V SS terminals which are connected to pins 1 and 20 respectively. The GSM MODEM is connected to PORTB of the PIC microcontroller. The microcontroller is receiving from the GSM MODEM and as a result the TX pin of the MODEM is connected to the RX pin of the PIC (pin 12) The Power Supply Unit The microcontroller and the LCD screen require a stable V DD of 5V so as to operate. The GSM MODEM on the other hand requires a minimum of 4V and can work with up to 5.5 volts. To supply the PIC and the LCD, a dc voltage of 12V is passed through a regulator circuit to achieve a stable output of 5V. The 78L05 regulator circuit shown below is responsible for the stable 5V output. Figure 3. 9 Voltage Stabilizer Circuit [9] This 5V output is used to power both the LCD and the PIC microcontroller. This voltage was also used in the level shifter circuit as the V DD. The GSM MODEM has its own voltage regulator circuit which gives out a stable 4V output suitable for the MODEM. 25

37 CHAPTER 4 RESULTS AND ANALYSIS This chapter shows the results of the projects and analysis of the results is also presented. This section takes a look at the simulated and practical results of the project. This chapter is divided into three sections; Startup display, GSM general message display and authorized message display. 4.1 Startup Display When the notice board is powered the following message is seen Figure 4. 1 Proteus Simulation Figure 4. 2 Practical Result 26

38 The practical result for the first part of this project was as expected and is also consistent with the simulated result. 4.2 GSM Message Display When the message Hello! is sent from the phone to the number specified by the on the welcome screen. The results are The first part of the code is the sender of the text, in this case the number , the next line show the date when the text was sent, the time the text was sent is on the third line then the sent text is on the last line 27

39 CHAPTER 5 CONCLUSION AND RECOMMENDATIONS 5.1 Conclusions This was accomplished with some difficulties especially time and the availability of the components. The wireless e notice board was implemented using the GSM modem which made it possible to display texts which were sent from a mobile phone using the GSM network. The GSM modem does not filter the contents sent to it and hence the displayed message contains the sender s number, some at commands and some other information. The phone processors are able to filter this information so that the displayed text is precisely what the recipient needs to see. The simulation of the project was achieved using the Proteus software and the GSM messages were simulated using terminal v.9. It was not possible to simulate the entire project working in Proteus as the GSM modem is unavailable as a component in Proteus. This explains why the first part of the results only show a message printed on the screen. The terminal software models the working of the GSM modem and was therefore used for the second part. 5.2 Realization on larger Screen To realize this e-notice board on a bigger and more economical TFT screen is another microcontroller with a higher pin count should to be used. The PIC 16f690 has 18 I/O pins while a 128 by 64 LCD, which is slightly bigger and has graphic capabilities, has 15 data pins. This leaves 3 pins which are not enough for the control pins and any other peripherals. For larger screens more data and control pins are required. With a higher pin count MCU and a larger screen, a higher level programming language will be required because it will be friendlier to use. The higher programming language will enable pictures and videos to be displayed. In a higher level language, picture and video compression is easier than if it was to be done in assembler. Video and picture compression enables files of large sizes to be sent cheaply and also increase the processing time of the MCU being used. 28

40 5.3 Recommendations With assembler language, the amount of material being sent to the screen from the GSM modem is a lot and most of it is irrelevant to the target audience. When a higher level language is used the content can be edited to be precise as possible. The display unit used in this project is a 20 by 4 LCD screen and this does not allow for graphic changes and picture to be displayed. For future work of a similar project, a bigger screen should be used so display is not limited to text messages only. 29 the GSM modem has other functionalities that can be used to make the notice board more functional. For example the GSM modem has the capacity to read and write messages, delete messages from the SIM card and it can also make and receive calls. Future works should explore these functions. 29

41 30

42 BIBLIOGRAPHY [1] M. Joshi, "EnTcians," Students of E&TC, 25 July [Online]. Available: electromate.blogspot.com/2013/07/classification-of-microcontrollers.html. [Accessed 17 February 2015]. [2] T. Wilmhurst, Designing Embedded Systems with PIC Microcontrollers: Principles and applications, Oxford: Elsevier, [3] PIC16F631/677/685/687/689/690 Datasheet, USA: Microchip Technology, [4] J. Morton, The PIC microcontroller: Your personal introductory course, Oxford: Jordan Hill, [5] M. Bates, PIC Microcontroller: An introductin to Microelectronics, Oxford: Elsevier, [6] "Ali Express," [Online]. Available: m.aliexpress.com/item/ html?tracelog=storedetail2mobilesitedetail. [Accessed 18 February 2015]. [7] "Electronic Experimental Solutions," [Online]. Available: [Accessed 17 February 2015]. [8] D. Ibrahim, PIC basic Projects: 30 projects using PICBASIC and PICBASIC PRO, Oxford: Elservier, [9] C. P. Sanchez.J, Microcrontroller Programming; The Microchip PIC, London: CRC Press, [10] Michael.A.Covington, PIC Assembly language for the complete beginner, Athens: Gernsback publications, [11] "Ali Express," [Online]. Available: m.aliexpress.com/item/ html?tracelog=storedetail2mobilesitedetail. [Accessed 18 February 2015]. [12] M. Verle, PIC Microcontrollers, Mikroelectronika. [13] "PIC Tutorial Three- LCD modules," Winpicprog, june [Online]. Available: [Accessed 12 March 2015]. 31

43 [14] M. Bates, Interfacing PIC microcontrollers: Embedded design by interactive simulation, Oxford: Elsevier, [15] "SIM 900 modules," in SIM 900 datasheet. [16] D. W. Smith, PIC in Practice: A Project based Approach, oxford: elsevier, [17] "saving energy forcomputer monitors," [Online]. Available: office_is03_e.html. [Accessed 17 February 2015]. 32

44 APPENDIX A. Microcontroller code ;==================================================================== ; PROJECT NUMBER: 6 ; MICROCONTROLLER BASED ANEMOMETER ;==================================================================== ; CODED BY: Dennis ; REG NO: F17/1353/2010 ;========================================================= ; fuses ;=========================================================== radix hex include "P16F690.INC" config _CP_OFF & _WDT_OFF & _BOR_ON & _PWRTE_ON &_INTRC_OSC_NOCLKOUT &_MCLRE_OFF errorlevel -302;surpress bank error messages ;==================================================================== ; VARIABLE DECLARATIONS ;========================================================================= passcode ENDC CBLOCK 0X20 Timer Timer_X ORG 0x0000 ; Programstorage starting at address 0x0000 in program memory GOTO START send_lcd:; sending commands to the LCD movwf PORTC bcf PORTA,5 bsf PORTA,1 33

45 bcf PORTA,1 call delay10ms return Data_Write:; writing Characters to the lcd movwf PORTC bsf PORTA,5 bsf PORTA,1 bcf PORTA,1 call delay10ms return One_ms:; delay of one milisecond movlw 0XF9 movwf Timer Xms: movwf Timer_X LOOPX: call One_ms decfsz Timer_X,F goto LOOPX return delay: movlw 0XFA call Xms return START: ;Initialising the Registers: clrf PORTA;initialize porta clrf clrf PORTB;initialize portb PORTC;initialize portc clrf STATUS; return to bank 0 34

46 bsf bcf STATUS, OPTION_REG,7; pull up resistor are set clrf TRISB; set port as all zeros bsf TRISB,5 ;set bit 5 as a 1 ; to enable the serial port clear sync bit of TXSTA and set the SPEN bit of CLRF TRISC ;PORTC set for outputs clrf TRISA; set pins port as output banksel ANSEL ;go to bank 3 clrf ANSEL; set pins as digital clrf ANSELH;set pins as digital bcf STATUS,RP0; move back to bank0 ;enable interrupts ;set internal oscillator at 8Mhz bcf STATUS,RP0 bsf STATUS,RP0 ; move to bank 1 movlw b' '; value for setting internal Clock movwf OSCCON; send set value to OSCCON register bcf STATUS,RP0;back to bank 0 ;Set baud rate at 9600 BSF STATUS, RP0 ;select bank 1 MOVLW d'25' ; Mhz Fosc err MOVWF SPBRG MOVLW b' ' ;brgh = 1 MOVWF TXSTA ;enable Async Transmission, set brgh BCF STATUS, RP0 ;select bank 0 MOVLW b' ' MOVWF RCSTA ;enable Async Reception ;LCD SET_UP CLRF STATUS;BANK0 selected MOVLW 0X14 35

47 CALL Xms ;20ms time delay allows LCD to complete initialisation process. MOVLW 0x01 ;Display clear command CALL send_lcd MOVLW 0x38 CALL send_lcd;lcd set for 8-bit, 2-Line,5x8 dot matrix display. MOVLW 0x0c CALL send_lcd ;Display on,cursor off, no Blinking. MOVLW 0x04 CALL send_lcd MOVLW 0x01 CALL send_lcd;display cleared,ddram address=0 MOVLW 0x85 CALL send_lcd ;DDRAM address set to 0 ;WELCOME message sent to screen movlw 0x57 ;'w' call Data_Write movlw 0x45 ;'E' call Data_Write movlw 0x4C ;'L' call Data_Write movlw 0x43 ;'C' call Data_Write movlw 0x4F ;'O' call Data_Write movlw 0x4D ;'M' call Data_Write movlw 0x45 ;'E' call Data_Write movlw 0x21 ;'!' call Data_Write 36

48 Line1:;move to line 2 movlw 0X0C3 call send_lcd movlw 0X54 ; T call Data_Write ; movlw 0X4F ;O call Data_Write ; movlw 0X20 ; SPACE call Data_Write ; movlw 0X44 ; D call Data_Write ; movlw 0X49 ; I call Data_Write ; movlw 0X53 ; S call Data_Write movlw 0X50 ; P call Data_Write; movlw 0X4C ; L call Data_Write ; movlw 0X41 ; A call Data_Write ; movlw 0X59 ; Y call Data_Write ; movlw 0x20 ; Space call Data_Write movlw 0x48 ;H call Data_Write movlw 0x45 ; E call Data_Write movlw 0x52 ;R 37

49 call Data_Write movlw 0x45 ;E call Data_Write ;third line movlw 0X099; COMMAND TO MOVE TO THIRD LINE call send_lcd movlw 0X54 ; T call Data_Write movlw 0X45 ; E call Data_Write movlw 0X58 ; X call Data_Write movlw 0x54 ; T call Data_Write ; forth line movlw 0X0D7; lcd command to move to line4 call send_lcd movlw 0X30 ; 0 call Data_Write ; movlw 0X37 ;7 call Data_Write ; movlw 0X31 ; 1 call Data_Write ; movlw 0X39 ; 9 call Data_Write ; movlw 0X33 ; 3 call Data_Write ; movlw 0X39 ; 9 call Data_Write ; movlw 0X33 ; 3 38

50 call Data_Write ; movlw 0X32 ; 2 call Data_Write movlw 0X31 ; 1 call Data_Write movlw 0X32 ; 2 call Data_Write movlw d'100';delay call LOOPX movlw d'100';wait call LOOPX movlw d'100'; wait call LOOPX movlw d'100'; wait call LOOPX LOOP: call Rcv_RS232 ; function to receive from GSM goto LOOP;recheck the above function XMIT_RS232: ;transmitting btfss PIR1, TXIF ;xmit buffer empty? GOTO XMIT_RS232 ;no, wait MOVWF TXREG ;now send Rcv_RS232: RETURN BTFSS PIR1, RCIF ; check for received data GOTO Rcv_RS232 39

51 MOVF RCREG, W; move received data to RCREG CALL Data_Write RETURN END; end of entire program 40

52 B. PIC16f690 Internal Architecture Appendix Figure 1. 1 Internal Architecture of PIC16F690 [3] 41

53 C. Circuit Diagram 42

Embedded Systems Programming and Architectures

Embedded Systems Programming and Architectures Embedded Systems Programming and Architectures Lecture No 10 : Data acquisition and data transfer Dr John Kalomiros Assis. Professor Department of Post Graduate studies in Communications and Informatics

More information

Chapter 10 Sections 1,2,9,10 Dr. Iyad Jafar

Chapter 10 Sections 1,2,9,10 Dr. Iyad Jafar Starting with Serial Chapter 10 Sections 1,2,9,10 Dr. Iyad Jafar Outline Introduction Synchronous Serial Communication Asynchronous Serial Communication Physical Limitations Overview of PIC 16 Series The

More information

Hi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan

Hi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan PIC18 Serial Port Hi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan chanhl@mail.cgu.edu.twcgu Serial vs. parallel data transfer 2 Simplex, half-, and full-duplex transfers 3

More information

DERTS Design Requirements (1): Microcontroller Architecture & Programming

DERTS Design Requirements (1): Microcontroller Architecture & Programming Lecture (5) DERTS Design Requirements (1): Microcontroller Architecture & Programming Prof. Kasim M. Al-Aubidy Philadelphia University 1 Lecture Outline: Features of microcomputers and microcontrollers.

More information

Experiment 7:The USART

Experiment 7:The USART University of Jordan Faculty of Engineering and Technology Department of Computer Engineering Embedded Systems Laboratory 0907334 7 Experiment 7:The USART Objectives Introduce the USART module of the PIC

More information

Lesson 14. Title of the Experiment: Introduction to Microcontroller (Activity number of the GCE Advanced Level practical Guide 27)

Lesson 14. Title of the Experiment: Introduction to Microcontroller (Activity number of the GCE Advanced Level practical Guide 27) Lesson 14 Title of the Experiment: Introduction to Microcontroller (Activity number of the GCE Advanced Level practical Guide 27) Name and affiliation of the author: N W K Jayatissa Department of Physics,

More information

CHAPTER 1 - World of microcontrollers

CHAPTER 1 - World of microcontrollers CHAPTER 1 - World of microcontrollers One Time Programmable ROM (OTP ROM) One time programmable ROM enables you to download a program into it, but, as its name states, one time only. If an error is detected

More information

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers Lecture (4) Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers Prof. Kasim M. Al-Aubidy Philadelphia University-Jordan DERTS-MSc, 2015 Prof. Kasim Al-Aubidy 1 Lecture Outline:

More information

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad Objectives To be familiar with microcontrollers, PIC18F4550 microcontroller. Tools PIC18F4550 Microcontroller, MPLAB software,

More information

PIC 16F84A programming (II)

PIC 16F84A programming (II) Lecture (05) PIC 16F84A programming (II) Dr. Ahmed M. ElShafee ١ Introduction to 16F84 ٣ PIC16F84 belongs to a class of 8-bit microcontrollers of RISC architecture. Program memory (FLASH) EEPROM RAM PORTA

More information

University of Jordan Faculty of Engineering and Technology Department of Computer Engineering Embedded Systems Laboratory

University of Jordan Faculty of Engineering and Technology Department of Computer Engineering Embedded Systems Laboratory University of Jordan Faculty of Engineering and Technology Department of Computer Engineering Embedded Systems Laboratory 0907334 6 Experiment 6:Timers Objectives To become familiar with hardware timing

More information

ME 515 Mechatronics. A microprocessor

ME 515 Mechatronics. A microprocessor ME 515 Mechatronics Microcontroller Based Control of Mechanical Systems Asanga Ratnaweera Department of Faculty of Engineering University of Peradeniya Tel: 081239 (3627) Email: asangar@pdn.ac.lk A microprocessor

More information

EET203 MICROCONTROLLER SYSTEMS DESIGN Serial Port Interfacing

EET203 MICROCONTROLLER SYSTEMS DESIGN Serial Port Interfacing EET203 MICROCONTROLLER SYSTEMS DESIGN Serial Port Interfacing Objectives Explain serial communication protocol Describe data transfer rate and bps rate Describe the main registers used by serial communication

More information

Figure 1.1: Some embedded device. In this course we shall learn microcontroller and FPGA based embedded system.

Figure 1.1: Some embedded device. In this course we shall learn microcontroller and FPGA based embedded system. Course Code: EEE 4846 International Islamic University Chittagong (IIUC) Department of Electrical and Electronic Engineering (EEE) Course Title: Embedded System Sessional Exp. 1: Familiarization with necessary

More information

ME 6405 Introduction to Mechatronics

ME 6405 Introduction to Mechatronics ME 6405 Introduction to Mechatronics Fall 2006 Instructor: Professor Charles Ume Microchip PIC Manufacturer Information: Company: Website: http://www.microchip.com Reasons for success: Became the hobbyist's

More information

Input/Output Ports and Interfacing

Input/Output Ports and Interfacing Input/Output Ports and Interfacing ELEC 330 Digital Systems Engineering Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning Basic I/O Concepts Peripherals such as LEDs and keypads are essential

More information

Dept. of Computer Engineering Final Exam, First Semester: 2016/2017

Dept. of Computer Engineering Final Exam, First Semester: 2016/2017 Philadelphia University Faculty of Engineering Course Title: Embedded Systems (630414) Instructor: Eng. Anis Nazer Dept. of Computer Engineering Final Exam, First Semester: 2016/2017 Student Name: Student

More information

Laboratory 10. Programming a PIC Microcontroller - Part II

Laboratory 10. Programming a PIC Microcontroller - Part II Laboratory 10 Programming a PIC Microcontroller - Part II Required Components: 1 PIC16F88 18P-DIP microcontroller 1 0.1 F capacitor 3 SPST microswitches or NO buttons 4 1k resistors 1 MAN 6910 or LTD-482EC

More information

INDUSTRIAL TRAINING:6 MONTHS PROGRAM TEVATRON TECHNOLOGIES PVT LTD

INDUSTRIAL TRAINING:6 MONTHS PROGRAM TEVATRON TECHNOLOGIES PVT LTD MODULE-1 C Programming Language Introduction to C Objectives of C Applications of C Relational and logical operators Bit wise operators The assignment statement Intermixing of data types type conversion

More information

ELCT 912: Advanced Embedded Systems

ELCT 912: Advanced Embedded Systems ELCT 912: Advanced Embedded Systems Lecture 10: Applications for Programming PIC18 in C Dr. Mohamed Abd El Ghany, Department of Electronics and Electrical Engineering Programming the PIC18 to transfer

More information

Lecture (04) PIC16F84A (3)

Lecture (04) PIC16F84A (3) Lecture (04) PIC16F84A (3) By: Dr. Ahmed ElShafee ١ Central Processing Unit Central processing unit (CPU) is the brain of a microcontroller responsible for finding and fetching the right instruction which

More information

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor 1 2 A microprocessor is a single, very-large-scale-integration (VLSI) chip that contains many digital circuits that perform arithmetic, logic, communication, and control functions. When a microprocessor

More information

ﻢﯿﺣﺮﻟا ﻦﻤﺣﺮﻟا ﷲا ﻢﺴﺑ

ﻢﯿﺣﺮﻟا ﻦﻤﺣﺮﻟا ﷲا ﻢﺴﺑ بسم االله الرحمن الرحیم In the name of Allah 1 2 Graphical LCD for beginners and interfacing with PIC MCU By Eng. Mustafa H. Abyad Cairo, Egypt March 2009 Table of contents 3 Table of contents. 3 1. Introduction

More information

Chapter 11: Interrupt On Change

Chapter 11: Interrupt On Change Chapter 11: Interrupt On Change The last two chapters included examples that used the external interrupt on Port C, pin 1 to determine when a button had been pressed. This approach works very well on most

More information

Midrange 8b PIC Microcontrollers. ECE Senior Design 14 February 2017

Midrange 8b PIC Microcontrollers. ECE Senior Design 14 February 2017 Midrange 8b PIC Microcontrollers ECE Senior Design 14 February 2017 Harvard vs. Von Neumann Harvard Architecture Program Memory 14-bit Bus CPU 8-bit Bus Data Memory Harvard architecture Separate busses

More information

Embedded Systems. PIC16F84A Internal Architecture. Eng. Anis Nazer First Semester

Embedded Systems. PIC16F84A Internal Architecture. Eng. Anis Nazer First Semester Embedded Systems PIC16F84A Internal Architecture Eng. Anis Nazer First Semester 2017-2018 Review Computer system basic components? CPU? Memory? I/O? buses? Instruction? Program? Instruction set? CISC,

More information

Weekly Report: Interactive Wheel of Fortune Week 4 02/014/07-02/22/07 Written by: Yadverinder Singh

Weekly Report: Interactive Wheel of Fortune Week 4 02/014/07-02/22/07 Written by: Yadverinder Singh Work Completed: Weekly Report: Interactive Wheel of Fortune Week 4 02/014/07-02/22/07 Written by: Yadverinder Singh Last week started with the goal to complete writing the overall program for the game.

More information

1 Introduction to Computers and Computer Terminology Programs Memory Processor Data Sheet Example Application...

1 Introduction to Computers and Computer Terminology Programs Memory Processor Data Sheet Example Application... Overview of the PIC 16F648A Processor: Part 1 EE 361L Lab 2.1 Last update: August 19, 2011 Abstract: This report is the first of a three part series that discusses the features of the PIC 16F684A processor,

More information

PIC Discussion. By Eng. Tamar Jomaa

PIC Discussion. By Eng. Tamar Jomaa PIC Discussion By Eng. Tamar Jomaa Chapter#2 Programming Microcontroller Using Assembly Language Quiz#1 : Time: 10 minutes Marks: 10 Fill in spaces: 1) PIC is abbreviation for 2) Microcontroller with..architecture

More information

Computer Hardware Requirements for Real-Time Applications

Computer Hardware Requirements for Real-Time Applications Lecture (4) Computer Hardware Requirements for Real-Time Applications Prof. Kasim M. Al-Aubidy Computer Engineering Department Philadelphia University Real-Time Systems, Prof. Kasim Al-Aubidy 1 Lecture

More information

Section 21. Addressable USART

Section 21. Addressable USART 21 Section 21. Addressable USART Addressable USART HIGHLIGHTS This section of the manual contains the following major topics: 21.1 Introduction... 21-2 21.2 Control Registers... 21-3 21.3 USART Baud Rate

More information

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR. ELECTRONICS & COMMUNICATION DEPARTMENT Question Bank- 1

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR. ELECTRONICS & COMMUNICATION DEPARTMENT Question Bank- 1 SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR ELECTRONICS & COMMUNICATION DEPARTMENT Question Bank- 1 Subject: Microcontroller and Interfacing (151001) Class: B.E.Sem V (EC-I & II) Q-1 Explain RISC

More information

PIC Microcontroller Introduction

PIC Microcontroller Introduction PIC Microcontroller Introduction The real name of this microcontroller is PICmicro (Peripheral Interface Controller), but it is better known as PIC. Its first ancestor was designed in 1975 by General Instruments.

More information

Physics 335 Intro to MicroControllers and the PIC Microcontroller

Physics 335 Intro to MicroControllers and the PIC Microcontroller Physics 335 Intro to MicroControllers and the PIC Microcontroller May 4, 2009 1 The Pic Microcontroller Family Here s a diagram of the Pic 16F84A, taken from Microchip s data sheet. Note that things are

More information

LABORATORY MANUAL Interfacing LCD 16x2, Keypad 4x4 and 7Segment Display to PIC18F4580

LABORATORY MANUAL Interfacing LCD 16x2, Keypad 4x4 and 7Segment Display to PIC18F4580 LABORATORY MANUAL Interfacing LCD 16x2, Keypad 4x4 and 7Segment Display to PIC18F458 1. OBJECTIVES: 1.1 To learn how to interface LCD 16x2, Keypad 4x4 and 7Segment Display to the microcontroller. 1.2 To

More information

Flow Charts and Assembler Programs

Flow Charts and Assembler Programs Flow Charts and Assembler Programs Flow Charts: A flow chart is a graphical way to display how a program works (i.e. the algorithm). The purpose of a flow chart is to make the program easier to understand.

More information

ELE492 Embedded System Design

ELE492 Embedded System Design Overview ELE9 Embedded System Design Examples of Human I/O Interfaces Types of System Interfaces Use of standards RS Serial Communication Overview of SPI, I C, L, and CAN Class //0 Eugene Chabot Examples

More information

Serial Communication

Serial Communication Serial Communication What is serial communication? Basic Serial port operation. Classification of serial communication. (UART,SPI,I2C) Serial port module in PIC16F887 IR Remote Controller Prepared By-

More information

Mechatronics and Measurement. Lecturer:Dung-An Wang Lecture 6

Mechatronics and Measurement. Lecturer:Dung-An Wang Lecture 6 Mechatronics and Measurement Lecturer:Dung-An Wang Lecture 6 Lecture outline Reading:Ch7 of text Today s lecture: Microcontroller 2 7.1 MICROPROCESSORS Hardware solution: consists of a selection of specific

More information

Laboratory: Introduction to Mechatronics

Laboratory: Introduction to Mechatronics Laboratory: Introduction to Mechatronics Instructor TA: Edgar Martinez Soberanes (eem370@mail.usask.ca) 2017-02-9 Lab 3. LED Control and Interruptions. Lab Sessions Lab 1. Introduction to the equipment

More information

1 Introduction to Computers and Computer Terminology Programs Memory Processor Data Sheet... 4

1 Introduction to Computers and Computer Terminology Programs Memory Processor Data Sheet... 4 Overview of the PIC 16F648A Processor: Part 1 EE 361L Lab 2.1 Last update: August 1, 2016 Abstract: This report is the first of a three part series that discusses the features of the PIC 16F648A processor,

More information

ECE 354 Introduction to Lab 1. February 5 th, 2003

ECE 354 Introduction to Lab 1. February 5 th, 2003 ECE 354 Introduction to Lab 1 February 5 th, 2003 Lab 0 Most groups completed Lab 0 IDE Simulator Questions? ICD Questions? What s the difference? ECE 354 - Spring 2003 2 Addition to Honesty Policy It

More information

Outlines. PIC Programming in C and Assembly. Krerk Piromsopa, Ph.D. Department of Computer Engineering Chulalongkorn University

Outlines. PIC Programming in C and Assembly. Krerk Piromsopa, Ph.D. Department of Computer Engineering Chulalongkorn University PIC ming in C and Assembly Outlines Microprocessor vs. MicroController PIC in depth PIC ming Assembly ming Krerk Piromsopa, Ph.D. Department of Computer Engineering Chulalongkorn University Embedded C

More information

Bolt 18F2550 System Hardware Manual

Bolt 18F2550 System Hardware Manual 1 Bolt 18F2550 System Hardware Manual Index : 1. Overview 2. Technical specifications 3. Definition of pins in 18F2550 4. Block diagram 5. FLASH memory Bootloader programmer 6. Digital ports 6.1 Leds and

More information

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100) (Revision-10) FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100) PART-A (Maximum marks : 10) I. Answer all

More information

Embedded Systems. PIC16F84A Sample Programs. Eng. Anis Nazer First Semester

Embedded Systems. PIC16F84A Sample Programs. Eng. Anis Nazer First Semester Embedded Systems PIC16F84A Sample Programs Eng. Anis Nazer First Semester 2017-2018 Development cycle (1) Write code (2) Assemble / compile (3) Simulate (4) Download to MCU (5) Test Inputs / Outputs PIC16F84A

More information

eip-24/100 Embedded TCP/IP 10/100-BaseT Network Module Features Description Applications

eip-24/100 Embedded TCP/IP 10/100-BaseT Network Module Features Description Applications Embedded TCP/IP 10/100-BaseT Network Module Features 16-bit Microcontroller with Enhanced Flash program memory and static RAM data memory On board 10/100Mbps Ethernet controller, and RJ45 jack for network

More information

EXPERIMENT 4: Parallel Input/Output. Objectives Introduction to the Parallel Input/Output (I/O) Familiarization to Interfacing

EXPERIMENT 4: Parallel Input/Output. Objectives Introduction to the Parallel Input/Output (I/O) Familiarization to Interfacing EXPERIMENT 4: Parallel Input/Output Objectives Introduction to the Parallel Input/Output (I/O) Familiarization to Interfacing Components' List: 1. Protoboard 2. 4 x pushbutton 3. 4 x 330Ω resistor 4. 4

More information

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Ali Karimpour Associate Professor Ferdowsi University of Mashhad AUTOMATIC CONTROL SYSTEMS Ali Karimpour Associate Professor Ferdowsi University of Mashhad Main reference: Christopher T. Kilian, (2001), Modern Control Technology: Components and Systems Publisher: Delmar

More information

Basics of UART Communication

Basics of UART Communication Basics of UART Communication From: Circuit Basics UART stands for Universal Asynchronous Receiver/Transmitter. It s not a communication protocol like SPI and I2C, but a physical circuit in a microcontroller,

More information

APPLICATION NOTE 2361 Interfacing an SPI-Interface RTC with a PIC Microcontroller

APPLICATION NOTE 2361 Interfacing an SPI-Interface RTC with a PIC Microcontroller Maxim/Dallas > App Notes > REAL-TIME CLOCKS Keywords: DS1305, SPI, PIC, real time clock, RTC, spi interface, pic microcontroller Aug 20, 2003 APPLICATION NOTE 2361 Interfacing an SPI-Interface RTC with

More information

Module 2: Introduction to AVR ATmega 32 Architecture

Module 2: Introduction to AVR ATmega 32 Architecture Module 2: Introduction to AVR ATmega 32 Architecture Definition of computer architecture processor operation CISC vs RISC von Neumann vs Harvard architecture AVR introduction AVR architecture Architecture

More information

Robotics Training Module ABLab Solutions

Robotics Training Module ABLab Solutions Robotics Training Module ABLab Solutions www.ablab.in Table of Contents Course Outline... 4 Introduction to Robotics... 4 Overview of Basic Electronic... 4 Overview of Digital Electronic... 4 Power Supply...

More information

EEE111A/B Microprocessors

EEE111A/B Microprocessors EEE111A/B Microprocessors Revision Notes Lecture 1: What s it all About? Covers the basic principles of digital signals. The intelligence of virtually all communications, control and electronic devices

More information

Serial Communications

Serial Communications April 2014 7 Serial Communications Objectives - To be familiar with the USART (RS-232) protocol. - To be able to transfer data from PIC-PC, PC-PIC and PIC-PIC. - To test serial communications with virtual

More information

Embedded System Design

Embedded System Design ĐẠI HỌC QUỐC GIA TP.HỒ CHÍ MINH TRƯỜNG ĐẠI HỌC BÁCH KHOA KHOA ĐIỆN-ĐIỆN TỬ BỘ MÔN KỸ THUẬT ĐIỆN TỬ Embedded System Design : Microcontroller 1. Introduction to PIC microcontroller 2. PIC16F84 3. PIC16F877

More information

CHAPTER 6 CONCLUSION AND SCOPE FOR FUTURE WORK

CHAPTER 6 CONCLUSION AND SCOPE FOR FUTURE WORK 134 CHAPTER 6 CONCLUSION AND SCOPE FOR FUTURE WORK 6.1 CONCLUSION Many industrial processes such as assembly lines have to operate at different speeds for different products. Process control may demand

More information

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Ali Karimpour Associate Professor Ferdowsi University of Mashhad AUTOMATIC CONTROL SYSTEMS Ali Karimpour Associate Professor Ferdowsi University of Mashhad Main reference: Christopher T. Kilian, (2001), Modern Control Technology: Components and Systems Publisher: Delmar

More information

THE UNIVERSITY OF THE WEST INDIES

THE UNIVERSITY OF THE WEST INDIES THE UNIVERSITY OF THE WEST INDIES EXAMINATIONS OF MOCK 2004 Code and Name of Course: EE25M Introduction to Microprocessors Paper: Date and Time: Duration: Three Hours INSTRUCTIONS TO CANDIDATES: This paper

More information

Programming 8-bit PIC Microcontrollers in С

Programming 8-bit PIC Microcontrollers in С Programming 8-bit PIC Microcontrollers in С with Interactive Hardware Simulation Martin P. Bates älllllltlilisft &Щ*лЛ AMSTERDAM BOSTON HEIDELBERG LONDON ^^Ш NEW YORK OXFORD PARIS SAN DIEGO SAN FRANCISCO

More information

Introduction to 8051 microcontrollers

Introduction to 8051 microcontrollers Introduction to 8051 microcontrollers Posted on May 7, 2008, by Ibrahim KAMAL, in Micro-controllers, tagged This tutorial is specially tailored to electronics and robotics hobbyists that have already realized

More information

Learning Objectives:

Learning Objectives: Topic 5.2.1 PIC microcontrollers Learning Objectives: At the end of this topic you will be able to; Recall the architecture of a PIC microcontroller, consisting of CPU, clock, data memory, program memory

More information

Introduction to Microcontrollers

Introduction to Microcontrollers Introduction to Microcontrollers Embedded Controller Simply an embedded controller is a controller that is embedded in a greater system. One can define an embedded controller as a controller (or computer)

More information

Outline. Micriprocessor vs Microcontroller Introduction to PIC MCU PIC16F877 Hardware:

Outline. Micriprocessor vs Microcontroller Introduction to PIC MCU PIC16F877 Hardware: HCMIU - DEE Subject: ERTS RISC MCU Architecture PIC16F877 Hardware 1 Outline Micriprocessor vs Microcontroller Introduction to PIC MCU PIC16F877 Hardware: Program Memory Data memory organization: banks,

More information

BASIC INTERFACING CONCEPTS

BASIC INTERFACING CONCEPTS Contents i SYLLABUS UNIT - I 8085 ARCHITECTURE Introduction to Microprocessors and Microcontrollers, 8085 Processor Architecture, Internal Operations, Instructions and Timings, Programming the 8085-Introduction

More information

DEV-1 HamStack Development Board

DEV-1 HamStack Development Board Sierra Radio Systems DEV-1 HamStack Development Board Reference Manual Version 1.0 Contents Introduction Hardware Compiler overview Program structure Code examples Sample projects For more information,

More information

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform.

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform. Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform www.sierraradio.net www.hamstack.com Topics Introduction Hardware options Software development HamStack project

More information

The University of Texas at Arlington Lecture 21_Review

The University of Texas at Arlington Lecture 21_Review The University of Texas at Arlington Lecture 21_Review CSE 5442/3442 Agenda Tuesday December 1st Hand back Homework 7,8 and 9. Go over questions and answers Exam 3 Review Note: There will be a take home

More information

Explanation of PIC 16F84A processor data sheet Part 1: overview of the basics

Explanation of PIC 16F84A processor data sheet Part 1: overview of the basics Explanation of PIC 16F84A processor data sheet Part 1: overview of the basics This report is the first of a three part series that discusses the features of the PIC 16F94A processor. The reports will refer

More information

Timer2 Interrupts. NDSU Timer2 Interrupts September 20, Background:

Timer2 Interrupts. NDSU Timer2 Interrupts September 20, Background: Background: Timer2 Interrupts The execution time for routines sometimes needs to be set. This chapter loops at several ways to set the sampling rate. Example: Write a routine which increments an 8-bit

More information

Lecture 1. Course Overview and The 8051 Architecture

Lecture 1. Course Overview and The 8051 Architecture Lecture 1 Course Overview and The 8051 Architecture MCUniversity Program Lectures 8051 architecture t System overview of C8051F020 8051 instruction set System clock, crossbar and GPIO Assembler directives

More information

Figure 1: Pushbutton without Pull-up.

Figure 1: Pushbutton without Pull-up. Chapter 7: Using the I/O pins as Inputs. In addition to working as outputs and being able to turn the I/O pins on and off, these same pins can be used as inputs. In this mode the PIC is able to determine

More information

To be familiar with the USART (RS-232) protocol. To be familiar with one type of internal storage system in PIC (EEPROM).

To be familiar with the USART (RS-232) protocol. To be familiar with one type of internal storage system in PIC (EEPROM). Lab # 6 Serial communications & EEPROM Objectives To be familiar with the USART (RS-232) protocol. To be familiar with one type of internal storage system in PIC (EEPROM). Serial Communications Serial

More information

CHIPS Newsletter Vol 5 - Yahoo! Mail. Official Newsletter of

CHIPS Newsletter Vol 5 - Yahoo! Mail. Official Newsletter of CHIPS Newsletter Vol 5 From: "chips@elproducts.net" To: "Chuck Hellebuyck" Thursday, April 29, 2010 12:07 AM CHIPs Vol 5 / April 28, 2010 Official Newsletter

More information

Chapter 2 Sections 1 8 Dr. Iyad Jafar

Chapter 2 Sections 1 8 Dr. Iyad Jafar Introducing the PIC 16 Series and the 16F84A Chapter 2 Sections 1 8 Dr. Iyad Jafar Outline Overview of the PIC 16 Series An Architecture Overview of the 16F84A The 16F84A Memory Organization Memory Addressing

More information

GSM Based Remote Control Design for LCD Publicity Display

GSM Based Remote Control Design for LCD Publicity Display IOSR Journal of Engineering (IOSRJEN) ISSN (e): 2250-302, ISSN (p): 2278-879 Vol 04, Issue 2 (December 204), V2 PP 49-53 wwwiosrjenorg GSM Based Remote Control Design for LCD Publicity Display Noaman AbdElnou

More information

Microcontroller basics

Microcontroller basics FYS3240 PC-based instrumentation and microcontrollers Microcontroller basics Spring 2017 Lecture #4 Bekkeng, 30.01.2017 Lab: AVR Studio Microcontrollers can be programmed using Assembly or C language In

More information

Hong Kong Institute of Vocational Education Digital Electronics & Microcontroller. 8. Microcontroller

Hong Kong Institute of Vocational Education Digital Electronics & Microcontroller. 8. Microcontroller 8. Microcontroller Textbook Programming Robot Controllers, Myke Predko, McGraw Hill. Reference PIC Robotics: A Beginner's Guide to Robotics Projects Using the PIC Micro, John Iovine, McGraw Hill. Embedded

More information

C:\IDE\Brooke-16F88-LED\Brooke-16F88_LED.asm

C:\IDE\Brooke-16F88-LED\Brooke-16F88_LED.asm title "Simple 16F88 LED Blinker" by Brooke Clarke, N6GCE Working 5 June 2006 http://www.prc68.com C:\IDE\Brooke-16F88-LED\Brooke-16F88_LED.asm =================== How to Read the.asm Source File ===============

More information

A PIC-based LCD Display for Stand-Alone Instrumentation

A PIC-based LCD Display for Stand-Alone Instrumentation A PIC-based LCD Display for Stand-Alone Instrumentation Michael Case, Dr. Bruce E. Segee Department of Electrical and Computer Engineering University Of Maine Instrumentation Research Laboratory Session

More information

Professor E. Ambikairajah UNSW Sydney

Professor E. Ambikairajah UNSW Sydney ELEC2117 Chapter 3a: PIC16F886 Instruction set Professor Eliathamby Ambikairajah Head of School of Electrical Engineering and Telecommunications, UNSW, Sydney 06 March 2017 Prof E Ambikairajah Instruction

More information

MCS-51 Serial Port A T 8 9 C 5 2 1

MCS-51 Serial Port A T 8 9 C 5 2 1 MCS-51 Serial Port AT89C52 1 Introduction to Serial Communications Serial vs. Parallel transfer of data Simplex, Duplex and half-duplex modes Synchronous, Asynchronous UART Universal Asynchronous Receiver/Transmitter.

More information

Chapter 9. Input/Output (I/O) Ports and Interfacing. Updated: 3/13/12

Chapter 9. Input/Output (I/O) Ports and Interfacing. Updated: 3/13/12 Chapter 9 Input/Output (I/O) Ports and Interfacing Updated: 3/13/12 Basic Concepts in I/O Interfacing and PIC18 I/O Ports (1 of 2) I/O devices (or peripherals) such as LEDs and keyboards are essential

More information

Parallel-to-Serial and Serial-to-Parallel Converters

Parallel-to-Serial and Serial-to-Parallel Converters Session 1532 Parallel-to-Serial and Serial-to-Parallel Converters Max Rabiee, Ph.D., P.E. University of Cincinnati Abstract: Microprocessors (MPUs) on a computer motherboard communicate in a parallel format

More information

Parallel IO. Serial IO. Parallel vs. Serial IO. simplex vs half-duplex vs full-duplex. Wires: Full Duplex. Wires: Simplex, Half-duplex.

Parallel IO. Serial IO. Parallel vs. Serial IO. simplex vs half-duplex vs full-duplex. Wires: Full Duplex. Wires: Simplex, Half-duplex. Parallel IO Parallel IO data sent over a group of parallel wires. Typically, a clock is used for synchronization. D[15:0] clk Serial IO Serial IO data sent one bit at a time, over a single wire. A clock

More information

SOLUTIONS!! DO NOT DISTRIBUTE!!

SOLUTIONS!! DO NOT DISTRIBUTE!! THE UNIVERSITY OF THE WEST INDIES EXAMINATIONS OF FEBRUARY MID-TERM 2005 Code and Name of Course: EE25M Introduction to Microprocessors Paper: Date and Time: Duration: One Hour INSTRUCTIONS TO CANDIDATES:

More information

FULL DUPLEX BIDIRECTIONAL UART COMMUNICATION BETWEEN PIC MICROCONTROLLERS

FULL DUPLEX BIDIRECTIONAL UART COMMUNICATION BETWEEN PIC MICROCONTROLLERS FULL DUPLEX BIDIRECTIONAL UART COMMUNICATION BETWEEN PIC MICROCONTROLLERS Dhineshkaarthi K., Sundar S., Vidhyapathi C. M. and Karthikeyan B. M. Tech, School of Electronics Engineering, VIT University,

More information

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING. EE Microcontroller Based System Design

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING. EE Microcontroller Based System Design DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EE6008 - Microcontroller Based System Design UNIT III PERIPHERALS AND INTERFACING PART A 1. What is an

More information

Jordan University of Science and Technology Electrical Engineering Department Microcontrollers and Embedded Systems Spring 2011

Jordan University of Science and Technology Electrical Engineering Department Microcontrollers and Embedded Systems Spring 2011 Jordan University of Science and Technology Electrical Engineering Department Microcontrollers and Embedded Systems Spring 2011 Microcontrollers andembedded Systems and and EE445 Embedded Embedded Microcontrollers

More information

University of Florida EEL 4744 Spring 2014 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 1 April Apr-14 9:03 AM

University of Florida EEL 4744 Spring 2014 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 1 April Apr-14 9:03 AM Page 1/15 Exam 2 Instructions: Turn off cell phones beepers and other noise making devices. BEAT UCONN! Show all work on the front of the test papers. If you need more room make a clearly indicated note

More information

Embedded systems. Exercise session 3. Microcontroller Programming Lab Preparation

Embedded systems. Exercise session 3. Microcontroller Programming Lab Preparation Embedded systems Exercise session 3 Microcontroller Programming Lab Preparation Communications Contact Mail : michael.fonder@ulg.ac.be Office : 1.82a, Montefiore Website for the exercise sessions and the

More information

ELCT708 MicroLab Session #1 Introduction to Embedded Systems and Microcontrollers. Eng. Salma Hesham

ELCT708 MicroLab Session #1 Introduction to Embedded Systems and Microcontrollers. Eng. Salma Hesham ELCT708 MicroLab Session #1 Introduction to Embedded Systems and Microcontrollers What is common between these systems? What is common between these systems? Each consists of an internal smart computer

More information

ELCT706 MicroLab Session #4 UART Usage for Bluetooth connection PC - PIC

ELCT706 MicroLab Session #4 UART Usage for Bluetooth connection PC - PIC ELCT706 MicroLab Session #4 UART Usage for Bluetooth connection PC - PIC USART in PIC16F877A Universal Synchronous/Asynchronous Receiver Transmitter - Can receive and transmit - Can be synchronous or Asynchronous

More information

Microcontrollers. Introduction to the PIC 8-bit Midrange Family. ECE Senior Design 15 February 2017

Microcontrollers. Introduction to the PIC 8-bit Midrange Family. ECE Senior Design 15 February 2017 Microcontrollers Introduction to the PIC 8-bit Midrange Family ECE Senior Design 15 February 2017 Popular Microcontrollers 8051 Intel then Everyone (8-bit old) PIC Microchip (8, 16 & 32bit) AVR Atmel (8

More information

Department of Electronics and Instrumentation Engineering Question Bank

Department of Electronics and Instrumentation Engineering Question Bank www.examquestionpaper.in Department of Electronics and Instrumentation Engineering Question Bank SUBJECT CODE / NAME: ET7102 / MICROCONTROLLER BASED SYSTEM DESIGN BRANCH : M.E. (C&I) YEAR / SEM : I / I

More information

Example of Asyncronous Serial Comms on a PIC16F877

Example of Asyncronous Serial Comms on a PIC16F877 /***************************************************************************************/ /* Example of Asyncronous Serial Comms on a PIC16F877 */ /* Target: PIC16F877 */ /* Baud: 9600 */ /* Bits: 8 */

More information

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text In this lecture the detailed architecture of 8051 controller, register bank,

More information

Introduction. Embedded system functionality aspects. Processing. Storage. Communication. Transformation of data Implemented using processors

Introduction. Embedded system functionality aspects. Processing. Storage. Communication. Transformation of data Implemented using processors Input/Output 1 Introduction Embedded system functionality aspects Processing Transformation of data Implemented using processors Storage Retention of data Implemented using memory Communication Transfer

More information

Section 16. Basic Sychronous Serial Port (BSSP)

Section 16. Basic Sychronous Serial Port (BSSP) M 16 Section 16. Basic Sychronous Serial Port (BSSP) BSSP HIGHLIGHTS This section of the manual contains the following major topics: 16.1 Introduction...16-2 16.2 Control Registers...16-3 16.3 SPI Mode...16-6

More information

ELCT706 MicroLab Session #4 UART Usage for Bluetooth connection PC - PIC

ELCT706 MicroLab Session #4 UART Usage for Bluetooth connection PC - PIC ELCT706 MicroLab Session #4 UART Usage for Bluetooth connection PC - PIC USART in PIC16F877A Universal Synchronous/Asynchronous Receiver Transmitter - Can receive and transmit - Can be synchronous or Asynchronous

More information