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

Similar documents
Serial Communications

Basics of UART Communication

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

Microcontroller basics

Microcontroller Systems. ELET 3232 Topic 11: General Memory Interfacing

Serial Communications

Embedded Systems Lab Lab 8 EEPROM

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Serial Port Communication Module No: CS/ES/11 Quadrant 1 e-text

Interfacing Techniques in Embedded Systems

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

Amarjeet Singh. January 30, 2012

Serial Communication Prof. James L. Frankel Harvard University. Version of 2:30 PM 6-Oct-2015 Copyright 2015 James L. Frankel. All rights reserved.

ECE251: Thursday November 8

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang,

Embedded Systems. Read pages

EasyPIC5 Development System

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

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

Microprocessors/Microcontrollers

Serial Communication

19.1. Unit 19. Serial Communications

Embedded Systems and Software

Serial Communication. Simplex Half-Duplex Duplex

ĐẠ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

Introduction the Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications

Organization. 5.1 Semiconductor Main Memory. William Stallings Computer Organization and Architecture 6th Edition

Embedded Systems and Software. Serial Communication

William Stallings Computer Organization and Architecture 6th Edition. Chapter 5 Internal Memory

Chapter 5 Internal Memory

Parallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this?

PIC Microcontroller and

Laboratory 5 Communication Interfaces

Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features

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

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

EE 308: Microcontrollers

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

Serial Communication. Simplex Half-Duplex Duplex

CSE 466 Exam 1 Winter, 2010

School of Computer Science Faculty of Engineering and Computer Science Student ID Number. Lab Cover Page. Lab Date and Time:

AT-501 Cortex-A5 System On Module Product Brief

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

Asynchronous Transmission. Asynchronous Serial Communications & UARTS

DESIGN OF A CUBESAT PAYLOAD INTERFACE. Jason Axelson Department of Electrical Engineering University of Hawai i at Mānoa Honolulu, HI ABSTRACT

IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -4 1 UNIT 4

Computer Organization and Microprocessors SYLLABUS CHAPTER - 1 : BASIC STRUCTURE OF COMPUTERS CHAPTER - 3 : THE MEMORY SYSTEM

PIC Microcontroller Introduction

Laboratory Finite State Machines and Serial Communication

Raspberry Pi - I/O Interfaces

Unit 19 - Serial Communications 19.1

Development and research of different architectures of I 2 C bus controller. E. Vasiliev, MIET

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

Hello, and welcome to this presentation of the STM32 Low Power Universal Asynchronous Receiver/Transmitter interface. It covers the main features of

Computer Organization. 8th Edition. Chapter 5 Internal Memory

RS485 board datasheet EB062-00

EET203 MICROCONTROLLER SYSTEMS DESIGN Serial Port Interfacing

or between microcontrollers)

Semiconductor Memories: RAMs and ROMs

Memory Overview. Overview - Memory Types 2/17/16. Curtis Nelson Walla Walla University

EXPERIMENT 8: Introduction to Universal Serial Asynchronous Receive Transmit (USART)

Summer 2003 Lecture 1 06/09/03

USB232 board. EB039

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

PD215 Mechatronics. Week 3/4 Interfacing Hardware and Communication Systems

UART TO SPI SPECIFICATION

Lecture 25 March 23, 2012 Introduction to Serial Communications

Digital Storage Oscilloscope

Memory Expansion. Lecture Embedded Systems

Interfacing a Hyper Terminal to the Flight 86 Kit

Bolt 18F2550 System Hardware Manual

18-349: Introduction to Embedded Real-Time Systems

PART B UNIT II PART A

Concepts of Serial Communication

8051SERIAL PORT PROGRAMMING

Robotic Systems ECE 401RB Fall 2006

USB232 board EB Technical datasheet

Serial Buses in Industrial and Automotive Applications

Sender Receiver Sender

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Lab Course Microcontroller Programming

REQUIRED MATERIALS Epiphany-DAQ board Wire Jumpers IR Rangefinder Sensor LED Resistors Breadboard Multimeter (if needed)

MICROPROCESSORS B (17.384) Spring Lecture Outline

Embedded Systems. Software Development & Education Center. (Design & Development with Various µc)

Digital Circuits 7: MCUs... how do they work?

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

Learn how to communicate

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

FULL DUPLEX BIDIRECTIONAL UART COMMUNICATION BETWEEN PIC MICROCONTROLLERS

EECS 373 Design of Microprocessor-Based Systems


PART - B (Answer all five units, 5 X 10 = 50 Marks)

Getting Embedded Software into the Target System using Device Programmer

MICROPROCESSORS B (17.384) Spring Lecture Outline

