(Solution) 16/03/2015 ELEG 385 Microprocessors And Microcontrollers Homework 3: Due On Wed. 25th Of March, 2015 In Class 1. Write A C18 Code To Perform The Same... | Snapessays.com


(Solution) 16/03/2015 ELEG 385 Microprocessors and Microcontrollers Homework 3: Due on Wed. 25th of March, 2015 in class 1. Write a C18 code to perform the same...


I need solution within 24 hours, Please check the document and provide complete solution as per the requirement.16/03/2015

 

ELEG 385

 

Microprocessors and Microcontrollers

 

Homework 3:

 

Due on Wed. 25

 

th

 

of March, 2015 in class

 

1.

 

Write a C18 code to perform the same function performed by the following Assembly code.

 

COUNT EQU 0x08

 

COUNTER EQU 0x20

 

NUM_X EQU 0x21

 

ORG 0

 

MOVLW 0

 

MOVWF NUM_X

 

MOVLW COUNT

 

MOVWF COUNTER

 

REPEAT

 

BTFSS 0x10, 0

 

INCF NUM_X, F

 

RRNCF 0x10, F

 

DECF COUNTER, F

 

BNZ REPEAT

 

END

 

2.

 

Assume that XTAL = 4 MHz. Find the TMR0H:TMR0L value needed to generate a:

 

a.

 

time delay of 2 ms. Use 16-bit mode, no prescaler mode.

 

b.

 

time delay of 10 ms. Use 16-bit mode, and the largest prescaler possible.

 

3.

 

Assuming that XTAL = 10 MHz, and we are generating a square wave on pin RB0 (50% Duty

 

Cycle); find the lowest square wave frequency that we can generate using:

 

a.

 

Timer0 in 16-bit mode.

 

b.

 

Timer0 in 8-bit mode.

 

c.

 

Timer 2

 

d.

 

Write an Assembly code to generate the wave with lowest frequency among the values

 

you found in parts (a), (b) and (c).

 

e.

 

Repeat part (d) using C.

 

4.

 

Program Timer2 in (a) Assembly and (b) C to toggle pin RB0 when it counts up for 0 to 150

 

assuming XTAL = 4 MHz.

 

5.

 

Calculate the total number of bits transferred if 100 pages of ASCII data are sent using

 

asynchronous serial data transfer. Assume a data size of 8 bits, 1 stop bit, not parity and each

 

page contains 80x25 text characters. How long would it take to transfer the whole 100 pages

 

serially if the baud rate 9600?

 

6.

 

Write (a) Assembly and (b) C code to transfer serially the message “I HEAR YOU” continuously

 

at baud rate 1200.

 

7.

 

(a) Write an Assembly program to receive 10 bytes of data serially and send them to PORTC. Set

 

the baud rate at 57,600. There must be a delay of 1 second before sending each byte to PORTC,

 

so the bytes need to be stored in RAM, and then sent to PORTC in the same order in which they

 

were received, (b) write the a program to perform the same using C.

 


Solution details:
STATUS
Answered
QUALITY
Approved
ANSWER RATING

This question was answered on: May 23, 2022

Solution~00021147602810.zip (25.37 KB)


This attachment is locked

Our expert Writers have done this assignment before, you can reorder for a fresh, original and plagiarism-free copy and it will be redone much faster (Deadline assured. Flexible pricing. TurnItIn Report provided)

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
SiteLock

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

May 23, 2022

EXPERT

Tutor

ANSWER RATING

GET INSTANT HELP

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • ■ As a reference for in-depth understanding of the subject.
  • ■ As a source of ideas / reasoning for your own research (if properly referenced)
  • ■ For editing and paraphrasing.

This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

Get Free Price Quote