Professional Documents
Culture Documents
Mostra Subiecte Examen2 PSM
Mostra Subiecte Examen2 PSM
Mostra Subiecte Examen2 PSM
The Stack Pointer (SP) register is a 16-bit register, that must be initialized by
software with the ending address of a RAM memory area, called the stack. SP
automatically decrements each time a byte is pushed to the stack, and increments
when a byte is pulled from stack. Thus, SP always points to the first free location of
the stack.
LDX #$8000
PSHX
RTS
Interrupt vector
Reserved memory area, associated with each interrupt source, that contains either
the
address of the interrupt service routine, or a jump instruction to this routine.
See also: Interrupt, Interrupt service routine
PORTx is for sending a value out to the port when it is set as an output. PINx is for use in
getting the current value from the port when it is set as an input.
PORTx also sets the state of the internal pull-up resistors when the port is set to input. And on
more recent models, writing to PINx will toggle the value of the pins (the PORTx value) when
they are set as outputs.
12. Cati conductori sunt necesari pentru realizarea unui bus I2C?
14. Cate intreruperi EXTERNE distincte admite HC11 din seria K? Dar
Atmega16?
15. Ce tensiune continua rezulta la iesirea unui filtru trece-jos care are la intrare
un semnal PWM generat de ATmega16, cu factor de umplere 30%?
Watchdog-ul
Sistemul constra intr-un
numarator al carui
moment de overflow este
controlabil prin program.
La overflow, genereaza un
RESET harware
Periodic, programul
trebuie sa stearga
numaratorul inainte de
overflow.
17. Enumerati doua deosebiri esentiale intre convertorul A/D al HC11 si cel al
AVR.
Convertorul A/D al HC11 Convertorul A/D la AVR-uri
Rezolutie: 8 biti Are rezolutia de 10 biti - sunt necesare doua
Timp de conversie: 128 perioade ale ceasului E registre de date ADCH-ADCL
Alimentare separata AVDD, AGND Poate genera intreruperi la sfarsitul
Referinte separate VRL, VRH conversiei
In fiecare ciclu de conversie se executa 4 conversii Foate functiona cu procesorul in SLEEP
rezultatele se se stocheaza in ADR1-ADR4, fie Are un prescaller propriu pentru controlul
asupra ceasului (divizeaza cu rate intre 2 si 128)
aceleiasi intrari fie asupra unui grup de intrari.
(Bitul
MULT din ADCTL)
Nu exista intrerupere asociata cu convertorul A/D.
If the input lines MODA and MODB are grounded during RESET, HC11 enters
a special operating mode, called bootstrap. In bootstrap mode, the microcontroller
executes a program, called bootloader, located in a small ROM, invisible in the
memory map in normal modes.
The bootloader allows user programs to be loaded into the MCU RAM, via the
serial communication interface SCI, and, when the transmission completes, the user
program is automatically launched.
In principle, the user program loaded this way can use any of the MCU resources,
but the most common use of the bootstrap mode is for writing the CONFIG register
and EEPROM constants. Some members of the HC11 family have internal EPROM
or OTPROM (One
22. Scrieti o functie care face conversia unui octet binar in doua caractere ASCII
corespunzator celor doi semiocteti exprimati in hexazecimal:
23. Se considera circuitul din figura urmatoare:
24. Desenati schema unui circuit pentru izolarea galvanica cu optocuplor a unei
intrari digitale intr-un microcontroller.
26. Stiind ca variabila rflg este setata de rutina de intrerupere de receptie a unui
caracter pe linia seriala asincrona la primirea unui caracter, iar rxdata contine
caracterul receptionat, explicati functionarea unui microcontroller AVR care
executa urmatorul program:
while (1)
{
if(rflg)
{
switch(rxdata)
{
case 0x30:
PORTB.0=0;
break;
case 0x31:
PORTB.0=1;
break;
} // end switch
} // end if
} // end while