Ask Electrical & Electronics Expert

i) The Special Function Registers within the 16F1847 microcontroller are held within a number of memory banks. How many memory banks are there within the 16F1847 microcontroller?

ii) Explain two methods to show how a special function register within a particular memory bank can be selected.

The TRIS Registers

The 16F61847A microcontroller has two TRIS registers, TRISA and TRISB, situated in bank 1 in the special function register memory map.

i) What is the function of the TRIS registers?

ii) How can the TRIS registers in bank 1 be accessed?

Write a short program to configure PORTA of the microcontroller as inputs and PORTB of the microcontroller as outputs.

For the remaining exercises assume that PORTA is connected to switches and PORTB is connected to LEDs in common cathode configuration (i.e. output a 1 to illuminate).

Key Press Accumulator

It is required to produce a system incorporating a microcontroller that keeps count (in binary) of the number of times that a key has been pressed. The key is connected to bit RAO of PORTA and when pressed should increment the binary value displayed on LEDs connected to PORTB.

Write a program to meet the above specification, simulate the program to ensure correct operation, program a microcontroller and test.

Software Delays

The 16F 1847 assembly language program listed below is a software time delay incorporating two nested loops.

1857_Function of the TRIS registers.png


By incorporating breakpoints and using the stopwatch determine the amount of time elapsed in the software delay assuming the microcontroller is operating from a 4Mhz crystal oscillator. Compare the value obtained above with that obtained by calculation. Are the time values equal?

Travelling LED program

It is required to produce a system incorporating a PIC 16F1847 to produce the following sequence on LEDs (travelling LED).

• 0 0 0 0 0 0 0
0 • 0 0 0 0 0 0
m 0 • 0 0 0 0 0
m 0 0 • 0 0 0 0
0 0 0 0 • 0 0 0
m 0 0 0 0 • 0 0
m 0 0 0 0 0 • 0
m 0 0 0 0 0 0 •
And repeat

The LEDs are connected to PORTB and the sequence should only start after the key connected to RAO has been asserted. Should key RA1 be pressed then all of the LEDs should be switched off The sequence can be set off again by reasserting key RAO. Incorporate a 100ms delay between changes of state of the sequence. Write a program to carry out the above specification, simulate, program a microcontroller and test.

Electrical & Electronics, Engineering

  • Category:- Electrical & Electronics
  • Reference No.:- M91034129
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Electrical & Electronics

Question 1for the ce amplifier in figure 1 given the

Question 1 For the CE amplifier in Figure (1), given the following component parameters: Parameter Value β DC , β AC 150 V BE 0 . 7 V V CC 12 V R C 820 ? R E 1 100 ? R E 2 220 ? R 1 20 k? R 2 5 . 2 k? R L 100 k? C 1 , C ...

Question -i a star-connected three-phase synchronous

Question - (i) A star-connected, three-phase synchronous induction motor takes a current of 10 amps from a 415 volt supply at unity power factor when supplying a steady load. If the synchronous reactance is 5 ohms/phase ...

1 a name the three major groups of contamination and

1. (a) Name the three major groups of contamination and briefly describe their physical characteristics. (b) Where do the above contamination types come from? Give one example of each. 2. Name two processes metrics which ...

Question 1 in the voltage regulator circuit in figure p221

Question 1: In the voltage regulator circuit in Figure P2.21, V 1 = 20 V, V Z = 10 V, R i = 222Ω and P z (max) = 400 mW. (a) Determine I L, I z , and I L , if R L = 380Ω. (b) Determine the value of R L , that will establ ...

Summative assessmentin 2017 sej101 assessment will consist

Summative Assessment In 2017 SEJ101 assessment will consist of nine tasks that will develop a portfolio of your assessed work. Throughout the trimester you will have the opportunity for feedback on all nine tasks before ...

1 a name the three major groups of contamination and

1. (a) Name the three major groups of contamination and briefly describe their physical characteristics. (b) Where do the above contamination types come from? Give one example of each. 2. Name two processes metrics which ...

1 a name the three major groups of contamination and

1. (a) Name the three major groups of contamination and briefly describe their physical characteristics. (b) Where do the above contamination types come from? Give one example of each. 2. Name two processes metrics which ...

Case studythis assignment consists of a written report of

CASE STUDY This assignment consists of a written report of approximately 1000 words and any diagrams in which you are asked to critically compare different process methods used to achieve the same result and show an awar ...

Problem 1 a two-phase servomotor has rated voltage applied

Problem 1: A two-phase servomotor has rated voltage applied to its excitation winding. The torque speed characteristic of the motor with Vc = 220 V, 60 Hz applied to its control phase winding is shown in Fig.1. The momen ...

Electrical engineering questions -q1 two ideal voltage

Electrical Engineering Questions - Q1. Two ideal voltage sources designated as machines 1 and 2 are connected, as shown in the figure below. Given E 1 = 65∠0 o V, E 2 = 65∠30 o V, Z = 3Ω. Determine if Machine 1 is genera ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As