0% found this document useful (0 votes)
33 views5 pages

AMES 24-25 - assignments no. 6 with solution.docx

AMES electrical engineering subject notes

Uploaded by

kaleom259
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views5 pages

AMES 24-25 - assignments no. 6 with solution.docx

AMES electrical engineering subject notes

Uploaded by

kaleom259
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Dr. D. Y. Patil Institute of Technology Pimpri, Pune - 411 018.

Department of Electrical Engineering

TE 2024-25
Subject:- AMES (Advanced Microcontroller and Embedded System
(303145A))
Assignment No: 6 (Solution)
Total Marks: 10

Sr. No. Questions

1 Explain bit configuration of TXSTA Register and RCSTA register.

Ans. TXSTA Register: (Transmit Status and Control Register


RCSTA ( Receive Status and Control Register)

2 Draw and explain block diagram of USART Transmitter in PIC18


Ans.

1. TSR is heart of Transmitter.


2. This register is loaded after stop bit of previous data is transmitted.
3. The TRMT flag is set to indicate TSR register is empty.
4. The TSR register transmits 10 bit data (8 bit data from TXREG + 1 start bit + 1
stop bit ) through the TX pin
5. After the data is transferred to the TSR register, the TXREG is made empty &
TXIF flag is set.
6. TXIF can be enabled/disabled by TXIE bit.
7. The TRMT flag indicates the status of TSR whether it is empty or full.
8. By setting TXEN bit in TXSTA register we can enable transmission.
9. After TXREG is loaded with data & desired B.R. is generated, the transmission
will start.
10. At this time TSR is empty.
11. After the data is transmitted the TSR register is full & TXREG is empty.
12. If the TXEN bit in the TXSTA register is cleared, then ongoing transmission will
be aborted.
13. This clearing will reset the transmitter & the RC6/TX pin will be in high
impedance state.
14. If we want 9 bit transmission, then TX9 bit in the TXSTA register should be set
indicating select 9 bit transmission.
15. The 9th bit should be written in bit 0 i.e. TX9D bit of TXSTA register.
16. For 9 bit transmission before writing data to TXREG register, the 9th bit must be
written.
17. Otherwise if the TSR empty incorrect data will be transmitted.
3 Write a PIC18 program to transfer letter “A” serially with baud rate 9600
continuously. Let XTAL = 10MHz

Ans. 1) TXSTA Bit Configuration:

0 0 1 0 0 0 0 0

For transmission process, TXEN bit should be enabled

Therefore, TXSTA = 20H

2) Calculation of SPBRG (X):

X = (156250/9600) – 1

X = 15 (In Hex FH)

You might also like