Introduction to ARM LPC2148 Microcontroller

AVR Training Board-I. VLSI Design Lab., Konkuk Univ. LSI Design Lab

TKT-3500 Microcontroller systems

Basic Organization Memory Cell Operation. CSCI 4717 Computer Architecture. ROM Uses. Random Access Memory. Semiconductor Memory Types

EXPERIMENT 7: Introduction to Universal Serial Asynchronous Receive Transmit (USART)

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

Transcription:

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 communications is the process of sending data one bit at one time, sequentially, over a communications channel or computer bus. This is in contrast to parallel communications, where all the bits of each symbol are sent together. Serial communications is communications and most computer networks, where the cost of cable and synchronization difficulties makes parallel communications impractical. Serial computer buses are becoming more common as improved technology enables them to transfer data at higher speeds. Examples of serial communication architectures includes: RS-232, RS-485, Universal Serial Bus (USB), SPI, I2C and others. Serial interfaces have certain advantages over parallel interfaces. The most significant advantage is simpler wiring. In addition, serial interface cables can be longer than parallel interface cables, because there is much less interaction (crosstalk) among the conductors in the cable. 1

USART USART stands for the Universal Synchronous/Asynchronous Receiver/Transmitter. Universal means that it can be used with a wide scope of devices Synchronous devices that communicate with each other require an external synchronization line (the clock). Asynchronous The Asynchronous mode (without the common clock) is easier to implement, although it is generally slower than the synchronous. It is also the older way older versions of PIC did not have the possibility of working in synchronous mode, therefore the devices they had were more appropriately named as UART (without S) Receiver/Transmitter means that this device can receive and transmit (send) data simultaneously. It is also called the two-way or full duplex communication. USART Asynchronous Mode The USART transmits and receives data using standard non-return-to-zero (NRZ) format. As seen in figure below, this mode does not use clock signal, while the data format being transferred is very simple: Briefly, each data is transferred in the following way: In idle state, data line has high logic level (1); Each data transmission starts with START bit which is always a zero (0); Each data is 8- or 9-bit wide (LSB bit is first transferred); and Each data transmission ends with STOP bit which always has logic level which is always a one (1). 2

Each UART contains a shift register which is the fundamental method of conversion between serial and parallel forms. After waiting a further bit time, the state of the line is sampled and the resulting level clocked into a shift register. After the required number of bit periods for the character length (8,9 bits typically) have elapsed, the contents of the shift register is made available RS-232 The RS-232 standard defines the voltage levels that correspond to logical one and logical zero levels for the data transmission and the control signal lines. Valid signals are plus or minus 3 to 15 volts - the range near zero volts is not a valid RS-232 level. 3

4

Connection Establishment In order to establish the communication, PC must have communication software installed. One such communication terminal is part of mikrobasic IDE. It can be accessed by clicking Tools > USART Terminal from the drop-down menu. Terminal allows you to monitor transfer and to set all the necessary transfer settings. First of all, we need to set the transfer rate to match the microcontroller's rate. Then, select the appropriate communication port and finally press Connect button. 5

Lab Wrk 1 Explore the USART Library following functions ::::: and use them to send data from PIC to PC Usart_Init Usart_Data_Ready Usart_Read_Text Usart_Write_Text Simulate and connect the circuit. Hints : Code examples it the library are very useful MAX232 IC is already connected to the board. Note that RX and TX are on pins C6 and C7. For simulation you will need to place a virtual terminal 6

And connect it like this Lab Work 2 Now we will receive data from PC to PIC and view it on LCD Simulate your work on Proteus. Save your code and a snapshoot of your Proteus connection. (this must be included in your report!) 7

EEPROM EEPROM (also called an E2PROM) or Electrically Erasable Programmable Read-Only Memory is a non-volatile storage chip used in computers and other devices to store small amounts of volatile (configuration) data. Some microcontrollers use built-in (internal) EEPROM, while other microcontrollers don t have built in ones. Otherwise, they use external ones connected via parallel or serial communication. PIC18F4550 has 256 bytes of EEPROM memory locations on addresses from 00h to FFh those can be written to or read from. Characteristics of EEPROM The most important characteristic of this memory is that combines the characteristics ROM and RAM: It does not lose its contents during power supply turned off like ROM Data can be retained in EEPROM without power supply for up to 40 years Its contents can be modified during the execution of PIC program by PICs CPU like RAM Data can be written more than 1.000.000 times. Data can be loaded to the EEPROM during the programming operation for the PIC (by the programmer) Programming the internal EEPROM with mikrobasic Functions used : Eeprom_Read Eeprom_Write HomeWork Include all your work during the lab. A hard-copy of reports should be submitted next meeting. 8