VTech Alphabert s Magic Readport User Manual Page 39

  • Download
  • Add to my manuals
  • Print
  • Page
    / 80
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 38
BM Dept., Govt. Engg. College, Gandhinagar Page 39
EXPERIMENT NO. 10
AIM: Write a program to transmit letter “E” continuously using serial port. Modify program to
transmit text “YES”. Use 8 bit UART mode with baud rate 19,200.
Circuit diagram:
Serial data transmission:
Data transmission is unidirectional from microcontroller to the destination device.
Each character takes 33.3 to 0.5 milliseconds for the transmission depending of the baud rate
used. The program must wait until transmission of character is over before loading the next
character in the SBUF. If program does not wait, data will be lost. This can be prevented with
any one of the following method mentioned here.
Use time delay between transmissions of two characters. Time delay can be chosen
slightly higher than known transmission time of one character. This method is simplest.
Monitor TI flag of t he SCON special function register (SFR) to check whether character
transmission is completed or not. Next character should be place d only after TI flag is set
i.e. transmission is over.
TI Flag must be cleared by the program before transmission of next character.
We can also use interrupt method to check whether transmission is over or not. Serial
interrupt can be invoked by TI or RI flag of SCON special function register. The vector
location for the serial interrupt is 0023h. The serial interrupt bit ES (IE.4) and Enable
interrupts bit EA (IE.7) are set in IE (Interrupt Enable) SFR. When transmission is over,
TI flag will set and serial interrupt will be invoked. Program will jump to the location
0023h where user should writ e a routine to clear TI flag and load S BUF register by new
character. In this practical, we will first write a program using polling method i.e.
continuously checking TI flag and then we will write a program using interrupt method.
Program:
ORG 00H
AJMP START
Page view 38
1 2 ... 34 35 36 37 38 39 40 41 42 43 44 ... 79 80

Comments to this Manuals

No comments