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.
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.
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
|