The background systems that keep the CPU fed, timed, and visible. Los sistemas de fondo que mantienen la CPU alimentada, sincronizada y visible.
Santi Scagliusi, PhD
The CPU runs instructions. These keep it powered, ticking, supervised, and on-screen.La CPU ejecuta instrucciones. Estos la mantienen alimentada, en marcha, supervisada y en pantalla.
Clock system. Generates MCLK, SMCLK and ACLK.Sistema de reloj. Genera MCLK, SMCLK y ACLK.
Power management. Makes VCORE, supervises the supply.Gestión de energía. Genera VCORE y supervisa la alimentación.
Watchdog. Resets the chip if software hangs.Watchdog. Reinicia el chip si el software se cuelga.
LCD controller. Drives the 6-digit segment display.Controlador LCD. Maneja el display de segmentos de 6 dígitos.
One clock system fans out to the CPU and two classes of peripheral.Un sistema de reloj se reparte a la CPU y a dos clases de periférico.
Three oscillators feed the clock system. Each sits at a different point on the frequency line.Tres osciladores alimentan el sistema de reloj. Cada uno cae en un punto distinto de la recta de frecuencias.
After reset each signal is already bound to a source. You only touch CS to change it.Tras el reset cada señal ya está ligada a una fuente. Solo tocas CS para cambiarlo.
ACLK runs on REFO, not the crystal. Software must enable LFXT to use Y1.ACLK corre con REFO, no con el cristal. El software debe habilitar LFXT para usar Y1.
A wrong write to CSCTL0 triggers a reset. You unlock first, then configure.Una escritura incorrecta en CSCTL0 provoca un reset. Primero desbloqueas, luego configuras.
BIS.B #BIT4, &PJSEL0 ; PJ.4 = LFIN MOV.B #0A5h, &CSCTL0_H ; unlock, key = 0xA5 BIC.W #LFXTOFF, &CSCTL4 ; turn LFXT on
The key 0xA5 in the high byte opens the block.La clave 0xA5 en el byte alto abre el bloque.
It is 215. Fifteen divide-by-2 stages land exactly on 1 Hz.Es 215. Quince etapas de dividir entre 2 caen exactamente en 1 Hz.
A 15-bit counter overflows once per second. That is the heartbeat of a clock.Un contador de 15 bits desborda una vez por segundo. Ese es el latido de un reloj.
An LDO makes VCORE from DVCC. A supervisor watches the rail and resets on a droop.Un LDO genera VCORE desde DVCC. Un supervisor vigila la línea y resetea ante una caída.
After power-up or LPMx.5, unlock the pins with bic.b #LOCKLPM5, &PM5CTL0.Tras el encendido o LPMx.5, desbloquea los pines con bic.b #LOCKLPM5, &PM5CTL0.
These bits in the status register choose how much of the chip keeps running.Estos bits del registro de estado eligen cuánta parte del chip sigue en marcha.
One instruction sets the bits and the CPU stops. An interrupt wakes it; RETI restores the mode.Una instrucción pone los bits y la CPU se detiene. Una interrupción la despierta; RETI restaura el modo.
Each rung down turns off more clocks and drops the current further.Cada peldaño apaga más relojes y baja más la corriente.
More awake · higher current ← → less awake · lower currentMás despierto · más corriente ← → menos despierto · menos corriente
It runs unless software clears it. Reach the end and the chip resets.Corre salvo que el software lo borre. Llega al final y el chip se reinicia.
Stop it. First line of most examples. Key 0x5A, WDTHOLD = BIT7.Detenerlo. Primera línea de casi todo ejemplo. Clave 0x5A, WDTHOLD = BIT7.
Pet it. Clear the counter on a healthy loop so it never reaches the cliff.Acariciarlo. Borra el contador en un bucle sano para que nunca llegue al borde.
A dedicated controller paints segments with no CPU work once it is set up.Un controlador dedicado pinta segmentos sin trabajo de CPU una vez configurado.
Six alphanumeric digits, labelled A1 to A6.Seis dígitos alfanuméricos, etiquetados de A1 a A6.
Up to 320 segments, refreshed on the controller's own clock.Hasta 320 segmentos, refrescados con el reloj del propio controlador.
Each bit of the LCDMx byte switches one segment on or off.Cada bit del byte LCDMx enciende o apaga un segmento.
Set up LCD_C once (LCDCCTL0) and enable the pins (LCDCPCTLx). After that, writing the byte is the whole job.Configura LCD_C una vez (LCDCCTL0) y habilita los pines (LCDCPCTLx). Después, escribir el byte es todo el trabajo.
The exact LCDMx-to-digit map is board-specific, and the simulator does not model the LCD. This one we read on real hardware.El mapa exacto de LCDMx a dígito es propio de la placa, y el simulador no modela el LCD. Este lo vemos en hardware real.
From a single bit to a whole microcontroller, twelve modules.De un solo bit a un microcontrolador completo, doce módulos.
Bits, registers, addressing modes, instructions and formats.Bits, registros, modos de direccionamiento, instrucciones y formatos.
Memory map, assembly with C, interrupts and power, digital I/O.Mapa de memoria, ensamblador con C, interrupciones y energía, E/S digital.
Timers, cooperative multitasking, and the system modules.Temporizadores, multitarea cooperativa y los módulos del sistema.
The system modules, in three lines.Los módulos del sistema, en tres líneas.
MCLK for the CPU, SMCLK for fast peripherals, ACLK for low-power ones.MCLK para la CPU, SMCLK para periféricos rápidos, ACLK para los de bajo consumo.
PMM keeps it powered, LPM turns clocks off, the watchdog catches hangs.El PMM la alimenta, los LPM apagan relojes, el watchdog atrapa cuelgues.
Set up LCD_C once and it paints segments on its own. That is the whole point.Configura LCD_C una vez y pinta segmentos solo. Ese es todo el sentido.