What is the function of the tris registers

Assignment Help Electrical Engineering
Reference no: EM13497009

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.

Reference no: EM13497009

Questions Cloud

Obtain the average power delivered to the circuit : The resistor in a series RCL circuit has a resistance of 97.0 ?, while the rms voltage of the generator is 6.00 V. what is the average power delivered to the circuit
Evaluate the work done on the system if the gas is ideal : Find the expression for the reversible pressure-volume work of an isothermal van der Waals gas with a constant number of moles (integrate the expression fully from Vi to Vf) (b) One mole of a gas at 300 K is compressed isothermally and reversibly ..
Find the number of molecules in a volume : In an ultrahigh vacuum system (with typical pressures lower than 10?7 pascal), find the number of molecules in a volume of 1.70 m3
Which of the following best describes the production budget : 061683RR - PLANNING, PERFORMANCE. Last year, the House of Orange had sales of $826,650, net operating income of $81,000, and operating assets of $84,000 at the beginning of the year and $90,000 at the end of the year. What was the company's turnov..
What is the function of the tris registers : What is the function of the TRIS registers and how can the TRIS registers in bank 1 be accessed
Estimate how far is the blackboard from her eyes : A student is reading a lecture written on a blackboard. The lenses in her eyes have a refractive power of 54.56 diopters, How far is the blackboard from her eyes
Evaluate the change in ph of the solution : If 2.00 mL of a 0.40 M NaOH solution is added to 65.0 mL of a buffer solution that contains 0.10 M HCN and 0.10 M NaCN, calculate the change in pH of the solution (i.e. pH[after] - pH[before] ). For HCN, Ka = 4.9 e-10.
Through what angle did the pulley turn while accelerating : Your car's fan belt turns a pulley at 3.00 rev/s . When you step on the gas for 1.25s , the rate increases steadily to 5.60 rev/s. Through what angle did the pulley turn while accelerating
What is the electric field between its plates : A C=35 pF parallel plate cApacitor has plates of area A=402cm^2. What is the electric field between its plates when it is connected across a potential difference of V=14.5 Volts

Reviews

Write a Review

Electrical Engineering Questions & Answers

  Lithium ion battery technology

The paper includes Lithium ion battery technology with its advantages and disadvantages. The paper discusses about the Lithium air battery in which detailed reactions of Lithium with air including nonaqueous as well as aqueous are given.

  Power transformers and tariffs

Construction of different types of power transformer, significant energy savings

  Paper on orthogonal frequency-division multiplexing

This document is shown a paper on Orthogonal frequency-division multiplexing with advantages, disadvantages and uses.

  Function of the hmi in a scada system

This assignment contains electronics engineering questions like State the commonly found components of a SCADA (Supervisory control and data acquisition) system. and decribe the function of the HMI in a SCADA system.

  Resultant waveform of the odd harmonic series

Prepare an Excel graph showing the individual components and summated resultant waveform of the odd harmonic series resulting in an approximate square wave.

  Explain scada system

Explain the function of the HMI in a SCADA system.

  Design a 2-digit 24 second shot-clock

Design a 2-digit 24 second "shot-clock" countdown timer with pushbutton controller.

  Model a discrete-time system

To understand di erent signal models To be able to model a discrete-time system and design simple signal processing algorithms.

  Draw a relay construction diagram

Draw a relay construction diagram and briefly explain the operation of a relay.

  Frequency division multiplexing

Write a short technical report on Frequency Division Multiplexing

  Impact of electron energy

Briefly discuss the impact of electron energy, electron current and target on the Bremsstrahlung generated.

  Traffic light controller

The schematic of the traffic light controller

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd