Examen de control - Digsys

Consultes sobre l'examen: Francesc: DT: 15:00 ? 17:00; DV: 11:00 ? 12:00, 16:
00-19:00. Josep: DT: ... 4 Connecting the PIC microcontroller (modify this circuit).

Part of the document


E. T. TELECOMUNICACIONS |Sistemes Electrònics Digitals | |
|2AT4 |9/1/2007 |Profs. Francesc J. Sànchez / |
| | |Josep Conesa |
- Control de mínims. Publicació de les qualificacions: 19 de gener
- Consultes sobre l'examen: Francesc: DT: 15:00 - 17:00; DV: 11:00 -
12:00, 16:00-19:00
Josep: DT: 15:00-17:00; 19:00-21:00; DC: 15:00-17:00 Mínim 6
Task description We want to design a function generator to produce sinusoidal, triangular
and TTL waveforms programming a PIC16F84A in C, using interruptions to
attend the buttons and driving additional external interface circuitry.
Fig. 1 shows the proposal which includes an 8-bit digital to analogue
converter (see a commercial device type DAC08 plus an output OP-AMP) to
produce the desired outputs. The VREF block produces stabilized reference
voltages of 5.00 V and 2.50 V. The AMP block subtracts the DC level VREF/2
from the DAC output to generate a bipolar signal.
[pic] Fig. 1 Function generator to be designed Top-down design steps
The analogue interface circuitry (the same as in MI5)
1- Explain the function of the DAC08 and the analogue output circuit.
Deduce the output voltage equation and justify the value of the
resistors of the circuit represented in Fig. 2. Explain the circuit of
the voltage reference in Fig. 3 and gather the function of the output
OPAMP's.
[pic] Fig. 2 Internal structure of the proposed output amplifier [pic] Fig. 3 Internal structure of the dual voltage reference circuit The microcontroller
2- Make convenient changes in circuit shown in Fig. 4 and explain how
switches, pushbuttons and D/A converter can be connected so that they
will be able to handle interrupt requests.
3- [pic] Fig. 4 Connecting the PIC microcontroller (modify this circuit) The internal EEPROM peripheral (the same as in MI5)
4- The sinusoidal waveform will be stored in the internal PIC 64 byte
EEPROM. Search in books and datasheets the main characteristics of
that peripheral and explain through which registers is programmed and
accessed in the read and write cycles. 5- Deduce the value of the 64 8-bit waveform samples that will be stored
in the EEPROM to generate the sinusoidal signal of 5 V range. Use a
spreadsheet to produce the values as in the attached file
"SED_Funct_gen_sinusoidal.xls". How will the waveform period and
frequency be calculated? How can the waveform frequency be adjusted? The linear and TTL waves (the same as in MI5)
6- Explain the way the linear triangular waveform will be produced and
why the EEPROM may be not needed. Answer the same question for the
TTL signal. Explain the differences if the waveforms are produced
using only 64 points or the whole range of 255 points. 7- How can be synthesized a pulse width modulated (PWM) TTL signal with a
duty cycle (DC) ranging from 1% to 99%? 8- Which way can be even more effective to store different waveforms or
data permanently in memory and without having the EEPROM restriction
of 64 bytes? How can be stored and retrieved data blocks in program
memory? Programming the application in C 9- Assume the EEPROM has been written previously in the programming
process, so that when the main program starts after a reset (MCLR_L)
the EEPROM is already loaded with the waveform table (look at how that
has been done in assembler in the previous exercise). Propose the flux
diagram for the main C program that will configure the ports and do
nothing else but an infinite loop while waiting for an interrupt
request from the waveform selection pushbuttons. Write the C code. Use
an initial sample MPLAB project and the Proteus-VSM initial project
(for instance MI5) to start the software development (look at the web
page where this task is posted).
Fig. 5 Flux diagram for the main program 10- Use the MPLAB, the HI-TECH C Lite Compiler and the virtual laboratory
Proteus-VSM to simulate and verify your designs. Repeat this step
after each one of the following sections to build a robust and error
free code. 11- Propose the flux diagram and write code for the interrupt service
function which will produce the sinusoidal waveform. 12- Explain how to produce a TS delay so that the waveform frequency can
be ajusted. Propose the flux diagram and write de code. 13- Propose the flux diagram and write de code for the triangular
function. 14- Propose the flux diagram and write de code for the TTL function. Programming the waveform frequency
15- How can be adjusted the frequency of the output signals using simply a
pair of pushbuttons? Perhaps using the TIMER0 peripheral? 16- Can be replaced the Ts delay routines by the TIMER0?
-----------------------
Take this task description as an example of how can you organize and
develop your application project