View
0
Download
0
Category
Preview:
Citation preview
A MI PfiDRE
Pues su recuerdo y su guía, Me han dado la
Fuerza para salir adelante en MÍ carrera.
ft pesar de su ausencia y perder algo valioso
en MÍ vida, he sentido su presencia en el
anor f i l ial que va^'wás alia' del tiewpo
y las circunstancias físicas y desconocidas.
Gracias padre, hoí el pasado se torna presente
y ne lleno de orgullo de tí.
AGRADECIMIENTO.
A todos V quienes han hecho posible la realizacio'n
del presente trabajo, especialwente a los Ingenieros
Herbert Jacobson y JÍM Childs de HCJB, Fernando Flores
y Saúl Briones de la E.P.N., así COMO tawbie'n al
Insr. Adolfo Loza, director de la presente tesis.
Certifico que la presente tesis, ha sido desarrollada en su
totalidad por el señor Raúl Patricio Andrade Herrera.
fng. Adolfo Loza Arguello.
DIRECTOR DE TESIS.
CAPITULO 1
1.1.- EL MUNDO ACTUAL Y LA INFORMACIÓN.
1.2.- REQUERIMIENTOS.
1.3.- ESTÁNDARES DE TIEMPO / FRECUENCIA.
1.4.- ESTÁNDARES DE TIEMPO EXISTENTES EN EL
OBSERVATORIO DE LA EPN.
1.5.- DESEMPEÑO DE LOS ESTÁNDARES DE TIEMPO /
FRECUENCIA.
1.6.- MÉTODOS DE DETENCIÓN DE LA DESVIACIÓN.
1.7.- LAS SEÑALES WWV.
1.- INTRODUCCIÓN.
1.1.- EL MUNDO ACTUAL Y LA INFORMACIÓN.
Los sistemas automáticos que mantienen tanto el tiempo como la
frecuencia, reciben diferentes señales de estándares locales, las
cuales son emitidas en diferentes bandas y frecuencias con el fin
de realizar mediciones periódicas y determinar la precisión y
estabilidad de sus estándares, así como sincronizar los sistemas
de tiempo.
Las diferentes señales utilizan dos tipos de propagación: aérea
y terrestre, y al conocer las coordenadas de las estaciones
emisora y receptora así como el tipo de propagación utilizada por
la señal, se puede calcular el tiempo de retardo que sufre la
señal hasta ser recibida y por consiguiente corregir y tener una
hora tan exacta según se haya calculado éste tiempo, pues el
retardo de la señal varía de acuerdo al tipo de propagación
ut i 1 izada.
Al utilizar la señal remota para realizar las mediciones y
comparaciones se recomiendan realizarse siempre a una misma hora
del día y buscando tener las mejores condiciones climáticas,
mientras que el uso de un osci lador local permite tiempos de
muestreo más largos sin ingerencias ambientales; Hoy en día se
utilizan los satélites para emitir las señales horarias, pues se
cons iguen valores más altos de precisión.
1.2.- REQUERIMIENTOS.
1.2.1.- EXACTITUD DE LA HORA.
Las estaciones que reciben señales para su sincronismo,
procedentes de lugares que cuentan con estándares de primer
orden, ajustan su hora en la medida que sea exacto el cálculo del
tiempo de propagación; por citar un ejemplo, se puede mencionar
que el tiempo de retardo que sufre la señal de la estación WWV
hasta llegar al Observatorio de Quito es de 21.3 mS. , por lo que
la exactitud de los sistemas ajustados con ésta señal, estará en
éste orden.
Otro sistema muy utilizado es el LORAN C, debido a la potencia
de la señal, estabilidad y retardo de la emisión proporcionada
por la estación master de hasta 7 cifras significativas.
Esta señal se origina en el estado de Florida-USA, donde además
se emiten boletines diarios que indican el retardo de la señal,
la misma que para el caso de la estación del CLIRSEN es de
55497 . 1 microsegundos.
Cabe mencionar además el efecto que causan las condiciones
ambientales y superficiales sobre la señal, ocasionando un
retardo adicional, pero son valores muy pequeños comparados con
los t iempos de propagación de la señal.
Pero los s istemas que ahora son más ut i 1 izados para referencia
3
o comparación de la hora a nivel internacional, son los emitidos
a través del uso de satélites geoestacionarios3 debido a que se
alcanza una precisión en el orden de los nanosegundos
(característico en este tipo de sistemas), dependiendo del tipo
de satélite utilizado para el propósito, tal es el caso del GPS
(Global Positioning System), operado por el departamento de
defensa de USA el cual garantiza una exactitud dentro de 100
nanosegundos.
En nuestro país se recibe la información de tiempo del satélite
GOES, considerado de grado medio; éste satélite ha sido
desarrollado por el NBS (NATIONAL BUREAU OF STANDARES), el cual
presta un servicio que no es muy costoso a las regiones de USA,
Canadá y América del Sur; la exactitud de ésta señal está dentro
de los 100 microsegundos.
Todos estos sistemas de emisión de hora, tienen como base
estándares de tiempo de primer orden, los cuales a su vez son
comparados periódicamente-con señales de tiempo similares, lo que
permite conocer sobre la exactitud y estabilidad alcanzados.
Es por lo tanto necesario en un lugar donde se genera información
de "frecuencia y hora exactas", tener un conocimiento cabal de
los datos que posee un estándar patrón, para poder implementar
las correcciones del caso, y conocer los rangos de precisión que
mantendrá la frecuencia y hora generadas.
1.2.2.- CAMPO DE USO DE LA HORA EXACTA.
En Astronomía.- Para referencia de las observaciones
siderales.
En Investigaciones Espaciales.- Sincronismos en transmisiones
y recepciones con naves, así
como también el rastreo de los
mismos.
En Navegación Marítima.- Determinación de posición y trazo de
planes de ruta.
En Navegación Aérea.- Debido a que la velocidad es un factor
crítico, se utiliza la hora exacta, para
determinación de posiciones, así como
para el control de tráfico aéreo.
En Comunicaciones.- Sincronización de redes de comunicación
digital,
En Computación.- Tiempo real y sincronización de redes de
computadoras.
Industria de Potencia.- Medición de frecuencia, cuentas,
detección de fallas.
Industria Electrónica.- Medición y ajuste.
1.3.- ESTÁNDARES DE TIEMPO / FRECUENCIA.
Un estándar de frecuencia es un oscilador que genera determinadas
frecuencias con valores de estabilidad y precisión muy altos.
Los estándares de Cesio e Hidrógeno, están considerados como
primarios, pues, éstos alcanzan los valores más altos de
estabilidad y precisión conocidos.
Aunque se realizan comparaciones entre estándares de este orden,
no se pueden realizar calibraciones o correcciones para mejorar
sus características, sino solamente con fines de estudio sobre
su comportamiento.
1.3.1.- ESTÁNDARES PRIMARIOS.
La resonancia atómica de los estándares, utilizan efectos
mecánicos cuantizados en los estados energéticos de la materia,
particularmente transiciones entre estados energéticos separados
por energías correspondientes a frecuencias de microondas.
Las características principales de estos estándares son;
- Átomos en ciertos niveles de energía seleccionables.
- Disponibilidad por largo tiempo de ellos en estos estados.
- Capacidad de exponer estos átomos a energía de microonda.
- Detección de resultados.
6
Las transiciones tienen propiedades bien definidas en su
ocurrencia, es por ello el uso de los átomos de Cesio, Rubidio,
Talio e Hidrógeno, prestando mayor atención a tres dispositivos:
El Haz atómico de Cesio, La Celda de gas de Rubidio y el maser
de hidrógeno.
Los estándares de Cesio y Rubidio, utilizan resonantes atómicos
pasivos para gobernar osciladores convencionales, usualmente a
los de cristal de cuarzo.
El máser de Hidrógeno, es un dispositivo activo, que deriva su
señal debido a una emisión estimulada de microonda.
1.3.1.1.- ESTÁNDARES DE HAZ DE CESIO.
El estándar de haz de Cesio está en uso en cualquier lugar donde
se necesite alta precisión y exactitud en frecuencia y tiempo,
y es utilizado como base de los estándares de laboratorios
generadores de frecuencia y hora exacta en los Estados Unidos.
Para el estándar de Cesio, la cantidad de efectos de interés,
surgen en el campo magnético hiperfino nuclear de los átomos, una
transición particularmente apropiada ocurre entre el cuarto nivel
principal F = 4 , subnivel rrip = O , y el tercer nivel principal
F = 3 , subnivel m- = O , niveles hiperfinos del átomo de Cesio
133 .
Esta transición es apropiada para control de frecuencia, debido
a la relativa insensibilidad a influencias externas, tales como
campos eléctricos y magnéticos.
Para el oscilador de Cesio, la resonancia atómica es
9 192 631 770 Hz, y se basa en un oscilador que usa la selección
espacial. Un horno contiene el metal de Cesio, el cual es
calentado a una temperatura cercana a los 100 °C, temperatura a
la cual el haz atómico abandona el horno a través de una cámara
-9al vacío ( 10 atmósferas). El haz atraviesa el magneto, la
cavidad de microonda y finalmente alcanza el detector atómico,
el cual está formado de un cable de tungsteno a 900 °C.
La fig. 1.1 muestra el diagrama de bloques del estándar de Cs .
HORHO
DE CESTO
OSCILADOR DE CRISTAL DE
CUARZO Y SINTETIZADOR
DE FRECUENCIAS
SELECTOR
DE ESTADO
REALIMENTACIÓN
1
u
1
COU I DflD
SELECCIONADOS
DE ESIftDO
DETECTOR DE
ÁTOMOS
Fig. 1.1.- Diagrama de bloques del Es tándar de Cesio.
Los á tomos que chocan con el d e t e c t o r se i o n i z a n o se t o r n a n
e l é c t r i c a m e n t e cargados y pueden ser r ecog idos por un e l e c t r o d o
auxiliar, en donde el flujo de átomos cargados representa una
corriente eléctrica, la cual es amplificada, detectada y usada
en el camino de realimentación.
Como se puede apreciar en el diagrama anterior,el estándar de
Cesio utiliza un oscilador de cristal de cuarzo, debido a que
éstos poseen valores de estabilidad a corto plazo mejores que los
de Cesio, pero este último es más estable a largo plazo; por esta
razón una combinación de estos dos osciladores, permite mejorar
las características del estándar de Cesio.
1.3.1.2.- MASER DE HIDROGENO.
El maser (amplificación de microonda por emisión estimulada de
radiación), tiene una frecuencia atómica de resonancia de
1 450 405 752 Hz, y corresponde a la transición entre los estados
F = 1 y F = O del átomo de hidrógeno.
El resonador esta basado en un haz atómico seleccionado por el
método espacial y detectado por microonda. Todo haz natural de
hidrógeno está compuesto de moléculas de hidrógeno, cada una de
las cuales está formada por la unión de dos átomos de hidrógeno.
En la figura 1.2. se muestra el diagrama de bloques del máser de
hidrógeno.
FUENTE DE
HIDROGENO
SELECTOR
DE ESTADO
OSCILADOR DE C R I S T A L DE
CUARZO V SIHTETIZfiDOR
' DE FRECUENCIAS
F = i
REALIMENTACIÓN
SOLIDA
COMPARADOR DE
FRECUENCIAS
CAUIDAD CON BULBO
DE ALMACENAMIENTO
FIg. 1.2,- Maser de Hidrógeno.
La fuente del haz proviene de la disociación del gas en moléculas
de hidrógeno mediante descarga de radiofrecuencia, lo cual
produce hidrógeno atómico con alta eficiencia. El haz abandona
la fuente hacia una cámara al vacío para luego atravesar un
magneto selector de estado y finalmente entrar a un bulbo de
almacenan! i en to en una cavidad de m i ero onda .
La celda de interacción es vaciada a menos de 10 " de la presión
atmosférica y está construida de cuarzo con una capa de teflón.
La protección de teflón permite el choque de los átomos de
hidrógeno con las paredes sin producir disturbios significativos
sobre las oscilaciones.
La celda tiene un diámetro típico de 0.15 metros y es
10
dimensionada en una forma tal que contenga los átomos por un
tiempo cercano a un segundo.
Dentro de los patrones de tiempo y frecuencia, el maser de
hidrógeno tiene la mejor estabilidad de frecuencia para tiempos
de muestreo entre 1 y 10 segundos.
El funcionamiento del maser alcanza valores de estábil idad del
orden de 1 x 10 . , sin embargo, la señal liberada por el maser
es a una frecuencia y potencia que no se usa directamente; esto
implica que el receptor requiere trasferir la estabilidad del
maser a un oscilador de cristal (TXCO) que trabaja a una
frecuencia de salida entre 5 y 100 MHz. La contribución de ruido
del receptor electrónico degrada la estabilidad de frecuencia de
la señal original del maser.
Existen, sin embargo, métodos específicos que predicen en gran
forma las características de ruido de dichos componentes.
El desarrollo del maser de Hidrógeno en los últimos años ha
llevado a una reducción en su tamaño sin rebajas sustanciales en
sus características de estabilidad de frecuencia. Este maser de
hidrógeno con características únicas, usa una cavidad dieléctrica
de un diámetro externo de 14.7 cm. y 13.7 cm. de largo con un
peso de 4.4 Kg. con una fuente convencional, selección espacial
hexapolar y cuatro campos magnéticos, el volumen del resonador
completo es cerca de 20 litros.
11Estos osciladores presentan valores de Q en el orden de 10 , lo
que significa que poseen el valor más alto del factor de calidad
entre los osciladores actualmente en uso.
Los valores de estábil i dad a lo largo del tiempo no son tan
buenos como los osciladores de Cesio 5 sin embargo para períodos
cortos de hasta un día, el maser tiene la mejor estabilidad de
todos los osciladores existentes.
El estándar de Hidrógeno tiene aplicación en aquellos campos
donde la estabilidad a corto tiempo es crítica y a diferencia de
los osciladores de Cesio y Rubidio, el maser está aun sujeto a
pruebas experimentales bajo condiciones ambientales adversas.
En general, algunos de-los efectos negativos que se tiene sobre
los generadores atómicos son el campo magnético externo, las
colisiones, distribución asimétrica alrededor de la frecuencia
de resonancia, el efecto doppler y el ruido en los circuitos
electrónicos.
1.3.2.- ESTÁNDARES SECUNDARIOS.
Los estándares de frecuencia secundarios, son aquel los que son
referidos en su control a un estándar primario; los osciladores•
de cristal de Cuarzo y Rubidio, son ampliamente utilizados como
estándares secundarios de alta calidad.
Hay que anotar que el estándar de Rubidio es conceptualmente
12
diferente al de cristal de Cuarzo, ya que tiene un origen
distinto, pues es de tipo atómico y exhibe mejores valores de
estab i 1idad.
i1.3.2.1.- OSCILADOR ATÓMICO DE RUBIDIO.
Conocido también como Celda de vapor de Rubidio, utiliza también
un resonador pasivo.
La figura 1.3. muestra el diagrama de bloques de este estándar.
LAMPARA(Rb-87)
kw9r
CELDA
Rb -
F = 1
CON
87
F = 2.
k-
t.K
F1LTRO
CELDfi CON Rb-85
FOIODETECTORi
CAUIDítD (*>
REAL1MENTACIÓN
OSCILADOR DE CRISTflL DE
CUñJÍZO Y SINTETIZADOR
DE FfíECUEHCIftS
SALIDA
Fig. 1.3.- Oscilador Atómico de Rubidio.
La operación del estándar de Rubidio está basado en la
transición hiperfiria del Rb - 87. El vapor de Rubidio y un buffer
de gas (reduce el efecto de las colisiones), están contenidas
en una celda iluminada por un haz de luz filtrado.
13
Un fotodetector observa los cambios cerca de la resonancia en una
cantidad de luz absorbida como una función de la frecuencia de
microonda api i cada.
La señal de microonda es derivada por multiplicación de la
frecuencia del oscilador; un servo lazo conecta la salida del
detector y oscilador, tal que, el oscilador esté asegurado en el
centro de la línea de resonancia.
Utilizando una técnica de bombeo óptico, se genera un exceso de
población en uno de los niveles hiperfinos del Rb - 87 dentro de
una celda; la población en el nivel F = 2 es incrementada a
expensas del nivel F = 1 .
Los átomos del Rb - 87 i luminados son ópticamente excitados
hasta un nivel mayor de energía, para desde ahí decaer nuevamente
a los niveles F = 2 y F = 1. La luz excitante ha sido filtrada
para remover las componentes de fuga del nivel F = 2 , a un nivel
de energía mayor.
El oscilador se basa en una celda de gas que usa el método deo
selección óptica. La celda contiene gas de Rubidio a 10 de la
presión atmosférica. La resonancia atómica del Rb - 87 es de
6.834.682.608 Hz.
Con el fin de reducir el efecto de la colisiones entre los
átomos, se introduce Argón (gas inerte amortiguador). Las
colisiones atómicas así como la acción simultánea de la luz y las
14
señales de mícroonda sobre el mismo átomo, producen variaciones
-9de frecuencia en el orden de 10 .
Estos cambios de frecuencia dependen fundamentalmente de la
presión y temperatura del gas amortiguado, así como de la
intensidad de la luz, ya que esta dependencia varía con el
tiempo, los osciladores de Rubidio necesitan una calibración
inicial y recalibración cada cierto tiempo, debido a que muestran
un envejecimiento y degeneración similar a los osciladores de
cristal .
Su característica de estabilidad, sin embargo, es muy apreciable,
presentando valores de 10 para tiempos de muestreo menores a
-13un segundo y hasta 10 para tiempos superiores a un día.
Los oscil adores de Rubidio son utilizados en aquel las
aplicaciones que requieren excelente estabilidad, donde su bajo
costo, peso y menor tamaño que los osciladores de Cesio es
fundamental, y en aplicaciones donde los osciladores de cristal
no son suficientes por su constante descaí ibración.
(FREQUENCY AND TIME STAND ARS APL I CATIÓN NOTE, HEWLETT PACKARD)
1.3.2.2.- OSCILADORES DE CRISTAL DE CUARZO.
Estos osciladores son ampliamente usados y dominan actualmente
el campo de los generadores de frecuencia.
15
El cristal de cuarzo es el resonador mecánico del oscilador
(dispositivo que vibra u oscila al someterlo a una excitación),
cuyas oscilaciones son excitadas mediante el efecto
piezoe1éctrico en el cristal. Se presenta cuando se ejerce una
compresión mecánica sobre el cristal, lo que genera un voltaje
a través del mismo,
En forma inversa, la aplicación de un voltaje externo a través
del cristal da lugar a una expansión o contracción dependiente
de la polaridad del voltaje.
La estabilidad de los osciladores de cuarzo, se ve beneficiada
al tener un control sobre la temperatura y humedad, por lo que
los cristales se hallan localizados en hornos sellados,
permitiendo con esto además prevenir efectos de vibraciones
mecánicas que también influyen sobre la estabilidad.
Una característica inherente al oscilador de cristal de cuarzo
es que su frecuencia cambia, como consecuencia del
envejecimiento, esta variación es constante, y luego de un
período inicial comprendido entre unos pocos días a un mes, la
estabilidad debida al envejecimiento se ve afectada
miñori t ariamente.
En la figura 1.4. se puede observar el diagrama de bloques del
oscilador de Cuarzo.
16
PROPORTIONALLY-CONTROLLED DOUBLE OVEN
* OUIPUT5 ARE 8 U F P E R E D TO KEEP EACH SFABLE TO K l fH IH 2 PARTS |N I011 RECARDLESS OF LOAD CHAKCE IN OTHERS**F8EQUENCY AOJUST. A |OV CHAHGE (+5V TO -5V) IN APPLIED VOLTAGE CHANCES THE SMHz OUTPUT BY ^ 2 PARTS |N 10'
Fig. 1.4." Diagrama de bloques del Oscilador de Cuarzo.
Para largos períodos, el error acumulado puede' 'Ser ya muy
significativo, así: una desviación. de 1 parte en 10 por día,
8puede acumular en un año varias partes en 10
Con el fin de obtener una mejor característica de estabilidad.de
frecuencia, se -ha diseñado el oscilador de cristal de temperatura
compensada o TXCO . Este incremento de estábil i dad se logra a
expensas de un circuito adicional, de mayor volumen y mayor
consumo de potencia.
Es te osci lador I i ene un elemento que puede ser un pequeño
capacitor que permite " sintonizar el oscilador sobre un rango
17
1 imitado. Si se añade un sensor de temperatura que actúe sobre
el capacitor, la variación de frecuencia de resonancia del
cristal, puede ser minimizada con el uso de capacitores, cuyo
valor cambie con el voltaje aplicado (VARACTORES).
En la actualidad, se puede conseguir TXCO con una estabilidad de_T
frecuencia-temperatura del orden de 10 sobre un amplio rango
de temperatura.
Los resonadores de cristal tienen valores de Q (Q = VQ / W) ,
donde VQ es la frecuencia de resonancia y W es el ancho de banda
de media potencia o diferencia de las dos frecuencias de media
5 1potencia; entre 10 y 10 , que son altos si se compara con
resonadores distintos de los atómicos.
1.3.3.- OTROS GENERADORES DE FRECUENCIA.
a) TRAMPA DE IONES.- Al igual que los patrones antes
mencionados, éste refiere su frecuencia a las transiciones en el
estado hiperfino básico de la estructura de los respectivos
átomos.
La limitación de aquellos radica parcialmente en que el tiempo
de interacción del átomo y el campo de microondas es restringido
por el tiempo de transición del átomo a través de la región de
interacción en el tubo de Cesio, o por las colisiones contra las
paredes o gas amortiguador, en el maser de Hidrógeno o la celda
de Rubidio, respectivamente.
18
b) HAZ ATÓMICO DE MAGNESIO.- Experimentos recientes realizados
con el Mg-24 como generador de frecuencia en base a transiciones
finas en su estructura han dado lugar a un patrón cuya frecuencia
básica de transición es de 601.277.158.33 Hz . con incertidumbre
-13del orden de 10 para tiempos de 10 segundos o mayores.
Este generador está actualmente en estudio, pero se ha lia
limitado principalmente por el efecto Doppler.
Existen otros tres dispositivos de interés que son utilizados
como estándares de frecuencia, que son el haz de Talio, el maser
de Amoníaco y el maser de Rubidio.
El maser de Amoníaco es atractivo debido a su alta pureza
espectral y una excelente estabilidad a corto plazo que ofrece,
aunque su desarrollo e investigación, no han sido difundidos en
aplicaciones de control de frecuencia.
El haz de Talio, similar al estándar de Cesio presenta grandes
perspectivas de ser utilizado como estándar, debido a su alta
precisión; en la actualidad se halla en estudio.
El máser de Rubidio se ha desarro 1 lado recientemente, el cual
ofrece una pureza espectral, que excede a cualquier estándar
atómico existente.
( FREQUENCY AND TIME STANDARS APLICATION NOTE, HEWLETT PACKARD
CO. )
19
1.3.4.- TEMPERATURA Y ENVEJECIMIENTO DE LOS CRISTALES.
Estos fenómenos son dos de los efectos más importantes en el
diseño de los osciladores de cristal: la temperatura afecta a la
frecuencia de resonancia, mientras que el envejecimiento del
cristal produce una degeneración en él conforme transcurre el
t iempo.
Es asíj que para disminuir la ingerencia de la temperatura y
humedad, los osciladores de cristal de cuarzo son herméticamente
encerrados en hornos ( 2 comúnmente ).
En el horno interno, se hallan ubicados el cristal y el control
de temperatura, mientras que en el horno externo, se encuentran
los circuitos controladores automáticos de ganancia (A.G.C) y los
controladores de la temperatura.
(QUARTZ OSCILATORS HEWLETT PACKARD).
En la figura 1.5, se puede apreciar una vista de corte del
oscilador de Cristal de cuarzo.
20
OUTEROVEN
INWEROVEN
INNER OVENCONTROL ASSEMBLY
CRY5TAL OSCASSEMBLY
OUTER OVENCONTROL ASSY
Fig. 1.5.- Vista de corte de un oscilador de
Cristal de Cuarzo,
1.4.- ESTÁNDARES DE TIEMPO EXISTENTES EN EL OBSERVATORIO
ASTRONÓMICO DE LA E.P.N.
1.4.1.- DESCRIPCIÓN.
El Observatorio de la E.P.N. dispone del oscilador de cuarzo
modelo 106A, el cual puede ser utilizado como estándar de
frecuencia / t iempoj posee tres sal idas sinusoidales cuyas
frecuencias son de 5 MHz, 1 MHz y 100 KHz. La estabi 1 i dad a
corto plazo de Ja salida de 5 MHz es de 1.5 partes en 10 ,
promediada en un período de rnuestreo de 1 segundo; mientras que
la relación de envejecimiento es menor que ± 5 partes en 10
en 24 horas.
21
11
La frecuencia del oscilador puede ser eléctricamente variada ens
un rango de 2 partes en 10 ' utilizando un voltaje d.c. de ± 5
volt ios, aprovechando la entrada E.F.C. (Electric Frequency
Control), El suministro de un voltaje positivo por esta entrada
incrementará la frecuencia de oscilación, mientras que un voltaje
negativo decrementará la misma.
Este modelo está diseñado para operar mediante una fuente de
regulada de 22 a 30 voltios.
La estábil idad del oscilador es obtenida mediante un cristal
residente; éste y otros componentes críticos permanecen en un
doble horno, teniendo un control proporcional de la temperatura;
el sellamiento del horno minimiza las variaciones debidas a
cambios de humedad.
Los componentes de estado sol ido mantienen la estábil idad de
frecuencia cuando el oscilador está sujeto a vibraciones o
goIpes.
La salida de 5 MHz es espectralmente pura y puede ser
multiplicada para obtenerse frecuencias en la banda X (8.2 a 12.4
GHz), proveyendo un espectro de la frecuencia fundamental que es
menor que 1 Hz en los puntos de media potencia.
22
la estabilidad y pureza espectral de esta señal la hace apropiada
para mediciones de efecto doppler, microondas espectroscópicas
y aplicaciones similares donde la frecuencia fundamental debe ser
multiplicada varias veces.
Las tres salidas del oscilador están bien aisladas entre sí , de
tal manera que un corto circuito en una de ellas no interrumpirá
a las dos restantes.
Los niveles de las señales de 5 MHz, 1 MHz y 100 KHz son de
1 V rmsj cuando terminan en cargas de 50 ohms.
(QUARTZ OSCILATOR OPERATING AND SERVICE MANUAL
-HEWLETT-PACKARD-).
1.4.2.- ESPECIFICACIONES
- Frecuencias disponibles: 5 MHz, 1 MHz y 100 KHz
(sinusoidales).
- Voltajes de las señales de salida: 1 voltio rms con 50
ohmios.
Relación de envejecimiento: < + 5 partes en 10 en 24 H,
- Estabi1idad:
- Como función de la temperatura:<+ 1 x 10 entre 0° y 40
23
- Como función de la humedad: No es afectada debido a que
el oscilador está sellado.
-I f- Como función de la carga: el cambio es < + 2 x 10
para circuito abierto, corto circuito o 50 ohmios R-L-C.
• Como función de la fuente de energía: < + 2 x 10
el rango de voltaje entre 22 a 30 voltios de.
-11 para
La variación de la estabilidad debido a la fuente de energía,
está relacionada con la fuente rectificada, la cual contiene
rizado, aunque mínimo, pero es influyente.
A continuación se muestra en el siguiente cuadro, algunos valores
de desviaciones para el estándar de cristal de cuarzo 106A. Los
valores de desviaciones registradas han sido tomadas sobre 100
muestras para intervalos de 1 mS, 10 mS y 0.1 S cada 20 segundos;
asimismo, 200 y 2000 muestras para intervalos de tiempo de 1 y
10 S.
TIEMPO MAX. DESVIACIÓN DE
PROMEDIO FRECUENCIA RMS (óf/f)
MAX. DESVIACIÓN DE FASE
RMS (óf/f) (MILIRAD.)
1 mseg.
10 mseg.
O . 1 seg.
1 seg.
10 seg.
8 x 10
1.5 x 10
1.5 x 10
1.5 x 10
1 . 5 x 1 0
-ÍO
-11
-11
0.03
0.04
0.04
0.4
4.0
24
1.5.- DESEMPEÑO DE LOS ESTÁNDARES DE FRECUENCIA.
El desempeño de un estándar de frecuencia es usualmente descrito
en términos de precisión, reproductibilidad y estabilidad, que
se definen como:
1.5.1.- PRECISIÓN.- Es el grado en el cual la frecuencia de un
oseilador corresponde a la de un estándar primario (1).
1,5.2.- REPRODUCTIBILIDAD.- Es el grado en el cual un oscilador
producirá la misma frecuencia luego de un tiempo determinado (1).
1.5.3.- ESTABILIDAD.- La estabilidad de un oscilador, es el
grado por el cual, la frecuencia será la misma durante un corto
o largo período de t iempo (1).
(1).- Tomado de los "Objetivos de temporización del CCITT G.811.
La estabilidad de un estándar de frecuencia/tiempo, es una de las
características más importantes inherentes a él, por lo que
aquella (la estabilidad) se la define a corto y largo plazo.
1.5.3.1,- ESTABILIDAD A CORTO PLAZO.
Es una expresión que hace referencia al cambio en la frecuencia
promedio sobre un tiempo suficientemente corto (pero excediendo
algún tiempo mínimo); los cambios en estos períodos son de
pequeña significación.
25
Hasta la presente, no existe un criterio general para especificar
el término corto plazo; los típicos valores para un oscilador de
cuarzo ultrapreciso son los siguientes:
11 Desviación de la frecuencia fraccional es 1 parte en 10
para un período de 0.1 segundos de tiempo promedio ".
1.5.3.2.- ESTABILIDAD A LARGO PLAZO.
Se refiere a pequeños cambios en la frecuencia promedio respecto
a pequeños cambios originados en el resonador u otro elemento de
un oscílador.
La expresión " estabilidad a largo plazo " para osciladores de
cuarzo es para hacer mención a la relación o taza de
envejecimiento y especificarla en " partes por día ", (cambios
de la frecuencia fraccional en 24 horas).
Para un estándar de Cesio¡ ésta expresión comúnmente hace
referencia a la desviación total de la frecuencia fraccional en
el tiempo de vida util del tubo del haz de Cesio.
Asimismo, un valor utilizado para mencionar un parámetro de esta
naturaleza para el mismo tipo de oscilador ya mencionado es:
" La estabilidad a largo plazo es de 5 partes por día ".
La buena reproductibi1idad es una ventaja en aplicaciones donde
26
se requiera sincronización entre varios aparatos; sin embargo,
la estabilidad en frecuencia es usualmente la característica más
importante para el usuario.
La determinación de la estabilidad, se realiza mediante los
denominados estimadores (expresiones matemáticas), los cuales son
abordados a continuación.
1.5.4.- INDICADORES DE ESTABILIDAD DE LOS ESTÁNDARES.
En Estadística, los indicadores que determinan el comportamiento
y la cuantificación de eventos aleatorios, se denominan
ESTIMADORES, los cuales, son expresiones o modelos matemáticos
determinísticos probabilísticos que mejor se ajusten en la
determinación de un parámetro (2).
Para el presente caso, la determinación de la estabilidad de un
estándar de segundo orden, estará representada por la desviación
experimentada por el instrumento en el transcurso del t iempo.
Esta desviación, debe ser determinada por una de las expresiones
más adecuadas existentes, pues existen algunos est imadores, los
cual es deben ser útil izados de acuerdo a como se ajusten más a
la realidad en base al tamaño de la muestra, el período de
ocurrencia etc.
De acuerdo al fenómeno físico ocurrido en la oscilación del
cristal de cuarzo, la estabilidad de éste, se determina mediante
27
dos tipos de est imadores a criterio del N.B.S., que son la
DESVIACIÓN PROMEDIAL y LA VARIANZA DE ALLAN.
La desviación promedial, está determinada por la detección del
desfasamiento entre dos pulsos en un período de tiempo de
muestreo, registrando la primera y la última lecturas, para luego
realizar la diferencia de las dos, y luego realizar la división
para el período de muestreo.
A continuación se muestra la expresión matemática del estimador:
ó f ó t
f T
donde: óf = error promedio de frecuencia.
út = desviación durante el período T.
T = período de comparación,
f = frecuencia a ser chequeada.
El segundo est imador ut i 1 izado , es la Varianza de Alian, en donde
se registra el cambio o desfasamiento entre dos pulsos, cada
unidad de tiempo, en.un período de muestreo determinado, al final
del cual se procede con los cálculos respectivos.
La expresión matemática del estimador se muestra a continuación:
r- - Y-ff-+ __ f—. wi.i>i _AV*-' — -y t-™!
2 7)
28
Donde: X¡: es la lectura actual del temporizador.
X¡+|: es la lectura siguiente del temporizador.
n: es el número de diferencias del intervalo de
t iempo.
La varianza de Alian, es el estimador más idóneo para determinar
la desviación de un estándar de tiempo/frecuencia, pues se basa
en la detección continua de los desfasamientos en el período de
tiempo escogido.
Los dos estimadores son complementarios, pues la varianza de
Alian, por proceder de una raíz cuadrada, carece de signo,
mientras que la desviación fracciónal, aunque es de menor
resolución, permite conocer el signo de la desviación, y mediante
éste el signo del voltaje corrector.
La varianza de Alian toma en cuenta el desfasamiento segundo a
segundo, razón por la cual presenta valores más reales respecto
de otros equivalentes calculados mediante otras expresiones, y
se prefiere además que el número de muestras tomadas sea alto.
Una vez que se ha calculado el valor mediante esta expresión, se
debe dividir para la frecuencia de muestreo.
(2).- PROBABILIDAD Y APLICACIONES ESTADÍSTICAS - PAUL L. MEYER.
29
1.5.5.- MEDICIÓN DE LA ESTABILIDAD.
La estabilidad de un estándar se efectúa mediante la comparación
del pulso generado por el estándar en estudio y otro de igual o
mejor resolución. La comparación entre pulsos determinará si
existe o no desfasamiento entre ellos, por esto debe
implementarse métodos que sean capaces de detectar tales
desviaciones en tiempo cortos de ocurrencia, y posteriormente
procesar e interpretar esa información.
Los sistemas a diseñarse deben reunir cuatro requisitos, a
criterio del National Bureau of Standars (N.B.S.), para que los
resultados sean confiables, los cuales se enumeran a
cont inuación:
- El período de ocurrencia entre muestra y muestra (t), puede ser
de 0.1 , 1 o 10 S., debiéndose escoger este tiempo, de acuerdo
a la facilidad en la detección.
- El período de muestreo debe ser suficientemente grande, (mayor
que 1/t); el período de tiempo normalizado es de un día.
- Los elementos a utilizarse deben tener un t iempo de respuesta
mucho más rápido que el evento a registrarse.
- El t iempo de respuesta debe ser finito, lo que ayuda a tener
una cuantificación sobre el error que se comete al realizar la
medición, y poder determinar la significación de éste.
30
Los métodos que han sido implementados pueden ser manuales y
automáticos, siendo más confiables los segundos, debido a que la
detección es realizada mediante contadores electrónicos, a
diferencia de los primeros que se realizan mediante operadores.
1.6.- MÉTODOS DE DETECCIÓN DE LA DESVIACIÓN.
Dentro de los métodos más utilizados para determinar dichas
desviaciones, se mencionan: aquel los que utilizan una señal
remota, y aquel los que utilizan un oscilador local primario o
secundario como referencia.
1.6.1.- DETECCIÓN MEDIANTE EL USO DE UNA SEÑAL REMOTA GENERADA
POR UN ESTÁNDAR PRIMARIO.
Este método de detección utiliza receptores de señales de tiempo,
el que provee información tanto visual como audible (tonos), de
la hora.
Dentro de este método la detección de la desviación se puede
hacer por dos caminos: el primero utilizando un detector digital,
y el segundo utilizando un osciloscopio. Los dos procedimientos
tienen ventajas y desventajas que también serán abordados.
1.6.1.1.- DETECCIÓN DIGITAL.
En este método se utiliza un contador electrónico de intervalos,
el cual mostrará el desfasamiento existentes entre los dos pulsos
31
de 1 Hz. que ingresan a él; el uno procedente de la estación
remota y el otro procedente del estándar en estudio.
Se hace necesario la utilización de un divisor de frecuencia (que
cuenta con reloj incorporado), pues la señal que provee el
estándar local es de 5 MHz., 1 MHz. y 100 KHz. y se necesita
conseguir a partir de ellas una señal de 1 Hz. por división para
proceder con la comparación ya mencionada.
La señal de 1 Hz.' entregada por el divisor de frecuencia es
utilizada para iniciar el intervalo de conteo, mientras que la
señal recibida sirve para detenerlo.
EJ método se ilustra a en la figura 1.6.
FREO DIV 4 CLOCK HPII5BR
TUNABLELF/VLF RECE1VER
DIGITAL-TO-ANALOG .SÍRIP-CHARÍ RECCONV HP58IA MOSELEY 680
Fig.1-6.- Detección de la desviación
32
Este valor es mostrado en los displays provistos para el efecto,
el cual está en el orden de los microsegundos y posee 6 cifras
significativas, es decir, puede detectar desfasamientos entre O
y 999999 microsegundos.
Como ventajas en este método se pueden mencionar las siguientes:
- El desfasamiento entre los pulsos es directamente detectado
y mostrada por el contador.
La información puede ser grafizada con la ayuda de un
dispositivo para el efecto y posteriormente utilizada para
fines estadísticos.
La desventaja para este método' de detección es que la recepción
de la señal se debe hacer en horas en que la propagación de la
señal se considere uniforme y se recomienda que el tiempo de
muestreo no sea mayor a dos horas.
Al no poseer el grafizador para determinar la desviación, el
cálculo se debe realizar manualmente anotando los valores segundo
a segundo durante todo el período.
1.6.1.2,- DETECCIÓN MEDIANTE EL USO DE UN OSCILOSCOPIO.
El segundo método, como ya se indicó, utiliza un osciles copio,
teniendo en este caso una detección visual.
33
La señal remota que se recibe es amp1ificada y mostrada en el
osciloscopio (eje vertical), la cual es sincronizada externamente
por la señal proveniente del estándar local a ser comparada, la
cual es de 1 Kfíz.
La figura 1.7, ilustra el método indicado.
DSC'ILLQSCOPE HPI20B
TUNABLELF/VLF REGEIVER
FREQSTANDAfiO HP107AR/BR FREO DIVIDER4CLOCK HPII5BR
Fig . 1.7.- Detección mediante el uso de osciloscopio
Como método alternativo se utiliza un divisor de frecuencia, para
que a partir de una señal de 100 KHz., proveída por el estándar
local, sea convertida a una señal de 1 KHz. La señal recibida
debe ser un m ú l t i p l o entero respecto de la señal usada para el
barridodelosciloscopio.
La comparación de las medidas son hechas utilizando el cruce por
34
cero y un punto de referencia, y se deberá observar la cantidad
y dirección de la desviación sobre un período de t iempo. Una
desviación hacia la derecha indicaría que la frecuencia del
estándar local es más alta} mientras que una desviación hacia la
izquierda indicaría que la frecuencia es más baja.
Como ventaja de éste método se puede anotar:
Sólo se necesitaría un osciloscopio que cubra este rango de
frecuencia para la determinación del error.
Como desventaja se puede anotar:
Que el ruido presente en la señal recibida aproximadamente
es de la misma frecuencia de la señal portadora y puede ser
de suficiente amplitud que cause confusión.
La exactitud en las comparaciones está determinada por la
estabilidad del disparo del osciloscopio, precisión en la
calibración del barrido y la habilidad del usuario para
integrar y resolver el valor ót; por lo que no es
recomendado determinar exactitudes de estándares queo
necesitan varias partes en 10 .
1.6.2.- MEDIANTE EL USO DE UN OSCILADOR PRIMARIO.
Este método requiere de un estándar primario o de otro secundario
en ausencia de él, un mezclador, un circuito disparador y un
35
contador digital. La figura 1.8, ilustra el método a seguirse:
UNDER TESTHP5I02A FREQ SYNTH
J:» • «L
NOHINHz
(Single per mode)H P 5 2 4 5 L COUNTER
REFEREHCEHP107BR QÜARTZ OSC
H P 5 8 I A MOSELEY 680D/A CONVERTER STRIP CHART REC
Fig 1.8.- Detección de la desviación utilizando un
estándar local
El ose ilador primario es seteado a una frecuencia de 1 MHz. ± 1
Hz, ; ésta señal- es mezclada con la salida de 1 MHz. del oscilador
a ser comparada, obteniéndose a la salida del mezclador una señal
de 1 Hz. añadida a la desviación, la cual sirve corno señal de
disparo para el contador.
La señal de 1 MHz . que provee el estándar se utiliza como ba^se(
de tiempo para el contador del intervalo de desfasamiento;
36
asimismo, este valor de desfasamiento puede ser grafizado
utilizando un dispositivo previsto para el efecto, con fines
estadíst icos.
La ventaja de este método es que el contador permite leer
directamente la lectura de las desviaciones existentes.
Otra ventaja es que se puede escoger el tiempo de muéstreo
estandarizado de 24 horas.
Como desventajas se pueden anotar las siguientes:
Se necesita de la presencia de un oscilador primario.
Se necesita implementar un mezclador para obtener la
diferencia de las señales ingresadas.
Se requiere de un dispositivo grafizador de las desviaciones
para registrar los resultados de la desviación.
De los métodos mencionados anteriormente, el de mayor exactitud
es el que utiliza el estándar local, pues la desviación se puede
calcular sobre una muestra con período de tiempo estandarizado,
que permita tener un valor de desviación más real.
(Los métodos citados son sugeridos por el N.B.S. y han sido
tomados del manual de Frecuencia y tiempo)
37
1.6.3.- MÉTODO UTILIZADO EN EL PRESENTE TRABAJO.
El proceso para la determinación de la estabilidad de un estándar
de segundo orden en el presente trabajo, está basado en las
recomendaciones del N.B.S. ya mencionadas, el mismo que se
detalla a continuación:
El diseño está basado en un sistema rnicroprocesado (digital ) ,
basado en el microcontrolador MCS-8031, mediante el cual se
ejecutan programas para resolver las operaciones de cálculo de
las desviaciones y corrección. Este elemento, además utiliza
temporizadores como elementos periféricos, para detectar los
desfasamientos .
El muestreo se realiza cada segundo (t = 1 S.), pues, en este
tiempo, el microcontrolador debe realizar lecturas de los
desfasamientos y otras operaciones adicionales de cálculo
El sistema puede utilizar una de las dos señales remotas WWV o
WWVB o un estándar primario local; para el primer caso con un
período de muestreo de 2 horas, mientras que 24 para el segundo
caso. En ambas opciones se cumple con la condición de que el
t iempo de muestreo debe se mayor a 1/t.
La detección de los desfasamientos, se realiza mediante el
temporizador 8253-5, el cual puede trabajar con una frecuencia
de reloj de hasta 5 MHz, con un tiempo de respuesta de 300 nS.,
el cual es mucho menor al evento a registrarse (1 S). El tiempo
38
muy pequeño de respuesta, evita tener errores ponderables que
influyan en los resultados.
El sistema diseñado, está integrado en un solo componente, el
cual contiene todos los elementos necesarios para la detección,
almacenamiento, cálculo y corrección de la desviación. Esta
última opción es necesaria para mantener la estabilidad de los
estándares de segundo orden.
Al utilizar la señal remota, se requiere de un receptor que cubra
el rango de frecuencias en las que se emite esta señal; la que
además se utiliza para el sincronismo en la detección digital.
El receptor de la estación WV, provee una señal de 1 Hz. la cual
es visible mediante un osciloscopio y audible mediante un tono
de 1500 Hz.
La figura 1.9 muestra los bloques necesarios para la
determinación de la desviación, en donde además se puede apreciar
los elementos disponibles que son el receptor de la señal WWV y
su antena, así como el estándar local si se utiliza la otra
opción; el bloque a diseñarse se indica con línea punteada
DIAGRAMA DE BLOQUES DEL SISTEMA DETECTOR-CORRECTOR
DE DESUIACIONES DE ESTÁNDARES DE TIEMPO,
E S T Á N D A R
L O C A L
i MHz
B L O Q U E A D I S E Ñ A R S E
BLOQUE D I U I S O R
DE FRECUENCIA
1 Hz
BLOQUE
CORRECTOR DE
LA DESUÍACION
BLOQUE DE
REGISTRO V
CALCULO DE LA
DESUÍACION
1 2 3 4 5 6
i Hz
MICROSEGUNDOSSTftRT STOP
DETECTOR
D E D E S U I A C I O N E E
1 MHz
B A S E DE
T I E M P O C I N 3
RECEPTOR DE LA
ESTACIÓN REMOTA
DE HORA EXACTA
i Hz
BLOQUE D I U I S O R
DE FRECUENCIA
E S T Á N D A R
L O C A L
F I G U R A 1 .9
40
1.7.- LAS SEÑALES WWV.
El National Burean of Standarás opera 4 estaciones: WWV, WWVH,
WWVB j WWVL ubicadas en territorio norteamericano; así las
estaciones WWV, WWVB y WWVL están ubicadas en Ft . Col 1 ins,
Colorado, y la estación WWVH en Maui, Hawai en USA, teniendo
como generadores fuentes de haz de Cesio.
La señal WWV utiliza frecuencias portadoras de 2.5, 5 , 10 ,15,
20 y 25 MHz, que modulan señales de 440, 600 y 1000 Hz
dependiendo de la hora y uso, con una potencia de transmisión de
1 a 5 Kw para la primera y quinta frecuencias, mayores a 5 Kw
para la segunda, tercera y cuarta, y menores a 1 Kw para la
última frecuencia.
La señal WWVH utiliza portadoras de 2.5, 5 y 10 MHz. para
modular señales de 440, 600 y 1200 Hz, con una potencia de
transmisión menores a 1 KW. para la primera frecuencia, de 1 a
5 Kw. para la segunda y mayores a 5 Kw para la última frecuencia.
La estación WWVB utiliza una portadora de 60 KHz. con una
potencia de transmisión mayor a 5 Kw., mientras que la estación
WWVL utiliza una portadora de 20 KHz. con una potencia de 1 a 5
Kw.
Estas señales están codificadas en alfabeto Morse, y además puede
escucharse el audio de un anunciador que previene la llegada de
los diferentes tonos.
41
La señal WWV, también disemina la hora útil izando codificación
BCD (decimal codificado en binario), mediante una trama cuya
duración es de 1 segundo: y esta formada por 100 pulsos.
La trama incluye información de los segundos, minutos, horas, día
del año y bits no utilizados, así como bits de separación, bits
de referencia o marca.
El reconocimiento del "O" o del "1" se lo hace por medio del
ancho del pulso, los cuales son de 2 ms. y de 6 ms.
respect ivamente.
El inicio de una trama tiene lugar luego de la recepción de la
secuencia 1000011111 la cual va incluida al final de la trama
anterior; a continuación se recibe la información de los
segundos, minutos y el día del año; las unidades, las decenas y
centenas utilizan 4 bits. En caso de no utilizar todos los 4 bits
se rellenan éstos con " O ".; a continuación se tiene la
secuencia que indica la finalización de la trama.
La figura 1.10 muestra una trama con la información de tiempo
codificada procedente de la estación WWV.
I»','
mu—
M—
II
36
BIN
AR
Y
DIG
IT,
100
P
PS
C
OD
E
(IO
DO
H
z C
AR
R1E
R)
[Wlt
HD
UI
100
P
PS
IN
DE
X
MA
ftK
ER
Sl
-uní—
U-HHIII
II
• TI
ME
FR
AM
E ¡
ON
E
SE
CO
ND
J-
SE I
SM
S)—
]!—
"*
ir*~
"0"
PU
LS
E (
2H
S1
~*
~i f*
"'°
MS
Í1Y
P)
50
S£C
OTO
5 23
M
INU
TES
10
H
OU
RS
RE
FE
flEN
CE
T
IME
13
D
¿r
121,
10
HO
UR
S,
23
MIN
UTE
S,
50
SEC
ÓN
OS
36
BIN
AR
Y D
IGIT
, 10
0
PP
S
CO
DE
HJf
CfiE
QS
j .
e O
NE
SEC
ON
O
RE
FER
EN
CE
M
AR
KE
Rx
OÍS
IN
DEX
M
AR
KE
fl+
IO
O
PP
S
IND
EX
M
AR
KE
R*
UN
USE
D
BIT
Figura 1.10.- Trama de tiempo de la Estación WWV.
43
La estación WWVB uti 1 iza también codificación BCD y emite la
información utilizando una trama de 1 minuto de duración, la que
contiene 60 pulsos.
La trama incluye información de minutos, horas, día del año, y
correcciones en el orden de los milisegundos a ser añadidos o
disminuidos, de acuerdo a la escala UT2 y bits de separación
entre unidades, decenas y centenas y bits de finalización de la
trama.
Tanto el " O " como el " 1 " se reconocen por diferencia en
el ancho del pulso, pues un 1 tiene un ancho de 500 ms. tanto en
bajo como en alto, mientras que un O tiene una duración de 800
ms. en alto y 200 ms. en bajo. La trama se inicia con un pulso
cuya duración es de 800 ms. en bajo y 200 ms. en alto, el cual
va incluido al final de la trama anterior. Los bits que indican
la finalización de la trama son 00000 seguidos del pulso de
inicio de trama.
La información es armada en una trama, utilizando dos bytes para
el envío de la información referente a los segundos ( 00 a 59),
minutos (00 a 59) , y horas (00 a 23) y tres bytes para la
información de los días del año (001 a 366).
La figura 1.11 muestra la trama codificada de la estación WWVB.
i»'
NB
S S
íati
on W
WV
B T
ime
Co
de
0
H-0
.8 se
Mar
ker
Pul
se
I lie
n S
eo;o
nd P
osití
on M
arke
i
-H
U-Q
.5S
CC
Bín
ary
Cod
e "O
ne"
] U
ncoó
ed (D
isfe
gard
Ind
icat
ed C
odc)
Bin
ary
Cod
e "Z
ero
"
Kal
Min
ute
Mar
tcer
U-Q
.5se
c
Subira
cl In
díc
ato
r (-
) U
Ts C
orr
ect
ion
A
dd I
ndíc
aio
r (+
)
Figura 1.11.- Trama de tiempo de la Estación WWVB
45
Cada estación posee tres relojes atómicos que dan información de
~í2la hora y frecuencia mantenida dentro de una precisión de 10
respecto al patrón del National Bureau of Standars, y los pulsos
de segundo o "Ticks" transmitidos por WWV y WWVH son obtenidos
de la misma fuente de frecuencia que controla la frecuencia
portadora.
CAPITULO 2
2.1.- ESTRATEGIA UTILIZADA PARA EL DISEÑO.
2.2.- DIAGRAMA DE FUNCIONAL DEL SISTEMA.
2.3.- ELEMENTOS CONSTITUTIVOS DEL SISTEMA.
2.4.- DISEÑO DE CADA UNO DE LOS BLOQUES.
2.5.- CIRCUITOS NECESARIOS PARA EL SISTEMA.
2.6.- SEÑALIZACIONES Y PROTECCIONES.
2.7.- DIAGRAMA GENERAL.
47
DISEÑO DEL SISTEMA.
2.1.- ESTRATEGIA UTILIZADA PARA EL DISEÑO.
La estabilidad de un estándar secundario, como ya se ha indicado,
se determina mediante la ayuda de un estándar primario, o de otro
de mejor resolución en ausencia de él.
El método utilizado para la determinación de desfasamientos entre
el pulso del estándar primario y el pulso del estándar en
estudio, en el transcurso de un tiempo determinado, está basado
en el uso de contadores externos, programables por un
microprocesador, el cual, los inicializa, lee el valor de los
desfasamientos registrados y almacena en memoria, consiguiéndose
con esto, evitar errores en las mediciones o lectura.
A continuación, mediante el uso de los estimadores estadísticos
ya mencionados, se conoce el valor de la desviación promedio, así
como la varianza de Alian, los cuales son complementarios, pues
mediante el primero se define el signo, en tanto que el segundo
determina la magnitud.
La corrección de la desviación experimentada se realiza mediante
un conversor digital análogo de 10 bits también programable.
48
2.2.- DIAGRAMA FUNCIONAL DEL SISTEMA.
Mediante el diagrama funcional, se pretende ilustrar en forma de
bloques, los elementos constitutivos del sistema a diseñarse y
la relación que mantienen entre ellos, así como las señales que
se obtienen a la salida de algunos bloques.
También constan; el estándar patrón local, remoto y aquel en el
cual se determinará la estabilidad.
Hay que indicar además, que el diseño de los bloques se hará
siguiendo el orden del diagrama funcional.
En la figura 2.1 se ilustra el diagrama funcional del sistema.
DIAGRAMA FUNCIONAL DEL SISTEMA
DETECTOR-CORRECTOR DE DESU. EST. DE T/F.
E S T A I
ES TU
1
CONVERSOI
SIN. A C
ES Tf i í
F O T ]
1
CONVERSO!
SIN. A (
HDf l
DI C
F- 1
í DE 0
UADRA
SDft
R O N
I DE 0
UADRA
r~~"
L- - -
P
>
MH?
NDA
DA
R
NDA
DA
F
F
F:
RE(
STf
DE
= 11
= ir
ÍEP1
ÍCÍ(
TIÍ
1Hz
1Hz
ron)N
:HPO
D I V I S OFREGUÉ
DIUISO
FREGUÉ
DE LA
REMOTA
<FREC.
R DE
NCIA
R DE
NCIA
~~~i
— j
1
I
"= i
^ J
L Hz
L Hz
CORRECTOR DE
DESVIACIÓN
CONVERTIDO
DE PULSOS
•
REGISTRADOR
INTERVALOS
1 1
CONVERTIDO
DE PULSOS
i
ii
_ _ „ „ : i
LA
R
DE
R
ALHÉ
LA
1
íCENAr
INFOI
1TKNT
ÍMACI
LECT
V
0 DE
ON
URA
CAÍ
DES
INFORMACIÓN
EXTERNA
• '
DF, INTERVALOS
CULO DE LA
VIACION
• •
VISUALIZACION DE
LA INFORMACIÓN
BLOQ UE fiLTEFNfiTI U O
FIGURft
50
2.3.- ELEMENTOS CONSTITUTIVOS DEL SISTEMA.
En el diagrama mostrado, se puede apreciar que se tiene luego de
los estándares, circuitos convertidores de onda sinusoidal a
cuadrada, pues los estándares suministran señales sinusoidales
análogaSj las cuales, para que puedan ser utilizadas deben ser
transformadas a señales digitales.
A continuación se encuentran los bloques divisores de frecuencia,
los mismos que son necesarios para obtener frecuencias más bajas
(1 Hz), facilitando con esto, la comparación y detección de
desfasamientos entre estas señales. Los estándares proporcionan
salidas de 5 MHz, 1 MHz y 100 KHz, mientras que los bloques
divisores entregan señales de 1 Hz.
Luego se encuentran dos bloques acondicionadores de pulsos, los
cuales convierten las señales de 1 Hz cuya duración es de 500 ms.
en alto y 500 ms. en bajo, en señales que tienen una duración de
1 ns. en alto y 999999 M-S . en bajo, para facilitar la detección;
la necesidad de éste bloque, se explicará más adelante.
A continuación, los dos pulsos anteriores ingresan al registrador
de intervalos, el cual detectará el desfasamiento existente entre
ellos en el orden de los microsegundos.
El siguiente bloque permite: la lectura, almacenamiento,
visualización del desfasamiento cada segundo, así como la
corrección de la desviación, previo el cálculo de éste valor.
51
El bloque corrector convierte dicho valor en una señal análoga
de voltaje que ingresa al estándar mediante la entrada E.F.C.,
que sirve para variar la capacidad del diodo varactor, y de esta
manera, la frecuencia del cristal.
Cabe mencionar que en virtud de no poseer información sobre la
cuantificación del voltaje en función de la desviación, se
procede a corregir la desviación por medio de un lazo cerrado,
es decir, se calcula la desviación y se procede a corregirla
hasta obtener valores de ella aceptables (lo más cercanos posible
a los datos suministrados por el fabricante).
2.4.-DISEÑO DE CADA UNO DE LOS BLOQUES.
En el punto anterior se ha descrito brevemente la concatenación
que mantienen los bloques entre sí, aunque de una manera somera;
en este punto se justificará la presencia del bloque, la forma
de trabajo y la razón de uso de los elementos de cada bloque
diseñado.
2.4.1.-BLOQUE CONVERTIDOR DE LA SEÑAL SINUSOIDAL A CUADRADA.
Como ya se mencionó, la señal que provee el oscilador patrón, es
de 1 Vp rms sinusoidal, razón por lo que es necesario
primeramente amplificarla y luego convert irla a una señal
cuadrada de nivel TTL, para que pueda ser utilizada.
La amplificación de la señal se realiza por medio del operacional
52
ECG 976 que es un elemento de propósito general, mediante un
circuito amplificador inversor, en el que se utilizan
resistencias de 1 Kü y de 5.6 Kfi, con lo que se alcanza una
amplitud de 8 V. a la salida.
Una vez amplificada la señal3 se procede a recortarla a
5.1 V. j mediante el uso de un diodo zener 1N4733A, para luego
mediante el C.I. 74HC14 que es un Schmit Trigger, asegurar la
cuadratura de la señal.
En este diseño se utiliza el amplificador operacional ECG 976,
debido a la simplicidad para su conexión y porque además su rango
de operación cubre la frecuencia de IMHz, a la que tiene que
trabaj ar.
El documento 2.2, muestra el diagrama del conversor de onda
sinusoidal a cuadrada.
54
2.4.2.- BLOQUE DIVISOR DE FRECUENCIA.
La necesidad de éste bloque, se debe a que la frecuencia que
proveen los osciladores está en el orden de los MHz., y la
frecuencia de los pulsos a ser comparados debe ser 1 Hz ; por esta
razón, la frecuencia entregada por los osciladores debe ser
dividida, hasta alcanzar el valor indicado de 1 Hz.
La razón de comparar pulsos de 1 Hz. de debe a la facilidad que
se tiene para detectar y procesar desfasamientos muy pequeños,
cosa que no ocurriría al comparar pulsos de duración de 1 \iS al
utilizar directamente la señal de 1 MHz.
Debido a que el diseño utiliza la frecuencia de 1 MHz., que es
una de las tres frecuencias que proveen estos osciladores
patrones (1 MHz . , 5 MHz . y 100 KHz . ) , se ejecuta una división por
1000000.
El diseño del bloque se basa en el circuito integrado 8253-5 que
es un contador de intervalos programable, en donde el valor de
la cuenta} puede ser cargado y leído desde el microprocesador}
mediante un bus bidireccional de 8 líneas, una vez inicializado
con la cuenta y elegido la manera de trabajo, la operación de
división es totalmente autónoma.
Entre las características principales de este integrado se citan
las siguientes:
55
Posee 3 contadores independientes de 16 bits.
Modos programables de conteo.
Conteo binario o BCD.
Fuente única de poder de + 5 V.
Velocidad de respuesta hasta 5 MHz .
Trabaja como un pórtico de entrada-salida.
Debido a las características que presenta el C.I. 8253-5 en sus
modos de operación, y de acuerdo al requerimiento, se escoge el
modo de trabajo # 4, pues este permite tener una cuenta regresiva
desde el valor inicial izado (999999) hasta 1 legar a cero donde
a su salida genera un pulso en bajo cuya duración es de un ciclo
del reloj (1 M-S . ) > el mismo que segundo a segundo ingresa al
monoestable para su acondicionamiento y de ahí al flip-flop.
Además, se necesita tener un 1L en la línea de GATE (G) , para que
el contador real ice esta tarea, caso contrario el contador
detiene la cuenta por el tiempo en que esta línea se mantenga en
este estado; por esta razón, la entrada de gate está conectada
a 1L.
La división se realiza utilizando dos de los tres contadores
disponibles en el integrado; tanto el primero como el segundo
están conectados en cascada y ejecutan conteos de 10.000 pulsos
en el primer temporizador, mientras que el segundo realiza
conteos de 100 pulsos (generados por el primero), completando así
la cuenta deseada.
56
Se accede a este integrado tanto para la inicial ización como para
la lectura mediante la línea de CS (chip select) a través del
integrado 74HC138 que es un decodificador de direcciones,
mediante el cual, el microcontrolador puede acceder a los
elementos periféricos.
Se justifica el uso del temporizador, debido a que mediante él
se puede realizar la división de la frecuencia por 1000000 o
cuentas mayores, es programable por el microcontrolador, tratado
como un elemento periférico, y además, porque al escoger el modo
de trabajo, realiza la función independiente e indefinidamente.
El bloque divisor además incluye la presencia del C.I 74HC373 que
es un latch transparente, así como el C.I.74HC123 que es un
monoestable de precisión, cuya función se explica en el acápite
s iguiente:
El documento 2.3, muestra el diagrama del bloque divisor de
frecuencia.
58
2.4.3.-BLOQUE ACONDICIONADOR DE LA SEÑAL.
Los pulsos que ingresan al detector de desfasamientos
(temporizador) tienen una duración de 500 ms. en alto y
500 ms. en bajo, los cuales, con el objeto de facilitar la
detección del desfasamiento, son acondicionados, es decir se
convierten en pulsos cuya duración en alto es de 1 us. y 999999
us en bajo, utilizando un monoestable de precisión.
2.4.3.1.- JUSTIFICACIÓN DE LA NECESIDAD DE ESTE BLOQUE.
El bloque detector de intervalos está constituido por un
temporizador, el cual posee 3 contadores provistos de una entrada
"G" , la cual al estar habilitada, permite al temporizador
realizar el conteo, mientras que al estar deshábilitada ésta
entrada, detendrá la cuenta.
Por esta razón, se hace necesario un circuito que controle a esta
entrada "G", lo que se realiza, mediante el flip-flop tipo "D"
(CD 4013), el cual, genera un pulso cuya duración representa el
desf as amiento entre los pulsos en estudio, y que a su vez
controla la activación (conteo de intervalos) y desactivación del
temporizador mediante la entrada "G" mencionada.
Los pulsos que originan el inicio y término del desfasamiento
entre ellos, ingresan a las entradas SET y RESET respectivamente
del f1ip-flop.
59
Observando la tabla de verdad del flip-flop se puede advertir que
existiría conf1icto para generar el pulso de desfasamiento,
cuando se presente el pulso que ingresa al pin de SET, si el
pulso que ingresa a la entrada RESET, lo hace luego de un tiempo
menor a 500 ms., pues el flip-flop no detectaría el término del
primer pulso, no permitiendo con esto detectar el desfasamiento.
Por lo tanto, al cambiar los t iempos de duración de los pulsos
en alto, se minimiza la ocurrencia de este estado, y por
consiguiente un error en la detección.
2.4.3.2.- ACONDICIONAMIENTO DE LOS PULSOS.
El acondicionamiento de los pulsos se realiza mediante un
monoestable de precisión como es el 74HC123, el cual dispone de
entradas, donde pueden conectarse exteriormente resistencia y
condensador que determinan el ancho del pulso deseado; así en el
diseño se escoge una resistencia de 1 KQ y un condensador de 1000
pF. obteniéndose un pulso de 1 p.S. de duración en alto.
Asimismo, el monoestable en referencia es utilizado para generar
el pulso de interrupción (INT1), el cual alertará al
microcontrolador, para que realice una lectura del temporizador.
El ancho del pulso de interrupción no debe ser menor a 12 ciclos
de reloj que maneja el microcontrolador, y como la señal de reloj
es de 12 MHz. , se ha elegido valores tanto para la resistencia,
como para el condensador externos de 10 KQ y de 1000 pF
60
respectivamente, dando un ancho de pulso de 10 \is, con lo que se
cumple con el requerimiento
Se utiliza la salida negada del monoestable, pues la interrupción
en el microcontrolador es activada con la transición negativa del
pulso.
2.4.4.- BLOQUE REGISTRADOR DE INTERVALOS.
El presente bloque tiene como finalidad, la determinación del
desf asamiento entre dos pulsos, una vez que han sido
acondicionados.
Se utiliza el C.I. 8253-5, que como ya se indicó, es un triple
contador/temporizador programable de 16 bits, el cual trabaja
en el modo de operación # 4, debido a que en este modo se puede
controlar el tiempo de conteo mediante la señal GO , generada por
el flip-flop CD 4013, como se explica a continuación:
Los pulsos acondicionados obtenidos de los monoestables 74HC123,
el primero que proviene del divisor de frecuencia OUT1, y el
segundo procedente de la señal WWV o de otro estándar de
referencia, ingresan al flip-flop 4013 a las entradas SET y
RESET.
La entrada SET produce a la salida Q del filp-flop un pulso en
alto, el cual se mantendrá en este estado, hasta la llegada del
segundo pulso que ingresa por la entrada RESET, el cual produce
61
una transición de alto a bajo, con lo que se ha generado el pulso
que controlará la compuerta GO del temporizador, que permite
registrar el tiempo de desfase.
Además, el segundo pulso que entra a RESET, deberá producir la
señal de interrupción INT1 para que el microcontrolador realice
la lectura; esto se realiza a través de la salida negada (Q) ,
mediante otro monoestable 74HC123.
La cuenta almacenada en el temporizador es leída y almacenada en
la memoria RAM interna del microcontrolador 8031 que comanda el
sistema y espera por la segunda cuenta para realizar la
diferencia entre ellas y ésta nueva cuenta constituirá la
desviación entre los pulsos en cuestión. Este proceso se ejecuta
cada segundo hasta que se cumpla el período de maestreo. La
cuenta registrada en el temporizador es regresiva a cero, por lo
que, éste se setea en su valor más alto, mediante programa desde
el microcontrolador.
Se utiliza este integrado, debido a que mediante él, se puede
registrar tiempos de desfasamiento mayores a 1 segundo, es
independiente en su funcionamiento y es programable por el
miCTOcontrol ador.
El documento 2.4, muestra la conexión de los elementos del bloque
detector de desfasamientos, también constan el latch 74HC373 y
el decodificador de direcciones 74HC138.
63
2.4.5.- DISEÑO DEL BLOQUE DE LECTURA Y CALCULO DE LA
DESVIACIÓN.
2.4.5.1.- LECTURA DE LA DESVIACIÓN DE DOS PULSOS.
El bloque de lectura está constituido por el microcontrolador
8031, el cual , una vez que ha recibido la señal INT1 generada por
el monoestable 3 procede con la lectura de la cuenta, la misma que
dependiendo de su valor, estará registrada en uno o en dos
contadores.
El detector de desfasamientos como se indicó anteriormente, está
constituido por tres contadores independientes de 16 bits cada
uno, de los cuales se utilizan dos conectados en cascada, para
poder registrar intervalos de 999999 \is.
La programación de éste elemento, se realiza mediante el uso de
la palabra de control, la cual sirve para procesos de escritura
(carga de la información) y de lectura de los contadores.
En el proceso de escritura, se selecciona el contador, los bytes
a utilizarse para la carga del valor desde el cual se empieza el
conteo regresivo, el modo de operación del contador y la forma
de conteo: binaria o decimal.
La lectura también se realiza utilizando la palabra de control,
manteniendo armonía con lo elegido en la parte de escritura, es
decir: contadores utilizados, forma de conteo, etc. El proceso
64
de escritura se realiza una sola vez, pero el de escritura se
realiza una vez cada segundo.
2.4.5.2.- CALCULO DE LA DESVIACIÓN ENTRE DOS ESTÁNDARES,
Una vez terminado el muestreo, el microcontrolador puede realizar
los cálculos de la desviación promedio y la varianza de Allan.
Para determinar el valor de la desviación promedio, el
microcontrolador recupera los valores de desfasamiento inicial
y final3 realiza la diferencia y luego la división para el
período de muestreo.
Mediante este cálculo se determina tanto la magnitud como el
signo de la desviación, interesando más el signo, pues el valor
es referencial, yaque se utiliza más el valor calculado mediante
la varianza de Alian, que por proceder de un radical carece de
signo.
Para realizar el cálculo de la desviación por medio de la
varianza de Alian, el microcontrolador cada segundo real iza
operaciones parciales de ésta expresión que las almacena en la
memoria RAM interna, debido a que no caben todos los valores en
la memoria RAM externa.
Hay que indicar que se toma la parte entera de la desviación,
pues solamente ésta puede ser convertida en señal análoga para
efectuar la corrección.
65
El microcontrolador 8031 es el elemento más importante de este
bloque, por lo que a continuación se mencionan las
características principales:
- Posee una CPU que maneja 8 bits.
- 4 pórticos disponibles, es decir, que cuenta con 32 líneas
de entrada/sal ida.
- Puede direccionar hasta 64 Kbytes de memoria RAM y 64
Kbytes de memoria EPROM.
- Está provisto de 128 bytes de memoria RAM interna.
- Dispone de dos contadores/temporizadores.
- 5 canales de interrupción con dos niveles de prioridad.
2.4.6.- BLOQUE CORRECTOR.
Una vez que se ha calculado la estabilidad del estándar en
estudio, y ésta difiere del valor 5 x 10 , entonces se procede
a corregir la desviación, mediante la presión de la tecla D.
El valor de la desviación es un número, el cual debe ser
transformado a corriente y luego a voltaje, pues, mediante esta
señal se realiza la corrección5 por lo que se utiliza un
conversor digital-análogo C.D.A.
Dentro de la gama de conversores, se debe preferir uno que tenga
el mayor número de líneas (bits), pues permitirá transformar
cantidades numéricas en corrientes primeramente y luego en
voltajes con más exactitud (el número de bits determina el número
66
de intervalos de variación),
Para el presente diseño, se ha escogido el DAC-1006 que tiene una
exactitud de 10 bits, y puede ser controlado por el
microprocesador; entre las principales características, se citan
las siguientes:
- Interfase directa con microprocesador.
- Tecnología CMOS.
- Buffers para los datos de entrada.
- Carga de dos bytes de 8 bits o de una palabra de 10 bits.
El elemento que permite la conversión de corriente a voltaje, es
el amplificador operacional LF 356, sugerido por el fabricante
(National Semiconductor).
A continuación se indicarán las expresiones, mediante las cuales
se puede determinar el valor de corriente obtenida en función del
valor numérico ingresado.
El valor numérico (digital) a ser convertido en corriente se
expresa en 10 bits, el cual, mediante el microcontrolador, es
transferido al conversor digital-análogo (C.D.A.) en dos bytes,
utilizando una de las características de este
integrado (Bytel/Byte2).
El valor de la corriente entregada por el conversor, será función
del valor ingresado, el cual, estará representado por uno de los
67
2 (1024) valores, es decir, desde O a 1023, correspondiendo al
primer valor una corriente nula, mientras que al segundo la
máxima corriente; estos valores, se obtienen a través de las
sal idas I j e IQ^ , las cuales tienen polaridad opuestas entre
sí ( IQM-M es positiva) .
La corriente también depende del voltaje de referencia (VREp) , el
cual puede tener un valor entre -10 V. a 10 V.(el diseño utiliza
un VDün de 5 V.) y de la resistencia de realimentación (Rpn): laKDC ríi' '
expresión se muestra a continuación:
1023 x VRBF.lout = ; donde RpB = 15 KQ.
1024 x RPD.
A la salida del primer amplificador operacional se tiene una
señal de voltaje expresada por la siguiente relación:
VOÜT = (IOUT x RFB'
Mediante el segundo amplificador operacional (sumador), se
obtiene un valor de voltaje, que está constituido por la suma de
las señales que ingresan a él; al realizar los reemplazos de
valores, la expresión del voltaje de salída se define a través
de la siguiente expresión:
Vo = VREF x^ 512
68
Donde D es el valor comprendido entre - 512 < D < + 512, por lo
que la expresión final del voltaje queda como sigue:
( D - 512 )Vo = VREF x
512
De la última expresión, se puede colegir que se necesita
primeramente conocer el signo de la desviación, ya que, éste
definirá el signo del voltaje a aplicarse para realizar la
corrección.
El documento 2.5, muestra al bloque corrector de la desviación.
70
2.4.7.- BLOQUE DE ALMACENAMIENTO BE LA INFORMACIÓN Y
PROGRAMAS A EJECUTARSE.
Los valores de los desfasamientos entre los pulsos necesitan ser
almacenados en memoria, para poder realizar los cálculos
correspondientes, por lo que se podrá utilizar la memoria RAM
interna con que cuenta el microcontrolador (128 bytes), así como
las memorias RAM externa que almacenará los diferentes
desfasamientes y EPROM para los diferentes programas que se
ejecutarán.
Los desfasamientos netos serán almacenados en una memoria RAM
6264 cada 15 segundos, debido a la imposibilidad física de poder
utilizar otra de mayor capacidad (para tiempos de muestreo de 1
día se necesitan 86400 localidades); por esta razón, el
microcontrolador ejecuta algunas operaciones cada segundo, previo
el cálculo final de la desviación.
Las características de esta memoria se muestran a continuación:
- 8192 bytes de almacenamiento.
- Rápido tiempo de acceso (entre 100-150 ns) .
- Baja consumo de potencia en condición standby.
- Baja potencia de consumo.
- Fuente única de 5 Voltios.
- TTL compatible.
Todos los programas que ejecuta el microcontrolador son
71
almacenados en una memoria EPROM 2732 cuyas características se
muestran a continuación.
- Tiempo de acceso pequeño (aprox. 200 nanosegundos).
- Compatible con la familia 8051 por la velocidad de trabajo.
- Dos líneas de control,
- TTL compatible.
Es una memoria cuya capacidad es de 4096 Kbytes, borrable con luz
ultravioleta y programable eléctricamente.
La memoria RAM es la de mayor capacidad que puede ser utilizada
por el sistema debido al número de líneas disponibles. La
memoria EPROM se escogió de esta capacidad, ya que
suficientemente cave en ella el programa total.
Debido a que se utiliza la memoria interna del microcontrolador
y porque a través de él se ejecutan los programas y se realiza
el almacenamiento, consta en el diagrama.
El bloque de memoria se muestra en el documento 2.6.
73
2.4.8.- BLOQUE DE PRESENTACIÓN DE LA INFORMACIÓN.
El desfasamiento entre los pulsos, así como los cálculos de la
desviación, necesitan ser mostrados tanto la parte entera como
la parte exponencial , por lo que las primeras se muestran
ut i 1 izando displays BCD de 7 segmentos, en tanto que las
segundas, así como la indicación de los u.S. de la desviación neta
y el tipo de información u operación en ejecución, se indican
mediante la ayuda de leds luminosos.
El barrido de estos datos, son realizados por la interfase
programable teclado/display 8279, (a través del decodificador de
direcciones 74HC138) la cual primeramente es programada por el
mi erocontrol ador sobre el sentido de ingreso de los datos (de
izquierda a derecha o a la inversa), número de displays a
utilizarse, tiempo de barrido, etc.; este proceso de
inicialización se realiza una vez que se activa el sistema.
Una vez que se han detectado las desviaciones netas, o calculado
las desviaciones, el microcontrolador procede a cargar la
información a la interfase, para que ésta realice el barrido de
la información.
En el presente diseño se ha previsto 3 indicadores de dos dígitos
cada uno, tipo NTE 3075 de cátodo común para la parte entera,
mientras que para la parte exponencial se utiliza leds luminosos
NTE 3018.
74
Además son necesarios otros integrados como: el decodificador
3 a 8, drives suministradores y receptores de la corriente para
el encendido de los displays y las resistencias limitadoras de
estas corrientes.
Los drives a utilizarse son el NTE 2016 o el ECG 2016 y el UDN
2981A, cuyas características se detallan a continuación:
Driver UDN 2981A:
- Compatibles con niveles TTL.
- Capacidad de 500 mA. de suministro.
- Salidas protegidas contra transcientes.
Las características del driver NTE 2016 (o ECG 2016) son:
- Compatible con niveles TTL.
- Capacidad de 600 mA de recepción.
Además, se hace necesario la utilización de resistencias
1 imitadoras de corriente, cuyo dimensionamiento se hace a
cont inuación.
Como se tiene una fuente de 5 voltios Vcc. una caída de 0.5
voltios en el driver y se necesita una corriente de 20 mA. por
segmento se calcula el valor de las resistencias mediante la ley
de Ohm, obteniéndose un valor de 225 Q, por lo que se utiliza una
resistencia estandarizada de 220 &.
75
Recalculando la corriente que soportarían los segmentos al
utilizar la resistencia de 220 fí, resulta ser de 20.5 mA. que
está dentro del valor máximo (30 mA).
El dimensionamiento de las resistencias limitadoras de corriente
para los LED'S, se realiza de manera similar a la anterior, (pues
un diodo constituye un segmento del display), por lo que se
utiliza resistencias de 220 Ü.
Se utiliza el C.I. 74HC138 como decodificador 3 a 8 que sirve
para realizar el barrido de los displays y de los leds utilizados
para visualizar la información.
El bloque de presentación de resultados se muestra en el
documento 2.7.
77
2.4.9.- BLOQUE DE INGRESO DE INFORMACIÓN.
La información que debe ser entregada al sistema para su
operación, está constituida por el período de muestreo
especificado en horas, el tipo de señal de referencia a
utilizarse (señal WWV, WWWB o estándar local) y el tipo de
operación a ejecutarse (detección de desfasamientos netos,
cálculos de las desviaciones y corrección de ésta). Estos datos
se ingresan mediante un teclado de 16 opciones (10 dígitos y 6
caracteres literales y especiales).
Al energizarse el sistema, el programa principal procederá a
comprobar el correcto funcionamiento de los leds y displays, así
como la inicialización de la interfase/teclado display, y entrará
en espara de la primera tecla a ser presionada (A), mediante la
cual, permite al programa: inicial izar el divisor de frecuencia
y detector de desfasamientos y esperará por el ingreso del
período de muestreo, el cual debe ser expresado en horas, así
como también el tipo de señal a utilizarse.
Este último dato se lo hace a través de la tecla "*", pues al
presionarse la tecla mencionada, se indicará al sistema que se
utilizará un estándar local para la comparación.
A continuación el sistema esperará por el presionamiento de la
tecla B j para activar la INT1, que permite la detección de los
desfasamientos; el sistema ejecuta este proceso hasta que se haya
concluido el período indicado en el paso anterior, y luego
78
proceder con el cálculo y muestreo de la desviación promedio.
El presionamiento de la tecla C, permite al sistema, calcular y
mostrar la desviación por medio de la varianza de Alian.
Luego de realizar el proceso anterior, el sistema esperará por
la tecla D, mediante la cual se procede a realizar la corrección
de la desviación.
Esta información proporcionada, ingresa hasta la interfase
programable teclado/display 8279, la misma que al recibir los
datos desde el teclado, advierte al microcontrolador, mediante
el uso de la interrupción externa INTO, la transferencia de los
datos ingresados.
Ahora el microcontrolador determina la tecla presionada, mediante
la ejecución de un programa que determina la ubicación de esta
tecla, es decir, tanto fila como columna.
La información de las 16 posiciones del teclado se tiene a través
de las 8 líneas de salida con que cuenta este elemento,
correspondiendo 4 de ellas a las filas y las 4 restantes a las
columnas.
Se utiliza un teclado, para facilitar el ingreso de los datos y
de las opciones o tareas a ser ejecutadas.
Las principales características de la interfase se muestran a
79
cont inuación:
- Compatible con el microcontrolador utilizado.
- Programable desde el microcontrolador.
- Real iza operaciones simultáneas con el teclado/display.
- 8 caracteres FIFO para el teclado.
- Maneja 8 o 16 displays numéricos.
- Ingreso de datos de izquierda a derecha o a la inversa,
almacenados en memoria RAM interna del integrado.
- Generación de una interrupción al presionar una tecla del
teclado.
El documento 2.8, muestra el bloque de ingreso de la información.
81
2.5.- CIRCUITOS NECESARIOS PARA EL SISTEMA.
El sistema diseñado, necesita de fuentes de alimentación, para
polarizar los circuitos integrados previo el funcionamiento de
estos,
2.5.1.- DIMENSIONAMIENTO DE LAS FUENTES DE ALIMENTACIÓN.
El sistema diseñado está compuesto por 22 circuitos integrados,
18 de los cuales necesitan una fuente de alimentación de
5 V. y los restantes (3 amplificadores operacíonales y el C.D.A.)
necesitan otra de + 15 V. y - 15 V.
El diseño de la fuentes debe tomar en cuenta la corriente que
consumirán los integrados para poder escoger los elementos que
las conformarán, por lo que a cont inuación se detalla entre
paréntesis la corriente que consume cada integrado al ejecutar
los diferentes procesos.
En la determinación de la tecla presionada intervienen la
interfase teclado/display (120 mA) , el microcontrolador 8031 (150
mA), el decodíf icador 74HC138 (8 |iA) y la memoria EPROM 2732 (125
mA)3 lo que totaliza un consumo de 396 mA.
Los procesos de inicialización del divisor de frecuencia y del
detector de desfasamientos, participan: el microcontrolador 8031
(150 mA) 5 el tempor izado r 8253 (140 mA), el de codificador de
dirección 74HC138 (8 nA) y la memoria EPROM 2732 (125 mA), con
82
un consumo en cada proceso de 416 mA.
Al real izarse la detección de los desfasamientos operan: el
microcontrolador 8031 (150 mA), los dos temporizadores 8253 (140
x 2 = 280 mA), el monoestable 74HC123 (80 uA)5 el flip-flop
CD 4013 (10 |iA.)j el decodif icador de direcciones 74HC138 (8 M-A) 5
la memoria EPROM 2732 (125 mA) y la memoria RAM (110 mA) ,
total izando 665 mA.
Para realizar la corrección de la desviación se necesita del
microcontrolador 8031 (150 mA), del conversor digital-análogo
(3.5 mA) 5 2 ampl if icador es operacionales LF 356 (10 mA) y la
memoria EPROM 2732 (125 mA), con lo que se tiene un consumo de
300 mA.
Como se puede observar, el proceso de lectura, almacenamiento y
visualizacíón de la información representa el mayor consumo de
corriente con 665 mA.
La fuente que soportará el mayor valor de carga, será la de + 5
V de., por lo que se ha diseñado para que suministre una
corriente de 1 A., lo que evitará tener caídas de voltaje al
registrar el máximo consumo, mientras que las fuentes de + 15 V.
y - 15 V - , soportan corrientes de 23 mA, por lo que se han
diseñado para suministrar corrientes de 100 mA.
El diseño utiliza un transformador con 2 bobinados de entrada y
2 de salida, uno de estos se utiliza para la fuente de -15 V. y
83
el otro con tap central para la fuentes de +15 V. y -f5 V.
En cada proceso se realiza el muestreo de los datos con un
consumo de 450 nA por cada driver (2), que no const ituye un
incremento ponderal, pero previsto en los cálculos realizados.
2.5.2.- DISEÑO DE LA FUENTE DE + 5 V.
Una vez que se ha determinado la máxima corriente necesaria para
la operación del sistema, se procede con el diseño, siguiendo las
recomendaciones del manual de FUENTES REGULADAS de la National
Semiconductor, el mismo que se describe a continuación.
El circuito está constituido por un transformador con tap central
que reduce el voltaje de entrada de 115 V. a 16 Vrms. en una
salida y 8 Vrms. en el tap central, con lo que se cumple con las
especificaciones de voltaje mínimo de entrada que es 19 V. y 7.3
V. respect ivamente, pues se ha tomado en cuenta la caída en el
puente de diodos.
A la salida del transformador, se encuentra el puente
rectificador de onda completa con diodos de Si tipo KBPC-802 que
soporta un voltaje reverso de 200 V y una corriente de 4A.
A continuación se encuentra el condensador C3 de 4.4 mF., 35 V.
el cual es de un valor apreciable para tener un tiempo de
descarga grande (disminuir el rizado), con lo que el regulador
tendría pequeñas variaciones a su entrada.
84
Seguidamente se encuentra el regulador de voltaje LM 7805, que
suministra una corriente de 1 A., el cual se encuentra unido a
un divisor de tensión (R3 y R4) que permite sensar las
variaciones de tensión experimentadas; la selección de estas
resistencias se realiza de acuerdo a la sugerencia del manual.
Luego del divisor, se encuentra un capacitor C4 de 47 M-F. 10 V.
los cuales son utilizados para prevenir una posible variación de
voltaje. A la salida de este condensador se tiene la fuente de
los requerimientos deseados.
El cálculo de la energía que disipa el regulador se indica a
cont inuación:
Voltaje del secundario : 8 V x 1.4142 = 11.31 V.
Caída de voltaje en 2 diodos : 0.6 V x 2 = 1.2 V.
=> Voltaje de entrada al regulador = 10.11 V.
Voltaje de entrada min. del regulador = 7.3 V.
-•> Diferencia de voltaje = 2.81 V.
Corriente máxima necesitada = 665 mA.
:> Potencia a disiparse: P = 2.81V x 0.665 mA = 1.86 W.
Es necesario colocar en el regulador de voltaje, un disipador de
energía, para precautelar la vida útil, pues estas fuentes tienen
régimen de funcionamiento continuo.
85
2.5.3.- DISEÑO DE LAS FUENTES DE + 15 V. Y - 15 V.
Estas fuentes tienen una configuración muy similar a la fuente
anterior, variando solamente en los elementos utilizados, debido
al voltaje y corriente necesitados; además, cambian las
conexiones en el puente de diodos para la fuente de voltaje
negativo, donde se toma del polo opuesto, por lo que solamente
se indicarán las características de los elementos uti 1 izados.
En estas fuentes se utilizan puentes rect ificadores de onda
completa con diodos de Si tipo RB-154, que soporta un voltaje
reverso de 400 V. y una corriente de 1.5 A. Se utilizan los
condensadores C3 y C5 de valores similares a Cl, igualmente
utilizados para minimizar el rizado.
Para la fuente de + 15 V. se utiliza el regulador 78L15, mientras
que para la fuente de -15 V. se utiliza el 79L15, los cuales
suministran una corriente de 100 mA. con lo que se cubre el
requerimiento de corriente de éstas fuentes.
Las resistencias del divisor de tensión tienen igual valor, pero
dimensionadas para soportar mayor corriente, y disipar mayor
energía (0.5 W) . Igualmente, los condensadores de salida C2 y C6,
tienen la misma capacidad de C4, pero para 35 V., pues debe
soportar un voltaje mayor (15 V.).
La energía que disipan los reguladores de estas fuentes es de 0.1
W., cada uno, que corresponde a la diferencia entre el voltaje
86
del secundario (16 x 1.4142 = 22.62 V.) menos la caída de tensión
en los dos diodos (0.6 x 2 = 1.2 V.), y el voltaje mínimo de
entrada al regulador (17.5 V.)> multiplicado por la máxima
corriente necesitada (25 mA.). Estas fuentes no necesitan
disipador de energía adicional, debido a la baja potencia
generada.
El circuito se muestra en el documento 2.9.
88
2.6.- SEÑALIZACIONES Y PROTECCIONES.
2.6.1.- SEÑALIZACIÓN.
Dentro de las señalizaciones se pueden hablar de las internas
( o banderas ) y las externas o indicación visual.
Como señalización interna se puede mencionar a las señales
externas de interrupción INTO e INT1, de los temporizadores TFO
y TF1 de la recepción/transmisión serial RI + TI , aunque
solamente se utiliza en el diseño las dos primeras.
La primera de ellas, que es de mayor jerarquía es utilizada por
la interfase teclado/display, mientras que la segunda es
utilizada por el monoestable para indicarle al microcontrolador
que debe realizar una lectura del contador de intervalos de
t iempo.
Estas dos interrupciones pueden ser habilitadas o deshabilitadas
cuando se desee; la interrupción INTO se deshabilita mientras se
real iza la detección de desfasamientos, mientras que INT1 es
deshabilitada mientras se procede con el ingreso de datos y con
el proceso de inicialización de los contadores.
Al realizar un proceso de reset o de encendido, el sistema inicia
el proceso ejecutando las instrucciones desde la localidad OOOOH,
luego el programa espera por el ingreso de los datos del teclado.
89
Al act ivarse la interrupción que previene el contéo se ejecuta
desde la localidad 0013H, por lo que se enruta desde esta
localidad) la detección de la desviación.
la señalización externa se halla representada por los 6 display
BCD 7 segmentos para visualizar la magnitud de la desviación y
por LED' S para indicar que la lectura está expresada en
microsegundos, cálculo de la varianza de ALLAN, desviación
promedio, y la indicación exponencial.
2.6.2.- PROTECCIONES.
Debido a que el sistema trabaja con señales provenientes de los
estándares, cuyo valor es de 1 Vp, o del receptor que provee una
señal similar, no se requiere de protecciones adicionales.
La primera protección utilizada, está ubicada en los bobinados
de entrada del transformador de las fuentes de voltaje, la cual
está representada por dos fusible Fl y F2 de 125 V., 0.25 A.
para prevenir algún cortocircuito en la fuente principal de
alimentación.
La segunda protección está representada por un condensador de
4.7 mF, 80 V. ubicado a la salida del bobinado secundario del
transformador, el cual atenúa sobretensiones de voltaje de
entrada, debido al tiempo de carga del condensador.
90
2.7.- DIAGRAMA GENERAL DEL SISTEMA DISEÑADO.
A continuación se muestra el diagrama general, el cual contiene
todos los bloques diseñados, incluyendo además al divisor de
frecuencia (alterno), en caso de utilizar el oscilador local para
realizar la comparación.
Este diagrama no incluye las fuentes de al imentación, ni el
conversor de onda sinusoidal a cuadrada, los cuales se muestran
en diagramas individuales.
El diagrama general se muestra en la figura 2.10.
"*"
r
-t-*-*
_
C3
— -4.
-4
mF
3S
V
.
VI
G
VO
N D
>
R3
< 2
. 2
K
"*
"-
í 0.2
5
W —
-*•
5 DC
—
C-4
"" 47
LJF
±0
V.
C7,C
e, C
3 =
-4
.V
Ti-tle
ES
CLE
Lfi
PO
LX
TE
CN
XC
P N
lC
ION
ftL.
FU
EN
TE
S
DE
P
tf_IM
E:h
4Tf=
lCZO
NT
F2
.3
X,
-ISQ
BlS
K
RO
CAPITULO 3
3.1.- METODOLOGÍA DE CALCULO.
3.2.- ESTRUCTURA GENERAL DEL SOFTWARE.
3.3.- EL PROGRAMA PRINCIPAL.
3.4.- SUBPROGRAMAS UTILIZADOS.
3.5.- INGRESO DE DATOS.
3.6.- INFORMACIÓN OBTENIDA DE CADA UNO DE
LOS BLOQUES
3.7.- ALMACENAMIENTO Y PRESENTACIÓN DE LA
INFORMACIÓN
93
SOFTWARE DEL SISTEMA.
3.1.- METODOLOGÍA DE CALCULO.
El cálculo de la desviación de un estándar de segundo orden
requiere de la ejecución de operaciones de más de 8 bits, pero
al usar un microprocesador de un mayor número de líneas de acceso
encarecería el sistema, por esta razón, todas las operaciones de
esta característica se realizan mediante programas ejecutados a
base al microcontrolador 8031 (8 bits).
El microcontrolador realiza varios procesos segundo a segundo,
hasta que termine el período de muestreo como lectura de
intervalos, ejecución de operaciones y entrega de valores a la
interfase para la visualización de la información. Todo esto se
real iza mediante el uso de las interrupciones que se disponen.
Los manuales de información emitidos por el National Bureau of
Standars (NBS) sobre generación, diseminación y control de la
hora exacta, recomiendan el método de detección aplicado en el
presente diseño, complementando con el cálculo de la desviación
promedio y la varianza de Allan.
Al no automatizar la detección cálculo y corrección de la
desviación, la operación manual requiere de la presencia de dos
personas para realizar el proceso.
94
3.2.- ESTRUCTURA GENERAL DEL SOFTWARE.
La estructura del software está basada en la arquitectura de la
familia de microcontroladores MCS-51, que consta de 5
interrupciones, a las que se puede acceder mediante el registro
IE que controla las mismas.
Este es un registro de 8 bits, mediante el cual se puede
habilitar o deshabilitar las interrupciones; las direcciones se
indican entre paréntesis, así como el orden de prioridad en su
ejecución: IEO (0003H), TFO (OOOBH), IE1 (0013H), TF1 (001BH) y
RI+TI (0023H).
IEO e IE1 son las interrupciones externas, que pueden ser
utilizadas por elementos periféricos, TFO y TF1 son utilizadas
para uso de los temporizadores, mientras que RI+TI se utiliza
para la transmisión de datos en forma serial.
El sistema utiliza solamente las 2 interrupciones externas,
debido a que se debe atender requerimientos desde el teclado y
temporizadores externos para la determinación de los
desfasamientos. No se utilizan los temporizadores del
microcontrolador debido a que solo pueden registrar eventos cuyos
tiempos se expresen hasta en 13 bits (8192 M.S ) .
Los procesos a realizarse, han sido configurados para guardar
independencia y orden en su ejecución, de esta manera se evita
realizar nuevas inicializaciones por una presión equivocada de
95
una tecla o realizar procesos que no cuenten con la información
necesaria. <
La ut i lización de las dos interrupciones, la jerarquía de las que
están provistas y la posibilidad de inhibir cualquiera de ellas,
permiten realizar inicializaciones} calcular las desviaciones y
corregirlas, las que se ejecuten solamente mediante el teclado,
controlado por la interrupción de mayor prioridad INTO, mientras
que la detección de los desfasamientos, utilizan la interrupción
INT1 de menor prioridad.
El programa realiza primeramente la fase de comprobación del
estado de los elementos que permiten la visualización de la
información, luego la etapa de inicialización de elementos
programables por el microcontrolador, la detección de los
intervalos de desfasamiento, almacenamiento de información y
ejecución de algunas operaciones, cálculo de las desviaciones y
finalmente el proceso de corrección de la desviación.
3.3,- EL PROGRAMA PRINCIPAL.
El programa principal espera primeramente por la energización del
sistema o luego de la ejecución de un RESET, por lo que el
microcontrolador empezará a ejecutar las instrucciones que se
encuentren desde la localidad OOOOH. Debido a que no se cuenta
con el espacio de memoria suficiente para todo el programa, se
produce un salto hacia la localidad 002D, donde se encuentra el
subprograma que ejecuta el barrido de displays y leds, previa
96
inhibición de las dos interrupciones; el subprograma en mención
se denomina CHECDISP.
Una vez que se ha cumplido esta fase, el programa procede a
habí 1itar la interrupción INTO que habilita el ingreso de
información desde el teclado (INT1 permanece deshabilitada), para
luego proceder a preguntar si se ha presionado la tecla " A ",
pues de no ocurrir así, el sistema no realizará tarea alguna.
La detección de la tecla A, permite al programa inicializar los
temporizadores divisor de frecuencia y detector de los intervalos
de tiempo. Las subrutinas en mención se denominan DFREC Y CONTERV
respect ivamente.
Luego se debe ingresar el período de muestreo expresado en horas
y el tipo de señal de referencia (remota o local); para el caso
de utilizar señal remota, se presionará la tecla "*", la cual
sirve para escoger el factor de multiplicación que determina el
número de muestras a registrarse; esto se lo realiza mediante la
subrutina CONVPERM.
Seguidamente, se ejecutará la subrutina que detecta el
presionamiento de la tecla " B ", mediante la cual se da inicio
a la detección de las desviaciones, por medio de la activación
de la interrupción INT1. La subrutina en referencia se denomina
TECLAB.
Ahora, el sistema procederá a detectar, leer y almacenar las
97
desviaciones entre dos pulsos; la subrut ina a ejecutarse se
denomina LEAINTER.
Luego de realizar las tareas mencionadas, el programa principal
ejecuta la subrutina CHECNUM mediante la cual se determina si se
ha tomado todas las desviaciones previstas, de serlo así, el
programa ejecuta la subrutina DESPROM que calcula la desviación
promedio; caso contrario, continúa con la detección.
Una vez realizado el cálculo el sistema permanece en espera de
que se presione la tecla " C ", para realizar el cálculo de la
varianza de Alian. Este proceso se realiza mediante las
subrutinas TECLAC y DESALLAN respectivamente.
El presionamiento de la tecla " D " permite realizar la
corrección de la desviación, con lo que el proceso habrá
concluido.
Previa ejecución del programa principal, se procede a inicializar
las etiquetas y sus respectivas direcciones.
El diagrama de flujo del programa principal se muestra mediante
los diagramas 3.1 y 3.2.
DIAGRAMA DE FLUJO DEL PROGRAMA PRINCIPAL
SE HA
ENERGIZADO EL
SISTEMA
NO
SE HA
PRESIONADO LA SI
TECLA "B"
CHEQUEO DE
DISPLAV V LEDS
"V TECLA "A" S^\^ 1r
N
i
,/SE
NO /^PRESIOf
/ I N I C I A L I Z A C I O N
DEL D I H . DE FREC.
"
INICIñLISACION
DEL DETEC. DE I NT
\t
INGRESO DELPERIODO DE HUEST.
r
Hfi\ÍADO Lft\I
0
FIGURO 3.1
REGISTRO V flLMAC.
DE LA DESVIACIÓN
E HAN
TOMADO TODAS
LAS DESVIACIO
NES
CALCULO DE LA
DESU. PROMEDIO
UISUALIZACION DE
LA DESV. PROMEDIO
SE HA
PRESIONADO LA
TECLA "C"
CALCULO DE LA
DESV. DE "ALLAN"
giSUALIZACION DE
LA DESU. DE ALLAN
LA
DESVIACIÓN ES
LA NORMAL
CORRECCIÓN DE
LA DESUI ACIÓN
FIGURO 3.2
100
El programa principal muestra el orden de ejecución de las
subrutinas, la instrucción END al final del mismo es con el fin
de darle sentido de conclusión, ya que en el programa total
aparece como última instrucción. La codificación se muestra a
continuación:
PROGRAMA PRINCIPAL PARA LA DETECCIÓN Y CORRECCIÓN DEDESVIACIONES DE ESTÁNDARES DE SEGUNDO ORDEN DE T/F .
PROGPRIN:DISPLED:
LJMPAA : LCALL
LCALLLCALLLCALLLCALLLCALL
LEAINT:LJMPLCALL
TFB : LCALLLCALLLCALLLCALLLCALLLJMPEND
CHECDISPTECLAADFRECCONTERVPERMUESTCONVPERMTECLAB
LEA ÍNTERCHECNUMDESPROMTECLACDESALLANTECLADCORRECTFINN
; CHEQUEO DE DISP.Y LEDS; LECTURA DE LA TECLA "A"jINIC. DEL DIV. DE FREC .jINIC. DET. INTERVALOS.; CARGA DEL PER. DE MUEST;CONV. DEL PER. DE MUEST.; LECTURA DE LA TECLA "B"
;LECT. DE DESFASAMIENTOS;CHEQ. # DE DESV, TOMADAS;CALC. DE LA DESV. PROM .; LECTURA DE LA TECLA "C";CALC. DE DESV. DE ALLAN; LECTURA DE LA TECLA "D";CORECCION DE LA DESV.; SALTO A FIN DE PROGRAMA.
3.4.- SUBPROGRAMAS UTILIZADOS.
A continuación se realiza una descripción de los subprogramas
utilizados y el propósito de los mismos; se utiliza para el
direccionamiento de los elementos periféricos, las etiquetas que
constan en el programa general. En la codificación se explica el
objetivo de los procesos necesarios.
101
3.4.1.- SUBRUTINA DE COMPROBACIÓN DEL FUNCIONAMIENTO DE
DISPLAYS Y LEDS INDICADORES.
Esta subrutina se ejecuta para poder conocer el estado de
funcionamiento de los display y leds indicadores, lo que
permitirá tener lecturas claras de la información.
Este proceso se ejecuta mediante la interfase programable
teclado-display, la cual recibe del microcontrolador los datos
a ser barridos en los display y leds.
Previo al envío del dato para comprobar el funcionamiento de los
indicadores, el microcontrolador inicializa a la interfase con
la siguiente información: sentido de ingreso de los datos (de
izquierda a derecha), número de display a utilizarse (6), la
frecuencia de barrido (por división de la frecuencia de reloj),
aunque el manual sugiere un tiempo de 100 KHz 5 puede elegirse
otro valor.
El valor a ser mostrado en los display es el 8, pues permite
visual izar todos los segmentos, mientras que los leds , al estar
conectados como un segmento del display y al enviar el número 8
(7FH) se encenderán todos a la vez; la subrutina descrita se
denomina CHECDISP.
El diagrama de flujo se muestra en la figura 3.3.
DIAGRAMA DE FLUJO DE LA SUBRUTINA DE COMPROBACIÓN
DEL FUNCIONAMIENTO DE DISPLAY ¥ LEDS,
INICIO
NO / \IENERGIZADO EL
INICIALIZACION
DE LA INTERFACE
PROGRAMADLE
SUBRUTINA DE
BORRADO DE LA MEH
FIFO DE LA INTERF
ENVIÓ DEL UALOR
A SER MOSTRADO
" 8 "
ENCENDIDO DE
DISPLAV V LEDS
DEL SISTEMA
C
F I G U P f t 3.3
103
La codificación de la subrutina se muestra a continuación:
SEGMENTO DE PROGRAMA PARA CHEQUEAR DISPLAY Y LEDS.
CHECDISP:LCALLSJMP
ININTER:MOVMOVMOVMOVXMOVMOVXLCALLLCALLRET
ESPINT:MOVSJMP
CLEAN:MOVMOVXMOVMOVXRET
DISPLAY:MOVMOVMOVXMOVMOV
DISPL:MOVMOVXDJNZMOVRET
ININTERESPINT
IE,#OOHDPTR,#INTERFA,#MODOKEY@DPTR,AA,#RELOJ@DPTR,ACLEANDISPLAY
IE,#05HAA
A,#CLEAR@DPTR,AA,#HABIL@DPTR,A
DPTR,#INTERFA,#ESDIS@DPTR,ADPTR,#DATOR5,#07H
A,#7FH@DPTR,AR53DISPLR7,#OOH
;ESPERA POR LAS INTERRUP.
;DESHAB.DE TODAS LAS INT.;DIR. DE LA INTERF. 8279;DISP.DE 8 CARACT. ENT IZQ;ENVIÓ DEL COMANDO;PREESCALAMIENTO DEL RELOJ;ENVIÓ DEL COMANDO;SUBR. DE LIMPIEZA DE DISP;SUBR. ENVIÓ DATO A DISP.
;HAB. DE INTERRUPCIÓN.;SALTO A LEER TECLA "A".
;CÓDIGO DE BORRADO;ENVIÓ DEL COMANDO;HAB. Y BLANQ. DE INTERF,;ENVIÓ DEL COMANDO
;DIR. DE LA INTERFASE;COMANDO DE ESC. EN DISP.;ENVIÓ DEL COMANDOjDIR. DEL DATO DE INTERF.;PUNT.DE CONTROL (7 DISP.)
;VALOR A MOSTRARSE (8);ENVIÓ DEL DATO
;PUNT.DE CONTROL DE PLECT.
104
3.4.2.- SUBRÜTINA DE DETECCIÓN DE LA TECLA " A ".
La presente subrutina, realiza la decodificación de la tecla
presionada, ya que el valor corresponde a la fila y columna
almacenada en la memoria FIFO de la interfase. Si la tecla
presionada no es la " A " el programa no continuará su ejecución.
Se procede de manera similar para la detección de las teclas B,
C y D, de manera que solo se mostrará el diagrama de flujo para
el caso de la tecla A.
El diagrama de flujo se muestra en la figura3.4.
DIAGRAMA DE FLUJO DE LA SUBRUTINA DE
DETECCIÓN DE LA TECLA "A",
INICIO
INGRESO PE TECLfl
PRESIONADA
DECODIF1CACION DE
TECLA PRESIONADA
CORRESPOND
A Lft TECLA "A" ?SI
C
CONTINUfiCION DEL
PROGRAMA
FIGURft
106
La codificación de esta subrutina se muestra a continuación:
SUBRUTINA QUE DETECTA EL PRESIONAMIENTO DE LA TECLA "A"
TECLAA :MOVMOVMOVXMOV
LEER:MOVXCJNEMOVMOVMOVX
. MOVMOVMOVXRET
SALIDA:MOVMOVMOVX
WAITINT:NOPLJMP
DPTR,#INTERFA,#LECDIS@DPTR , ADPTR,fDATO
A , @DPTRA, #03H, SALIDADPTR,#INTERFA,#ESDIS@DPTR , ADPTR,#DATOA,#5FH@DPTR, A
DPTR,#INTERFA,#ENDINT@DPTR , A
LEER
;HAB. DEL COM . DEL 8279; LECTURA DEL SENSOR RAM; ENVIÓ DE COMANDO;HAB. DATO PARA EL 8279
;LECT. DE FILA Y COL.; SI NO ES TECLA A ESPERE;DIR. DE LA INTERFASE; COMANDO DE ESCRITURA; ENVIÓ DEL COMANDO;COM. DE ENVIÓ DE DATO; CÓDIGO DE LA LETRA "a"; ENVIÓ DEL DATO
;HAB. DE LA INTERFASE; BAJAR BANDERA DE INT.; ENVIÓ DEL COMANDO
3.4.3.- SUBRUTINA DE SETEO DEL DIVISOR DE FRECUENCIA.
Esta subrut ina se denomina DFREC y se inicia habí 1 itando al
temporizador 8253-5 mediante las líneas AO y Al (A03A1 = 11), que
habilitan el modo de escritura.
Utilizando el formato del registro de control, se selecciona el
contador (posee tres contadores de 16 bits cada uno), el número
de bytes a utilizarse (1 o 2) , el modo de trabajo (posee 6) y el
modo de conteo (BCD o binario).
Primeramente se selecciona el contador "O", con dos bytes, modo
107
4 de trabajo, ya que, una vez concluida la cuenta, el
temporizador genera un pulso en bajo, y continua con el conteo
seteadOj es decir genera un pulso cada segundo, mientras esté
habí 1itada la entrada " GO ".
En este temporizador se puede seleccionar la forma de conteo: BCD
o BINARIA , eligiéndose la segunda, debido a que el
microcontrolador realiza las operaciones en hexadecimal, y no
posee la operación de ajuste decimal para la diferencia.
A continuación se procede con la carga del byte menos
significativo (3FH), luego el byte más significativo (42H).
Debido a que un solo contador no es suficiente, se utiliza un
segundo contador, pero solamente el byte menos significativo,
precediéndose de igual forma como en el anterior, seteándose
primero e inicializándose luego con el valor de OFH,
completándose la cuenta de 999999 expresada en binario.
El diagrama 3.5 muestra el diagrama de flujo de esta subrutina.
SUBRUTINA DE SETEO V CARGA DEL DIUISOR DE FRECUENCIA
INICIO J
HABILITACIÓN DEL
TIMER 8253
SELECCIÓN DEL CONTADOR
"0", 2 BVTES, MODO DE
TRABAJO tt 4 V CUENTA
B I N A R I A
CARGA DEL VALOR
99 (EN BINARIO)
EN LSB V EN KSB
SELECCIÓN DEL CONTADOR
"i", UN Bm, MODO DE
TRABAJO tí 4 V CUENTA
BINARIA
CARGA DEL VALOR
99 (EN BINARIO)
EN LSB
SETEO DEL MODO
DE LECTURA
C FIN
FIGURfi 3.5
109
La codificación de esta subrutina se indica a continuación:
SUBRUTINA
DFREC:MOVMOV
MOVXMOVMOVMOVXMOVMOVXMOV
MOV
MOVXMOVMOVMOVXRET
DE INICIALIZACION
DPTR,#DIVFREC ;A,#38H ;
5j
@DPTR , A ;DPTR,#DIVO ;A,#3FH ;@DPTR , A ;A,#42H ;@DPTR , A ;DPTR,#DIVFREC ;
jA,#58H ;
3
j
@DPTR , A ;DPTR3#DIV1 ;A5#OFH ;@DPTR , A ;
DEL DIVISOR DE FRECUENCIA.
DIR. DEL DIV. DE FRECUENCIACARGA DEL MODO DE OPERACIÓN:CONT. "0", DOS BYTE S-, MODO 4DE TRABAJO, CUENTA BINARIAENVIÓ DEL REGISTRO DE CONTROLDIRECCIÓN DEL DIVISOR "0"CUENTA DEL BYTE LSBENVIÓ DE LA CUENTACUENTA DEL BYTE MSBENVIÓ DE LA CUENTADIR. DEL DIVISOR DE FREC . YY HAB. DEL REG. DE CONTROLCARGA DEL MODO DE OPERACIÓNCONTADOR "1" , UN BYTE, MODO 4DE TRABAJO, CUENTA BINARIAENVIÓ DEL REGISTRO DE CONTROLDIRECCIÓN DEL DIVISOR "1"CUENTA DEL BYTE LSBENVIÓ DE LA CUENTA
3.4.4.- SUBRUTINA DE SETEO DEL REGISTRADOR DE DESFASAMIENTOS.
Esta subrutina denominada CONTERV, se inicia luego de la
habí 1itación del temporizador 8253, mediante el decodificador de
direcciones y de las líneas AO y Al (AO,A1 = 11), similar a la
subrutina anterior, solo que ahora varían los valores desde donde
se realiza el conteo.
Los valores seteados son los máximos (FFH) para los dos bytes del
contador "O" y para el byte menos significativo del contador "1",
pudiendo de esta forma registrar suficientemente períodos de 1
segundo.
110
Lo que varía entre los dos temporizadores es la conexión externa
y el seteo de las cuentas, además se agrega un segmento de
programa que sirve para setear la Iectura5 y hacerlo a través de
latches internos. Por lo demás es el mismo proceso seguido para
la división de la frecuencia, por esa razón no se incluye el
diagrama de finjo.
La codificación de esta subrutina se muestra a continuación:
SUBRUTINA DE INICIALIZACION DEL DETECTOR DE INTERVALOS.
CONTERV:MOV
MOV
MOVXMOVMOVMOVXMOVMOVXMOV
MOV
MOVXMOVMOVMOVXMOVMOVMOVXMOVMOVXRET
DPTR,#DETDESF
A,#38H
@DPTR,ADPTR,#CONTOA,#3FH@DPTR,AA,#42H@DPTR,ADPTR,#DETDESF
A,#58H
@DPTR,ADPTR,#CONT1A,#OFH@DPTR,ADPTR3#DETDESFA,#OOH@DPTR,AÁ,#40H@DPTR,A
DIR. DEL DETECTOR DE DESFAS.Y HAB. DEL REGISTRO DE CONTROLCARGA DEL MODO DE OPERACIÓN:CONTADOR "O", DOS BYTES, MODO 4DE TRABAJO, CUENTA BINARIAENVIÓ DEL REGISTRO DE CONTROLDIRECCIÓN DEL CONTADOR "O"CUENTA DEL BYTE LSBENVIÓ DE LA CUENTACUENTA DEL BYTE MSBENVIÓ DE LA CUENTADIR. DEL DETECTOR DE DESFAS.Y HAB. DEL REG. DE CONTROLCARGA DEL MODO DE OPERACIÓNCONTADOR "1", UN BYTE, MODO 4ENVIÓ DEL REGISTRO DE CONTROLDIRECCIÓN DEL CONTADOR 1CUENTA DEL BYTE LSBENVIÓ DE LA CUENTADIR. DEL DETECTOR DE DESF.ACTIVACIÓN LATCH DEL CONT."O"ENVIÓ DEL COMANDOACTIVACIÓN LATCH DEL CONT."1"ENVIÓ DEL COMANDO
1113.4.5.- SUBRUTINA DE INGRESO DEL PERIODO DE MUESTREO.
Una vez que se ha inicializado los temporizadores, el programa
principal espera por el ingreso del período de muestreo, y tipo
de señal a utilizarse (local o remota). La subrutina se denomina
PERMUEST y permite además, almacenar en memoria interna RAM, los
datos ingresados en horas, primeramente las decenas y luego las
unidades; el proceso concluye al presionar la tecla " # ".
A continuación se debe indicar el tipo de señal de referencia a
utilizarse; el presión amiento de la tecla " * " indica al
microcontrolador que se va a utilizar la señal remota o en caso
contrario la señal del estándar local.
Es necesario esta información, pues, el número de muestras a
tomarse difieren en uno y otro caso, ya que al utilizar la señal
remota, los pulsos de referencia son recibidos cada minuto (señal
WWVB), mientras que al utilizar el estándar local o la señal WWV,
los pulsos se reciben cada segundo.
Esta subrutina también incluye la tabla de conversión de 1 dato
presionado por el valor de la tecla presionada.
A continuación, el proceso se describe mediante el diagrama de
flujo que se muestra en el diagrama 3.6.
SUBRUTINfi DE DETECCIÓN DEL PERIODO DE MUESTREO
FflCTOR DE HULTI
PLICACION = 60
NO
C
VISUALIZACIONDE " a "
INGRESO DE LAS
DECENAS DE HORA
VISUALIZACIQN DE
TECLA PRESIONADA
INGRESO DE LAS
UNIDADES DE HORA
ALMACENAMIENTO EN
MEMORIA RAM (uC)
YISUAUZACION DE
TECLA PRESIONADA
FACTOR DE MULTI
PLICACION = 3600
FIGURfi 3.6
113
La codificación de esta subrutina se muestra a continuación:
SUBRUTINA DE LECTURA DEL PERIODO DE MUESTREO.
PERMÜEST:
L2:
DAT:
MOVMOVMOVXMOVMOVXCJNELJMPCJNESJMP
DPTR3#INTERFA,#LECDIS@DPTR , ADPTR,#DATOA , @DPTRA, #3 OH, DATSALPA)#32HJDATINÁSTER
;HAB. DEL COM . DEL 8279i LECTURA DEL SENSOR RAM; ENVIÓ DE COMANDO;HAB. DATO PARA EL 8279; INGRESO VAL, FRES. EN TEC; TECLA # PARA SALIR
DATIN:
Jl:
J2:
J3:
NA:
ÁSTER
MOVMOVDIVCLRMOVMOVMOVSÜBBJNCCLRMOVCJNEMOVSJMPCJNEMOVSUBESJMPCJNEMOVSUBESJMPMOVSUBEMOVMOVCMOVMOVMOVCMOV;CJNEMOVMOVMOVMOVLJMP
R3,AB,#10HABCR6,#03HR5,AA,BA,R6ESPERCA,R5A,#OOH, JlA,BNAA,#01H, J2A,R3A,#OCHNAA,#02H, J3A,R3A3#18HNAA,R3A3#24HDPTR3#TABLA1A,@A+DPTRR4,ADPTR,#TABLA2A , @A+DPTRRl ,A
A5#32H}PRIMVALRO , # REMLOCA,#01HRO,#22H@R05ÁSALP
;SEGM. DE PROGRAMA PARAj DETERMINAR SI LA TECLA; PRESIONADA CORRESPONDE;A UN NUMERO Y NO A UNA; LETRA
;SI ES UNA LETRA, SALGA
-; PERTENECE A PRIM.FILA?
; SALTE A NA; PERTENECE A SEG. FILA?
; PERTENECE A TER . FILA?
; SEGMENTO DE PROG . PARA;DET. EL VALOR REAL;DE LA TECLA PRESIONADA
;LOC. TIPO SEÑAL USADA;USO DE SEÑAL LOCAL;DIR. DEL PER. DE MUEST.;SE GUARDA VAL. DEL ACC .
114
PRIMVAL:MOVCJNEMOVMOVMULMOVMOVMOVMOVMOVXMOVMOVXSJMP
SEGVAL:MOVMOVADDMOVMOV
ESPER:MOVMOVMOVX
J5: NOPSJMP
SALP:RET
RO 5#35HR2,#OOH,SEGVALA,R4B,#OAHAB@RO,AR2,f01HDPTR,#INTERFA,#ESDIS@DPTR,AA,R1@DPTR,AESPER
RO,#35HA,R4A,@RO@RO,AR2,#OOH
DPTR,#INTERFA,#ENDINT@DPTR,A
L2
;DIR. DEL PER. DE MUEST.;PRIM. O SEG. VAL INGR.
;SE MULT. VALOR INGRESADO;PARA ENCONTRAR DECENAS
;PUNT. PARA VALOR UNIDS.;DIR. DE LA INTERFASE;HAB. DE ESCRITURA;ENVIÓ DEL COMANDO;SE RECUP. VALOR DEL ACUM.;ENVIÓ DATO A LA ÍNTER.
;SE REC. EL VALOR DEL ACC,;SUMA DE ÜNIDS A LAS DECS;SE ALMAC. EL VALOR TOTAL;PÜNT. DE PRIMERA LECTURA
;HAB. DEL COMANDO;BAJAR BANDERA DE INT.;ENVIÓ DEL COMANDO
TABLA1:DBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDB
01H02H03HOOH04H05H06HOOH07H08H09HOOHOOHOOH32HOOH
;#;#;#)
;#;#;#í
;#;#5#J
3
;#J
J
FILAFILAFILAFILAFILAFILAFILAFILAFILAFILAFILAFILAFILAFILAFILAFILA
o,o,0,0,1,1,1,1,2,2,2,2,3,3,3,3,
COLCOLCOLCOLCOLCOLCOLCOLCOLCOLCOLCOLCOLCOLCOLCOL
0123012301230123
(A)
(B)
(C)(#)
(*)(D)
115
3.4.6.- SUBRÜTINA DE CONVERSIÓN DEL PERIODO DE MUESTREO A
NUMERO DE MUESTRAS A TOMARSE.
Esta subrutina permite transformar el período de maestreo de
horas a número de lecturas a tomarse dependiendo del tipo de
señal a utilizarse, así como almacenar el valor en la memoria RAM
interna.
Esta subrutina inicia preguntando si se ha presionado la tecla
"#" ; si esto ha ocurrido, el período en horas se multiplicará
por 60 (3C), de no serlo así, se entenderá que se ha elegido el
estándar local, por consiguiente el factor será 3600 (OE10H);
estos valores representan el número de muestras por hora a
registrarse. Se denomina CONVPERM y se halla incluida como parte
del diagrama de flujo de la subrutina anterior. La codificación
de esta subrutina se muestra a continuación:
SUBRUTINA DE CONVERSIÓN DEL PERIODO DE MUESTREOA NUMERO DE MUESTRAS A TOMARSE.
CONVPERM :MOVCJNE
LOCAL :MOVMOVDECMOVSJMP
REMOTO:MOVMOVMOV
TIP: LCALLLCALL
RO , # REMLOC@RO,#0 OH, REMOTO
RO ,#33H@RO,#10HRO@RO,#OEHTIP
RO,#33H@RO,#3CHR1,#TMUESTMUL16PASO
; SUBRUTINA PARA CAMBIAR;EL PERIODO DE MUESTREO;A NUMERO DE MUESTRAS A;DE ACUERDO AL TIPO DE; SEÑAL A UTILIZARSE.;SE MULTIPLICA EL VALOR;DEL PERIODO DE MUESTREO;POR 3600 EN HEXADECIMAL
;SE MULTIPLICA EL VALOR;DEL PERIODO DE MUESTREO;POR 60 EN HEXADECIMAL
RET
116
PASO:MOVMOVMOV
LOCALID:MOVMOVDECDECDJNZMOVDECLCALLRET
CONVPERM:MOVMOVCLRSUBBNC
LOCAL:MOVMOVDECMOVMOVSJMP
REMOTO:MOVMOV
TR: MOVLCALLRET
R0,f35HRl,#FACTACTR2,#05H
A,@RO@R1,ARlROR2,LOCALIDR1,#FACTACT@R1LIMP
RO,#REMLOCA,#01HCA;@ROREMOTOMOV RO , #LMULA,#10H@ROROA,#OEH@RO,ATRMOV RO,fLMULA,#3CH@RO ,AR1,#TMUESTMUL16
;SE ALMACENA EL NUMERO;DE MUESTRAS EN LA;LOCALIDAD 20-22
;NUM. MUEST. A TOMARSE;= PER. X FACTMULT - 1;BORRAR LOC. DE LA MULT
;DIR. DEL TIPO DE SEÑAL
;DIR. DEL MULTIPLICANDO;VALOR = OE10 = 3600
;VALOR = 3CH = 60
3.4.7.- SUBRUTINA DE LECTURA DEL DESFASAMIENTO.
Una vez que se ha presionado la tecla "B", el programa procede
a act ivar la INT1} que permite iniciar el proceso de detección
del desfasamiento entre dos pulsos.
Esta subrutina se denomina LEAINTER y se ejecuta por activación
de la interrupción externa (INT1). Primeramente detecta sí se
trata de la primera lectura, para almacenarla en la memoria RAM
interna, para utilizarla en el cálculo de la desviación promedio.
117
Luego de registrar el segundo desfasamiento, la subrutina ejecuta
otros subprogramas como: resta entre lecturas sucesivas (RESTA),
elevar al cuadrado este valor (CUADRADO), actualización del
número de desfasamientos tomados (ACTUAL), almacenamiento
(STOREDES) y el de muestreo de resultados (MUESTREO).
Tanto la lectura de los desf asamientos se realiza a través de la
subrutina denominada REGDESV.
El diagrama de flujo de esta subrutina se muestra mediante la
figura 3.7.
PROGRAMA PARA DETECTAR EL DESFASAMIENTO DE DOS PULSOS
Pi O P2 ACTIVAN
LA SALIDA DEL
FLIP-FLOP " D "
LEGADO EL
SEGUNDO PUL
SO.
SI
INICIO J
INICIAL. DE MODOS
V CANT. DE CONTEO
E HAN
ACTIVADO LOS
PULSOS Pl V
P2.
SE DETIENE EL
TIMER
EL TIMER ENMIA
"INT0" AL uC.
EL uC REGISTRA EL
DATO ALMACENADO
E HAN
TOMADO TODOS
LOS DATOS
REGISTRAR EL SIG.
UALOR ALMACENADO.
RESTAR LOS DOS
VAL. REGISTRADOS.
ALMACENAR EL UAL.
DEL DESFASAMIENTO
MOSTRAR EL VALOR
DE DESFASAMIENTO
FIGUFfi 3 . 7
119
La codificación de la subrutina mencionada se muestra a
cont inuación:
SUBRUTINA DE
LEAINTER:CJNE
REGPDESV:MOVLCALLMOVMOVMOV
PAT: MOVMOVDECDECDJNZMOVMOVLJMP
REGSDESV:MOVLCALLMOVMOVMOV
NUREST:LCALLJCLCALLLCALLLCALLLCALLMOVMOVLCALLLCALLLCALLJZSJMP
ULA: LCALLMOV
PL : NOPDJNZLJMP
REGDESV:MOVMOV
LECTURA DEL DESFASAMIENTO ENTRE DOS PULSOS.
R7,#OOH,REGSDESVí
RO,#PLECT ;REGDESV ;RO,#PLECT ;R1,#LECANT ;R2,#03HA,@RO ;@R1,A ;RORlR2,PATR7,#01H ;R2,#08H ;PL
RO , #ULECT ;REGDESV ;RO , #ULECTR1,#LECANTR4,fDESVNET
RESTA3B ;CAMBIOCUADRADOLIMP ;STOREDES ;CONTUAL ;RO,#DESVNET ;R6,#OOHCONVER ;MUESTREO jCHECNUMMSULAULANT ;R2,#08H ;
R2,PLLEAINTER
DPTR,#CONTO ;R2,#02H ;
;CONT. PARA REAL. LECT .DE LA SEGUNDA DESV.SEGM. PARA REALIZAR LALECT. DE LA DESVIACIÓNPUNT. DE PRIMERA LECT.LECTUTA ANTERIOR
PRIMERA LECTURA COMOLECTURA ACTUAL
PUNT. DE CONTROL PARASEGUNDA LECTURA.
PUNT. DE ULTIMA LECT.LECTURA DE LA DESV.
SUBRUTINA DE RESTA
BORRAR LOC. DE LA MULT .ALMACENAMIENTO DEL DATOACTUALIZACIÓN CONTADORPUNTERO DEL DATO DESV.
SUBR. CAMBIO BIN A BCDVISUALIZACION DE DESV.
SUBR. PARA CAMBIAR ULT .LECTURA A ANTERIOR
DIR. DEL CONT. "0"PUNTERO DE CONTROL
120
LECTURA:MOVX A,@DPTR ;LECT. DEL CONT. "O1
MOV @RO,A ;ALM. DEL DESFASEDEC RODJNZ R2,LECTURAMOV DPTR,#CONT1 ;DIR. DEL CONT. "1"MOVX A,@DPTR ;LECT.DEL CONT. "1"MOV @RO,A ;ALM. DEL DESFASERET
MS: LJMP FINN ;FIN DEL PROGRAMA
3.4.8.- SUBRUTINA DE CONTROL DEL NUMERO DE
DESVIACIONES TOMADAS.
Esta subrutina controla que se recepten todas las lecturas
previstas de acuerdo al período de muestreo seleccionado.
Una vez que se realiza la segunda lectura, el programa procede
a averiguar si el contenido del contador implementado corresponde
a la cuenta de lecturas previstas. En caso de serlo, el programa
deshabilita la interrupción INT1, con lo que se detiene el
proceso de lectura de intervalos, para proceder con el cálculo
de la desviación promedio.
Además, esta subrutina controla las lecturas a ser almacenadas,
las que corresponden a números múltiplos de 15.
La figura 3.8 muestra el diagrama de bloques la subrutina
descrita.
ACTUALIZACIÓN
DEL CONTADOR
NO
E HAN
TOMADO TODAS
LAS LECTURAS ?
SI
CONTINUAR CON
EL PROCESO
DESACTIVAR LA
INTERRUPCIÓN INT0
C
FIGURfl 3.8
122
A continuación se muestra la codificación de esta subrutina
SUBRUTINA DE CONTEO DEL NUMERO DE DESVIACIONES TOMADAS
CHECNUM:MOV RO,#FACTACT ;PUNTERO DE MUESTRASMOV R1,#LECTUAL ;CONTADOR ACTUALMOV R2,#03H
VL: CLR CMOV A,@ROSUBE A,@R1JNZ SIGADEC RODEC RlDJNZ R2,VL
SIGA:RET
3.4.9.- SUBRUTINA DE CALCULO DE LA DESVIACIÓN PROMEDIO.
Esta subrutina calcula un valor muy utilizado para determinar la
desviación de estándares de segundo orden; pues determina el
signo de la desviación, lo que no realiza la varianza de Alian,
ya que, dependiendo de él, se aplicará al estándar un voltaje
positivo o negativo para la corrección de la desviación.
Como ya se indicó, se trata de encontrar la desviación
experimentada por un estándar en un determinado período de
muestreo; por lo que es necesario almacenar la primera y la
última lecturas, obtener la diferencia de ellas y dividir para
el período de muestreo.
El diagrama de flujo de la subrutina de cálculo de la desviación
promedio se muestra en la figura 3.9.
PROGRAMA PARA EL CALCULO DE LA DESUIACION PROMEDIO
I N I C I OJ
RECUPERAR EL V A L .
tn
RECUPERAR EL U A L .
ti
RESTAR LOS VAL.
RECUPERAR EL VAL.
" n " (NUMERO DE
DATOS TOMADOS).
REALIZAR LA DIVISIÓN
At _ tn - ti__ _ _ _ _ - _ _ _ _ _ _ _ _ _ _ _ _ _
MOSTRAR EL VALOR
DE LA DESVIACIÓN
PROMEDIO
E N D
F I G U R f t 3 - 9
124
La codificación de la subrutina que realiza el cálculo de la
desviación promedio se indica a continuación:
SUBRUTINA
DESPROM:LCALLMOVMOVLCALLLCALLLJMP
DPROM :MOV RO ,MOVMOV
NEW: LCALLJCSJMP
CAN: MOVMOVLCALLSJMP
DESVPOS :MOVMOVMOVDECMOVMOVDECMOVMOVLCALLMOVMOVMOV
SDD : MOVMOVDECDECDJNZMOVMOVLCALLRET
DE CALCULO DE
DPROMRO,#DESPROR6,#01HCONVERMUESTREOFINÍ
#ULECTR1,#PLECTR4 , #LMULRESTA3BCANDESVPOSRl ,#DESVNEG@R1,#01HCAM1NEW
Rl , #MULDORA,#OAOH@R1 , ARlA,#86H@R1 ,ARlA,#01H@R1,AMUL16RO,#35HRl , #DESVNETR2,#05HA,@RO@R1 ,ARORlR2,SDDRO,#DESVNETR1,#FACTACTRESTASE
LA DESVIACIÓN PROMEDIO.
;PUNT. DE CIFRA DECIMAL
;DIR. DE LA ULTIMA LECT .;DIR. DE LA PRIM. LECT,
;SUB. PARA ENC. LA DIF.; CHEQUEO SIGNO DE DIF.
;ALM. SIGNO DE LA RESTA; 1 = SIGNO NEGATIVO
;SEGM. DE PROGRAMA PARA; REAL I ZAR LA MULT .;DE LA DIFERENCIA DE;DESV. POR 100000;PARA LUEGO DIVIDIR POR;EL NUMERO DE MUESTRAS; TOMADAS
;DIR. RESULT.DE LA MULT.;DIR. DE LA DESV. NETA;PASO DE CANT. DE LA;MULT. A LOC . DE; SUMAT . PARA ENCONTRAR;LA DESV. PROMEDIO.
;SUBR. PARA ENCONTRAR;LA DESV. PROMEDIO,
125
Esta subrutina anida a otras como MUL16 que sirve para
multiplicar números de más de 8 bits, y se ejecuta antes de
realizar la división por el período de muestreo, para evitar
tener un cociente cero (numerador menor que el denominador).
Existen además otras subrutinas anidadas como CONVER y MUESTREO;
la primera se utiliza para convertir el resultado de la
desviación expresada en hexadecimal a B.C.D, así como la notación
exponencial; la segunda subrutina, sirve para realizar el
muestreo de estos resultados. También consta la tabla de
conversión de valores B.C.D. y notación exponencial, a valores
a ser mostrados.
Todas estas subrutinas se muestran en el programa total, al final
del capítulo.
126
3.4.10.- SUBRUTINA QUE CALCULA LA DESVIACIÓN DE ALLAN.
Esta subrutina se ejecuta, una vez que se ha detectado la tecla
"C" (TECLAC) y se denomina DES ALLAN, la cual a su vez anida a
otras, pues se implementan operaciones de diferencia,
muítiplicaciónj división y raíz cuadrada entera de más de 8 bits.
Para realizar el cálculo, se toma el valor del sumatorio, el cual
se almacena en 5 bytes, se recupera el valor 2 x (n - 1), donde
"n" representa el número de muestras tomadas y finalmente se
realiza la división de las dos cantidades anteriores.
A continuación se extrae la raíz cuadrada del valor obtenido, se
convierte a BCD, visual izandose tanto la parte entera como la
exponencial.
El diagrama de flujo se muestra en la figura 3.10.
DIAGRAMA DE FLUJO DE LA SUBRUTINA QUE CALCULA
LA DESUIACION MEDIANTE LA UARIANZA DE ALLAN,
INICIO
RECUPERACIÓN DEL
VALOR DEL
SUNATORIO
RECUPERACIÓN DEL
YALOR DEL NUMERO
DE NUESTRAS
i 1
REALIZAR LA
DIMISIÓN DE LOS
DOS VALORES
i r
EXTRAER LA RAÍZ
CUADRADA DE
LA DIMISIÓN
i r
NOSTRAR EL
VALOR DE LA DESV.
CALCULADA
1 r
C FIN
FIGURft 3.10
La codificación de esta subrutina es la siguiente
128
SUBRUTINA
DESALLAN:MOVMOVMOV
ELV: MOVMOVDECDECDJNZMOVMOVLCALLLCALLMOVCLRMOVDECMOVMOVMOVLCALL
LCALL
MOVLCALL
LCALL
RET
RESTA5B:DIFERÍ :
MOVCLR
DIF: MOVSUBBMOVDECDECDJNZJCPUSHMOVCJNEMOVDEC
DE CALCULO DE LA
RO,#FACTACTRl ,#MULDORR23#03HA,@RO@R1 ,ARORlR23ELVRO , # LMUL@R03#02HMUL16PASORO,#7AHA@RO,ARO@RO}AR03#SUMATR1,#FACTACTRESTASE
yRAÍZ
R63#02HCONVER
MUESTREO
R2,#05HCA3@ROA3@R1@RO,ARORlR2,DIFTERMINERORO,#DESPRO@R03#OFFH,BAB@R03#OOHRO
DESVIACIÓN DE ALLAN.
¡DIR. DEL NUM. DE MUEST.;DIR. DEL MULTIPLICADOR¡TRASPASO DEL NUMERO DE¡MUESTRAS TOMADAS A LOC.¡DEL MULTIPLICADOR.
¡DIR DEL MULTIPLICANDO
¡2 x NUM. DE MUESTRAS.¡A LOC. DE FACTACT.¡SEGM. DE PROGRAMA;PARA BORRAR LOC.¡A SER NUEVAMENTE¡UTILIZADAS.
¡DIR. DEL SUMATORIO¡DIR DEL MUM. DE MUEST.¡SUBR. PARA ENCONT. LA¡DIF. ENTRE EL SUMAT.¡Y EL NUM. DE MUESTRAS¡SUBRUTINA PARA ENCONT.¡LA RAÍZ CUADRADA DE LA¡DIFERENCIA ANTERIR.; SUB . PARA CONVERTIR¡EL DATO HEX A BCD.¡SUB. PARA CAMBIAR LOS¡RESULT. DE TABLA A BCD.¡Y ENVIAR A LA INTERF.
¡NUM. DE BYTES DEL MIN.; SEGMENTO DE PROGRAMA¡MEDIANTE EL CUAL SE¡REALIZA LA DIVISIÓN¡MEDIANTE RESTAS; SUCESIVAS.
¡SI C=l TERMINE¡SEGMENTO DE ACTUAL.¡DEL CONTADOR; (COCIENTE) .
129
CJNEBAB: INC
SJMPAB: INCABBA:
MOVADDMOVMOVADDMOVLJMP
TERMINE:LCALLRET
RAÍZ:MOV
INIC:MOV
RR3: MOVMOVMULMOVDECMOVMOVCLRINC
NI: MOVSUBBDECDECDJNZJCPUSHMOVCJNEMOVDEC
RR2: INCPOPINCSJMP
RM: MOVMOVMOV
MT: MOVMOVDECDECDJNZRET
@RO,#OFFH,AB@ROABBA@ROPOP ROA,#05HA,RORO,AA,f05HA,R1R1,ADIFERÍ
LIMP
R2,#01HMOV R1,#SQRTRO,#DIVCOCA,R2B,R2AB@R1,ARl@R1,BR3 ,#02HCRlA,@ROA3@R1RlROR3,N1RMRORO , #DESLAN@RO)#OFFH,RR2
RO@ROROR2INICRO,#DESLANRl,fDIVCOCR2,#02A,@RO@R1 ,ARORlR2,MT
;SEGMENTO DE PROGRAMA;MEDIANTE EL CUAL;SE EXTRAE LA RAÍZ;CUADRADA ENTERA DEL;COCIENTE.
;NUMERO DE BYTES
;SI C=l FINALIZA
;ACTUALIZACIÓN DEL;RESULTADO
;SEGMENTO DE PROGRAMA;PARA COLOCAR LA RAÍZ;EN LAS LOCALIDADES;DEL COCIENTE.
130
3.4.ll.-SUBRUTINA DE CORRECCIÓN DE LA DESVIACIÓN.
Esta subrutina se ejecuta una vez que se ha calculado la varianza
de Alian y se conoce el signo de la desviación, para encontrar
el valor a ser enviado al C.D.A.
De acuerdo al valor entregado al conversor, este transforma
mediante los operacionales a un valor de voltaje de acuerdo a la
tabla indicada en el manual (pág. 4-50). Así: para un valor de
512¡ se tiene un voltaje de O V. , negativos para menores que éste
y positivos para los mayores a él.
Por esta razón, se debe restar o sumar " 5 " (que es la parte
entera de la desviación característica), al valor de la varianza
de Alian, y este resultado adicionarle 512 o restarle del mismo,
dependiendo del signo de la desviación, encontrado en la
desviación fraccional (bit 10) .
Debido a que se utiliza un conversor digital análogo de 10 bits,
es necesario cargar en dos bytes el valor de la desviación,
primeramente el byte menos significativo, y luego el de mayor
significación, el cual incluye el signo de la desviación
experimentada.
Primeramente se procede a habilitar al conversor, luego el modo
de ingreso de los datos (justificación izquierda), y finalmente
la carga del valor en dos bytes.
131
Cabe indicar que el C.D.A al poseer una exactitud de 10 bits, se
consigue variar el voltaje de referencia V,,™. que es de
5 V. en un rango de 1024 valores diferentes.
El diagrama de flujo de esta subrutina se muestra mediante la
figura 3.11.
SUBRUTINñ DE CORRECCIÓN DE Lñ DESUIñCION
INICIO J
RECUPERAR EL VAL.
PE DESVIACIÓN
'• >
HABILITACIÓN DEL
" C.D.A."
i '
CARGA DEL BVTE
MENOS SIGNIFICA!.
i i
CARGA DEL BVTE
MAS SIGNIFICATIVO
i '
CARGA DEL SIGNO
MENOS AL MSB.
w i/tjvim
\sPOS
1
ENVIÓ DE
AL " C
1
*ivn j&o j-
TIV/
1
ESTE VAL
D.A."
r
i
HABILITACIÓN DEL
" C.D.A."
i 1
CARGA DEL BVTE
MENOS SIGNIFICA!.
i 1
CARGA DEL BVTE
MAS SIGNIFICATIVO
C F I N
FI GUFft 3 -1JL
133
La subrutina codificada se muestra a continuación:
SUBRUTINA DE CORRECCIÓN DE LA DESVIACIÓN CALCULADA,
CORRECT :MOVMOVJNZ
POS : MOVMOVADDCMOVDECMOVADDCMOVINC
ANDHER :MOVMOVMOVXDECMOVMOV
ROT : RLDJNZMOVMOVXLJMP
NEG : MOVCLRMOVSUBEMOVDECMOVSUBEMOVINCLJMP
FINCOR:FINN:
RO,#DESVNEGA,@RONEGRO , #DESLANA,#05HA,@RO@RO ,AROA,#02HA,@RO@RO ,ARO
DPTR,fCORDVlA3@RO@DPTR , AROA,@ROR3,#06HAR3,ROTDPTR,#CORDV2@DPTR , AFINCORRO,#DESLANCA,#OFBHA,@RO@RO,AROA,#01HA,@RO@RO ,AROANDHERRETEND
i SEGMENTO DE PROGRAMA;PARA DETERMINAR EL; SIGNO DE LA DESV.¡DESVIACIÓN POSITIVA;SE SUMA AL VALOR;DE LA DESVIACIÓN DE;ALLAN, VALOR 20 5H (517)
; ENVIÓ DEL LSB AL CDA .
; ACOND I C I ONAM I ENTO;DEL MSB
; ENVIÓ DEL MSB
;DESVIACION NEGATIVA
; RESTA DEL VALOR 1FBH; (507) , EL VALOR DE;LA DESVIACIÓN PARA; REALIZAR LA CORRECCIÓN;BIT MAS SIGNIFICATIVO.
; ENVIÓ DE LA DESV. AL CDA.
¡FIN DEL PROGRAMA.
134
3.5.- INGRESO DE DATOS.
Como se conoce, el ingreso de los datos y la definición de la
tarea a realizarse, se lo hace a través del teclado, el cual
genera un pulso de interrupción (INTO) al presionar una tecla.
El período de muestreo, puede ser escogido entre 1 y 24 horas,
dependiendo del tipo de señal a utilizarse pues entre las dos
difiere el número de muestras a tomarse por hora (60 o 3600); no
se registrarán como datos válidos, valores que no estén
comprendidos en al rango indicado.
Las teclas literales indican el proceso a ejecutarse, las cuales
tienen un orden de ingreso.
3.6.- INFORMACIÓN OBTENIDA DE CADA UNO DE LOS BLOQUES.
La información que se obtiene de cada bloque ya ha sido
mencionada, por lo que solamente se citarán las principales
características de cada uno de ellos:
3.6.1.- BLOQUE DE INGRESO DE DATOS.
De este bloque, se obtiene un pulso de interrupción y el valor
codificado de la tecla presionada.
135
3.6.2.-BLOQUE DETECTOR DE DESFASAMIENTOS.
De este bloque se recibe el valor del desfasamiento entre dos
pulsos en microsegundos (expresado en binario), mediante un pulso
que activa al temporizador cada segundo al utilizar el estándar
local, o cada minuto con la señal remota WVB.
3.6.3.- BLOQUE DIVISOR DE FRECUENCIA.
De este bloque se obtiene un pulso de 1 segundo de duración, el
cual será comparado con el que se recibe del estándar primario,
local o remoto.
3.6.4.- BLOQUE CORRECTOR DE LA DESVIACIÓN.
Este bloque entrega un valor de voltaje proporcional al valor de
la desviación registrada.
3.7.- ALMACENAMIENTO Y PRESENTACIÓN DE LA INFORMACIÓN.
3.7.1.- ALMACENAMIENTO DE LA INFORMACIÓN.
El almacenamiento de la información referente a los
desfasamientos registrados cada 15 segundos, se lo efectúa en la
memoria RAM externa, mientras que los datos para el cálculo de
la desviación promedio, el cálculo de la varianza de Alian y el
proceso de corrección de la desviación, se lo realiza en la
memoria RAM interna.
136
El almacenamiento, se ejecuta direccionando la memoria externa,
mediante el registro de 16 bits DPTR, en el cual se carga la
dirección de la memoria y el dato a ser almacenado.
3.7.2.- PRESENTACIÓN DE LA INFORMACIÓN.
La presentación de la información se realiza mediante la
interfase programable, la cual al recibir la información del
microcontrolador, realiza el barrido de displays y leds a través
del decodificador de direcciones.
Previo al envío de la información, el microcontrolador realiza
una conversión del dato recibido en hexadecimal desde el detector
de desfasamiento, a valores BCD, mediante la subrutina CONVER;
mediante una TABLA se determinan los segmentos a encenderse en
cada display.
Además, las desviaciones parciales que están expresadas en
microsegundos, así como los cálculos de desviaciones parcial,
varianza de Alian y parte exponencial se expresa mediante leds
luminosos.
A continuación se muestra la codificación de esta subrutina
SUBRUTINA DE CONVERSIÓN DE VALORES DE HEXADECIMAL A BCD.
CONVER: ;SEGMENTO DE PROGRAMAMOV R1,#BBCD ;PARA CONVERTIR EL DATOMOV R35#OOH ;DE HEXADECIMAL A BCD
137
MOVMOVDIVCJNE
MEN100:MOVXCHDIVCJNEMOVINCLCALLPUSHMOVMOVPOPLJMP
MAY10:MOVINCDECMOVINCLCALLPUSHMOVMOVPOPLJMP
MAY100 :MOVDECINCMOVXCHDIVMOVINCDECMOVINCLJMP
STAR:CJNE
USEC:PUSHMOVMOVPOPLJMP
DESVIC:CJNE
DESP:PUSHMOVMOV
A,@ROB,#100ABA,#OOH;MAY100
A,#OAHA5BABA,#OOH,MAY10@R1,BR3CEROSRORO,#6CH@RO,#01HROSTAR
@R1,AR3Rl@R1,BR3CEROSROR05#6CH@RO,#02HROSTAR
@R1 ,ARlR3A>#OAHA,BAB@R1 ,AR3Rl@R1,BR3CEROS
R6,#OOH,DESVIC
RORO,#6CH@RO,#08HROEST
R6,#01H,DESAL
RORO,#6CHA}#20H
;SE DIVIDE POR 100 PARA;DETERMINAR EL NUMERO;DE CENTENAS;A SEGM. MAYOR QUE 100
;A SEGM. MAYOR QUE 10;CANTIDAD ENTERA
;INDICACIÓN DE 10 - 11
;CANTIDAD ENTERA,
;CIFRA DECIMAL
SINDICACIÓN DE 10 - 10
;CANTIDAD ENTERA.
;PRIMER CIFRA DECIMAL
;SEGUNDA CIFRA DECIMAL
;IND. DE DESV. PARCIAL;EXPRESADA EN uS.
;INDICACIÓN DE;DESVIACION
138
ADDMOVPOPLJMP
DESAL:PUSHMOVMOVADDMOVPOP
EST: RETCEROS:
MOVCLRSUBEMOVDEC
CER: MOVMOVDECDJNZDECRET
A,@RO@RO,AROEST
RORO,#6CHA,#40HA3@RO@RO ,ARO
A,#06HCA;R3R25ARlA,#OAH@R1 ,ARlR2?CERRl
;PROMEDIO Y PARTE;EXPONENCIAL.
SINDICACIÓN DE DESV,;DE ALLAN E;INDICACIÓN;EXPONENCIAL
;SEGMENTO DE PROGRAMA;PARA COLOCAR CEROS;DE ACUERDO A LA;CANTIDAD A MOSTRARSE
La subrutina de conversión de los datos a ser enviados a la
interfase, se realiza mediante una tabla, que se muestra a
cont inuación:
TABLA2:
DBDBDBDBDBDBDBDBDBDBDBDB
3FH06H5BH4FH66H6DH7DH07H7FH6FHOOH10H
;CÓDIGO DEL NUMERO O;CÓDIGO DEL NUMERO 1;CÓDIGO DEL NUMERO 2;CÓDIGO DEL NUMERO 3;CÓDIGO DEL NUMERO 4;CÓDIGO DEL NUMERO 5;CÓDIGO DEL NUMERO 6;CÓDIGO DEL NUMERO 7;CÓDIGO DEL NUMERO 8;CÓDIGO DEL NUMERO 9;DISPLAY APAGADO;CÓDIGO DE CORRECCIÓN
Los valores de los dígitos del O al 9 están definidos mediante
la instrucción DB, y direccionados de acuerdo al valor cargado
en el acumulador.
CAPITULO 4
4.1.- PRUEBAS DE FUNCIONAMIENTO DEL SOFTWARE
4.2.- ANÁLISIS TÉCNICO ECONÓMICO
4.3.- ANÁLISIS DE EFICIENCIA DEL SISTEMA
4.4.- CONCLUSISONES Y RECOMENDACIONES
4.5.- ALTERNATIVAS Y OPCIONES
4.6.- BIBLIOGRAFÍA
140
PRUEBAS Y RESULTADOS.
Las pruebas y resultados del sistema, han sido realizadas a nivel
de software, debido a la denominación (diseño) del presente
trabajo.
4.1.- PRUEBAS DEL FUNCIONAMIENTO DEL SOFTWARE.
Las pruebas realizadas en el software han sido hechas, utilizando
el simulador AVSIM51, mediante el cual se puede observar el
desarrollo, enrutamiento, generación de banderas, operaciones y
los resultados obtenidos.
El programa principal, ha sido estructurado a base de subrutinas,
siguiendo el orden que exige el proceso, con lo que se ha
independizado y facilitado su comprobación
Debido a que el programa simulador no permite observar el
envío/recepción de la información a/desde los elementos
periféricos, los datos que deben ser leídos, se simulan
recibirlos, para poder realizar las operaciones respectivas.
Las pruebas han sido realizadas en los programas que ejecutan
operaciones aritméticas, debido a que estos utilizan memoria RAM
interna del microcontrolador, y pueden ser visual izados. los
valores obtenidos son satisfactorios, pues cumplen con su
comet ido.
141
En lo relacionado a la velocidad, los programas de suma, resta
y multiplicación son bastante rápidos en comparación con el de
la extracción de la raíz cuadrada, debido al algoritmo utilizado.
4.2.- ANÁLISIS TÉCNICO-ECONÓMICO.
El análisis técnico-económico se realiza en función del desempeño
del sistema diseñado, de las bondades ofrecidas y del costo que
presenta frente a los sistemas análogos construidos, los cuales
también se citan.
En el aspecto técnico se puede anotar, que el sistema está
integrado en un solo componente y no solamente realiza las
funciones de los existentes separados en módulos, sino que
además, real iza la corrección de la desviación.
Debido a que es un sistema microprocesado, realiza todas las
operaciones previstas, de manera automática, con un grado de
precisión mayor a los manuales.
En el campo económico, se justifica, debido al costo que tienen
sistemas que realizan procesos similares. Los datos han sido
tomados de los catálogos de los fabricantes (Hewlett-Packard) y
se muestran a continuación:
142
PART.NUMBER DESCRIPCIÓN VALOR (USD)
115BR/CR FREQUENCY DIVIDER AND CLOCK 1500
5245L 50 MHz. ELECTRONIC COUNTER AND PLUG-INS 2950
11 VA VLF COMPARATOR 1500
TOTAL 5950
Se citan además otras cifras correspondientes a estándares de
Cesio (primarios), de Cuarzo (secundarios), fuentes de
alimentación, así como un osei los copio para comparación visual.
5060A CESIUM BEAM FREQUENCY STANDARD 15500
106A/QUARTZ OSCILLATOR 3900
724BR AND 725AR POWER SUPPLIES 600
175A 50 MHz. OSCILLOSCOPE 1325 1325
La cotización del sistema diseñado3 toma en cuenta: el valor de
los circuitos integrados utilizados, transformador, placa y
alambre para wire up, placa y fabricación del circuito impreso,
carcasa y elementos inherentes al armaje, así como también
algunas extras, como se indica a continuación:
DESCRIPCIÓN
143
PRECIO (DOLARES US.)
Circuitos integrados
Transformador
Placa Wire up
Alambre
Placa circuito impreso
Fabricación Impreso
Carcasa
Extras
TOTAL
114
15
10
20
15
20
20
40
254
Los valores de los elementos ut i 1 izados, han sido extraídos del
catálogo de JAMECO ELECTRONIC COMPONENTS.
4.3.- ANÁLISIS DE EFICIENCIA DEL SISTEMA.
La eficiencia del sistema desde el punto de vista del hardware
estará sujeto al armaje puesta en marcha y pruebas del diseño.
En lo referente al hardware la eficiencia estaría determinada en
función del método útil izado para realizar las mediciones y
proceso de cálculo de los estimadores. La automatización del
proceso, garantiza un error despreciable, pues el t iempo de
respuesta de los integrados (HCMOS de alta velocidad y bajo
consumo), afecta a todas las muestras.
144
La utilización de señales de reloj provistas por el propio
estándar hacen que las mediciones tengan un mayor grado de
confiabilidadj en virtud de la estabilidad y exactitud
suministrada por estos dispositivos, evitándose errores por estos
mot ivos.
En el proceso de cálculo se utilizan estimadores recomendados en
la estadística como la varianza de Alian, utilizada para
determinar la desviación de estándares de segundo orden.
El programa en su totalidad, necesita de 1359 bytes para su
ejecución representado por 12 subrutinas principales que anidan
18 subprogramas.
La utilización del cristal de 12 MHz . y la lógica de la que están
provistas las interrupciones, permite ejecutar el proceso
completamente; así por ejemplo, si el microcontrolador está
real izando un proceso u operación y recibe una señal de
interrupción, este atiende este requerimiento, para luego seguir
con el proceso interrumpido.
4.5.- CONCLUSIONES Y RECOMENDACIONES.
4.5.1.- CONCLUSIONES.
Las conclusiones en lo referente al diseño se pueden mencionar
las siguientes:
145
El sistema en su diseños se basa en las recomendaciones del
N.B.S. emitidos en boletines a los centros de emisión y hora
exactas, bajo tres exigencias: señal de referencia, método de
comparación y cuantificación de los resultados.
En lo referente al uso de la señal de referencia, el sistema ha
sido diseñado para utilizar como referencia, un estándar local
u otro remoto (mediante la recepción de una señal)
En cuanto al método de comparación, el diseño está basado en la
detección digital-automática de los desfasamientos, con lo que
se minimiza el error de medición.
La cuantificación de los resultados, se realiza mediante la
utilización de los estimadores estadísticos sugeridos,
garantizando resultados reales.
En lo referente al hardware, se ha utilizado elementos
programables por el microcontrolador, los cuales, una vez
inicializados operan de una manera autónoma.
El teclado utilizado permite: indicar al microcontrolador el
proceso a ejecutarse de una manera secueneial, ingreso del
período de muestreo en horas y el tipo de señal de referencia.
El C.D.A útil izado, también es programable y posee 10 bits de
precisión.
146
Los diseños de la fuente y el conversor, son de carácter
genérico, tanto por el diseño como por su aplicación, los que son
sugeridos por los manuales.
4.5.2.- RECOMENDACIONES.
Las recomendaciones serían dirigidas a una posible construcción
del presente diseño, por lo que se harían las siguientes
recomendaciones:
- En lo referente a las fuentes, uno de los puntos más
importantes del diseño es el transformador, el cual debe
tener bajas pérdidas en el hierro, y soportar valores de
carga mayores al valor máximo con lo que se asegura un
correcto funcionamiento.
- Que posea salidas con voltajes cercanos a los requeridos por
los reguladores, con ello se garantiza que éstos no tengan que
disipar mucha energía, lo que alargará el t iempo de vida útil
de estos.
- El uso de disipadores en el regulador de la fuente, se
justifica por la carga soportada, que determina la energía a
disipar y el régimen de trabajo, como por ejemplo la fuente de
5 V., pues el calentamiento del elemento, degrada el valor de
voltaje de salida.
147
- Se deben utilizar las protecciones previstas en las fuentes5
ya que un percance, no solamente destruiría la fuente misma,
sino que el resto de circuitos integrados.
4.6.- ALTERNATIVAS Y OPCIONES.
Como opciones del diseño real izado se puede indicar las
siguientes:
- transmitir la información obtenida tanto de desviación entre
pulsos, como la desviación total, hasta un elemento
grafizador análogo, o hasta una impresora o plotter para
poder tener la información grabada; de estas dos
alternativas se puede elegir una de ellas en base a las
bondades que presenta cada.
Para el caso de utilizar un grafizador análogo como el mostrado
en los métodos de detección del capítulo 1, la señal BCD
obtenida del sistema es recibida por un conversor digital-análogo
el cual dependiendo de la señal de voltaje recibida, permitirá
desplazar la aguja grafizadora, que ilustrará la desviación.
Este caso se utiliza una carta rotulada previamente, sobre la
cual se registran los datos recibidos.
El uso de impresora o plotter, necesita de un computador y
programas, para aprovechar la facilidad de la transmisión serial
de datos mediante el microcontrolador.
148
La utilización de grafizadores 3 permite i lustrar la desviación,
lo que facilita llevar estudios estadísticos, que permiten prever
correctivos y anticipar resultados.
En la primera alternativa, se tiene un solo tipo de gráfico, que
muestra como se mantiene o desplaza la estabilidad del estándar.
En la segunda alternativa, se puede tener varios t ipos de
gráficos dependiendo de los programas implementados.
4.7.- BIBLIOGRAFÍA.
- INTEL Mícrocontroler Handbook.
- INTEL Component Data Catalog.
- INTEL Memory Component Handbook.
- MOTOROLA INC. High-Speed Cmos Logic Data.
- SPRAGUE Integrated Circuits.
- NATIONAL SEMICONDUCTOR L i n e a r a p p l i c a t i o n s
Handbook.
- NATIONAL SEMICONDUCTOR Voltage Regulator Handbook.
- ECG Semiconductor Replacement
Guide.
- TIME AND FRECUENCY USER'S MANUAL National Bureau of
Standars.
- FRECUENCY AND TIME STANDARDS Hewlett Packard Co.
Aplication Note 52.
- PROBABILIDAD Y APLICACIONES
ESTADÍSTICAS Paul L. Meyer
149
Roberto Ángel Ares.
- ESTUDIO SOBRE FRECUENCIA Y HORA Ignacio Bustamante/1987.
EXACTA EN EL ECUADOR Y PERSPECTI-
VAS FUTURAS (tesis) .
- TRANSMISIÓN DIGITAL
- SEMINARIO SOBRE FRECUENCIA
Y HORA EXACTA
- ELECTRÓNICA DE ESTADO SOLIDO
- CHARACTERIZATION AND CONCEPTS
Jan Cermak
Van Der Ziel
Proceedings of the IEEE
OF TIME FREQUENCY DISEMINATION Vo1 60, #5, May 1972.
DEVELOPMENT AND PERFOMANCE Proceedings of the IEEE
OF THE PTB'S CS1 PRIMARY CLOCK Vo1 74, #1, Jan. 1986
ANEXOS.
PROGRAMA GENERAL.
ÍNDICE.
INFORMACIÓN TÉCNICA DE LOS CIRCUITOS INTEGRADOS
The Cybernetic Micro Systems 8051 Family Ássembler, Versión 3.02 Page 101-01-80
j
•PROGRAMA PARA REALIZAR LA DETECCIÓN, ALMACENAMIENTO,
•CALCULO, VISUALIZÁCION Y CORRECCIÓN DE LAS
•DESVIACIONES EXPERIMENTADAS POR ESTÁNDARES
•DE SEGUNDO ORDEN DE TIEMPO/FRECUENCIA.
;DEFINICIÓN DE ETIQUETAS PARA EL PROGRAMA PRINCIPAL;Y SUBRUTINAS.
EC01EC000009
002800D300A00090005000E00002000400030004100020003003300030014003400040015000600071007000003500690027002E00240033003500350069
í
J
ÍNTERFDATOMODOKEY
RELOJCLEARHÁBILESDISLECDISEHDINTFILAMAXFILACOLUMNAMAXCOLMEPROMMRAMDIVFRECDIV0DIV1DETDESFCOMT0CONT1DISPDIVALTCORDV1CORDV2TMUESTSUMATPLECTULECTFACTACTMULDORPRODLMULRESDIV
EQUEQUEQU
EQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQUEQU
0EC01H0EC00H09H
28H0D3H0A0H90H50H0E0HR204HR304H1000H2000H3003H3000H3001H4003H4000H4001H5000H6000H7100H7000H
35H69H27H2EH24H33H35H35H69H
;DIR. DEL COMANDO 8279;DIR. DEL DATO DEL 8279;DISP.DE 8 CARACT . ENT . IZQ.; BÚSQUEDA DECODIF . DEL TECLADO.;PRE-ESCAL.(100 KHz) PARA MUEST; BORRADO DE DISPLÁYS;BLANQUEO Y HABILIT . DEL 8279; ESCRITURA EN DISPLÁYS; LECTURA DEL SENSOR RAM;BAJA BANDERA DE INTERRUPCIÓN; CONTADOR DEL NUMERO DE FILASj PUNTERO DE MÁXIMA FILA; CONTADOR DEL NUM . DE COLUMNAS; PUNTERO DE MÁXIMA COLUMNA; DIRECCIÓN DE MEM. EXT. EPROM .; DIRECCIÓN DE MEM. EXT. RAM.;DIR DE HAB. DEL DIV. DE FREC.;DIR DEL DIVISOR DE FREC. "0".;DIR DEL DIVISOR DE FREC. "1".;DIR. DE HAB. DEL DET . DE DÉSE .;DIR. DE HAB. DEL CONTADOR "0" .;DIR. DE HAB. DEL CONTADOR "1".;DIR. DEL DEC. DE BARRIDO DISP.;DIR. DEL DIV. DE FREC. ALTERNO;DIR. DEL CDA Y CARGA DEL LSB .;DIR. DEL CDA Y CARGA DEL MSB.;LOC. DEL PERIODO DE MUESTREO.;LOC. DEL SUMATORIO.;LOC. DE LA PRIMERA LECTURA.;LOC. DE LA ULTIMA LECTURA.;VAL. DEL # DE MUEST. A TOMARSE;DIR. DEL MULTIPLICADOR.;DIR. PROD. MULT . DE 40 BITS.jDIR. DEL MULTIPLICANDO.;DIR. RESULT. PARC. DE LA DIV.
007F007000030013002300330078006A006B002A006400720074007A007E007A007C
0000000300060009000C000F001200150018001B001E002100240027002A
02002D12006912008D1200A91200CE12015C12018A0201B11202B41202D712043F1204631204F712051B020550
002D 1200320030 8013
0032 75A8000035 90EC010038 7409003A F0003B 7428003D F0003E 12004F
aero Systems
RCUAD EQUREPAR EQUTECA EQUTECB EQUTECO EQUTECO EQULEGTUAL EQUDESVNEG EQUREMLOC EQULECAMT EQUDESVNET EQUBBCD EQULECRAM EQUDESPRO EQUSQRT EQUDIVCOC EQUDESLAM EQU
PRQGPRIN:DISPLED:LJMPAA: LCALL
LCALLLCALLLCALLLCALLLCALL
LEAINT: LJMPLCALL
TFB : LCALLLCALLLCALLLCALLLCALLLJMP
•SEGMENTO DEi
CHECDISP:LCALLSJMP
ININTER:MOVMOVMOVMOVXMOVMOVXLCALL
8051 Family Assembler, Versión 3.02 Page 2
7FH ;DIR.70H ;DIR.03H ;VAL.13H ;VAL.23H ;VAL.33H ;VAL.78H ;CQNT6AH jDIR.6BH jIND.2AH ;LOC.64H ;LOC.72H ;LOC.74H ;LOC.7AH ;LOC.7EH ;LOC.7ÁH ;LOC.7CH ;LOC.
CHECDISPTECLAADFRECCQNTERVPERMUESTCQNVPERMTECLABLEAINTERCHECNUMDESPROMTECLACDESALLANTECLADCORRECTFINN
01-01-80
RESULT. PARCIAL DE LA RAÍZ.RESULT. PARCIAL DE LA RESTA.DE FILA Y COL. DE TECLA A.DE FILA Y COL. DE TECLA B.DE FILA Y COL. DE TECLA C,DE FILA Y COL, DE TECLA D..DE INTERVALOS ACTUALIZADO.DEL SIGNO NEG. DE LA DESV.DEL TIPO DE SEÑAL USADADE LA ULTIMA LECT . TOMADADE LA DESVIACIÓN NETA.DE VAL. DE BINARIO A BCDDE CQNTE0=15 PARA MEM . RAMDE LA DESVIACIÓN PROMEDIODEL CUADRADO PROGRESIVO.DEL CUOCIENTE DE LA DIV.DE LA RAÍZ DE ALLAN .
; CHEQUEO DE DISP.Y LEDS;LECTURA DE LA TECLA "A";INIC. DEL DIV. DE FREC .;INIC. DET. INTERVALOS.; CARGA DEL PER. DE MUEST;CONV. DEL PER. DE MUEST,;LECTURA DE LA TECLA "B";LECT. DE DESFASAMIENTOS;CHEQ, # DE DESV. TOMADAS;CALC. DE LA DESV. PROM .;LECTURA DE LA TECLA "C";CALC. DE DESV. DE ALLAM;LECTURA DE LA TECLA "D";CORECCION DE LA DESV.
PROGRAMA PARA CHEQUEAR DISPLAY Y LEDS
ININTERESPINT
IE,#00HDPTR,#INTERFA,#MQDGKEY@DPTR,AA,#RELQJ@DPTR,ACLEAN
jESPERA POR LAS INTERRUP .
;DESHAB.DE TODAS LAS INT ,;DIR. DE LA INTERF . 8279;DISP.DE 8 CARACT . ENT IZQ; ENVIÓ DEL COMANDO;PREESCALAMIENTO DEL RELOJ; ENVIÓ DEL COMANDO;SUBR. DE LIMPIEZA DE DISP
The Cybernetic Micro Systems 8051 Family Assembler, Versión 3.02 Page 301-01-80
0041 1200560044 22
0045 75A8050048 7A0E004A 00004B DAFD004D 80B4
004F 74D30051 F00052 74A00054 F00055 22
0056 90EC010059 7490005B F0005G 90EC00005F 7D07
0061 747F0063 F00064 DDFB0066 7F000068 22
0069 90EC01006C 7450006E F0006F 90EC00
0072007300760079007B007C007F00810082
E0B4030D90EC017490F090EC00745FF022
0083 90EC010086 74E00088 F0
0089 00008A 020072
ESPIblT:
AR:
CLEAN:
DISPLAY
DISPL:
LCALLRET
MOVMOVNOPDJNZSJMP
MOVMOVXMOVMOVXRET:MOVMOVMOVXMOVMOV
MOVMOVXDJNZMOVRET
•SUBRUTINA QUEj
TECLAA:
LEER:
SALIDA:
WAITINT
MOVMOVMOVXMOV
MOVXCJNEMOVMOVMOVXMOVMOVMOVXRET
MOVMOVMOVX;
NQPLJMP
DISPLAY
IE,#05HR2,#0FH
R2,ARAA
A,#CLEAR@DPTR,ÁA^HABIL@DPTR,A
DPTR,ttINTERFAjttESDIS@DPTR,ADPTR?#DATOR5,#07H
A,#7FH@DPTR,AR5.DISPLR7Jtt00H
;SUBR. ENVIÓ DATO A DISP.
;HAB. DE INTERRUPCIONES
; CÓDIGO DE BORRADO;ENVIO DEL COMANDO;HAB. Y BLANQ. DE INTERF .; ENVIÓ DEL COMANDO
;DIR. DE LA INTERFACE; COMANDO DE ESC. EN DISP.; ENVIÓ DEL COMANDO;DIR. DEL DATO DE INTERF.;PUNT.DE CONTROL (7 DISP.)
;VALOR A MOSTRARSE (8); ENVIÓ DEL DATO
;PUNT.DE CONTROL DE PLECT .
DETECTA EL PRESIONAMIENTQ DE LA TECLA "A".
DPTRjttlHTERFA,ttLECDIS@DPTR,ADPTR,#DATO
A,@DPTRAJ#03HJSALIDADPTR.ííINTERFA.ítESDIS@DPTR, ADPTR.ttDATOA.4Í5FH@DPTR, A
DPTR,ííINTEREA^ttENDINT@DPTR, A
LEER
;HAB. DEL COM . DEL 8279; LECTURA DEL SENSOR RAM;ENVIO DE COMANDO;HAB. DATO PARA EL 8279
;LECT. DE FILA Y COL.;SI NO ES TECLA A ESPERE;DIR. DE LA INTERFACE; COMANDO DE ESCRITURA; ENVIÓ DEL COMANDO;COM. DE ENVIÓ DE DATO; CÓDIGO DE LA LETRA "a"; EN VIO DEL DATO
;HAB. DE LA INTERFACE; BAJAR BANDERA DE INT.;ENVIO DEL COMANDO
DESPERA POR LA INT1.
The Cybernetic Micro Systems 8051 Family Assembler, Versión 3.02 Page 401-01-80
;SUBRUTINA DE INICIALIZACION DEL DIVISOR DE FRECUENCIA,
DFREC:008D 9030030090 7438
00920093009600980099009B009C
F0903000743FF07442F0903003
009F 7458
00A1 F000A2 90300100A5 740F00A7 F000A8 22
MOV DPTR,#DIVFRECMOV A,#38H
MOVX @DPTR,AMOV DPTR,#DIV0MOV A,#3FHMOVX @DPTR,AMOV Á,#42HMOVX @DPTR,AMOV DPTR,#DIVFREC
MOV A,#58H
MOVX @DPTR,AMOV DPTR,#DIV1MOV A,#0FHMOVX @DPTR,ARET
;DIR.DEL DIV. DE FREC.;CARGA DEL MODO DE OPER:;CONT "0",2 BYTES,MODO 4;DE TRABAJO, CUENTA BIN.;ENVIÓ DEL REG.DE CONTROL;DIR. DEL DIVISOR "0";CUENTA DEL BYTE LSB¡ENVIÓ DE LA CUENTA¡CUENTA DEL BYTE MSB;ENVIÓ DE LA CUENTA;DIR. DEL DIV.DE FREC.;Y HAB. REG. DE CONTROL¡CARGA DEL MODO DE OPER.;CONT."1" ,1 BYTE,MODO 4;DE TRABAJO, CUENTA BIN.;ENVIÓ REG. DE CONTROL;DIR, DEL DIVISOR "I11¡CUENTA DEL BYTE LSB;ENVIÓ DE LA CUENTA
;SUBRUTINA DE INICIALIZACIOM DEL DETECTOR DE INTERVALOS
CONTERV:00Á9 904003
00AC 7438
00AE F000AF 90400000B2 743F00B4 F000B5 744200B7 F000B8 904003
00BB 7458
00BD00BE00C100C300C400C700C900CA
F0904001740FF09040037400F07440
MOV DPTR,#DETDESF
MOV A,#38H
MOVX @DPTR,AMOV DPTR,#CONT0MOV A,#3FHMOVX @DPTR,AMOV A,#42HMOVX @DPTR,ÁMOV DPTR,#DETDESF
MOV A,#58H
MOVX @DPTR,AMOV DPTR,#CONT1MOV A,#0FHMOVX @DPTR,ÁMOV DPTR,#DETDESFMOV A,íí00HMOVX @DPTR,AMOV A
;DIR. DEL DETEC.DE DESEAS.;Y HAB. DEL REG.DE CONTROL¡CARGA DEL MODO DE OPER.:;CQNT,"0",2 BYTES, MODO 4;DE TRABAJO, CUENTA BIN.;ENVIÓ DEL REG. DE CONTROL;DIR. DEL CONTADOR "0"¡CUENTA DEL BYTE LSBiENVIO DE LA CUENTA¡CUENTA DEL BYTE MSB;ENVIO DE LA CUENTA;DIR. DEL DETEC.DE DESFAS.;Y HAB. REG. DE CONTROL¡CARGA DEL MODO DE OPER.;CONT. "1",1 BYTE, MODO 4;ENVIÓ DEL REG. DE CONTROL¡DIRECCIÓN DEL CONTEDOR 1¡CUENTA DEL BYTE LSB¡ENVIÓ DE LA CUENTA;DIR. DEL DETECTOR DE DESF¡ACTIV. LATCH DEL CONT."0"¡ENVIÓ DEL COMANDO¡ACTIV.LATCH DEL CONT.M1"
00CC F000CD 22
00CE00D100D300D400D700D800DB00DE00E100E300E400E700E800E900EB00EC00EE00EF00F100F200F300F600F800FA00FD00FE01000102010501060108010A010B010D011001110112011501160117011A011C011E01200121
90EC017450F090EC00E0B4300302014BB432028034FB75F01084C37E03FDE5F09E5051C3EDB40004E5F08013B40105EB940G800BB40205EB94188003EB942490014C93FC90043393F9B4320A786B74017822F602014B
0124 7835
±cxo Systeras 8051 Family Assemtaler, Versión 3.02 Page 501-01-80
MOVX @DPTR,A j ENVIÓ DEL COMANDORET
;SUBRUTINA DE LECTURA DEL PERIODO DE MUESTREO..>
PERMUEST:
L2:
DAT:
DATIN:
Jl:
J2:
J3:
NA:
ÁSTER:
PRIMVAL
MOVMOVMOVXMOVMOVXCJNELJMPCJNESJMPMOVMOVDIVCLRMOVMOVMOVSUBBJNCCLRMOVCJNEMOVSJMPCJNEMOVSUBBSJMPCJNEMOVSUBBSJMPMOVSUBBMOVMOVCMOVMOVMOVCMOVCJNEMOVMOVMOVMOVLJMP:MOV
DPTR,#INTERFA,#LECDIS@DPTR,ADPTR,#DATOÁ.ODPTRA.ífSeH.DATSÁLPA,#32H,DATINÁSTERR3,AB,#10HABCR6,#03HR5,AA,BA,R6ESPERCA,R5A,#00H, JlA,BNAA^IH, J2A,R3A,#0CHNAA,#02H, J3A,R3A,#18HNAA,R3Á,t24HDPTR^TABLAlA,@A+DPTRR4,ADPTR,ttTABLA2A,@A+DPTRR1,AAJtt32HJPRIMVALR0,#REMLOCA,#01HR0,ít22H@R0, ASALP
R0,#35H
;HAB. DEL COM . DEL 8279; LECTURA DEL SENSOR RAMj ENVIÓ DE COMANDO;HAB. DATO PARA EL 8279; INGRESO VAL. PRES.EN TEC .;TECLA # PARA SALIR
;SEGM. DE PROGRAMA PARAj DETERMINAR SI LA TECLA; PRESIONADA CORRESPONDE;A UN NUMERO Y NO A UNA; LETRA
;SI ES UNA LETRA, SALGA
; PERTENECE A PRIM.FILA?
j SALTE A NA; PERTENECE A SEG . FILA?
; PERTENECE A TER. FILA?
; SEGMENTO DE PROG. PARA;DET. EL VALOR REAL;DE LA TECLA PRESIONADA
;LOC. TIPO SEÑAL USADA;USO DE SEÑAL LOCAL;DIR. DEL PER. DE MUEST .;SE GUARDA VAL. DEL ACC .
;DIR. DEL PER. DE MUEST.
¿The Cybernetic Micro Systems 8051 Family Assembler, Versión 3.02 Page 601-01-80
01260129012A012D012E012F013101340136013701380139
* 013B013D013E013F0140
01420145014701480149014B
BA0012EC75F00AA4E67A0190EC017490F0E9F08007
7835EC26F67A00
90EC0174E0F000808C22
CJNEMOVMOVMULMOVMOVMOVMOVMOVXMOVMOVXSJMP
SEGVAL :MOVMOVADDMOVMOV
ESPER:MOVMOVMOVX
J5: NOPSJMP
SALP : RET
R2,#00H,SEGVA, R4B,#0AHAB@R0, AR2J#01HDPTR,#INTERFA,#ESDIS@DPTR,AA, Rl@DPTR,AESPER
R0;#35HA,R4A;@R0@R0, AR2 ,#001-1
DPTR,#INTERFA,#EHDINT@DPTR,A
L2
014C 01014D 02014E 03014F 000150 040151 050152 060153 000154 070155 080156 090157 000158 000159 00015A 32015B 00
TABLA1
;PRIM. O SEG. VAL INGR.
;SE MULT. VALOR INGRESADO;PÁRA ENCONTRAR DECENAS
;PUNT. PARA VALOR UNIDS.;DIR. DE LA INTERFACE;HAB. DE ESCRITURA;ENVIÓ DEL COMANDO;SE RECUP. VALOR DEL ACUM;ENVIÓ DATO A LA ÍNTER.
;SE REC. EL VALOR DEL ACC,;SUMA DE UNIDS A LAS DECS;SE ALMAC. EL VALOR TOTAL;PUNT. DE PRIMERA LECTURA
;HAB. DEL COMANDO;BAJAR BANDERA DE INT.;ENVIQ DEL COMANDO
DBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDB
01H02H03H00H04H05H06H00H07H08H09H00H00H00H32H00H
;#;#;#j;#;#;#j
;#;#;#)
>
;#ji
FILAFILAFILAFILAFILAFILAFILAFILAFILAFILAFILAFILAFILAFILAFILAFILA
0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,
COLCOLCOLCOLCOLCOLCOLCOLCOLCOLCOLCOLCOLCOLCOLCOL
0123012301230123
(A)
(B)
(C)(#)
(*>(D)
jSUBRUTINA DE CONVERSIÓN DEL PERIODO DE MUESTREO;A NUMERO DE MUESTRAS A TOMARSE
015C 786B015E B60009
0161 78330163 7610
CONVPERM:MOVCJNE
LOCAL:MOVMOV
R0,#REMLOC@R0,#00HJREMOTO
R0,tt33H
;SUBRUTINA PARA CAMBIAR;EL PERIODO DE MUESTREO;A NUMERO DE MUESTRAS A;DE ACUERDO AL TIPO DE;SEÑAL A UTILIZARSE.;SE MULTIPLICA EL VALOR
The Cybernetic Micro Systems 8051 Family Assembler, Versión 3.02 Page 701-01-80
016501660168
016A016C016E017001730176
01770179
* 017B
017D017E017F018001810183018501860189
18760E8006
7833763C79351203AA12017722
783579247A05
E6F71918DAFA79241712042922
DECMOVSJMP
REMOTO:MOVMOVMOV
TIP: LCALLLCALLRET
PASO: MOVMOVMOV
LOCALID:MOVMOVDECDECDJNZMOVDECLCALLRET
R0@R0,#0EHTIP
R0J#33H@R0,#3CHRl^TMUESTMUL16PASO
R0,#35HRl.ttFACTACTR2,#05H
A,@R0@R1,ARlR0R2, LOCALIDR1,#FACTACT@R1LIMP
;DEL PERIODO DE MUESTREO;POR 3600 EN HEXADECIMAL
;SE MULTIPLICA EL VALOR;DEL PERIODO DE MUESTREO;POR 60 EN HEXADECIMAL
;SE ALMACENA EL NUMERO;DE MUESTRAS EN LA;LOCALIDAD 20-22
;NUM. MUEST. A TOMARSE;- PER. X FACTMULT - 1; BORRAR LOC . DE LA MULT .
;SUBRUTINA QUE DETECTA EL PRESIONAMIENTO DE LA TECLA "B"
TECLAB:018A 90EC01018D 7450018F F00190 90EC00
019301940197019A019C019D01A001A201A301A5
E0B4130F90EC017490F090EC00747CF07F0022
* 01A6 90EC0101A9 74E001AB F0
01AC 0001AD 02019301B0 22
LEERB:
SALIDB:
WINTB:
MOVMOVMOVXMOV
MOVXCJNEMOVMOVMOVXMOVMOVMOVXMOVRET
MOVMOVMOVX
NOPLJMPRET
DPTR,#INTERFA,#LECDIS@DPTR,ADPTR.ítDATO
A,@DPTRA,#13H,SALIDBDPTR,#INTERFÁ.ítESDIS@DPTR,ADPTR^DATOA,#7CH@DPTR,AR7,#00H
DPTR,#INTERFA^ENDINT@DPTR,A
LEERB
;HAB. DEL COM. DEL 8279;LECTURA DEL SENSOR RAM;ENVIO DE COMANDOjHAB. DATO PARA EL 8279
;LECT. DE FILA Y COLUMNAjSI NO ES TECLA B ESPERE;DIR. DE LA INTERFACE;COMANDO DE ESCRITURA;ENVIÓ DEL COMANDO;COM. DE ENVIÓ DE DATO;CÓDIGO DE LA LETRA "b";ENVIÓ DEL DATO;CONTROL DE PRIMERA LECT
jHAB. DE LA INTERFACE;BAJAR BANDERA DE INTjENVIÓ DEL COMANDO
;ESPERA DE LA INT.
01B1 BE0018
01B401B601B901BB01BD01BF01C001C101C201C301C501C701C9
01CC01CE01D101D301D5
01D701DA01DC01DF01E201E501E801EA01EC01EF01F201F501F701F901FC01FE01FF0201
02040207
0209020A020B020C020E0211
78271202047827792A7A03E6F71819DAFA7F017A080201FE
782E120204782E792A7C64
120226405E1202431204291202C412021778647E001203211202811202B460 ID
12026D7A0800DAFD0201B1
9040007A02
E0F618DAFB904001E0
fiero Systems 8051 Family Aasembler, Versión 3.02 Page 801-01-80
;SUBRUTINA DE LECTURA DEL DESFASAMIENTO ENTRE DOS PULSOS.>
LEÁINTER:CJNE R7,#00H, REGSDESV
REGPDESV:
PAT:
MOVLCALLMOVMOVMOVMOVMOVDECDECDJNZMOVMOVLJMP
R0,#PLECTREGDESVR0J#PLECTR1,#LECANTR2,#03HA,@R0@R1,AR0RlR2.PATR7,#01HR2,#08HPL
;COHT. PARA REALI . LECT .;DE LA SEGUNDA DESV.;SEGM. PARA REALIZAR LA;LECT. DE LA DESVIACIÓN;PUNT. DE PRIMERA LECT.;LECTUTA ANTERIOR
j PRIMERA LECTURA COMO; LECTURA ACTUAL
;PUNT. DE CONTROL PARA; SEGUNDA LECTURA.
REGSDESV:
NUREST:
ULA:
PL:
REGDESV
LECTURA
MOVLCALLMOVMOVMOV
LCALLJCLCALLLCALLLCALLLCALLMOVMOVLCALLLCALLLCALLJZSJMPLCALLMOVNOPDJNZLJMP:MOVMOV
;
MOVXMOVDECDJNZMOVMOVX
R0,#ULECTREGDESVR0,#ULECTR1,#LECÁNTR4,#DESVNET
RESTA3BCAMBIOCUADRADOLIMPSTOREDESCQNTUALR0,#DESVNETR6Jtf00HCGNVERMUESTREOCHECNUMMSULAULANTR2.1Í08H
R2,PLLEAINTER
DPTR^CONT0R2,#02H
A,@DPTR@R0, AR0R2, LECTURADPTR^CONTlA,@DPTR
;PUNT. DE ULTIMA LECT.^LECTURA DE LA DESV.
;SUBRUTINA DE RESTA
; BORRAR LOC . DE LA MULT .; ALMACENAMIENTO DEL DATO; ACTUALIZACIÓN CONTADOR; PUNTERO DEL DATO DESV.
;SUBR. CAMBIO BIN A BCDjVISUÁLIZ ACIÓN DE DESV.
;SUBR. PARA CAMBIAR ULT .j LECTURA A ANTERIOR
;DIR. DEL CONT . "0"; PUNTERO DE CONTROL
;LECT. DEL CONT . "0";ALM. DEL DESFASE
;DIR. DEL CONT. "1"; LECT. DEL CONT. "1"
The Cybernetic Micro Systems 8051 Family Assembler, Versión 3.02 Page 901-01-80
0212 F60213 220214 02001B
0217 79780219 B7FF08021C 09021D 07021E B7FF030221 77000223 090224 070225 22
MS:
MOVRETLJMP
022602270229022A022B022C022E022F02300231023202330235023602370239
C37A03E697FDC000ECF8EDF61CD0001819DAF022
023A 782A023C 792E023E 7C640240 0201D7
CQNTUAL :
EST1:
MOVCJNEINCINCCJNEMOVINCINCRET
RESTA3B:CLRMOV
R3B: MOVSUBBMOVPUSHMOVMOVMOVMOVDECPOPDECDECDJNZRET
CAMBIO: MOVMOVMOVLJMP
@R0, A
TFB
R1,#LECTUAL@R1,#0FFH,EST1Rl@R1@R1,#0FFH,EST1@R1,#00HRl@R1
CRí
A , @ R 1
R0'
R 0 , A
@ R 0 , AR4R0R0RlR 2 , R 3 B
R0J#LECANTRl^ULECTR4,#DESVNETNUREST
0243024502470249024B024C024D024E024F0251025202530254025502570258
786479337C357D02E6F7FBECC001F9EBF71CD0011819
CUADRADO:MOVMOVMOVMOV
CARGA: MOVMOVMOVMOVPUSHMOVMOVMOVDECPOPDECDEC
R0J#o:R1,#MR4,#L;R5,#0A,@R0@R1,AR3,AA, R4RlR1,AA,R3©Rl, AR4RlR0Rl
;ALM. DEL DESFASE
;SEGM. DE PROGRAMA;PARÁ LLEVAR CUENTA;DE LAS DESV.;TOMADAS
;SEGM. DE PROGRAMA;PARA REALIZAR;LA RESTA DE;CANTIDADES DE;3 BYTES.
;SEGM.DE PROG. PARA;CAMBIAR MINUENDO POR;EL SUSTRAENDO Y;Y VICIVERSA.
;DIR DE LA DESV. NETA;DIR DEL MULTIPLICADOR;DIR DEL MULTIPLICANDO
;SEGMENTO DE PROGRAMA;PARA COLOCAR EL VALOR;DE LA DESVIACIÓN COMOjMULTIPLICANDO Y;MULTIPLICADOR Y ELEVAR;AL CUADRADO, MEDIANTE;LA SUBRUTINA MUL16
0259 DDF0025B 1203AÁ
025E02600262026302650266026702680269026A026C
026D026F0271027302740275027602770279027A027C027D027E0280
78357969C37A05E736F71819DAF922
782E792A7Á03E6F71819DAFAE47B04F608DBFC22
02810283028502860289028A028B028C028E02910293029502970299
79727A06E790043393F719DAF7BE000ÁC000786C7608D0008006
íicro Systems 8051 Family Assembler, Versión 3,02 Page 10
DJNZLCALL
jSUBRUTINA PARA;LA DESVIACIÓNt
SUMA16:MOVMOVCLRMOV
S16: MOVADDCMOVDECDECDJNZRET
ULANT: MOVMOVMOV
TRASP: MOVMOVDECDECDJNZCLRMOV
BOR: MOVINCDJNZRET
R5, CARGAMUL16
01-01-80
REALIZAR LA SUMA DEL CUADRADO DEPARCIAL AL SUMATORIO DE LA DESVIACIONES.
R0,#35HR1,#SUMÁTCR2,#05HA,@R1A,@R0@R1,AR0RlR2JS16
R0,#ULECTR1,#LECANTR2,#03HA,@R0@R1;AR0RlR2.TRASPAR3,#04H@R0,AR0R3.BOR
•SUBRUTINÁ DE MUESTREO DE LA>
MUESTREO:MOVMOV
CONV: MOVMOVMOVCMOVDECDJNZCJNEPUSHMOVMOVPOPSJMP
Rl^BBCDR2,#06HA,@R1DPTRJ#TABLA2A,@A+DPTR@R1,ARlR2.CONVR6,#00H,FRACR0R0,#6CH@R0,t08HR0ENTER
;DIR RESULT. DE LA MULT .;DIR DEL SUMATORIO DE;LAS DESVIACIONES.;NUM. BYTES UTILIZADOS
; ULTIMA LECTURA; LECTURA ANTERIOR
; SEGMENTO DE PROGRAMA;PARA COLOCAR LA;ULTIMA LECTURA;COMO ANTERIOR.
INFORMACIÓN.
;DIR. DATOS A SER MOST .; NUMERO DE DÍGITOS.
; CONVERSIÓN DEL NUMERO.
029B029D029E02A002A102A402A602A702AA02AC02AE02AF02B002B102B3
7972E72480F790EC017490F090EC007A077972E7F019DAFB22
02B402B602B802BA02BB02BC02BD02BF02C002C102C3
782479787A03C3E69770041819DAF722
02C402C602C902CC02CE02D002D102D202D302D402D6
7878B60F0D902000C0007864E6F0E4F6D00022
íicro Systems 8051 Family Assembler, Versión 3.02 Page 11
FRAC:
ENTER:
PAS:
MOVMOVADDMOVMOVMOVMOVXMOVMOVMOVMOVMOVXDECDJNZRET
;SUBRUTINA DEj
CHECNUM:
VL:
SIGA:
MOVMOVMOVCLRMOVSUBEJNZDECDECDJNZRET
•SUBRUTINA DE)
STOREDES
EXITRET:
MOVCJNEMOVPUSHMOVMOVMOVXCLRMOVPOPRET
R1,#BBCDA,@R1A,#80H@R1,ADPTR,#INTERFÁ.tfESDIS@DPTR,ADPTR,#DATOR2,#07HR1,#BBCDA,@R1@DPTR,ARlR2.PAS
CONTEO DEL HUMERO
R0J#FACTACTR1,#LECTUALR2,#03HCA,@R0A,@R1SIGAR0RlR2,VL
ALMACENAMIENTO DE
R0,#LECTUAL@R0,#0FH, EXITRETDPTR.ttMRAMR0R0,#DESVNETA,.@R0@DPTR,AA@R0, AR0
01-01-80
; AUMENTO DEL PUNTO; DECIMAL, LUEGO;DE LA CANTIDAD; ENTERA.jDIR. DE LA INTERFACE;COMANDO DE ESCRITURA; ENVIÓ DEL COMANDO;COM. DE ENVIÓ DE DATO;NUMERO DE DÍGITOS
; ENVIÓ DE LOS DATOS;A SER MOSTRADOS EN;LOS DISPLAYS
DE DESVIACIONES TOMADAS.
;PUNTERO DE MUESTRAS; CONTADOR ACTUAL
LAS DESV. REGISTRADAS
;SEG. PROG. PARA DETEC .;EL VALOR #15 PARA ALM .;EN LA MEMORIA RAM.;DIR. DE LA MEM. RAM
jPARA ENCERAR LA LOC .; DESPUÉS DE GUARDAR;EL VALOR.
02D702DÁ02DC02DE02E102E402E702E902EB02ED02F002F202F402F602F802FB
02FD02FF0301030203030305030603070309030A030D030F0311031303140315031603170319031B031D0320
03210323032503260329032A032D032F03310332
1202E7787A7E011203211202810203A9782E79277C3512022640028009796A77011203A280F0
793374A0F7197486F7197401F71203AÁ783579647A05E6F71819DAFA7864792412049222
79727B00E675F06484B4002D740AC5F084B40011
:icro Systems 8051 Family Assembler, Versión 3.02 Page 1201-01-80
;SUBRUTINÁ DE CALCULO DE LA DESVIACIÓN PROMEDIO.>
DESPROM
DPROM:
NEW:
CAN:
DESVPOS
SDD:
CGNVER:
MEN100:
:LCALLMOVMOVLCALLLCALLLJMPMOVMOVMOVLCALLJCSJMPMOVMOVLCALLSJMP:MOVMOVMOVDECMOVMOVDECMOVMOVLCALLMOVMOVMOVMOVMOVDECDECDJNZMOVMOVLCALLRET
MOVMOVMOVMOVDIVCJNEMOVXCHDIVCJNE
DPROMR0.4ÍDESPROR6,#01HCONVERMUESTREOFINÍR0,#ULECTR1,#PLECTR4,#LMULRESTASECANDESVPOSRl^DESVNEG@R1,#01HCAM1NEVÍ
Rl^MULDORA,#0A0H@R1,ARlA.ttSSH@R1,ARlA,#01H@R1,AMUL16R0,#35HRl^DESVNETR2,#05HA,@R0@R1,AR0RlR2.SDDR0,#DESVNETR1,#FACTACTRESTASE
R1,#BBCDR3,#00HA,@R0£,#100ABAJ#00HJMAY100A,tt0AHA,BABA,#00H,MAY10
PUNT. DE CIFRA DECIMAL
jDIR. DE LA ULTIMA LECT .;DIR. DE LA PRIM. LECT.
;SUB. PARA ENC . LA DIF .; CHEQUEO SIGNO DE DIF.
;ALM. SIGNO DE LA RESTA;1 - SIGNO NEGATIVO
;SEGM, DE PROGRAMA PARA; REALIZAR LA MULT .;DE LA DIFERENCIA DE;DESV. POR 100000;PARÁ LUEGO DIVIDIR POR;EL NUMERO DE MUESTRAS; TOMADAS
;DIR. RESULT.DE LA MULT.;DIR. DE LA DESV. NETA;PASO DE CANT. DE LAjMULT. A LOC. DE;SUMAT. PARA ENCONTRAR;LÁ DESV. PROMEDIO.
;SUBR. PARA ENCONTRAR;LA DESV. PROMEDIO.
; SEGMENTO DE PROGRAMAjPARA CONVERTIR EL DATO;DE HEXADECIMÁL A BCD;SE DIVIDE POR 100 PARA; DETERMINAR EL NUMERO;DE CENTENAS;A SEGM. MAYOR QUE 100
;A SEGM. MAYOR QUE 10
The Cybernetic Micro Systems 8051 Family Assembler, Versión 3.02 Pag-e 1301-01-80
0335 A7F00337 0B0338 120394033B C000033D 786C033F 76010341 D0000343 02036B0346 F70347 0B0348 190349 A7F0034B 0B034C 120394034F C0000351 786C0353 76020355 D0000357 02036B035A F7035B 19035C 0B035D 740A035F C5F00361 840362 F70363 0B0364 190365 A7F00367 0B0368 020394036B BE000B036E C0000370 786C0372 76080374 D0000376 0203930379 BE010D037C C000037E 786C0380 74200382 260383 F60384 D0000386 0203930389 C000038B 786C038D 7440038F 260390 F60391 D0000393 22
0394 74060396 C3
MOVINCLCALLPUSHMOVMOVPOPLJMP
MAY10: MOVINCDECMOVINCLCALLPUSHMOVMOVPOPLJMP
MAY100: MOVDECINCMOVXCHDIVMOVINCDECMOVINCLJMP
STAR: CJNEUSEC: PUSH
MOVMOVPOPLJMP
DESVIC: CJNEDESP: PUSH
MOVMOVADDMOVPOPLJMP
DESAL: PUSHMOVMOVADDMOVPOP
EST: RET
CEROS: MOVCLR
@R1,BR3CEROSR0R0,#6CH@R0,#01HR0STAR@R1,AR3Rl@R1,BR3CEROSR0R0J#6CH@R0,#02HR0STAR@R1,ARlR3A,#0AHA,BAB@R1,AR3Rl@R1,BR3CEROSR6,#00H; DESVICR0R0,#6CH@R0,#08HR0ESTR6,#01H, DESALR0R0,#6CHA,#20HA,@R0@R0,AR0ESTR0R03#6CHA,#40HA,@R0@R0,AR0
A,#06HC
;CANTIDAD ENTERA
;INDICACIÓN DE 10 - 11
;CANTIDAD ENTERA
;CIFRA DECIMAL
;INDICACIÓN DE 10 - 10
;CANTIDAD ENTERA.
;PRIMER CIFRA DECIMAL
;SEGUNDA CIFRA DECIMAL
jIND. DE DESV. PARCIAL;EXPRESADA EN uS.
;INDICACIÓN DE;DESVIACIÓNjPROMEDIO Y PARTE;EXPONENCIAL.
;INDICACIÓN DE DESV.;DE ALLAN E;INDICACIÓN;EXPONENCIAL
jSEGMENTO DE PROGRAMAjPARA COLOCAR CEROS
The Cybernetic Micro Systems 8051 Family Assembler, Versión 3.02 Page 1401-01-80
0397 9B0398 FA0399 19039A 740A039C F7039D 19039E DAFA03A0 1903A1 22
03A2 782703A4 792E03A6 7C3503A8 2203Á9 22
CER:
CAM1:
FINÍ:
SUBEMOVDECMOVMOVDECDJNZDECRET
MOVMOVMOVRETRET
ÍSUBRUTINA PARA;DOS NÚMEROS DE
A,R3R2,A
RlA,#0AH@R1,ÁRlR2;CERRl
R0J#PLECTR1,#ULECTR4,#LMUL
REALIZAR LA24 Y 16 BITS
;DE ACUERDO A LA; CANTIDAD A MOSTRARSE
;SEGM. DE PROG . PARA; CAMBIAR MINUENDO;EL SUSTRAENDO Yj VICEVERSA.
MULTIPLICACIÓN DE-
POR
MUL16
03AA03AC03AE03B003B203B403B503B703B803B903BB03BC03BD03BE03BF03C003C203C403C503C603C703C803CA03CB03CD03CF03D103D303D503D603D803DA
79357B477C0278337A03E687F0Á4FDC000EBF8EDF618A6F0D000IBIBIB18DAEA19DCE37C027B587844793EC37E027A03E6
MM16:
M16:
MM32:S32:
MOVMOVMOVMOVMOVMOVMOVMULMOVPUSHMOVMOVMOVMOVDECMOVPOPDECDECDECDECDJNZDECDJNZMOVMOV -MOVMOVCLRMOVMOVMOV
R1,#LMULR3,tt47HR4,#02HR0?#MULDQRR2,#03HA,@R0B,@R1ABR5,AR0A,R3R0,AA,R5@R0, AR0@R0,BR0R3R3R3R0R2,M16RlR4.MM16R4J#02HR3,#58HR0,#44HR1,#3EHCR6,#02HR2,t03HA,@R0
;SUBRUTINA PARA MULT.;2 # DE 24 Y 16 BITS.jPUNT. MULTIPLICANDOjPUNT. DEL RESULTADO;PUNTERO DE CONTROL;PUNT. MULTIPLICADOR;NUM.DE MULT. PARC.;SEGM.DE PROG. PARA;REALIZAR LA MULT.;DEL PRIMER BYTE DEL;MULTIPLICANDO POR LOS;BYTES MULTIPLICADOR
;SE GUARDA RESUL. DE;LAS MULT. PARCIALES
;PUNTERO DE CONTROL;DIR. DE RESULTADOS;DIR. DE RES. PARCIALES;DIR. DE RES. PARCIALES
;SEGMENTO DE PROGRAMA;PARA REALIZAR LA SUMA;DE LAS MULTIPLICACIONES
The Cybernetic Micro Systems 8051 Family Assembler, Versión 3.02 Page 1501-01-80
03DB03DC03DD03DF03E003E103E203E303E503E603E703E803EA03EB03EC03ED03EE03F003F203F403F503E603F703F803FÁ03FC03FE0400040104020403040404060408040A040B040C040E04100412041304140415041604170418041A041C041E042004220423042404250428
37FDC000EBF8EDF6D0001819IBDAF00CEB9CFBDEES7A02784CE7F61819DAFA7847795E7A02E6F71819DAFA7A027859E8FE7C037D05795EC3E637F71819DDF9DCF2785E79357A05E6F71819DAFA
LL1
LL2
SSB1
SBB:
MM1:
ÁDDCMOVPUSHMOVMOVMOVMOVPOPDECDECDECDJNZINCMOVSUBBMOVDJNZMOVMOVMOVMOVDECDECDJNZMOVMOVMOVMOVMOVDECDECDJNZMOVMOVMOVMOVMOVMOVMOVCLRMOVADDCMOVDECDECDJNZDJNZMOVMOVMOVMOVMOVDECDECDJNZ
A,@R1R5,AR0A,R3R0 , AA, R5@R0,AR0R0RlR3R2.S32R4A,R3A, R4R3,AR6 } MM32R2J#02HR0J#4CHA,@R1@R0, AR0RlR2,LL1R0,#47HR1,#5EHR2,tt02HA,@R0@Rlj AR0RlR2.LL2R2,#02HR0J#59HA,R0R6,AR4j #03HR5,#05HR1,ÍÍ5EHCA,@R0A,@R1@R1,AR0RlR5,SBBR4,SSB1R0, ÍÍ5EHR1.ÍÍ35HR2.ÍÍ05HAj @R0@R1, AR0RlR2.MM1
;PARCIALES.
;SEGM. DE PROGRAMA PARA;REALIZAR SUMA DE LOS;BYTES QUE RESULTAN DE;LAS MULTIPLICACIONES;PARCIALES.
;SEGMENTO DE PROGRAMA;PARA REUBICAR EL;RESULTADO A LOC.;DEL MULTIPLICANDO;Y DEL MULTIPLICADOR
The Cybernetic Micro Systems 8051 Family Assembler, Versión 3.02 Page 1601-01-80
0428 22
0429 7830042B 7Á2F042D E4042E F6042E 080430 DAFC0432 22
0433 3F0434 060435 5B0436 4F0437 660438 6D0439 7D043A 07043B 7F043C 6F043D 00043E 10
RET
043F 90EC01* 0442 74500444 F00445 90EC00
0448 E00449 B4230D044C 90EC01044F 74900451 F00452 90EC000455 74580457 F00458 22
0459 90EC01045C 74E0
* 045E F0
045F 000460 020448
LIMP:
MM2:
TABLA2 :
MOVMOVGLRMOVINCDJNZRET
DBDBDBDBDBDBDBDBDBDBDBDB
•SUBRUTINA QUEi
TECLAC:
LEERC:
SALIDO:
WINTC:
MOVMOVMOVXMOV
MOVXCJNEMOVMOVMOVXMOVMOVMOVXRET
MOVMOVMOVX
NOPLJMP
R0,#30HR2,#2FHA@R0,AR0R2.MM2
3FH06H5BH4FH66H6DH7DH07H7FH6FH00H10H
DETECTA SI SE HA
DPTR,#INTERFA,#LECDIS@DPTR,ADPTR.tfDATQ
A,@DPTRA, #23H, SALIDODPTR^INTERFA,#ESDIS@DPTR,ADPTR,#DATQA,#58H@DPTR,A
DPTR^INTERFA,#ENDINT@DPTR,A
LEERC
; SEGMENTO DE PROGRAMA;PARA BORRAR LAS; LOCALIDADES ANTES; UTILIZADAS.
; CÓDIGO DEL NUMERO 0; CÓDIGO DEL NUMERO 1; CÓDIGO DEL NUMERO 2; CÓDIGO DEL NUMERO 3; CÓDIGO DEL NUMERO 4; CÓDIGO DEL NUMERO 5; CÓDIGO DEL NUMERO 6; CÓDIGO DEL NUMERO 7j CÓDIGO DEL NUMERO 8; CÓDIGO DEL NUMERO 9;DISPLAY APAGADO; CÓDIGO DE CORRECCIÓN
PRESIONADO LA TECLA "C"
;HAB.DEL COM . DEL 8279; LECTURA DEL SENSOR RAM; ENVIÓ DE COMANDO;HAB. DATO PARA EL 8279
;LECT.DE FILA Y COLUMNA;SI NO ES TECLA C SALGAjDIR. DE LA INTERFACE;COMANDO DE ESCRITURA; ENVIÓ DEL COMANDO; COM. DE ENVIÓ DE DATO; CÓDIGO DE LA LETRA "c"; ENVIÓ DEL DATO
,;HAB, DE LA INTERFACE• BAJAR BANDERA DE IbTT .;ENVIO DEL COMANDO
;ESPERA POR LA INT1
The Cybernetic Micro Systems 8051 Family Assembler, Versión 3.02 Page 1701-01-80
;SUBRUTINA DE CALCULO DE LA DESVIACIÓN DE ÁLLANt
DESALLAN :0463046504670469046A046B046C046D046E0471047304760479047B047C047D047E047F04810483
782479337A03E6 ELV:F71819DAEA783576021203AA120177787AE4F618F678697924120492
MOVMOVMOVMOVMOVDECDECDJNZMOVMOVLCALLLCALLMOVCLRMOVDECMOVMOVMOVLCALL
R0,#FACTACTRl,ttMULDORR2J#03HA,@R0@R1,AR0RlR2,ELVR0,#LMUL@R0,#02HMUL16PASOR0,#7AHA@R0,AR0@R0,A-R0,#SUMATRl^FACTACTRESTA5B
;DIR. DEL NUM. DE MUESTjDIR. DEL MULTIPLICADOR; TRASPASO DEL NUMERO DE;MUESTRAS TOMADAS A LOC;DEL MULTIPLICADOR.
;DIR DEL MULTIPLICANDO
;2 x NUM. DE MUESTRAS.;A LOC. DE FACTACT .;SEGM. DE PROGRAMA;PARA BORRAR LOC.;A SER NUEVAMENTE;UTILIZADAS.
;DIR. DEL SUMATORIO;DIR DEL MUM . DE MUEST.jSUBR, PARA ENCOMT. LA
0486 1204C0
0489 7E02048B 120321
048E 120281
0491 22
LCALL
MOVLCALL
LCALL
RET
RAÍZ
CONVER
MUESTREO
;DIF. ENTRE EL SUMAT.;Y EL NUM. DE MUESTRAS;SUBRUTINA PARA ENCONT.;LA RAÍZ CUADRADA DE LA;DIFERENCIA ANTERIR.;SUB. PARA CONVERTIR;EL DATO HEX A BCD.;SUB. PARA CAMBIAR LOS;RESULT. DE TABLA A BCD;Y ENVIAR A LA INTERE.
;SUBRUTINA PARA REALIZAR LA SUMA DE DOS CANTIDADES¿EXPRESADAS EN 5 BYTES.
0492049404950496049704980499049A049C049E04A004A204A5
7A05C3E697F61819DAF940 1EC000787AB6EF067600
RESTÁ5B:DIFERÍ: MOV
CLRDIF: MOV
SUBBMOVDECDECDJNZJCPUSHMOVCJNEMOV
R2,#05HCA,@R0A,@R1@R0, AR0RlR2 ,DIFTERMINER0R0,#DESPRO@R0J#0FFH,BAB@R0 ,#00H
;NUM. DE BYTES DEL MIN; SEGMENTO DE PROGRAMA; MEDIANTE EL CUAL SE; REALIZA LA DIVISIÓN; MEDIANTE RESTAS.-SUCESIVAS.
jSI C-l TERMINE; SEGMENTO DE ACTUAL.;DEL CONTADOR; (CUOCIENTE).
The Cybernetic Micro Systems 8051 Family Assembler, Versión 3.02 Page 1801-01-80
04A704A804ÁB04AC04AE04AF04B104B304B404B504B704B804B904BC04BF
18B6FF0306800106D000740528F8740529F902049212042922
04C004C204C404C604C704C904CA04CB04CC04CE04D004D104D204D304D404D504D604D804DA04DC04DE04E104E304E404E504E704E804EÁ04EC04EE04F004F104E204F304F4
7A01797E787AEA8AF0A4F719A7F07B02C309E6971918DBFA4010C000787CB6FF0376001806D0000A80D8787C797A7A02E6F71819DAFA
BÁB:
AB;ÁBBA:
TERMINE
DECCJNEINCSJMPINCPOPMOVADDMOVMOVADDMOVLJMP:LCALLRET
;SUBRUTINA PARA
RAÍZ:INIC:
RR3:
NI:
RR2:
RM:
MT:
MOVMOVMOVMOVMOVMULMOVDECMOVMOVCLRINCMOVSUBBDECDECDJNZJCPUSHMOVCJNEMOVDECINCPOPINCSJMPMOVMOVMOVMOVMOVDECDECDJNZ
R0@R0J#0FFH,AB@R0ABBA@R0R0AJít05HA, R0R0, AA,#05HA, RlRl, ADIFERÍLIMP
ENCONTRAR LA
R2,#01HR1,#SQRTR0,#DIVCOCA, R2B, R2ÁB@R1,ARl@RljBR3.ÍÍ02HCRlA¿@R0A,@R1RlR0R3,N1RMR0R0,#DESLAN@R0,#0FFH,RR2@R0 , #00HR0@R0R0R2INICR0,#DESLANR1,#DIVCOCR2,#02A,@R0@R1,AR0RlR2,MT
RAÍZ CUADRADA ENTERA.
; SEGMENTO DE PROGRAMA; MEDIANTE EL CUAL;SE EXTRAE LA RAÍZ; CUADRADA ENTERA DEL; CUOCIENTE.
; NUMERO DE BYTES
jSI C-l FINALIZA
; ACTUALIZACIÓN DEL; RESULTADO
; SEGMENTO DE PROGRAMA;PARA COLOCAR LA RAÍZ;EN LAS LOCALIDADES;DEL CUOCIENTE.
04F6 22
04F7 90EC0104FA 745004FC F004FD 90EC00
05000501050405070509050A050D050F0510
0511 90EC010514 74E00516 F0
0517 000518 020500
051B051D051E0520052205240525052605270529052A052B052C052F053005310532053305350536
786AE6701F787C740536F618740236F608907100E6F018E67B0623DBFD
ícro Systems 8051 Family Assembler., Versión 3.02 Page 1901-01-80
RET
•SUBRUTINA QUE DETERMINA SI SEj
TECLAD:
LEERD :
SALIDO:
WINTD:
MOVMOVMOVXMOV
MOVXCJNEMOVMOVMOVXMOVMOVMOVXRET
MOVMOVMOVX
NOPLJMP
•SUBRUTINA DEi
CORRECT
POS:
ÁNDHER:
ROT:
MOVMOVJNZMOVMOVADDCMOVDECMOVADDCMOVINCMOVMOVMOVXDECMOVMOVRLDJMZ
DPTR.ttlNTERFA,#LECDIS@DPTR,ADPTR,#DATO
A,@DPTRA,#33H, SALIDODPTR,#INTERFA^ESDIS@DPTR,ADPTR,#DATQÁ,#5EH@DPTR,A
DPTR,#IblTERFA.tfENDINT@DPTR,A
LEERD
CORRECCIÓN DE LA
R0,#DESVNEGA,@R0NEGR0,#DESLANAJ4t05HA,@R0@R0,ÁR0AJtf02HÁ,@R0@R0, AR0DPTR^CORDVlA,@R0@DPTR,AR0Á,@R0R3,tt06HAas, ROT
HA PRESIONADO LA TECLA "D" .
;HAB. DEL COM . DEL 8279; LECTURA DEL SENSOR RAM; ENVIÓ DE COMANDO;HAB. DATO PARA EL 8279
;LECT.DE FILA Y COLUMNA;SI NO ES TECLA D SALGA;DIR. DE LA INTERFACE¿COMANDO DE ESCRITURA;ENVIO DEL COMANDO;COM. DE ENVIÓ DE DATO;CODIGO DE LA LETRA "d"; ENVIÓ DEL DATO
;HAB. DE LA INTERFACE; BAJAR BANDERA DE INT.;ENVIO DEL COMANDO
;ESPERA PO LA INT1
DESVIACIÓN.
; SEGMENTO DE PROGRAMA;PARA DETERMINAR EL; SIGNO DE LA DESV.;DESVIACION POSITIVA;SE SUMA AL VALOR;DE LA DESVIACIÓN DE;ALLAN,VALOR 205H (517)
;ENVIO DEL LSB AL CDA .
; ACONDICIONAMIENTO;DEL MSB
The Cybernetic Micro Systems 8051 Family Assembler, Versión 3.02 Page 2001-01-80
0538 907000 MOV DPTRJ#CORDV2 ;ENVIO DEL MSB053B F0 MOVX @DPTR,A053C 02054F LJMP FINCQR053F 787C NEG: MOV R0,#DESLAN ¿DESVIACIÓN NEGATIVA0541 C3 CLR C0542 74FB MOV Á,#0FBH ;RESTA DEL VALOR 1FBH0544 96 SUBB A,@R0 ;(507), EL VALOR DE0545 F6 MOV @R0,A ¿LA DESVIACIÓN PARA0546 18 DEC R0 ;REALIZAR LA CORRECCIÓN0547 7401 MOV A,#01H ;BIT MAS SIGNIFICATIVO.0549 96 SUBB A,@R0054A F6 MOV @R0,A054B 08 INC R0054C 02052C LJMP ANDHER ;ENVIÓ DE LA DESV. AL CDA.054F 22 FIMCOR: RET0000 FINbT: END ;FIÍI DEL PROGRAMA.
The Cybernetic Micro Systems 8051 Family Assembler, Versión 3,02 Page 2101-01-80
;%T Symbol Mame Type Valué
AA . L 0003AB L 04AEABBA. . . . . L 04AFANDHER. - L 052CAR L 004AÁSTER . . . . . . . . . . . . . L 0117BAB L 04ABBBCD I 0072BOR L 027CCAM1. L 03A2
ft CAMBIO L 023ÁCAN . . L 02F4CARGA . L 024BC E R . . . . . . . . . . . . . . L 039ACEROS L 0394CHECDISP. . . . . . L 002DCHECNUM L 02B4CLEAN . L 004FCLEAR I 00D3COLUMNA I 0003CONT0 . . . . . . . . . . . . . I 4000COMT1 I 4001CQNTERV . . . . . . . . . . . . L 00A9CONTUÁL L 0217COblV L 0285CQNVER. L 0321CQNVPERM . . . L 015C
* CORDV1 I 7100CORDV2, . . . . . . . . . . . . I 7000CORRECT . . . . . . . . . . . . L 051BCUADRADO L 0243DAT . . L 00DEDATIH . . . . . . . . . . . . . L 00E3DATO I EC00DESAL . L 0389DESALLAN , L 0463DESLAN I 007CDESP. L 037CDESPRO. . . . . . . . . . . . . I 007ADESPROM L 02D7DESVIC. . L 0379DESVNEG- I 006ADESVMET I 0064
* DESVPOS . . . . . . . . . . . . L 02FDDETDESF I 4003DFREC L 008DDIF L 0495DIFERÍ. . . . L 0492DISP I 5000DISPL L 0061DISPLAY L 0056DISPLED L 0000
The Cybernetic Micro Systems 8051 Family Assemtaler, Versión 3.02 Page 2201-01-80
DIV0. .1 3000DIV1. I 3001DIVALT. . . . . . . I 6000DIVCOC I 007ADIVFREC . I 3003DPROM L 02E7ELV . L 0469ENDINT I 00E0ENTER L 02A1ESDIS I 0090ESPER L 0142ESPINT. . . L 0045EST L 0393EST1 L 0224EXITRET L 02D6FACTACT I 0024FILA. . . . . . . . . . . . . . I 0002FINÍ L 03A9FINCOR L 054FFINH L 0550FRAC L 029BHÁBIL I 00A0INIC L 04C2IMINTER L 0032INTERF I EC01Jl L 00FAJ2. L 0102J3 . . . L 010AJ5 L 0148L2. . L 00D7LEAINT . . L 0015LEAINTER. . . . . . . . . . . . L 01B1LECANT. . . . . . . . I 002ALECDIS I 0050LECRAM. . . . . . I 0074LECTUAL I 0078LECTURA L 0209LEER L 0072LEERB L 0193LEERC L 0448LEERD L 0500LIMP L 0429LL1 L 03F4LL2 , L 0400LMUL I 0035LOCAL L 0161LOCALID . . . . . . . . . . . . L 017DM16 , L 03B4MAXCOL. I 0004MAXFILA . . . . . I 0004MAY10 L 0346MAY100 L 035AMEN100. L 032DMEPROM. I 1000MM1 . L 0422
Jt The Cybernetic Micro Systems 8051 Family Assembler., Versión 3.02 Page 2301-01-80
MM16. . . . . . . . . . . . . . L 03B0MM2 L 042EMM32. L 0308MODOKEY I 0009MRAM. . . . . . . . . . . . . . I 2000MS. . L 0214MT. . . . . . . : . . L 04F0MUESTREO L 0281MUL16 L 03AAMULDOR. . . . . . . . . . . . . I 0033NI. L 04D2NA. . L 0100NEG L 053FNEW L 02EDNUREST. L 01D7PAS L 02AEPASO. L 0177PAT . . L 01BFPERMUEST. L 00CEPL L 01FEPLECT . . . . . . . . . . . . . I 0027POS L 0520PRIMVAL L 0124PROD I 0035PROGPRIM. L 0000PUNT U 0000R3B . L 0229RAÍZ L 04C0RCUAD I 007FREGDESV L 0204REGPDESV. L 01B4REGSDESV L 01CCRELOJ . I 0028REMLOC I 006BREMOTO L 016AREPAR I 0070RESDIV I 0069RESTA3B L 0226RESTA5B . L 0492RM • . . . . L 04EAROT L 0535RR2 L 04E4RR3 L 04C6S16 L 0265S32 . L 03DASALIDA. . . . . . . . . . . . . L 0083SALIDB. . . . . . . . . . . . . L 01A6SALIDO . . . L 0459SALIDO. L 0511SALP L 014BSBB L 0413SDD L 0313SEGVAL. . . . L 013BSIGA L 02C3SQRT. I 007E
The Cybernetic Micro Systems 8051 Family Assembler, Versión 3.02 Page 2401-01-80
SSB1. . . . . L 040ESTAR L 036BSTOREDES L 02C4SUMÁIS. . . . . . L 025ESUMAT I 0069TABLA1. , L 014CTABLA2 L 0433TECA, . . . . . . . . . . . . . I 0003TEGB I 0013TECC. . . . . . . . . . . . . . I 0023TECO I 0033TECLAA L 0069TECLAB L 018ATECLAC . . . L 043FTECLAD. . . . . L 04F7TERMINE L 04BCTFB L 001BTIP L 0170TMUEST. I 0035TRASP . . L 0273ULA . L 01F9ULANT L 026DULECT . I 002EUSEC L 036EVL. L 02BAWAITINT L 0089WINTB . L 01ACWlflTC . L 045FWINTD . L 0517
00 Error; (0000)
ÍNDICE GENERAL
CAPITULO 1
Pag:
1.1.- El Mundo Actual y la Información 1
1.2.- Requerimientos 2
1.2.1.- Exactitud de la hora 2
1.2.2.- Campo de uso de la hora exacta 4
1.3.- Estándares de Tiempo / Frecuencia 5
1.3.1.- Estándares primarios . 5
1.3.1.1.- Estándar de Haz de Cesio 6
1.3.1.2.- Maser de Hidrógeno 8
1.3.2.- Estándares Secundarios 11
1.3.2.1.- Oscilador Atómico de Rubidio 12
1.3.2.2.- Osciladorde Cristal de Cuarzo 14
1.3.3.- Otros Generadores de Frecuencia 17
1.3.4.- Temperatura y envejecimiento de los cristales 19
1.4.- Estándares de t iempo existentes en el
Observatorio Astronómico de la E.P.N. 20
1.4.1.- Descripción. 20
1.4.2.- Especificaciones 22
1.5.- Desempeño de los estándares de Tiempo/Frecuencia. 24
1.5.1,- Precisión 24
1.5.3.- Estabilidad 24
1.5.3.1.- Estabilidad a corto plazo 24
1.5.3.2.- Estabilidad a largo plazo 25
1.5.4.- Indicadores de estabilidad de los estándares 26
1.5.5.- Medición de la estabilidad 29
1.6.- Métodos de detección de la desviación. 30
1.6.1.- Detección mediante el uso de una señal remota
generada por un estándar primario. 30
1.6.1.1.- Detección digital 30
1.6.1.2.- Detección mediante el uso de un osciloscopio 32
1.6.2.- Detección mediante el uso de un oscilador
primario local 34
1.6,3.- Método utilizado en el presente trabajo 37
1.7.- Las señales WWV. 40
CAPITULO 2.
2.1.- Estrategia utilizada para el diseño 47
2.2.- Diagrama funcional del sistema 48
2.3.- Elementos constitutivos del sistema 50
2.4.- Diseño de cada uno de los bloques 51
2.4.1.- Bloque convertidor de la señal sinusoidal
a cuadrada 51
2.4.2.- Bloquedivisordefrecuencia 54
2.4.3.- Bloque acondicionador de la señal 58
2.4.3.1.- Justificación de la necesidad de éste bloque 58
2.4.3.2.- Acondicionamiento de los pulsos 59
2.4.4.- Bloque registrador de intervalos 60
2.4.5.- Diseño del bloque de lectura y cálculo
de la desviación 63
2.4.5.1.- Lectura de la desviación de los pulsos 63
2.4.5.2.- Cálculo de la desviación entre dos estándares 64
2.4.6.- Bloquecorrector 65
2.4.7.- Bloque de almacenamiento de la información
y programas a ejecutarse 70
2.4.8.- Bloque de presentación de la información 73
2.4.9.- Bloque de ingreso de la información 77
2.5.- Circuitos necesarios para el sistema 81
2.5.1.- Dimensionamiento de las fuentes de alimentación 81
2.5.2.- Diseño de la fuente d e + 5 V o l t i o s 83
2.5.3.- Diseño de las fuentes de + 15 V. y - 15 V. 85
2.6.- Señalizaciones y protecciones 88
2,6.1.- Señalizaciones 88
2.6.2.- Protecciones 89
2.7.- Diagrama general del sistema diseñado. 90
CAPITULO 3.
3.1.- Metodología de cálculo 93
3.2.- Estructura General del Software 94
3.3.- Programa Principal 95
3.4.- Subprogramas Uti 1 izados 100
3.4.1.- Subrutinas de Comprobación del funcionamiento
displays y leds indicadores. . 101
3.4.2.- Subrutina de detección de la tecla A 104
3.4.3.- Subrutina de seteo del divisor de frecuencia 106
3.4.4.- Subrut ina de seteo del registrador de
desfasamientes. 109
3.4.5.- Subrut ina de ingreso del período de muestreo 111
3.4.6.- Subrutina de conversión del periodo de muestreo
a número de muestras a tomarse. 115
3.4.7.- Subrutina de lectura del desfasamiento. 116
3.4.8.- Subrutina de control del número de desviaciones
tomadas. 120
3.4.9.- Subrutina de cálculo de la desviación promedio. 122
3.4.10.- Subrutina de cálculo de la desviación de Alian. 126
3.4.11.- Subrutina de corrección de la desviación. 130
3.5.- Ingresodedatos. 134
3.6.- Información obtenida de cada uno de los bloques. 134
3.6.1.- Bloque de ingreso dedatos. 134
3.6.2.- Bloque detector de desfasamientos. 135
3.6.3.- BLoque divisor de frecuencia. 135
3.6.4.- Bloque corrector de la desviación. 135
3.7.- Almacenamiento y presentación de la información. 135
3.7.1.- Almacenamiento de la información. 135
3.7.2.- Presentación de la información. 136
CAPITULO 4
4.1.- Pruebas del funcionamiento del Software 140
4.2.- Análisis técnico económico 141
4.3.- Análisis deficiencia de sistemas. 143
4.4.- Conclusiones y recomendaciones 144
4.4.1.- Conclusiones 144
4.4.2.- Recomendaciones 146
4.5.- Alternativas y opciones. 147
4.6.- Bibliografía. 148
íi 11018031/8051/8751
SINGLE-COMPONENT 8-BIT MICROCOMPUTER
• 8031 -Control Oriented CPU With RAM and I/O• 8051 - An 8031 Wíth Factory Mask-Programmable ROM• 8751 - An 8031 Wlth User Programmable/Erasable EPROM
4Kx8ROM/EPROM128x8 RAMFourB-Bít Ports, 32 I/O LinesTwo 16-BitTimer/Event CounlersHígh-Performance Full-DupíexSerial ChannelExternal Memory Cxpandable to 128KCompatible with MCS-80&/MCS-85®Peripherals
• Boolean Processor• MCS-48® Archllecture Enhanced with:
• Non-Paged Jumps• Direct Addressing• FourS-Register Banks• StackDepthÜp to128-Bytes• Multiply, Divide, Subtract, Compare
• Most Instructions Execute in 1jjs• 4ps Multiply and Divide
The Intel® 8031/8051/8751 is a stand-alone, high-performance single-chip computer íabricated with Intel'shighly-reliable +5 Volt, deplelion-load, N-Channel, silicon-gate HMOS technology and packaged in a 40-pinDIP.lt provides the hardware íeatures, architectural enhancements and new ¡nstruclions thai are necessary tomake it a powerful and cost effective controller for applícations requiring up to 64K byles of program memoryand/or up to 64K bytes of data storage.
The 8051/8751 contains a non-volatlle 4K x 8 read-only program memory; a volalile 128 X 8 read/writedatamemory; 32 I/O lines; two 16-bit timer/counters; a five-souice, two-priority-level,nestedinterrupt struciure;asería! I/O port for eíther multi-processor Communications, I/O expansión, or full dúplex UART; and on-ch¡p.oscillator and clockcircuíts. The 8031 is idéntica!, excepl íhalit lacks the program memory. For systems thairequire extra capability, the 8051 can be expanded usíng standard TTL compatible memoríes and the byteorientad MCS-80 and MCS-85 peripherals.The 8051 microcomputer, llke Its 804B predecessor, is efflcient both as a controller and as an arllhmeticprocessor. The 8051 has extensive facilitíes for binary and BCD arithmelíc and excels in bil-handlíng capa-büitíes. Etficíent use of program .memory results from an instnjctíon sel consisting of 44% one-byte, 41%two-byte, and 15% three-byte instructíons. With a 12 MHz crystal, 58% o) the inslrucílons execute in 1¿tS. 40%¡n 2/xs and multíply and divide require oníy 4¿¿s. Among the many instructions added to the standard 8045¡nstructíon sel are multipíy, divide, subtract and compare.
JL
COU-JIIKII T
TT'a
u^.nni »uiIIHHKOH
T*HDQK1UUA11I UO
r*0a*i*u*.niK«IAl rO*T
• rUlLDUH-tlU" I > —^
JF'5
Figure 1.Block Diagram
Figure 2.Logic Symbol
3 r>: '•
- Figure 3. PinConligutotion
8031/8051/8751
c
o
o
INTRODUCTIONThísdatasheel provides an introduction lo the 8051famüy- A detailed description oí the hardware re-quíred to expand the 8051 with more program mem-ory, data memory, I/O, specialized peripherals andínto rnultiprocessor coníígurations ¡s described inIhe 8051 Family User's Manual.
The 8051 FamilyThe 8051 is a stand-alone high-performancesingle-chip computer intended íor use ¡n sophistícatedreal-Hrne applications such as insírumentation,industrial control and ¡ntellígenl computer periph-erals. II provides the hardware (eatures, architecturalenhancements and new ¡nstructions that make Et apowerful and cosí effectlve controller for applicationsrequiring up to 64K-bytes oí program memory and/orup to 64K-bytes oí data storage. A Block Díagram ísshown in Figure 1.The 8031 is a control-oríented CPU without on-chipprogram memory. It can address 64K-bytes ofexterna! Program Memory in addítion to 64K-bylesof External Data Memory. For systems requiring extracapability, each member of the 8051 famlly can beexpanded using standard memories and the byteoriented MCS-80 and MCS-85 peripherals. The 8051is an 8031 with the lower 4K-bytes of ProgramMemory filled with on-chip mask programmableROM while the 8751 has 4K-bytes of^UV-iight-erasable/electrically-programrnable ROM.The three pin-compatible versíons of this com-ponent reduce development problerns to a mínimum«nd provide máximum ílexibífity. The 8751 is well«uited for development, prototyping, low-volumeproductíonandapplicatlonsrequlríng field updates;the 8051 for low-cost, high volume production; andthe 8031 for applícatíons desiririg the flexibílity oíesternal Program Memory which can be easíly
modified and updated ¡n the field,
MACRO-VIEW OF THE 8051ARCHITECTUREOn a single die the 8051 microcompuler combinesCPU; non-volalile 4K x 8 read-only program memory;volatile 128 x 8 read/wriíe daía memory;32 I/O lines:two 16-bit timer/evenl counlers; a íive-source, two-priority-levei, nesled intetrupt structure; serial I/Oportforeithermulti-processorcomm única lions, I/Oexpansión, or full dúplex UART; and on-chip oscilla-tor and clock circuits. This section will provide anoven/lew of the 8051 by províding a high-level de-scription of its major elemenls: the CPU architectureand the on-chip functions peripheral to the CPU.The generic term "8051" is used to refer collectivelyto the 8031, 8051, and 8751.8051 CPU ArchitectureThe 8051 CPU manipúlales .operands ¡n four memoryspaces. These are the 64K-byte Program Memory,64K-byte External Data Memory, 384-byte InternalData Memory and 16-bit Program Counier spaces.
• The Internal Data Memory address space ¡s furtherdivided into the 256-byte interna!" Data RAM and128-byte Specíal Funclion Register (SFR) addressspaces shown ¡n Figure 4. Four Register Banks(each with eighl registers}, 128 addressable bits,and the slack reside in the Interna! Daía RAM. Thestack depth ¡s ümited only by the available internalData RAM and íts locatíon ís determined by the 8-bítstack pointer. All registers except the ProgramCounter and the four 8-Regísíer Banks reside in theSpecíal Function Regisler address space. Thesememory mapped registers include aríthmelic regis-ters, poínters, I/O ports, interrupt system registers,timers and serial port, 128 bit locatíons in the SFRaddress space are addressable as bils. The 8051 con-tains 128 bytes of Internal Data RAM and 20 SFRs,
tXTE
iNTEf
_.
IIJAL
NAL
MK
4095
0
OVEHLAPPED SPACE
-i ,/\5 255 j 1
0 0
•
PflOGRAMMEMOFtr
INTERNALDAT* RAM
DATA MEMORY
Figure 4. 8051 Family Memory Organizaron
8031/8051/8751
O
The 8051 provides 3 non-paged Program Memoryaddress space lo accommodaie relocalable code.Condilional branches are performed relative to theProgram Counter. The reglsler-indirecl jump permitsbranching relalive lo a 16-bit base regisler with anollsel provided by an 8-bIt Índex regisler. Sixteen-bíl¡umps and calis permlt branching lo any locationin the conliguous 64K Program Mernory addressspace.The 8051 has íive melhods íor addressing sourceoperands: Register, Direct, Regisler-lndirect, Im-mediate and Base-Register- plus Index-Register-Indírecl Addressing. The íirsí three melhods can beused lor addressing deslination operands. Moslinstructions have a "deslination, source" field thatspeciíies Ihe data type, addressing methods andoperands involved. For operalionS' other thanmoves, the deslination operand ¡s also a sourceoperand.Registers in the íour 8-Register Banks can beaccessed through Regíst.er, Direct, or Regisíer-Indirecl Addressing; the 128 byles of Interna! DataRAM through Direct or Register-lndirecl Addressing;and the Special Fuñction Registers through DirectAddiessing. External Data Memory is accessedIhrough Regisler-lndírecl Addressing. Look-Up-Tabies residenl ¡n Program Memory can be accessedthrough Base-Register- plus Index-Register- IndirectAddressing.The 8051 is classííied as an 8-bil machine since theinlernai ROM, RAM, Speciai Fuñction Registers.Arithrnelic/Logic Unit and exíernal data bus are each8-bíts wide. The 8051 perlorms operations on bit,
. nibble. byte and double-bvle data types.The 8051 has extensive íacilities (or byte transfer,iogic, and ¡nleger arithmetic operaüons. U excels albit handling since data transfer, loglc and condi-tional branch operations can be performed directlyon Boolean variables.The 8051's instruction set is an enhancemenl oíthe instruction set familiar to MCS--48 users. U isenhanced to allow expansión oí on-chip CPUperipherals and to oplimize byte elficiency andexecution speed. Op codes were reassigned to addnew high-power operaüons and ío permil newaddressing modes which make the oíd operalionsmore orthogonal. Efíicienl use oí program memoryresulls (rom an instruction set consisting of 49single-byte, 45 two-byte and 17 three-byte inslruc-tions. When using a 12 MHz oscillalor. 64 instructionsexecule in 1üs and 45 inslructions execule in 2¡js.The remaining Instructions (mulliply and divide)execute in only 4/i s. The number of bytes in eachinstruclion and the number of oscillator periodsrequíred for oxocutlon ore listad In the appended8051 Instruclion Sel Summary.
On-Chip Peripheral FunclionsThus far only the CPU and memory spaces of the8051 have been described. In addition to the CPUand memories, an inlerrupl system, extensive I/Olacililies. and several peripheral funclions are inle-graled on-chip to relieve Ihe CPU of repetilious.complicated or time-crilical lasks and lo permilstringenl real-lime control .oí exíernal syslem inler-faces. The exlensive I/O (acililíes include the I/Opins, parallel I/O ports, bidireclional address/dalabus and the serial porl íor I/O expansión. The CPUperipheral functions integrated on-chip are the two16-bil counters and the serial port. All of (hese worktogelher to greatly boosl system performance.
INTERRUPTSYSTEMExíernal events and the real-time-driven on-chipperipherals require service by the CPU asynchronousto the execulion oí any particular seclion oí code.To lie the asynchronous activities of these functionsto normal program execul'lon. a sophistícated muí-tiple-source, lwo-priority-level, nested ¡nterrupt sys-tem is provided. Inlerrupt response latency ranges(rom 3jjs to 7¿/s when using a 12 MHz crystal.
The 8051 acknowledges ¡nterrupt requests frornfive sources: Two from external sources via the INTOand iTTfí pins. one írom each of the two interna!counlers and one írom Ihe seria! I/O port. Eachinterrupl vectors to a sepárate location in ProgramMemory for its service program. Each of the fivesources can be assigned to either of lwo priorilylevéis and can be independently enabled and dis-abled.' Addilionally all enabled sources can be globallydisabled or enabled. Each external interrupt is pro-grammable as eilher level- or transition-activatedand is aclive-low to allow the "wire or-ing" of several¡nterrupl sources to the inpul pin. The interruplsyslem is shown diagrammatically in Figure 5.
I/O FACILITIES
The 8051 has instruclions tha! treat its 32 I-'O unesas 32 ¡ndivjdually addressable bits and as lourparallel 8-bil porls addressable as Poris 0. 1. 2 and.3Ports 0. 2 and 3 can also assume other íunclionsPort O provides the multiplexed low-order addressand dala bus used for expanding Ihe 805! witnstandard rnemories and peripherals. Port 2 providesIhe high-ordei address bus when expanding Ihe8051 with external Program Memory or more than256 bytes of External Data Memory. The pins oíPort 3 can be configured individually to provide ex-ternal interrupl request Inputs. counter inputs. Iheserial porl's receiver mput and Iransmitleí outpul-and to genérate Ihe conlrol signáis used lor readtngand wriling Exlprnal Data Memory The geneinlio'1or use of an allcrnato Hmclion on n Poil 3 pi" 1?
done aulomatically by the 8051 as long as the Pirt
8031/8051/8751
o
o
INPUTUVEL ANOIMTEnRLJPT REOUCSTFLAG
INTERNALSERIALPORT
FIVÉINTERHUPTSOUflCESEACH INTERRUPT CAN BE IfJOlVIDlMUY ENABLED/OISABLEDENABUD INTEHRUPTS CAN BE CLOflALLy EfJABLED/DISABLEDEACH iNTERRUPT CAN ae ASSIGNED TO EITHEH OF TWO PRIQRITY LÉVELEEACH INTEHRUPT VÉCTORS TO A SEPÁRATE LOCATIOU IM PROGRAM UEMORYUÍTEHRUPT NESTING TO TWO LEVELSEXTERNAL IKTEHRUPT REOUESTS CAN BE PROGHAUIJED TO BE LEVEL- OflTRANSITION-ACTIVATEO
Figure 5. 8051 Interrupt Syslem
is confígured as an input. The confíguratíon of theports ís shown on the 8051 Family Logic Symboloí Figure 2.Open Draln I/O Pins
Each pin oí Port O can be configured as an opendrain oulput oras a high Impedance ¡nput. Resetíingthe microcomputer programs each pin as an Inpuí bywriting a one (1) to the pín. If a zero (0) ¡s later writtento the pin it becomes configured as an oulput andwill continuously sink current. Re-writ¡ng the pinto a one (1) wiíl place its output driver ¡n a hígh-impedance slaíe and configure the pín as an Input,Each I/O pin of Port O can sink two TTL loads,
Quail-Bidlrectional I/O Pins
p°rts, 1, 2 and 3 are quasi-bldirectional buffers.Hesetting the microcomputer programs each pin asan input by writing a one (1) to the pin. If a zero (0}is laier written to the pin II becomes configured asan outpul and will continuously sink current. AnyP'n that is configured as an output will be recon-('9ured as an input when a one (1) is writltn lo theDln- Simullaneous to this reconfíguration the outputüfiver of the quasí-bídjrecüona! port will sourcecurrent for two oscíllatór perlods. Since current Is*ourced only when a bit previously written ¡o a zero
í is updated to a one (1), a pin programmed as anJnP'Jt wilUot source current into the TTL gate that
MI oVÍn9 il if the pín ís later Written with another oneI )• Since the quasi-bidirectíonal ouiput driver sources
r'ent for only two oscillator perlods, an ¡nternal
pullup resistor oí approxlmately 20K- to 40K-ohmsÍs provided ío hold the external driver's loadíng al aTTL high level. Ports 1, 2 and 3 can sínk/source oneTTL load.
Mícroprocessor BusA microprocessor bus Ís provided to permit Ihe 8051to solve. a wíde range of problems and to allow theupward growth of user producís, Thls mullíplexedaddress and Üata bus provides an interface com-
.patible with standard memories, MCS-80 peripheralsand the MCS-85 memories that include on-chipprogrammable I/O ports and timing functíons. These
• are summarized in the 8051 Microcomputer Expan-sión Components chart of Figure 6.
When accessing exlernal memory the high-orderaddress Is emitted on Port 2 and the low-orderaddress on Port 0. The ALE signa! is provided forstrobing the address into__an external latch. Theprogram store enable (PSEN) signal Is provided forenabling an exlernal memory device to Port O duringa read from the Program Memory address space.When íhe MOVX ¡nstructíon is execuíed Port 3 auío-matically generales the read (PTD) sígnal íor enablingan External Data Memory devlce to Port O or gener-ales the wrlte (WR) signal for strobing the externalmemory device with the data emitted by Port 0. PortO emits the address and data to the external memorythrough a push/pull driver that can sink/source twoTTL loads. At the end oí the read/write bus cyclePort O ts automatically reprogrammed to lis high
8031/805V8751
o
o
Com
patib
le M
CS
-60/
85 C
ompo
nent
sCaiagory
I/O Expander
Slandard EPROMs
Standard RAMs
Mulliplexed Address/Data RAMs
Standard I/O
Standard Peripherals
Universal PeiipheralInlerlaces
Memorias withon-chip I/O andPeripheral Funclions.
I.D,
2758
2716-1
2732
2732A
2114A21482142-2
8185A
8212828282838255A
8251 A
820582868287
8253A
8279
8291-8292
804 1A8741 A
8155-28355-28755-2
Descríption8 une I/O Expander
(Shift Regíster)
1K x 8450ns LighlErasable
2K x 8 350 ns LightErasable
4K x8450ns LightErasable
4K x 6 250 ns LightErasable
ÍK x 4 100 ns RAM1K x 4 70 ns RAM1K x 4 200 ns RAM
1K x 8 300 ns RAM
8-Bil I/O PortB-BIt I/O Porl8-Bil I/O PortProgrammable
Peripheral InterlaceProgrammable Com-munlcalions Inlerlace
1 oí 8 Bínary DecoderBi-díreclional Bus DríverBi-direclional Bus Driver(ínverling)
Programmable IntervalTirner
ProgrammableKeyboard/DisplayInterlace (128 Keys)
GPI8 Talker/LfslenerGPIB Controller ,
ROM Program MemoryEPROM P'rogramMemory
256 X8-330 ns RAM2 K x 8 3 3 0 n s R O M2Kx8330nsEPROM
Comments
Low Cost I/O Expander
User programmable anderasable.
Data mernory can beeasily expahded usingslandard NMOS RAMs.
Serves as Address Latenor I/O porl.
Tnree B-bít programmableI/O porls.
Serial CommunicationsReceiver/Transmítter.
MCS-80 and MCS-85peripheral'deVices arecompatible with Ihe8051allowlng easy'addilion oíspecíalized ¡nterlaces.Fulure MCS-80/85devices vvilt also becompatible.
User programmable loperiorm custom I/O andconlrol lunctions.
ProgramOr DataMemory
P
P
P
P
DDD
D
DDD0'
D
DD 'D
D
D
DD
D/PD/P
DPP
CrystalFrequencyMHz (Max)
12
9
11
9
12
121212
12
12121212
12
121212
12
12
i12 j
11.7 J
12/11-712/11.7
1211.611.6
Figure 6. 8051 Microcompuler Expansión Components
¡mpedance state and Port 2 is returned to (he siateit had prior to the bus cycle. The 8051 generalesthe address, data and control signáis needed bymemory and" I/O devices ín amannerthat minimízesíhe requlrements placed on external program anddata memories. Al 12 MHz, the Program Memorycycle time is 500ns and the access times requiredfrom stable address and PSEN are approxlmaiely320ns and 150ns respecíively. The External DataMemory cycle time is 1ps and the access timesrequired frorn stable address and (rom read (RD)or write (WR) command are approximately GOOnsand 250ns respectlvely. '
6-28
TIMER/EVENTCOUNTERSThe 8051 contaínstwo16-b¡lcountersformeasur¡nctime intervals, measurlng pulse wldths, countin?svents and genera íing precise, periodicinterruptre'quests. Each can be programmed independenily1^opérate similar toan 8048 8-bÍítime'r with divide by3i
prescaler or asan8-bit counter with divide by 32p'rscaler (Mode 0), as a 1G-bIt tíme-interval or even-counter (Mode 1), or as an 8-bit time-interval °evenl counler wiln aulomatic reload upon ove''ílow {Modo 2).Addilionally, counter O' can be programmed t° _mode that divides il into one 8-bit lime-intervalf1 >
AlNin^1"' I
8031/8051/8751
O
•o
event counter and one B-bit líme-iníerval counter(Mode 3). When counterO ¡s in Mode 3, counler 1 canbe programmed to any oí the three aforementionedmodes, although it cannot set an ¡nterrupt requestflag or genérate an ¡nterrupt. Thís mode is useíulbecause counter 1's overflow can be used to pulsethe serial port's transmission-rate generalor. Alongwilh their múltiple operating modes and 16-bil pre-cisión, the counters can also handle very hígh inputIrequencies. These range (rom 0.1 MHz to 1.0 MHz(íor 1.2 MHz to 12 MHz crystal) when programmedlor an Enput thal Is a división by 12 oí the oscillatorfrequency and from O Hz to an upper íímít of 50 KHzto 0.5 MHz (íor 1.2 MHz to 12 MHz crystal) whenprogrammed íor exlernal ínputs. Both interna! andexlerna! inputs can be gated to the counter by asecond exlerna! source for direclly measuringpulse wídlhs.The counters are started and stopped under softwarecontrol. Each counter seis Its ¡níerrupl request flagwhen ¡t overflows (rom all ones to all zeros (or auto-reload valué). The operating modes and input sourcesare summarized in Figures 7 and 8. The effects oítheconfiguration flags and the status flags are shown¡n Figures 9 and 10.
SERIAL COMMUNICATIONSThe 8051 has a seria! I/O port Ihat ¡s useíu! forwnally fínkíng peripheral devices as well as múltipleeosts through standard asynchronous protocols withluil-duplex operatlon. The sería! port also has alynchronous mode for expansión of I/O lines usingCMOS and TTL shiít registers. This hardware serialCommunications ¡nlerface savas ROM code andpermits a much higher transmíssion rale ihan couldbe achíeved through software. In response lo a serialpon inlerrupt request the CPU has only to read/wr¡tel"e señal port's bufíer to servíce the seria! link.A block diagrarn of the serial port is shown ¡n Figuresu and 12. Methods íor linking UART (universal•iynchronous ¿eceiver/lransmitter) devíces are
• MODC 0:»-BITT|MtR/COUNTCR *ItH ORESCAU•MODE i: 1»-8II TIMER/COUWIEfl•MODE ft Lili AL/TO-RELOAD TIMEB/COUNItR
< f 5 1J U J L\IIUCH i ^/
• UODK 0:l-»trT|Mtfl/COUM)£" WITH PHfcSCALfA•UODE 1í16-B|r IIMEfl/COUNTEH•MDDE3:l-»lT AUTO.RELOAD IIUER/COUMIEH SERIAL
PORf
Figure 7. Tlmer/Event CounterModes O, 1 and 2
nae-lti irnn
EXTERNAL "
SOURCE ' '
. wooe 3;»-" T TIMCK
C«T»TAL— *^ IOSC|LLA70fl 1 . 1
EXTERNAL ,SOURCE
• WODEO; LfllTTIUER• MODt 1: U-Blr IIME• UODE Z:»-BII AUTO
7^1 ° '"" 1— I'-°_ ^- ¡_
1
1/COUNTtfl -MODE 3;»-
0 ^\R 1\
1 . tfc- THI TL1
JCOUM1CR WIIH PHESCAt-ER/COUHKRHELOAD TiMCñ/COUNTER
•.Lf, (IMTLB1UP7RCOUE3T)
~— fLAO 1
T " £fl ' BEQUE3T}'LAO 0
. ( '
f
•^ ^ SíRIALPOHT
Figure 8. Timer/Event Counter O in Mode 3
IWTERBUPf REQUEST
COUtJTEH 0
MODE 0:
MODE i:MODE í;MODE 3:
, .
•BIT TIMEf» WIIH S-B1T PHESCALER• BIT COUMTCH WITH S-Oír PRCSCALCfl '6-Bir TIMEH/COUNTen'BIT AUTO-RELOAD TIMER-COUNTER.HITTJMEn/COUHTEfl [TLO)
OFigure 9. Timer/Counter O Control and Status Flag Clrcuitry
8031/8051/8751
O
COUNTER/TIMER P.UN
COUNTER O \ MODE 3
CQUtJTíH 1
MOOC O: i-BIT T1MEH WHH PRESCALÉflíi-HIT COUNTER WIIH PHESCALtR
MOÜE 1: IS-Bir TIMERÍCOUMTERMDOE 3í »-6IT AUTO-RELDAD T/CMODE 3- PREVENTE 1NCHEUENTING OF T/C I
IHTERRUPT REQUEST
_PULSETOSERIAL PO«T
Figure 10. Timer/Counter 1 Control and Status Flag Circuitry
O
Figure 11. Serial Port—Synchronous Mode O
10 OH 11 BIT FRAME |BAUO HATEQENEFUTION FROU
TRAOSMITTER
TI
.
5CON(SERIAL COMTHOt)
CONTROL tJlING CIRCUITRY
416
\J-
<
| | KÍTEHRUPT
-BU J 1
* <>i i r""'N IMTERNAL B051 BUS
!•-
í . u9IHDATA SBUF ÍRCVH)BU •
t o .V*X INPUT SHIFT HEGISTEH
! ¿ ^ RtCEIVER
~*~DATA
7~ "' *' *" iMiERñUPi ...,..,.-,-, I n
o Figure 12. Serial Port —UART Modes 1, 2. and 3
6-30
8031/8051/8751
n
o
J .
I
i
'
TXD RXD
IMI
'
I '
TXÜ RXD
• OÍ1
1
1 '
TXD RXD
10S1
J
1
1
1
HXD TXD
IOS1
1 1
11
TXD RXD
10S1
' '
TXD RXD
1051
A. MULTI-flOSI INTeHCONNECT—HA.IF DÚPLEX B, MULTM051 IWTEHCONWECT—FUUL DÚPLEX C. BOS1-I2S1 INTCRFACE
Figure 13. UART Interíaclng Schemet
shown ¡n Figure 13 and a method for i/O expansiónIsshown ¡n Figure 14.The lull-duplex serial I/O port provides asyn-chronous modes to facilítate Communications withstandard UART devices, such as prínters and CRTtermináis, or Communications with other 8051s inmulti-processor systems. The receiver is doublebuHered to elimínate the overrun that would occur IfIhe CPU failed to respond to the receiver's interruptbefore the beginning of the next frame. Double buffer-iriQ of the transmitter Is not needed since the 8051can generally maintain the serial llnk at Its máximumrale wíthout it. A mlnor degradatíon in transmissíonrata can occur In rara events such as when the servic-ing o( the transmitter has to waít for a lengthy inter-rupt service program to complete. In asyncnronousmodes, lalse start-blt rejectlon is provlded on re-ceived trames. For noise rejection a best two-out-of-Ihree vote is taken on three samples near the centeroí each received bit.When interfacing with standard UART devices theserial channel can be programmed to a mode (Mode1) that transmits/receives a ten-bít frame or pro-flrammed to á mode (Mode 2 or 3) that transmits/receives an eleven-bit frame as shown in Figure 15,The Irame consists of a start bit, eight or nine databits and a stop bil. In Modes 1 and 3, the transmission-rate timing circuitry receives a pulse (rom counter 1wch time the counter overllows. The ¡nput to counterican bean externa! source ora división by 12 of the°sciliator frequency. The auto-reload mode of thecounter provides communicatlon retes of 122 to'31.250 bits per second (including start and stop bits)lora^z MHz crystal. In Mode 2 the communícation'»le is a división by 64 of the oscillator frequencyVialding a transmissíon rale oí 187,500 bits per
(including start and stop bits) for a 12 MHz
O
I '^rlbuled processing ofters a (áster, more power-ü| sv^^ ,han CQn be provjded by a s¡ngje CPU
r. Thís results (rom a híerarchy of ¡ntercon-processors, each with íts own memories and
•MI
DATAcuocx
PONT WM
A. I/O I»*WJTnH l l l i l l
IH1-INIOt UH
O.K ni
i
*-
•MI
DATA
CUOCK
ha. I/o OUT>UT 1
IHIHIIo*-ot
>IM O*
(NCU «T»
^ '
—
Figure 14. I/O Expansión Technlque
TTT
noot
1
1 ÍTO*
TTMCAt
CUT '
MULIP-MOCE»»onCOMHUHICA.TK>Kt
HA*T )-itTDAT* UAMK »TO*
1
)
> t )
AOOí ,«,
113
ITAHT . >-»IT DATA ÍTO»
UOCX PAN ti OM
• -•111 -**- DATA 1
— *- CIK
Figure 15. Typical Frame Formáis
AfN-fiur.Tp.fui
o
8031/8051/8751
í O
: o
1. Slaves — Configure serial port to InterruptCPU II the received ninth data bit¡s a one (1).
2. Master—Transmlt trame containlng addressín first 8 data bits and set niníh databit (I.e. nlnlh data bit desígnalesaddress frame).
3. Slaves—Serial port ¡nterrupts CPU whenaddress frame Is receíved. Interrupts^rvice program compares receivedaddress to Its address. The slavewhích has been addressed recon-figures its serial port to ¡nterruptthe CPU on all subsequent trans-missions. !
4. Master—Transmlt control trames and dataframes (these wlll be accepted onlyby the previously addressed slave).
Figure 16. Protocol lor Multl-ProcessorCommunications
I/O. In multlprocesslng, a host 8051 microcomputercontrols a multiplícíty oí 8051s conflgured to opératesímultaneously on sepárate portlons oí the program,each controllíng a portíon of the overall process,The interconnected 8051 s reduce the load on thehost processor and result in a low-cost system ofdata transmisslon. This form of distrlbuted process-ing is especially efíectlve in systems where controlsin a complex process are required at physlcallyseparaled locations.In Modes 2 and 3 the automatic wake-up of slaveprocessors through interrupt driven address-framerecognitlon Is provlded to íacllltate InterprocessorCommunications. The protocol for InterprocessorCommun ica t ions Is shown ín Figure 16.In synchronous mode (Mode 0).the hlgh speed serialport provides an efficient, low-cost method of expand-Ing I/O lines using standard TTL and CMOS shiftregisters. The serial channel provides a clock outputlor synchronizing the shlftlng of bits to/from anexternal register. The data rate is a división by 12of the oscillator frequency and is 1M bits per secondat 12 MHz.
8051 Famíly Pin Descriplion
VssCircuit ground polential.
VGC•"-SV power supply during operalion, programmingand verllication.PORTO
Porl O Is an 8-bÍl open drain bidireclional I/O port
It Isalso the rnultlplexed I ow-order address and da labus when uaíng external memory. U Is used for dalaInput and output during programming and verlfl-catíon. Port O can sink/source two TTL loads.
PORT1Port 1 is an 8-bII quasl-bidlrecüonal I/O port, !t Isused for the low-order address byte during program-ming and verlfication, Port 1 can sink/source oneTTL load. • . .
tPORT 2
Port 2 is an 8-bit quasi-bidirectíonal I/O port. U alsoemits the high-order address byte when accessingexlerna! memory. It is used for the hig'h-prderaddress and Iheconlrol signáis during programmingand verlfication. Port 2 can sink/source one TTLload.
PORT 3Port 3 Is an B-bit quasi-bldirectional I/O port. U alsocontains the interrupt, timer, serial port and RD andWR pins that are used by various optlons. Theoutput laten corresponding to a secondary functionmustbeprogrammed toa one (1) for that functiontoopérate. Port 3 can sínk/source one TTL load, Thesecondary functions are assígned to the pínsof Port3, as follows:
— RXD/data (P3.0). Serial port's receiverdata input(asynchronous) or dala input/output (synchro-nous).
— TXD/clock (P3.1). Serial port's íransmitter dataoutput (asynchronous) or clock output (synchro-nous). • •
— INTO (P3.2). InterrUptOinputorgat&control ínpulforcounterO.
— INT1 (P3,3), Interrupt 1 input orgate control inputlor counter 1.
— TO (P3.4). Input to counter 0.— T1 (P3.5). Input to counter 1.— WR (P3.6). The write control slgnal latones the
data byte (rom Porl O Into the External DalaMemory.
— RD (P3.7), The. read control signa! enablesExternal Data Memory to Port 0.
RST/VpoA low to high transition on thís pin (atapproximatel)'3V) resets the 8051. If Vpo is held within its spec(approximaleíy+SV), while Vccdrops belowspec.Vprj will provide standby power to the RAM.Vprjis low, the RAM's curren I isdrawn (romsmal! interna! resistor permits power~on reset usingonly a capacitor connected to
ALE/PHOGProvides Address Latch Enable output used I<"latchlng the address Inlo external memory durin?normal operatlbn. Receives the program pu'5e
6-32
o
8031/8051/8751
I
c
c
o
input duríng EPROM programmíng.
PSÍÑ"The Program Store Enable oulpul ís a control signalIhat enables the external Program Memory lo thebus during normal felch operatíons.
ÍA/VDD
When held at a TTL hign level. the 8051 executes¡nstructions (rom Ihe ínlernal ROM/EPROM whenthe PC ¡s less than 4096. When held al a TTL lowlevel, the 8051 fetenes all ¡nstuctíons Irom externa!Program Memory. The pin also receives the 21VEPROM programming supply voltage.
XTAL1 ,Input to the oscillaior's hlgh gain amplifler. A crystalor external source can be used,
XTAL2Output from the oscillator's amplifier. Requlred whena crystal Is used.
8051 FAMILY DEVELOPMENT SYSTEMAND SOFTWARE SUPPORTThe 8051 Is supported by a total range of Intel de-velopment tools. Thís broad range of supportshortens the product development cycle and thusbrings the product to market sooner.
ASM51CONV51
EM-51
ICE-5V"SDK-51
Absolute macro assembler (or the 8051.8048 assembly language soUrce codeto 8051 assembly source code conver-sión program.8051/8751 emulator board that uses amodified 8051 and an EPROM.Real-time ¡n-circuií emulator.System desígn klt for developíng userPrototype around the 8051.
• UPP-551 8751 personality card /or UPP-103Universal PROM Programmer.8051 Workshop.
8051 Software Development Package(ASM51 and CONV51)The 8051 soltware development package providesoevelopment system support íor the powerfuí 8051lamfly of slngle-chip microcomputers. The packagec°ntains a symbolic- macro assembleí and a 8048o 8051 source code converter. This diskette-based
package runs under ISIS-II on any Inlellec^mputer Development Sysíem with 64K
oí memory.
8°51 Macro Assembler (ASM51)macroassemblertranslatessymbollc805l
assembly íanguage instructions into machine exercutable object code. These assembly languagemnemonics are easíer to program and are morereadable than binary or hexideclmal machine in-structions. Also, by allowíng the programmer togíve symbolic ñames to memory locatíons ratherthan absolute addresses, software design anddebug are performed more quickly and relíably.
ASM51 provides symbolic access for (he many 'use-ful addresslng methods in the 8051 architecturewhich. reference bit, nlbble and byte locatíons.
The assembler supports macro defínítions andcalis. This provides a convenientmeans ofprograrn-ming a frequently used code sequence only once.The assembler also provides condltional assembly 'capablllties. Croas referencing Is provlded ¡n thesymbol table listing, which shows the user the UnesIn which each symbol was defined and referenced.
If an 8051 program contains errors, the assemblerprovides a comprehensive set oí error diagnostics,which are included in the assembly listing.
The object code generatedmay be used to programthe 8751 EPROM versión of the chip or sent toIntel for fabricating the 8051 ROM versión. Theassembler output can also be debugged using theICE-51 In-círcuit emulator.
8048 to 8051 Assembíy LanguageConverter Utillly Program (CONV51)The 8048 to 8051 assembly language converíer isa utüity to help users of the MCS-48 f amlly of micro-computers upgrade their designs to the high per-formance 8051 architecture, By converting 8048source code to 8051 source code, the ¡nvestrnent insoftware developed for the 8048 Is maíntained whenthe system ¡s upgraded,
8051 Emuiatíon Board (EM-51)The EM-51 8051 emulatíon board is a small (2.85" x5.25") board which emulates an 8031/8051/8751microcomputer using standard PROMs or EPROMsIn place of the 8051 's on-chíp program memory. Theboard includes a modified 8051 microcomputer.supporilng circuits, and two sockets íor programmemory. The user may selecl two 2716 EPROMs. a2732 EPROM, or two 3636 bipolar PROMs depend-ing on crystal frequency and power requirements. "
8051 In-Cfrcuií Emulator (ICE-51™)
The 8051 In-Circuít Emulator resides in the Intellecdevelopment system. The development systemmteríaces with the user's 8051 system through anin-cable buffer box with the cable lermínating in an8051 pin-compatíble plug. Together these replacethe 8051 dovico In tho nystam. With the eniulalorplug in place, the deslgner can exercise the systemín real-time whlle collecting up to 255 instruction
8031/8051/8751
O
cycles oí real-Ume data. In additíon, he can singlestep tne sysiem program.Static RAM memory ¡s available ¡n the ICE-51 bulferbox to amúlate the 8051's Interna! and externol pro-gram memorias and external data memory. Thedesigner can display and alter the contents of therepiacement memory In the ICE-51 buffer box,Internal 8051 registers, ¡nternal data RAM, andSpecial Functíon Registers. Symbollc referencecapability allows the designer to use meaninglulsymools provided by ASM51 rather than absolutevalúes when examiníng and modífylng these mem-ory. register, ílag, and I/O localions In his system.
Personallty Card for UniversalPROM Programmer (UPP-551)The UPP-551 ¡s a personalíty caro ror the UPP-103Universal PROM Programmer, The Universal PROM
Programmer Is an Intellec system peripheral cap-able of programming and verifying the 8751 whenthe UPP-551 ís Inserted. Programming and verfica-tlon operatlorts are Inltialed from the Intellec de-velopment system console.and are controlled by theUniversal RROM Mapper (UPM) progr'am.
8051 WorkshopThe workshop provides the desígn engineer ¿rsystem deslgner hands-on experience with the 8051microcomputers. The course includes explanationof the Intel 8051 architecture, system timíng andínput/output desígn. Lab sessions will allow theattendee to gain detaíled familiarity with the 8051(amily and support tools.
INSITET" Llbrary
The INSITE Library contains 8051 Utilities andapplications programs.
ABSOLUTE MÁXIMUM RATINGS"Ambieni Tempflrature Under Blas 0° C to 70° CSiorapí 7tmp«rílure , -65" C to -H50"CVoltape on Any Pin With
Resoeci to Ground (Vss) -G.5V to +7VPowe* DiMipalion , 2 Watts
PC. CHARACTERISTICS (TA °trcto7u°C:
'NQTICE; Stressss above íhose Usted under "AbsolutoMáximum Hatings"may cause permanent damage to thedevlce. This is a stress ratlng only and functional opera-tion oí the device a! these or any other conditions abovethose ¡ndicatad in the operaüonol secllons oí this speci-fícation is not ¡mplied, Exposure to absoluto máximumrating conditions for extended periods may alfecf devicereliabílity.
¡s ov)
o
¡ Symbol Parameler
Í V|t_ " Inout Low Voltage (AII except XTAL1)
• V|¡_- Inout Low Vollage (XTAL1)
i VIH Inoul High Voltagei. ' [Al! Except XTAL1. RST/Vpo)
Í VIH- ' Inout High Voltage (XTAL1)
i VIH: tnouí High Voltage (RST)
! VIH-. lnDUl H'9h Voltape (VpD)1 ". 1
' VC_ Ouiout Low Voltsge ^lAll Outputs Excepl Port 0)
• \- Output Low Vollage (Port 0)
Vo- Oulput High Vollage (All OülpulsExceoí Port 0, ALE and PSEN)
^ o _ - Output High Voltage (ALE and PSEN.Pon 0 In External Bus Mode}
!L- Pullup Resistor Curren! (P1, P2, P3J
lj_^- OutDUt Leakage Curren! (PO)
' JCC Power Supply Curren!I AU Oulputs Disconnected)
1 ic-C cower Down Supply Currenli
C-c Caaacitínce Oí I'O Buíler
Mln
-0.5
-0.5
2.0
TBD
3.0
4.5
2,4
2.4
Typ Max
0.8
TBD
VCG^O.S
VCC^P.SVcc -, 0.5
5.5
045
0.45
500
-10
150
20
10
Unlts
V
V
V
V
V
v .
V
V
V
V
iM
UA.
mA
mA
pF
Tesl Condllloru
i
Power Down Only(VCC = 0)
IOL=2mA
'OL1'* m^
IOH=-I°O^A
lOH=-^°3í;A
.d5V< Vjrg<VcC
.45V<VJNSVCC
TA=25°C
TA=25'ClVpD^5\/.
vcc-ovlc=1MHz * ' . ,
6-34
inte* 8031/8051/8751
CA.C. CHARACTERISTICS (TA 3 Q"c to ?o° c; vcc = sv ± 5%: vss = QV: cLforPorto,ALE
and PSEN Outputs - 150 pF; C¡_ for All Diñar Outputs « 80 pF)Memory Characterlstlc» !
Symbol
TCLCL
TCY
TLHLL
TAVLL
TLLAX
TPLPH
TLHLH
TPLIV
TPHDX
TPHDZ
TAVIV
TAZPL
Parameter
Oscillator Period
Min Inslruction Cycle Time
ALE Pulse Widlh
Address Set Up To ALE
Address Hold Atter ALE
PSEN Width
PSEÑ, ALE Cycle Time
PSEN To Valid Instructlon In
Input Data Hold Altar PSEN
Input Dala Float After PSEN
Address To Valid Instr In
Address Float To PSEN
12 MHz Clock
Mln
83
1.0
140
60
50
230
' 500
0
0
Max !
150
75
320
UnlU
ns
¿JS
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
Variable Clock1/TCLCL=1.2MHz to 12MHz
Mln
12TCLCL
2TCLCL-30
TCLCL-25
TCLCL-35
3TCLCL-20
6TCLCL
0
0
Max
Í2TCLCL
3TCLCL-1GO
TCLCL-10 .
5TCLCL-100
Unltt
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
na
ns
Exlemal Data Memory Characterísllcs
O
Symbol '
TRLRH
TWLWH
TRLDV
TRHDX
TRHOZ
TAVDV
TAVWL
TDVWX
TOVWH
TWHOX
Paramcler
RD Pulse Width
WR Pulse Width
RD To Valid Data In
Dala Hold Alter RD
Data Float Aller RD
Address To Valid Data In
Address To WR or RÜ
Dala Valid To WR Transltlon
Dala Selup Befare WR
DataHeldAllerWR
12 MHz Clock
Min
400
Max
400 |
0
250
| 100
200
... _ ._ ..600
i400
80
Units
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
Variable Clock
Min
.6TCLCL-100
6TCLCL-1001
0
4TCLCL-130
7TCLCL-180
2TCLCL-90
Max
5TCLCL-170
2TCLCL-70
9TCLCL-150
Unlls
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
NOTE:cto *'e 2 lo BALE cycles per inslruction Clocks and stale limincj areshowfion the tínimg diagraní lorreleierice purposes only They are
"oí accessíble ouiside ine packape TCV is the mínimum mstiuclion cycle lime which corisisls oí 12 oscillalor clocks or two ALE cycles.«'fias seiup and hold time Irom ALE are ine same íor aala and propram memoty.
o
o
na
ÍÍL
TI Tí TI T4 Tí TI
TTLrLTLnJL_L — »
, . \
¡i
XTLL
TAVU-*"
<( FLOAT)<
«— »-
TA2
L»H
1ADOREBS A^-Aj
• —
PL—
A7-AO
— TPUV*
FLOATV
,. TAVIV -
n TI
nru
./
T» lín
TJUTU T12
~\ ADDRCS5 A]S-Á,
TPHDX*
INBTR IN
hFLOAT
/
— .>( «7-*.
Ti H
,
f~
>
FLOAT^ INSTR IN FLOAT
Program Memory Read Cycle
X
/ INSTR IN FLOAlVPOflT 0 INSTR IN A7-Ao >
~V/AOOR[
_/M^
Data Memory Read Cycle
X
AT>< A,.A0 )<
HOÍ—|
Dala Memory Wrllti Cycle
8031/8051/8751
O
o
o
No le* onflndata
0p[
•dita•4*l*16iddrie
a<Mrl1
ral
bll
•
Table 1. 8051 Instrucllon Set Summary
imlructlon ««i and MdrBuIng mod«: Inierrupl Rwponw» Time: To llni»n éi«culion oí curren! Instruclion,'— R*o¡sl»f R7-RO of tta curr*ntly »*l»cled Regi*l«r Bank, rwpond lo tho Interrupl rvqumt. pu*h !h« PC and lo veclor lo Iba liril— B-blt interna.! d«ta localion'» tddrM». Thl» could be an inilructlonol the Inlerrupl wrvlce program requlreí 38 lo 81 MclUator
Inlarnal Dala R»m location (f>-127) or a SFR (U. I/O p«rlodi (3 to 7 <Js @12MHi).
— 6-blt Internal Data RAM location (0-255) addrawed In-dir«cily Ihrough r«glil«r Rl or RO.
— 6- bil conilant includvd In ln«tiucllon.— 1&-blt constan! Included In Inalructlon.— 16-6)1 d*»tlnatlon «ddre»s. U»«d by LCALL & UMP. A
branch can b* anywh»re withln tbe WK-byle ProgramM«mory kddiDu apace.
— 1 1-bll destlnatlon addres». Used by ACALL & AJMP. Thebranch wlll b* wllhin Ine «ame 2K-byte page of programm*mory aa tr>« tlril byt« of II» lollowlng Inslrucllon.
— Signod {two's complement) &-bil offset byle. U»ed bySJMP »nd al| conditlonal )umps. fi*nge U -128 lo -M27bytM relalivQ to flr»t byte of th« lollowlng Insliuclion.
— Direct Addre>»«d bl! In hiemal Dala RAM of SpaclalFunction Raglal«r.
— N*w opciatlon nol provldvd by KMfl/BWS, .I
IMS t Hut^nuM» tnAl Arrecí rt-Aij ot i MKU3'
INSTRUCTION
ADDADDCSU8BMULD1VDARRCRLCSETB C
CXxXooxxx1
FLAGovxXxxx
ACXXx
INSTHUCT ON
CLR CCPL CANL C. bllANL C,/bllORL C. bllORL C,/bllMOV C, bllCJNE
Coxxxxxx
FLAOOV AC
,
'Nol* Ihal op«ratlon» on SFR byle nddresi 208 or bll addrajwi 2O9-215 (1.*. lha PSW or blt> In Iht PSW} wlll alao alfacl II» o tetllngi.
o
Dala Trarukr
UncroonlcMOV A.fln
•MOV A.dataMOV A.@fliUOV A.'dataMOV Rn,A
•UOV Rn.dalaUOVRn.fd«la /'
•MOV dala.A :
•MOV dal».Rn í•UOV dala.dit» •
•UOV dala.@R|
•UOV dala'.tdata
1MOV @R!>
'UOV (5>Rl.dala
MOV@Rj.ituu
'MOV DPTR.• díliie
'MOV C.bil•MOV bit.C'UOVC A.tpA-
OPTR'"OVCA.@A-PC
wovx A.i^ftt
'"OVXA.lS'DPTR
MOV\[-A
"MOVX(ffiOPTR.A
"PSH d*ÍA
'(>n o»la
'*CR *lFln*Ck( '"
*'-0'Rix
D A.(3fl,
^
D«»crlptlon ByUMQVS tegisler lo A 1Mov« dlrecl byle lo A 2Move Indlrecl RAM to A 1Movo immedlate data lo A 2Move A to reglíler 1Move dlrecl byle to reglsteí 2Move Immediale dala lo 2ragislorMove A to dlrecl byle 2Move ragisler to direcl byle 2Move dlrecl bylo lo dlrecl 3byle ' .Mo^e mdlrect RAM lo dlrecl 2byteMove Immedíate dala to 3direct byleMowe A to indiract RAM tMove direct byle lo índlrecl 2RAMMove Immediale data lo 2mdirecl RAMMove 16-bll constan! lo Dala 3PoinlerMove dlrecl bit lo carry 2Move carry to duecl bil 2Mov* Procrarn Memory byle \d by A'DPTR lo A
Move Progom Memory fyle 1adtíressed by A*PC lo AMove Externa! Data (B-bH 1addrejs) lo AMova Exloma! Dal» (16-bil 1addreis) lo AMove A lo Exlernal Dala i(6-bíl addresi)Mó^n A le* Exlernal Dala *(l&-tnl adoren)Movp dueíl byle lo stock 2and inc 5PMove d»ecl byle Ircvn slnck ?and d«-c SPExctinnpo reqrslpr willi A 1E«ch*ng* dllrcl hylt' wi|(i A ¡'E^ctiangt- inanocl RAM 1wilh AEicr-anpe indirccl RAM s Ilaoit aig ni b ble willi A'5 LSN
OíciHatorPtrtod»
121!121212
2412
12
2424
?•'<
24
1224
12
24
122424
24
24
?4
?4
24
?4
24
U1
i;1u1
U1
Logic
MntmonlcANL A.Rn
•ANL A.dataANL A.ibSRiANL Ándala
•ANL da!a.A•ANL dala. «data •
•ANL C.bil•ANL C./blt
ORL A,Rn•ORL A.data
ORL A.^HÍORLA.adata
'ORL dala.A"ORL dala.-data
•ORL C.bil•ORL C./bit
XRL A.Rn'• XRL A.aala
XRL A.líTRi
XRL A.-tíaia
*XRL dala.A•XRL dala «dala
•SETBC' SH8 bil
CJ.R ACLR C
•CLR tulCPL ACPL C
•en. hnRL ARLC ARíl ARRC ASWAI* A
D*icrlptlon BylnAND reglsler lo A 1 -AND dir«;l byle lo A 2.AND Indlrecl RAM la A . 1AND Immediale data lo A 2 •ANDA lo direcl byle 2AND Immediale data lo direcl 3byle . •AND direcl bll io carry 2AND complémenl oí direcl bil 2lo carryOR íegister lo A 1OR direcl byle lo A . 2OR Indlrecl RAM lo A • 1OR Immediale data lo A 2OR A lo dlrecl byte 2OR Immediale dala lo dirnct 3byteOR direcl bit lo carry 2OR complemenl oí dlrecl bll 2to csrryExclusrve-OH reglsler lo A : 1Exclustve-OR direcl byle lo A, 2£*clusive-OR mdirecl RAM 1lo A íExclusive-OR immediaie 2üal,i lo AE*clusive-OR Alo direcl bylc 2E"Clusive-OR immediale 3dala lo direct byleSel cany lSel d'iecl bll 2Clear A . . iClear cany 1Clear diiecl bil 2ComplL-nienl A 1
. Compipmenl cany' 1Compk-menl direcl t>il ?Hotalf A Lell 1
Roíale A Lelt Itiiouori c;ury 1Rolan- A Ripni • iHolaic A Rinhl Ittiouqh fjtiiy ' 'Rüinlt- A leí! IOIH (pvchiiriíir 1liilihk^ witlim'Al
OiclllalorPvrlodt
121212121224
24
2J
12121212
1224
2424
121212
12
12?J
1212
\'¿12
121?1?1?1?12
i:*i:1i:1
8031/8051/B751
C ArittuTXtlc
Un*monlcADD A.Rn
•AOD A,o»t»AOD A,@RIAOD A.'dalaAODC A.Rn
'ADDC A.data
ADDC A.<3>RI
ADDCA.«dala
•SUBBA.Rn
•SUBB A.daU
•SUBB A,@RI
•SUBB A,»dala
INCAINCRn
•INC dalaIHC @RIDEC ADECRn
•DEC dala•DEC@RI•INCDPTH•MULAB•DIVAflDA A
D«*cH pilón 0y1«iAdd (eglitar lo A 1Add dlract byia to A 2Add Indlracl RAM lo A - 1Add im media le data to A 2Add raglitar and Carry l'ag to A 1Add direcl byla and carry Ilag 2to AAdd Indliact RAM and carry 1Mag to AAdd Immedlile data and carry 2Ilag to ASublrict regliter tnd cirry lltg 1Irom ASublr«ct dlract byle and carry 2Ilag (rom ASublracl Indlract RAM and 1cairy Ilag Irom ASublracl Immadfala dala and 2catry Ilag Irom AIncrement A 1Incremanl raglalar 1Incremant dirsct byle 2Incramanl Indlracl RAM 1Dacremanl A 1Dectemant ragliter 1D*cf*m*nl direcl byta 2Decramenl indlract RAM 1Incre-mant DiU Polnt«r 1MullipIyA llmei B 1Dividí A by B 1Decimal add Adjuil oí A 1
OacllutorP»rlod»
121212
121212
12
12
12
12
12
12
121212121212121224
48
4412
Control TranaUr (Branch)
MnvmonleAJMPaddf 11
•LJMPaddrl6•SJMPr»!"JMP @A*DPTR
JZr«lJNZ.r-1JCrelJNCr«l
•JB bll.rel
•JNB bil.rel
•JBCbll.rel
•CJNE A.d*ta.rel
•CJNE A.-dala.ral
•CJNE Rn.'dala,ral
•CNJE@R¡,• oau.rel
DJNZ Rn.rel
'DJNZdita.rel
OxcrlpllotíAbsoluta JumpLonQ JumpSnort JumpJump Intflracl r«lallv« totria DPTRJump II A 1» taroJump II A It nol i»roJump 11 carry li M!Jump H carry U nol MiJump («Ulive U dlracl blltt »«lJump ralitive It dlrecl bitU nol wlJump relativa U direcl bllla iet, Ihen claar bllCompara dlrect byle lo A& Jump it not Eq.5»« Nol< a.Compare Immed. lo A & JumpII nol Eq. Sea Nole a,Compara lmm»d. lo r»g &Jump II nol Ea. S«e Nol» a.Compara Immed. tn IndlrectRAM A Jump II nol Eq.S»« Note a.Decrement legislar & JumpII nol leroDeciemenl direct byle &Jump il not lero
Bvl*>232
1
22223
3
3
3
3
3
3
2
3
Nol. *} S*l C II Ih. Uní op«nnd U l«ti (han ln» «acondels« cloaf
OtcIH.UxParíod*
242424
24
2*24242424
24
24
24
24
24
24
24
24
OD«r«nO
O
Othar Í
MnamonlcNOP
OiclllalorDaacdpUon Bytai Pariodt
No Operatlon 1 12
Control Tr«n*l»r (Subrouürt*)
ACALLidcd!LCALL addrlGRETRETÍ
Abioluk Subroullne CaliLong Subroullne Caliñeturn (rom Suürouitne Caliñeturn from Inlerrupl Cali
2
3
11
OulUator
24
242424
All mnemonlcm copyrlghtedo intuí Corporation 1980.
o8279/8279-5
PROGRAMMABLE KEYBOARD/DISPLAY INTERFACE
• MCS-85™ Compatible 8279-5
• Scanned Keyboard Mode
• Scanned Sensor Mode
• Strobed Input Enlry Mode
• 8-Character Keyboard F1FO
• 2-Key Lockout or N-Key Roilover wíthConlact Debounce
• Dual 8- or 16-Numerical Display
• Single 16-Character Display
• Right or Lef t Entry 16-Byte DisplayRAM
• Mode Programmable from CPU
• Programmable Sean Timing
• Interrupf Output on Key Entry
The !ntelr 8279 is a general purpose programmable keyboard and display I/O inlerface devíce designed for use wilhIntel*" mlcroprocessors, The keyboard portion can provide a scanned Inleríace lo a 64-conlact key mal/ix. Thekeyboard porlion will also ¡nterlace to an array of sensors or a strobed inlerface keyboard, such as |he hall eflecl andlerrlte variely. Key depressions can be 2-key lockout or N-key roilover. Keyboard entries are debounced and slrobed inan 8-character FIFO. lí more than 8 characlers are entered, overrun status is set. Key entries sel the Interrupt outpu!Une to the CPU.
The display portion provídes a scanned display Interlace for LED, Incandescenl, and olher popular dlsplaylechnoloQles. Bolh numerlc and alphanumeríc segmenl dísplays may be used as well as simple Indjcalors. The 8279has 16X8 dlsplay RAM whlch can be organizad Into dual 16X4. The RAM can be loaded or ínterrogated by Ihe CPU. Bothríghl entry, calculalor and left enlry typewriter display formáis are possible. Balh read and wrlle of the dlsplay RAMcan t>e done .wllh aulo-íncrement oí the dlsplay RAM address. . ' .
D
CWJ
IWItf l fACÍ
TRllf
mor;
RL.C
ni si i [
RüC
3sDaDOU
3cr
Figure 1, Logic Symbol Figure 2, Pin Conflgurnílon
O
8279/8279-5
OHARDWARE DESCRIPTIONThe 8279 is packaged in a 40 pin DIP. The lollowing isa (unctional descilplion of each pin.
Table 1. Pin Descripllons
O
Sytnbol
DB0-DB7
CLK
RESET
CS
AO
RD. WR
IRQ
VSS.VCC
SLo-SLa
RLP-RL7
PinNo.
8
1
1
1
1
2
1
2
4
8
Ñame and Functlon
Bt-direcHon»! data bUs: All dalaand commands between the CPUand the 8279 are transmilted onthese unes.
Clock: dock Irom system used togenérale internal tírning.
He»el: Ahighsignalonthispinre-sols the 8279. AUur belng resel the8279 is placed in the followlngmode:1) 16 8-bit characler dlsplay
• — lelt entry.2) Encoded sean keyboard— 2
key lockout.Along wilh thls the program dockprescaler Is sel lo 31.
Chlp Seloct: A low on Ihls pin en-ables the Inleríace luncllons torecelve or Iransmlt.
Buft»r Address: A high on thlsUne Indícales Ihe signáis in or outare inlerpreted as a command orstatus. A low Indícales Iha! theyaie data.
Input/Output Read and Wrlle;These signáis enable the databullera to eliher send date to theexlernal bus or receive it ¡rom theexternal bus.
Inlerrupl Requeal; In a key-board mode, Ihe interrupt line ishigh when there is data In theFIFO/Sensor RAM. The interrup!line goes low wlth each FIFO'Sensor RAM read and lelurnshigh if there is sllll Inlormatlon Inthe RAM. In a sensor mode. theinterrupt Une goes hlgh whenevera change In a sensor is detected.
Ground end power supply plns.
Sean Lines; Sean Unes which areused to sean the key switch orsensor matrlx and the displaydigits. These Unes can be eitherencoded {1 oí 16) or decoded {1o) -i]
Relurn Lino: Retutn line inputswhich ate connncted to the seanlinón Inrnugh thí* kftVs c-r sonsornwiich- .1 '1l,u\ ivo aclivt itUprnnlpullups; le kí-Hp llipm hio' unlil nswitcli closute pulís t'np kw. Thcvalso stírv" as an 8-bil inpui in IhrStrobed Inpul mode.
Symbol
SHIFT
CNTUSTB
OUT Ao-OUT A3
OUT Bo-OUT B3
BD
pinNo,
1
1
44
1
1Ñame and Functlon
Shllt: The shtft input status Isslored along wlth the key positionon key closute in the Scanned Key-board modes. It has an active in-ternal pullup lo keep It high utitil aswltch closure pulís it low.
Control/Strobfld InpUt Mode; Forkeyboard modes thls une is usedas a control Input and stored likestatus on a key closure. The |meis also the sUobe Une thal enlersthe data into the F1FO in [heStrobed Inpul mude.
(Ristng Edge). It has an active !n-ternal pullup to keep il high untila switch closure pulís il low.
Outpula: These two pons are theoutpuls lor the 16 x 4 display rt-Iresh registers, The dala Irom(hese outputs is synchronized toIhe sean Unes (SL0-SL3) lor multi-plexed diglt displays. The two Abit ports may be blanked inde-pendently. These lwo pons rnayalso be consfdered as one 8-bitport.
Blank Dlsplay: Thís oulput isused to blank Ihe dlsplay duringdigH switching or by a displayblanking command.
FUNCT10NAL DESCRIPTION
Smco üala input and display are an integral Dar! oí mammicroprocessot designs the syslem designer needs aninteriace that can control these lunctions without olacinaa laigc load on the CPU The 8279 provides this funclionlor 8-bit microprocessors.
"Ihe 8279 has two socttons keyboaid and.dtspfay Thekt'vbaaid section can inlertacn lo regular tyDfwntpi ?lv't*keyboards ar randprn togglo or thumb switcíiPP 1hí'displnv seclion chives alphanurnefic displays oí a tiíint plindi: .iH» lighio Thtis Ihe CPU is rolieved honi scanninpl¡u- kpyooaicl ni toliuslurip |hfi display
The 8279 is designad lo direclíy connecl to ""'riucroprocessor bus. The CPU can progr'am all operalingmodes for the 8279. These moaes include: . ' -
inte! 8279/8279-5
Input Modos
• Scanned Keyboard — with encoded ( 8 x 6 keykeyboard) or decoded ( 4 x 8 key keyboard) sean Unes.A key depression generales a 6-bll encodlng oí keyposiUon. Posltlon and shlfl and control status areslored in the FIFO. Keys are automatlcally debouncedwllh 2-key lockout or N-key rollover.
• Scanned Sensor Malrix — with encoded ( 8 x 8 matilxswilches) or decoded (4 x B matrix swltches} sean lines.Key slatus (open or closed) slored in RAM addressableby CPU
• SUobed Inp'ul — Data on lelurn lines during controlUne slrobe Ís transferred to FIFO.
Oulput Modes
• 8 or 16 character mulliplexed displays that can be or-ganized as dual 4-bíl or single B-bit (B0= D0, A3 = D7).
• Right enlry or lefl enlry display formáis.
Other (eatures oí Ihe 8279 include:
• Mode piagrarnming from the CPU.
• Clock Prescaler
• Interrupl outpul ío sigrial CPU when theie is krvnoardor sensor dala available
• An 8 byte FIFO to síore keyboard inlormation.
• 16 byle internal Display RAM lor display reíresh. ThisRAM can also be read by the CPU.
PRINCIPIES OF OPERATION
The lollowing is a descrtptíon oí the majorelements of the8279 Programmable Keyboard/Display mte'rtace device.Rafer to the block díagram in Figure 3,
1/0 Control and Dato Bulfers
The I/O control section uses lhe.CS, AO. R~D and WR linesto control dala flow to and from Ihe various internalregislers and buffets. AII dala flow to and Ironi the 8279 isenabled by CS. The characleí oí the inlormation, given or,desired by the CPU. fs identflled by Ao. A logfc one:
nieans the inlormation ís a cornma_nd or sjjatus. A logiczero means Ihe inlormation Ís dala. RD and WR determinethe direction of data llow Ihrough Ihe Data Buííers. TheDala Buffers are bi-directional buffers thal connect theinternal bus_ to Ihe external bus. When Ihe chip is notselected (CS = 1). Ihe devices_are in a high impedancesljte. The drivers ¡npul during WR-C~S~ and output duringRD • C"S. . í
These tegislers store the keyboard and display modes andolher operaling conditions programmed by the CPU. Themodes are programmed by presenlíng the propercommand on the data [¡ríes with Ao = 1 and then sending.a WR. The command is lalched on the risíng edge oí wfi.
rifO/SENSOHRAM .
. SIA1US
Olí I A O J ül l l BOJ
inte! 8279/8279-5
o
o
The command is Ihen- decoded and Ihe appropriatelunction ¡a set. The timing conlrol contains Ihe basicliming counler chain. The first counter ís a 4- N prescalerthat can be programmed to yield an internal Irequencyoí 100 kHz which gives a 5.1 ms keyboard sean time anda 10.3 ms debounce lime. The other counlers dividedown the basic inlernai frequency to próvida the properkey sean, row sean, keyboard matrix sean, and dlsplaysean times.
Sean Counter
The sean counter has two modes. !n the encoded mode,the counter provitíes a bínary count thai must beexternally decoded to provide the sean lines for thekeyboard and display. tn the decoaed mode. the seancounter decodes the least signiíicaní 2 bils and provides adecoded l oí -i sean. Note than when the keyboard ¡s indecoded sean, so ¡s the display. This means that only thefirst 4 characlers ¡n the Display RAM are displayed,
In the encoded mode, the sean Unes are active híghoutputs. In the decoded mode, the sean lines are activelow outpuís. !
Return Buflers and Keyboard Debounce •and ControlThe 8 relurn lines are bulfered and latched by the ReturnBufíers. In the keyboard mode. these unes are scanned.looking íor key closures ¡n Ihat row. [f [he debouncecircuit detects a closed switch, it waits about 10 msec tocheck íí the swilch remains closed. If it does. the addressoí the switch ¡n Ihe matrix plus the status of SHIFT andCONTROL are transferred to the F1FO. In the scannedSensor Matrix modes, the contents oí the return Unes ¡sdirectly Iransferred to the corresponding row oí theSensor RAM (PIFO) each key sean time. In Strobed Inputmode. the contents oí Ihe relurn lines are transíerred tothe FIFO on the rlsing edge of tha CNTL/STB line pulse.
FIFO/Sensor RAM and Slatus"Thls block is a dual lunction 8 x 8 RAM. In Keyboard orSlrobed Inpuí modes. it ¡s a FIFO. Each new entry iswritlen Inlo successlve RAM positions and each is thenread ín order oí entry. F.IFO status keepg track oí thenumber oí characters in. the FIFO and wheiher it is lull orempty. Too many reads or writes will.be/ecogjniized as anerror. The status can be read by an RD wílh CS low andAo high. The status logíc also provides an IRQ signalwhen the FIFO is not empty. In Scanned Sensor Matrixmode, the memory is a Sensor RAM. Each row oí theSensor RAM is loaded with the status of the correspond-ing row oí sensor in the sensor matrix. In this mode, IRO \shigh íf a change in a sensor is detected.
Oisplay Address Reglsters and Dlsplay RAM
The Display Address Regísters hold Ihe address of theword currently being written or read by the CPU and the 'two 4-bit nibbles being displayed. The read/wnteaddresses are programmed by CPU command. They alsocan be sel lo auto mcremenl after each read orwrlte. TheDisplay MAM cdn be directly lead by the CPU after [hecorrect mode and a-^Jress is sel. The addfesses lor the Aand 8 nibbles aie ¿utomatically updated by the 8279 [omatch dala entry by Ihe CPU. The A and B nlbbles can beeniered independently or as one word. according lo Ihemode ihal is set by Ihe CPU. Dala entry to Ihe display cant>6 sel lo either teli or nghl entry, See IntorfaceConsideralions lor details.
SOFTWARE OPERATION
8279 commandsThe following commands program the 8279 operalinamodes. The commands are sent on Ihe Dala Bus with CS
low and Ao high and are loaded to Ihe 8279 on iheedge of WR.
Keyboard/Olsplay Mode Set
MSB
Code: lo O I O I D I D I K K K
LSB
Where OD is the Display Mode and KKK ¡s the KeyboaroMode. ;
iDD 't
0 0 8 8-bft character dlsplay — Left antry
0 1 16 8-blt charactar dlaplay — Left entry* '
1 O 8 8-b¡t character display — Right entry
1 1 16 8-bit character display — Right enlry
For description oí right and leíl entry, see InterlaceConsideralions. Note that when decoded sean is sel inkeyboard mode. the display is reduced to 4 characiersindependen! of display mode set.
KKK
Encoded Sean Keyboard — 2 Key Lockout'
Decoded Sean Keyboard —,2-Key Lockout
Encoded Sean Keyboard — N-Key Rollover
Decoded Sean Keyboard — N-Key Rollover
Encoded Sean Sensor Matrix .'•
Decoded Sean Sensor Matrix
Strobed Input, Encoded Display Sean
Slrobed Input, Decoded Display Sean
Program Clock
Code: o O 1 P P P P P
All íiming and multiplexing signáis for the 8279,aragenerated by an internal prescaler. This prescalwdivides the externa! clock (pin 3} by a programmablaInleger. Bits PPPPP determine the valué oí this íntegerwhich ranges (rom 2 to 31. Choosing a divisor Ihat yie^3
100 kHz wíll give the speciíied sean and debounctlimes. For inslance, if Pin 3 oí the 8279 Ís being clockedby a 2 MHz signal, PPPPP should be set lo 10100 todivide the clock by 20 to yield the proper 100 kHz opentt-Ing frequency,
Read FIFO/Sensor RAM
Code: | Q 1 O Al | X | A A A] X = Don*! Ca«
The CPU sets up the 8279 lor a read of theRAM by flrst writlng this command. In the Sean
altor réset.
8279/8279-5
O
o
board Moda, [he Auto-lncrement llag (Al) and ihe RAMaddress bils (AAA) are írrelevanl. The 8279 will automati-cally drlve the data bus for each subsequent read (A0= 0)¡n the same sequence In whlch the data flrst entered thaFIFO. All subsequent reads wlll be (rom the FIFO untllanother command ls Issued.
In Ihe Sensor Matríx Moda, íhe RAM address bits AAAselect one of Íhe 8 rowa oí tha Sensor RAM, II the Al ílag]a sel (Al» 1), each successive read wíll be (rom the sub-sequent row of tha sensor RAM,
Raad Dlsplay RAM
Code:
The CPU sets up the 8279 lor a read o) the Dlsplay RAMby flrst writlng this command. The address bits AAAAsetect one of the 16 rows oí íhe Dlsplay RAM. If the AlHag ¡s set (AI = 1), thls row address will be Incrementadafler each following read or wríte to tha Dlsplay HAM.Slnce the sama counter ls used for both readlng andwrillng, this command seta the next read or writeaddress and the sense of the Auto-lncrement mode forboth operallons.
Writs Dlsplay RAM
Code: [ 1 0 0 AI A A A A ]
0 1 1 A! A A A A
The CPU sets up the 8279 [or a write to Ihe Dlsplay RAMby flrst writlng thls command. After writlng the com-mand with A0=1, all subsequent wrltea with A0=0 wlllbe to Ihe display RAM. The addressing and Auto-lncrement functiona are identlcal to those for the HeadDisplay RAM. However, thls command does not affectIhe sourca of subsequent Data Reads; the CPU will read(rom whlchever RAM (Dlsplay or FIFO/Sensor) whlchwas last speclfied. If, ¡ndeed, the Display RAM was lastspeciííed, the Write Display RAM will, nevertheless,changa the next Read iocatlon.
WrlU InhlbWBIanklng
Coda: [ 1l. 1 X IW IW BL BL
The IW Bits can be used to mask nibble A and nlbble B'n applications requiring sepárale 4-bit display ports. Bysetling Ihe IW ílag (!W= 1} for one oí the ports, the portbecomes marked so that entries to the Dlsplay RAM'rom the CPU do not af fect that port. Thus, if each nlbbleis ¡nput to a BCD decoder, Ihe CPU may write a digil tolíie Dlsplay RAM wllhoui affectlng the other dlgll beingdisplayed. It ls Importan! to note that bit B0 correspondslo bit D0 on the CPU bus, and that bit A3 corresponds tobit 07. ' .
" the user wlshes to blank the display, tha BL llags areBailable for each nibble. The last Clear command ¡ssueddetermines the code to be used as a "blank." This codedelaulls lo all zeros after a reset. Note Ihat both BL"ags must be set to blank a display formatted wllh as|ng|e 8-blt port.
1 1 0 C0 CD CD CF CA
Clear
Code:
The CD bits are availabie ¡n this command lo clear allrows of the Dlsplay RAM lo a selectable blanking codeas follows:
CQ CD CD
0 X AI! Zeros (X - Don't Carel
1 O AB = Hex 20 (0010 0000)
1 1 AllOnes
Enable clear display when - 1 (or by CA - 1 )
During the time the Display RAM !s being cleared (It may not be written to. The most sígniflcanl bit of theFIFO status word is set durlng thls time. When íhe Dis-play RAM becomes available again, it automaticallyresots.
lf| the CF bit Is asserled (CF=1), the FIFO status iscleared and ihe interrupt output Une is reset. Also, theSensor RAM poinler is set to row 0.
CA, the Clear All bit, has Ihe combíned eftect of CD andCF; it uses the CD clearing code on the Display RAM andalso clears FIFO status, Furthermore, It resynchronlzesIhe internal tímlng chain.
End InterruptyError Mode Set
Code: 1 1 1 E x|x X X X = Don'l care.
For the sensor matrix modes this command lowers theIRO Une and enables (urther writlng into RAM. IThe IRQline would have been raísed upon the delecíion of achanga ¡n a sensor valué. This would have also ínhibltedfurther wrítíng into the RAM until reseí).
For the N-key rollover mode — i( the E bit is programmedto "1" the chíp will opérate tn the specíal Error mode. (Foríurther details, see Interface Consideralions Seclion.) •
Status- Word
The status word contams Ihe FIFO status, error, anddisplay unavaílable signáis, This_word is read by the CPUwhen Ao !s hlgh and CS and RD are low. See InterfaceConsiderations íor more detall on status word.
Data Read
Data Is read when AO, CS and RD are all low. The sourceoí the data is specilied by the Read FIFO or Read Displaycommands. The trailing edge oí RD will cause Ihe addressof the HAM belng read lo be incremented'ií the Auto-lncrement flag is set. FIFO reads always ¡ncremenl (ií no
• error occurs} independen! of AI.
Data Wríte
Data that is written with Ao, CS and WR low is alwayswritten tolhe Display RAM, The address isspecified by thelatesi Pead Display or Write Display command. Auto-Incremenling on the riaing edge oí WR occur» if Al set bythe latesl display command.
_ o. ano
8279/8279-5
O
o
INTERFACE CONSIDERATIONS
Scanned Keyboard Mode, 2-Key Lockout
There are three posslble combinallons oí conditíonsIhal can occur during debounce scannlng, When a key ¡sdepressed, Ihe debounce logic is set. Olher depressedkeys are looked for during Ihe nexl lwo scans. lí noneare encounlered, II.¡s a single key depression and thekey position is enlered into the FIFO along wilh thesiatus oí CNTL and SHIFT lines. II the FIFO was empty,IRO will be sel to slgnal the CPU Ihal Ihere is an entry lnthe FIFO. If the FIFO was lull, Ihe key will not be enteredand the error llag will be set. If another closed switch Isencountered, no enlry lo the FIFO can occur. II all otherkeys are released before this one, then It will be enteredto Ihe FIFO. II thls key Is released before any other, Hwill be entirely ignored. A key is entered to the FIFOonly once per depression, no matter how many keyswere pressed along wlth U or ln whal order they werereleased. II two keys are depressed wiihin the debouncecycle, II is a simultaneous depression, Nelther key willbe recognized untll one key remalns depressed alone.The lasl key will be treated as a single key depression.
Scanned Keyboard Mode, N-Key Rollover
Wilh N-key Rollover each key depression is trealedindependently Irorn all others. When a key is depressed.Ihe debounce circuit waits 2 keyboard scans and thenchecks to see ií the key ¡s still down. If ¡t ís, the key isenlered into Ihe FIFO. Any number.ol keys can bedepressed and another can be recognized and enteredinlo the FIFO. U a simultaneous depression occurs, thekeys are recognized and entered according to the orderthe keyboard sean found them.
Scanned Keyboard — Special Error ModesFor N-key rollover mode the user can program a specialerror mode. This ¡s done by the "End Interrupt/ErrorModeSel" command. The debounce cycle and key-valldilycheck are as in normal N-key mode. II durlng a ¿|nq_l_e_debounce cycle. two keys are íountí depressed, this isconsidered a simultaneous múltiple depression, and seisan error llag. This flag will prevenl any íurlherwríling intoIhe FIFO and will set interrupí (línolyet set). The error llag"could be read ¡n this mode by reading Ihe FIFO STATUSword. (See "FIFO STATUS" lor furlher delails.) The errorflag is resel by sending the normal CLEAR command wilhCF = 1.
Sensor Matrix Modeln Sensor Matrix mode, the debounce logic Ís ¡nhibiled.The stalus of the senspr switch Is inputted directly lo theSensor RAM. ln this way the Sensor RAM keeps an imageoí t he slale oí the swilches ln the sensor matrix. Althoughdebouncing is not provlded, this mode has the advantageIhal trie CPU knows how long Ihe sensor was closed andwhen ít was released. A keyboard mode can only indícalea validaled closure. To make the sof tware easíer. thedesigner should functionally group the sensors by lowsince Ihis is the formal ¡n which the CPU will read themThe IRO Une goes hlgh it any sensor valué change Isdelecled al the ond of a sensor matrlxscan,The IRQ line Iscleared by the f i rst data read operation If the Auto-
Incremenl flag is sel to zero. or by Ihe End Inlerruptcommand íl Ihe Auto-lncremenl llag Ís sel to one.
Note: Múltiple changes ¡n Ihe malrix Addressed by (SLo-a= 0) may cause múltiple ínterrupts. (SLo =0 in the DecodedMode), Resel may cause the 8279 to see múltiple changos.
Dala Formal
ln the Scanned Keyboard mode, Ihe character enteredinto the FIFO corresponds to the position of the switchin the keyboard plus Ihe stalus of [he CNTL and SHIFTUnes (non-lnverted). CNTL Is the MSB of the characlerand SHIFT is Ihe nexl most significanl bit. The nextthree bits are from the sean counter and indícale therow Ihe key was lound in.The last three blls are from Ihecolumn counler and indícate lo which return Une the keywas connecled. . •
MSB ' LSB
CNTL SHIFT1 iSCAN
' 1RETURN
1 T
SCANNED KEYBOARD DATA FORMAT
ln Sensor Matrix mode, the data on the return unes isentered directly in the row of Ihe Sensor RAM thatcorresponds lo Ihe row in Ihe matrix being scanned.Therelore, each switch postion maps directly to a SensorRAM position, The SHIFT and CNTLÍnputs are ignored inthis mode. Note that switches are nol necessarily (he onlything that can be connected to the return lines in thismode. Any logic thal can be trlggered by the sean linescan enter data to the return line inputs. Eight multiplexedinput porls could be tied to the return lines and scanned bythe 8279.
RL7 flt-6 RLs RL, RL3 RLj RL, RL0
ln Strobed Input mode, the data is also enlered to the FiFOfrom the return lines. The data Ís entered by the risingedge oí a CNTL/STB line pulse. Data can come'lrom"another encoded keyboard or simple swilch malrix. Thereturn lines can also be used as a general purpose slrobeCInput.
RLj RL6 RL5 RL4 RL3 RL2 RL, RL0
Dlsplay ;
Lell EntryLeft Entry m'ode Is Ihe simples! dísplay formal ¡n Ihateachdisplay position directly corresponds to a byte (or nibble'in Ihe Display RAM, Address O in the RAM is Ihe lell-mostdisplay character and address 15 (or address 7 incharacter display) is Ihe right most display characlerEnlering characlers Irom position *ero causes the displaílolilIfromlhelell.The 17 Ih (9th) characler is enterad bac^'ln the leí! most position and lílhng ag'ain proceeds lr°theie
8279/8279-5
c
o
• o
o
lil «nlry
2nd entry
16tn enlry
I7th entry
IBth enlry
-DliplnyRAMAddrnt
14 15
hs|i6:
14 15
|ts|l6 '
14 15
Í15Í16
LEFT ENTRY MODE(AUTO INCREMENTl
Rlght Enlry
Righl enlry ¡s the method used by most electroniccalculalors. The (irs! enlry ¡s placed ¡n ihe right mostdisplay characler. The nexl enlry Is also placed In Ihe rightmost character aíter Ihe dfsplay Is shltted leí! onecharacler. The leít mosl character fs shífled o(f ihe endand Is lost.
1 2
Hl entry
2nd enny
3fd tntry
1_4 15 Oj*D¡»pUyRAMAddrew
2 3
3 4
15 0 I
O 1rn—
16lhtntry 1 2
13 14 15
17th entiy .
1 2
2 í 3
2 3
18ih entry 3 ¡ 4
RIGHT ENTRY MODE(AUTO INCREMEWT)
Note that now Ihe display posilion and register address donol correspond. Consequenlly, entering a characler lo anarbitrary position in Ihe Auto Increment mode may haveunexpecled resulls. Entry Slarling a( Display RAM addressO with sequenlial entry is recommended.
Auio Incremenl
ln the Lelt Entry mode, Auto Incrementing causes iheaddress where íhe CPU wíll next wrlte lo be mcremenledby one and ihe characler appears ín the nexl location.
i non-Auío Incrementing the entry is bolh to the sameaddiess and dlsplay posillon Entry lo on arbitrary
in the Auto Increment motíe has no undesirable! ettecls and the result is predicíable:
_0_ 1_ 2 3 _4 5 6 7-»—Diipl»y1 RAM
O 1 2 3 4 B
2nd tntry
Command10010101
3/d entry
4th enlry
0 1 2 3 4 5 6 7
Enter ncxl it Lociiíon 5 Auto Irtcremenl
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7
LEFT ENTRY MODE(AUTO INCREMENT)
In the Right Enlry mode. Auto Incremenling and nonIncrementíng have the same eífect as in the Lefl Entryexcept lí the address sequence ¡s ínlerrupled:
lit entty
2nd entry
Commsnd10010101
1 2 3 4 5 6 7 O—— Disulay
" ~ " i r~m RAM
2 3 4 5 6 7 0 1
2 3 4 5 6 7 0 1
Entei nexl »I Localion 5 Auio Incremoni
3 4 5 6 7 0 1 2
4 5 6 7 0 1 2 3
4th entry [ ¡3 4 | . j 1 J 2
RIGHT ENTRY MODE[AUTO 1NCREMENTJ
Slarling at an arbíirary location opérales as shown below:
0 1 2 3 4 5 6 7-4-DisplavCortina nd10010101
lit entry
Sth
9lli
RAMAddreis
Enleí nexl al Ltwatio.n 5 Auio Increment
1 2 3 4 5 6 7 0
2 3 4 5 6 7 0 1
5 6 '/ B U
RICHT ENTRY MODE •[AUTO INCREMENT)
8279/8279-5
r
Enlry appears ¡o be from the ¡nitral entry point.
8/16 Character Dlsplay Formáis
II the display mode is set lo an 8 character display, Ihe onduty-cycle is double what ¡( would be lor a 16 characterdisplay (e.g.. 5.1 ms sean time (or 8 characters vs. 10.3 msfor 16 characters wllh 100 kH¿ interna! (requency).
G. FIFO SI.IU.
FIFO status ¡a used ín the Keyboard and Strobetí Inputmodes ío Indícale the number oí characters in the FIFOand lo indícate whether an error has occuired. There aretwo types of errars possible: overrun and underrun.Overrun occurs when the enlry of anothercharactennto a(ull FIFO is attempted. Underrun occurs when the CPUtries to read an empty FIFO.
The FIFO status word also has a bit to indícate Inat theDisplay RAM was unavaílable because a Clear Display orClear All command had not completed ¡ts clearíngoperatíon.
In a Sensor Matrlx mode, a bit la set In the FIFO stahword lo indícale that at least one sensor closure Indica!tion Is contalned in the Sensor RAM.
In Speclál Error Mode the S/E bit I3 showlng Ihe errorflag and serves as an Indlcatlon to whether aous múltiple closure error has occurred.
ErrocUnderrunErrot-Overrun
• S*ruor Closure/Eiror Flag fixMültipl» CloiuíeiDispliy univaihbla
o
SHIFT
'
CONTROL
\S
*/' RETURM
LINES
^ 5V
KEY6OAHDMATRIX
í COLUMNS
a RQWS
íís-aír
MICHO. DATAPHOCESSOR BUS
SYSTEM
SMIFT CNTU R0 ,
IÜR
nestrci
3 - 8 DECQOEH
i -1í DECODER
BLANKDISPLAY
ADDHtSSESIDECODED1
DISPLAYCHARACTEHSOAlA
DIS/LAV
•Qo not drlv« lh« Haybo«rcJ decodsr wllh tti» MSB oí trio sc»n Unes.
Figure 4. System Block DIagram
9^02
8279/8279-5
ABSOLUTE MÁXIMUM RATINGS'
Amblent Temperatura Q°C to 70°CStarage Temperature ~65aC to 1 25°CVoftage on any Pin whhflejpeci ro Ground . . . , , -0.5V to -f?V
Power Disiipaiíon , . . , . ] Watt
'NOTICE: Stresses abave those Usted under "AbsolutoMáximum ñatlngs" may cause permanent damage to thedevlce, This ¡s a stress raiing only and functional opera-(ion oí the dev¡ce at these or any other condiííons aboveíhose ¡ndlcated ¡n the operationatsecílons oí (hisspeciíl-catíon is not implled. Exposure to absoluta máximumrating condiíions lor extended parióos may affect davicereliabillty.
D.C. CHARACTERISTICS [TA - o°c to 7o°c. vss = vc * 5%, vcc (82/9-5)]
O
Symbol
VILI
VlL2
VIHI
V|H2
VOL
VOH1
VoH2
"ILI
'IL2 '
!OFL
"ce
Paramolnr
Input Low Voltage forReturn Lines
Inpui Low Voltage for A|| Othen
Inpui High Voltage forReturn Lines
Input High Voltage for All Othen
Output Low Voltage
Output High Voltage on InterruptLine
Other Outputa
Input Current on Shift, Control andReturn Lines
Input Leakage Currant on All Others
Output Float Leakagc
Power Supply Current
Mln.
-0.5
-0.5
2.2
2.0
3,5
2.4 :
Max.
1.4
0.8
0.45
+ 10-100
±10
±10
120
Unll
V
V
V
V
V
V
¿JA
pA
^A
PA
mA
Teat Condltlon*
Note 1
Nota 2
FOH - -100 ^A
V|fj - Vcc
V,N - OV
VIN - vcc ID ovVouT-VcctoO-fSV
t>
o
CAPACITANCESymbol
CINCOUT
Parameter
Inpui Capacitance
Output Capacitancc
Typ.
5
10
Max.
. 10
20
Unlt
PF
pF
Toít Condltlons
ÍC - 1 MHz Unmeasured
pins relurned to Vss
A.C. CHARACTERISTICS [TA'- o-c lo ro-c, vss - ov, (Note 3)JBúa ParameUrs
REAO CYCLE
Symbol
[AR
1RA
1RR
tRD'4'
I 'AOW
IDF
tRCY
Parameter
Address Stable Before READ
Addreu Hold Timo (or R EAD
REAO Pul« Width
Data Delay from RGAD
Address to Data Valid
READ to Data Roatlng
Read Cyde Timo
8279
Mln.
50
S
420
10
1
Max.
300
450
loo
8279-5
Mln.
0
0
'250
10
1
Max.
150
250
• too
Unit
ni
ni
ns
ns
nt
ns
A» . j
8279/8279-5
A.C. CHARACTERISTICS (Contlnued)
WRITE CYCLE
Symbol
Uw
IWA
lww
IDW
IWD[VVCY
Parameter
Address Stable Before WflITÉ
. Addresj Hold Time lorWRITE
WR ITE Pulse Wídth
Data Set Up Time for WRITE
Data Hold Time for WRITE
Write Cycle Time
3279
Mtn. ; Max.
50
20
-100
200
. AO
1
8279-5
Min.
0
0
250 - .
150
0 •
1 .
Max. UnH
~i
! -»~ !-s
"i
-J
-s •
O
OTHERTIMINGS
Symbol
t<pW
ICY
íParameter
Clock Pulse Wídih
. Clock Period
8279
Mln. Max.
230
8279-5
Mln.
120
500 I 320I
Max. Unlt ••'.
nsec
mee
Keyboard Sean Time , 5.1 msecKeyboard Debounce Time , 10.3 msecKey Sean Time — .80 /isecDisplay'Scan Time 10,3 msec
Dígít-on TimeBlanKing TimeInternal Clock Cyclel5!
NOTES:1. 8279. IQL - 1.6mA; 8279-5. !OL - 2.2mA.2. 8279. IOH - -lOO^A; 8279-5. IQH - -400/iA.3. 8279. Vcc - ^5V =5%: 8279-5, Vcc ^ +5V ±10%.4. 8279. CL - tOOpF; 8279-5. CL - iSOpF.5. Tha Pfescalar should be programmed to provide a 10 s ¡nternal clock cycle.
A.C. TESTING INPUT, OUTPUT WAVEFORM
INPUr.OUIPUT
*^> TE5T POINTS <C
-* LOGIC O ÍIMiHG MeASUHEMEWS AHE MAD6 Ar 3 OV FOfl A LOOIC I"AND O 8V FOR « LOQJC O
A.C. TESTING LOAD CIRCUIT
C, 1W pFC[ IHCLUDES jlO CAPACIIANCE
, O
inte! 8279/8279-5
C
O
y/AVEFORMS
READ OPERATION
.OUtPUP v' .\ WR1TE OPERATION
! UAIA BUS1 MNPun
D A T A'.'ii CHANCE
K.
\— IHA — '
\ 'ir
OA[AMAY CHANCE
ISYSTEM'5.AUDRESSflUSI
(HEAD CDNIROL]
IWHITE CONTROL]
; CLOCK INPUT
•o
J<
?• 'v
--Í
i O
; O
8279/8279-5
WAVEFORMS (Continued)
SCAN
EHCODFOStJAH
•DISPLAY PÍ1ESCALFH PnOQRAUMED ^OH IH-
MU..«"W(Cr . , -.
1
!i
'o • io/<" • • •'• .
/ • • • . . . . . . -
10 |.t .i [ ¡...UÓÍlmllOUM WHIIL JOFlFtr nrlUnH LIMn Aft f SiMnlroflHr »t í IIUE Al*0,.t -I l-| ntoSEircl l l l .UlCf l tO ntlUnHUHri ARF SAMnlfiOütU »1 A IIMÍ Al
NOlí: SltQWH U CHCOUEOSCAII Ltn (MIHV«j'sj AIIE H01 SHOWN BUI IHEY ARE SIMCU S, niVIDED HY } AtlQ *
9-dOG
O8253/8253-5
PROGRAMMABLE INTERVAL TIMER
• MCS-85™ Compatible 8253-5
• 3 Independen! 16-Bit Counters
• DC to 2 MHz
• Programmable Counter Modes
Counl Binary or BCD
Single 4-5V Supply'
24-Pln Dual In-Line Package
The Intel® B253 Is a programmable counter/Umer chlp desígned lor use as an Inlel microcompuler peilpheral. It usesnMOS lechnology with a single +5V supply and Is packagod in a 24-pin plástic DIP. ' . • ' • -
(tlsorganlied as 3 Independen! 16-bll counters, each wilh a counl ráte of up to 2 MHz. All modes oí operation are solí-wwe programmable, . "
figure 1. Block Dlagram Figure 2. Pin Conllguratlon
B-307
8253/8253-5
O
i t)
-tv
* Ó
The 8253 is a prográmmable interval tlrner/counterspeclíically designad lor use ' wilh Iht • Intel" Micro-computar syslems,' Its lunctíon Is Ihai of a generalpurpose. mulli-limihg eloment Ihat can be trealed as anar ray oí I/O ports in Ihe syslem sof tware. •
Thií H253 solves one oí Ihe most cormnon problems ín anyinictocompiiter syslem. the generalion oí accurale timedeltiys undoi soltware control. Instead oí seltlng up ilrningloops insyslums softwaie. the progí a mrrier configures Ihe8253 lo nialch his requiteinenls. mllializes one oí ;necounters of the 8253 wilh Ihe desired quantily, then uponcommand the 8253 will counl out iho delay and ¡meiruptthe CPU when il has compleled its lasks. II is easy lo seethai tlio soltwaíe overhtiad !s minimal and Ihat múltipledelays can easily be maintained by nssigninent oí prionty .levéis
Other countei/tfmer lunclions .that affi non-delay innaluic bul also common lo inost mtcrpcomputers can betniplcineníed wilh the 8253.
• Programmable Rale Gonenuor• Evenl Counter• Binnry Rale Multipliei• Reñí Tiniü Clock• Digital One-Shol
•• Compitíx Molor Controller
Data Bus Bulfer
This 3-staie, bi-directíonal, 8-bit buííer is used to inleríacethe 8253 lo Ihe system data bus. Data is Uansmitled orrecoived by Ihe bufler upon execulionoílNputor OUTpulCPU Inslruc'tlons. The Opta Bus Bullor haa throo bitsiclunctlons.
1. Programming Ihe MODES of the 8253.2. Loadíng the count registors.3. Readtng the count valúes.
Read/Wrile Logic
The Read/Wríte Logic accepts ¡nputs (rom the system busand in turn generales control signáis for overall devíceoperation. II is enabled or dlsabled by CS so that nooperation can occur to change the lunctíon unless Ihedevíce has been selecled by the system loglc.
RTJ (Read)
A "low" on this inpul inlorms the 8253 thal the CPU isinpuilíng data in the lorm oí a couniers valué.
WR (Wrlte)
A "low" on Ihis input infonns the 8253 Ihal [he CPU isout pulí iny d¡ila in Ihe lormof mod e In Ion nailon ot londincjcounleis.
AO, A l
These inputs are normally connected to tha address busTheir functlon Is lo seíect one oí the three counters to beoperated on and lo address in» control word regisler foimode selection.
CS (Chip Selecl)
A "low" on this ínpul enabiei the 8253. No reading otwriting will occur unless the Cívice ís selected. The elinpul has no efíecl upon tr.* actual operalion of (htcounters.
Figure 3, Block Oiagram Showlng Dala Bus Bu'fier an<Bead/Wrlle Loglc Functlons
CS
0
0
0
0
0
0
0
0
10
RD
1
1
1
1
0
0
0
0
X
1
WR
0
0
0
0
i11ix .1 .
AI !0 1
0
110
0
11X
X
AO
0
10
10
10
1XX
Load Counter No. 0
Load Counter No, 1
Load Counter No. 2
Wríte Mode Word
Read Counter No. 0Read Counter No. 1
Read Counter No, 2
No-Operatlon 3-Siatei . •'
Disable 3-Staie«No'-Optíration 3-Stau
9-30fl
8253/8253-5
O Word RegUter ' "
• jí,fl control Word Regís ter is seleclec /-nen AO, A1 are 11,lt ihen accepls inlormation from Ihe ca:a bus buller andjlores it ín a regisler. The Inlorrna; en stored !n thts .[egíster conlrols the operational MODH oí each counter,wlection oí binary or BCD counting =nd the loading oí¿achcount'regislef.
ího Conlío! Word Registe! can onl/ c-= written into; no(<»d operation oí íts contenls Is avaiü^ie.
Counler rfK), Counler #1, Counler *2
These Ihree lunctíonal blocks areio&r: calinoporallonsooníy a single Counier will be descrea Each.Counlerco'nslsls oí a single. 16-bII, pre-setu^'í DOWN counter.Th« counler can opérale Ín either b'r.^ry or BCD and ¡IsInput, gale and outpul are conlígurec sy the selection oí"MUDES slored ¡n the Control Word "£gtster.
¡The counlers are fully independen! and each can navesepárale Mode configuralion and counting operation,binary or BCD. Also. there are special íealures in Ihecontrol word Ihat handle the loading -' the counl valué sothal soltware overhead can be r-'^rnized (or theseiunctions. ,
•Thereading oí the conlenls oí each cconterisavailable toIhe programmer with simple READ cioerations íor evenl"counting applicalions and specíal ccmmands and logic«re Included In the 8253 so ihai t*** contenls oí eachcounler can ba read "on the fly" whrcul havlng lo ¡nhibilthe clock input.u!''
. 8253 SYSTEM INTERFftCE•The 8253 is a componenl oí Ihe Iniel" MicrocompulerSyslems and interlaces ¡n the same manner as all olherpetípherals of Ihe family. U Is ireated by the systemstoltware as an array of peripheral UO porls; three are'counters and the lourth ¡s a control register (or MODEprogramming.'
Basically, the select ¡nputs AO. Ai connect to the AO, A1¡iddress bus signáis oí the CPU. Tn= CS can be derived
1 directly I rom the address bus usíng a'mear select melhod.. Or ¡t can be connecled lo the outpu: 3f a decoder, such as., «n Intel* 8205 lor larger systems./*
05 I"
•lüfl '
¿»(lt í
-- OUI 0
Figure 4. Block Dlagram Showing Control WordRegisler and Counter Funcllon»
\l )
\,
%
CON1HOLBUS ! j
\» i oí- DAlABUSf l ] ',
f H l1"' G
A A^ CS D0 o, to ««
IÍ53
COUNIEH COUNIER CCKJNIER0 1 í
1 OUI OATE CL< OUI QATÍ CLK ^UI C*1I CL-(
1
Figure 5. 8253 Syslem Interlace
o
o
O
8253/8253-51
OPERATIONAL DESCRIPTION
The completa luncllonal dallnitlon oí ihe 825: sprogrammed by the systems soílware A SG! oí cor:-:wbrds musí be senl out by Ihe CPU lo inilialize -=:-counler of the 8253 with Ihe desired MODE and quar- •.informal Ion. Prior to Inllializalion, Iha MODE, count, z~zoutput oí all counlers is undelined.These control wo'isprogram íha MODE, Loading scquence and selecllor :'binary or BCD countlng.Once programmed, [he 8253 ¡s ready to perlorm whai t -7 -timíng tasks it is assigned to accomplish.
The actual counting operaiion oí each counte' ;complolely Independen! and nddhional logic is provic?:on-chip so that the usual problems assoclated .-. *-ellicient monitoring and management oí exi&" ~asynchronous events or rales lo the microcomc_"r'syslem have been eliminated.
Programmlng Ihe 8253
All of Ihe MOD ES íor each count erare progrummed c.'.' -.systems sof tware by simple I O opfira'ions.
Each counlür oí tho 8253 is i'H¡ividu;illy [irotjrnmni'-: :.wnling a control v/oíd mío Mío Con.uol Wtml fíogit'í-'(AO. AI • t i )
Control Word Formal
D7 D6 D5 D4 D3 C
SCI SCO RL1 RLO M2..Pl.MO ec:
Delinltlon oí Control ,
SC — Selocl Counlen
SC1 SCO
0
0
II
0
. . 1ü1
j Sslfícl Countcr 0
: S-.'liici Couiuer 1
Stílccl Couolcr 2
Illtígal
RL — Read/Load:
RLl RLO
0
10
i
0
0
1
1
Countcr Laiching opeíatíon (seuREAD/WRITE Proceclure Section)
Ruad/Load most sígníficani bytc onl\d least sígníticant bytti onl1.
Read/Load leasl sicjnUicant by.ta í i ts iIhen most slanlllcniu byle,
M — MODE:
M2 MI MO
n0
X
X
ii
0
0
110
0
D
1
0
i0
1
MnHj £_*Modu 1
Mode 2
Mode 3
Mode 4
Mode 5
BCD:
0
1
Binary Counler 1 6-biis
Binary Codetl Decimal (BCD) Counicr¡4 Osearles)
Counter Loading
The count register is not loaded unlll Ihe counl valué lawritten (one or lwo bytes, depending on Ihe mod«selccted by Ihe RL bils), lollowed by a rising edge and afalllng edge o[ Ihe clock. Any read oí tho counter príoi toIhal lalling clock edge may yi'eld invalid data.
MODE Delinlllon
MODE 0: Inlerrupl on Terminal Counl. The output wiltbe initially low alter tho mode sel operalion. Aller thacount is loaded into the saleclod counl register, the out-put will remaln low and Ihe counter wlll counl. When ler-mina! counl Is reached Ihe oulpul will go hígh ana r»-main high unlil the sclecled counl regisler is reloade<Jwllh the mode or a new count Is loaded, The counlar.continúes to decrement alter terminal counl has beenreachad.
Rewriting a counter legisler during counling resulls in.tho (ol|owing; •
(1} Wrilo Ist byte stops Ihe currenl counling.(2) Write 2nd byle star ls Ihe new counl.
MODE 1: Programmable One-Shol. The outpul will 50low on Ihe counl lollowing Ihe rising edge oí thegate i rvpul.
Tho oulpul will go high on Ihe terminal count. II a newcouní valué is loaded while Ihe oulpul Is low Íl wiil.noiaílect Ihe duration oí Ihe one-shol pulse unlll Ihe suoceacíing Irigger. The current count can be read al anylime wflhout aflecling the one-shol pulse.
The one-shot is relriggerable, henee the oulpul will rt-main low lor tho lull counl altor any rlslng edge oí thsgale inpul, •
9-310
O
I"
irte)' 8253/8253-5
2: FUI» Gcnernlof . Divida by N counler. Thu oul-pu[ wlll be low (of ono perlod oí Iha Input clock. Tho
,MfIod (rom ona oulpuí pulso lo Ihc nnxl nqunls Ihn'numbsr oí Input cou'nit, in Iho counl r i i j j ia lQr. If Iho'count rogli ler la reloaded bel-voen oulpul pulsea Iha'presen! period witl nol be al fecled, bul the subscquenlpertod will reílecl Ihe new valué.
The gale inpul, when low. will (orco Ihe oulpul high.V/hen Ihe gate inpul goes high, tho counlor will slarl'(rom the ínitial counl. Thus, Ihe gale inpul can be used'lo synchroníze Ihe counler.
When Ihis mode is sel, the oulput will remain high tinlil'íller the count regísler is loaded. The oulpul then can'liso be synchronized by software.
MODE3: Square Wave Rale Generalor.Simllar to MODEÍ2 except thal Ihe outpul v/lli remain high unlil one hall¡Ihe count has been compleíed (ior even numbers) andgo low lor the olher hall oí Ihe counl. This Is accom-pllshed by decremenling the counler by [wo on the lall-íng edge oí each clock pulse. When Ihc counter reachesterminal counl, the slale of Ihe oulput is changed andIhe counter is reloaded v/ilh the iull count and Ihe whole
¡pfocess Is repealed.
If Ihe count is odd and Ihe oulpul ¡s high, Ihe firsl clockpulse (aíler the count Is loaded) decrements Ihe counlby i. Subsequenl clock pulses decrement Ihe clock by2. A f t e r límeout, Ihe output goes lov/ and the lull counl
¡is reloaded. The Hrsl clock pulae (lollowing the retoad)¡decremenls tiie counler by 3. Subsequenl clock pulses¡decremenl Ihe count by 2 unlil timeout. Then the wholeprocess is repeated. In Ihis way, jf Ihe count is odd, Iheoulput will be high lor (N+ 1)/2 counls and low for(N-1V2 counls.
MODE 4; So l twaro Trlggered Slroba. A f le r Ihe mode Issel, the oulpul wlll be high. When Ihe counl is loaded,Ihe counter wül begin counting. On terminal counl, theoulput wlll go low for one inpul clock period, Ihen willBO high again.
II lim count reglslur Is reloaded botwtjon oulput pulses.Ihe piesenl purlod wlll not be allected. huí thesubsequenlpnriod will rnllnct Iho IIRW valué. "The count will bo tnhlh-lltnt whilü llio fjíilci Input la low. Roloadmg ihu counliurnnlulor wlll ruulnrl counting boglnnlng wilh Iha nnwnumber.
MODE 5: Hardware Trlggorod Strobe. The counler willslarl counlinf] a f te r the rising.edge of Ihe Iriggnr Inpuland will go lov/ Ior one clock period when the terminalcounl is reached. The counler is relrigQerable. The oul-pul wlll nol go low unlil Ihe lull count af ler the risíngedge oí any Irhjnnr.
Sign»! LowOí Cotng
COunlino
counl*i<
COunlmq
Hlyh
Cn.ililiisC.fHltltlIll;
Figure 6. Gale Pin Opecaliona Summary
9-311 -
o
o
inte!
MODE 0: Inlorrupt on Terminal Counl
8253/8253-5
MODE 3: Squnre Wava Qoneraior
CLOCK
MODE 1: Programmabla One-Shot
WfU
I H I G C E R
OUTPUI
MODE 4: So f twa re Trlggered Slrobe
3 í I O
LOAD n [ n - i _
OATE
ouirui3 ? I S
MODE 2: Rale Generalor MODE 5: Hardware Trlggered Strobe
GATE
OUIPUT [n- 4|
OUIPUI In - *}
3 a i o
3 2 1 C
Figure 1, B2S3 Tlrning DIagrams
9-312 A.FNOOMÍB
8253/8253-5
Read Operat lonsIn mosl counleí applicalions il becomes nocessary lomadI he valué of Ihe counl In piogross and rnnkn acompulaiional ducision based on. Ihis quanlily Evenlcounloí» «re ptobnDly Iho moal common nppllcnlfon Ihnlnaos llus kmclion The B253 conlalns loíjto Ihnl will nliowIhe prografnmer lo easily rend Ihe conlenls oí nny oí Míeth fee counteis wilhoul disturbing lite actual counl inprogress
There are iwo metnoos that Ihe programrner can uso lorcad Ihe .aiue oí Ihe counlers. The f irsl mclhod involvesIhe use oí simple ! O read operalions oí Ihn selecledcounleí By controllmg Ihe AO. Al inpuls lo the 8253 Iheprograrnmei cansclecl lhe counler to be read (remnniberIhal no read opetntion oí Ihe mode rngisItM is allowed AO.A l - 1 1 ) Tne only rcquireinent wilh Ihís melhod ¡s Ihal inoider lo assui e a si a ble counl readíng thuaclual opera! ionoí Iho seiecicd coimicr must be inhibiled sithcr byconirollmg me Galc mpul or by exlernnl logic ihat inhibilsthe clocK mpul The conlents oí Ihe counlet selecled willbe availaoie as lollows:
lirsl 1 O Rc-ad confatns Ihe leasl signiíicanl bylfi (LSD}
SGCond I O Read coninms ihe mosl sirjnilicanl byte(MSB).
Due lo me infernal logic oí Ihe 8253 U is absolulclynecessary ;o complete thy nntire renduif] procodurc II lwo6yles ate pfoginmmed lo be tead fhun lwo byles nujsl heread be'o'e any loadmg wn command can be snni lo Ihesame ce .nit*i
Read Operat lon Chart
A1
0
0
]1
AO
0
1
0
1
RD
0
0
0
0
Read Counler No. 0 '
Rünil CiiiinlUf Ñu. }
Ruad Counu'r No. ?
lllctjal
Reading While Countlng
In order lot ihe programmer lo read Ihe conlents oí ntiycoun'ler wilhoul ellecling or disluibmg [he couniingopernlion ihe 8253 has special inlcrnal logre Ihal can beaccessud usina simple WR commnnds lo Ihe MODEregistcr Bíisically. when Ihe programmer wishes lo rendIhe conten I s oí a sflecled counler "on Ihe Ily"heloat)sincMODE regislcr wilh a special codc whioh Intchcs ihepresen! counl \alue into a storage regisler so ihat iiscontenls contam an accurale, slable- quanlily Theprogrammei Ihen issues a normal read command lo iheselecled counter and ihe conlenls oí Ihclatcheri rngisicf isavnilable
MODE Reg ls te r lor Latching Counl
AO, A1 = 11
D7
SCI
PG ¡ D5
SCO ¡ 0
DI
0
D3
X
D2
X
DI
X
DO
X
SCI.SCO— specrly counler lo be lalched
DS.D'l — 00 cesignales counler lalching operaíion
X — tíon'i cate .
The same limllallon applles lo Ihls mode oí readíng Ihecounter as the prevlous melhod. Thal ¡s, il ¡s mandaloryto complete Ihe enlire read operaíion as programmed.This cornmanrí has no eítecl on Ihe counler's mode.
•II an 8085 dock oulpul ls lo ddve an B253-5 clock Inpul, 11 musí be tetíuced lo 2 MHi or less
Figure 10. MCS-85" Clock In te r íace '
9-314
8253/8253-5
ABSOLUTE MÁXIMUM RATINGS*
Amhiem 1 ein|Hir¡lluní Uiulfjr üins
Vo l tage On Any PinWith Résped lo GroumJ
Power Oissipalion
. . 0UC lo 70" C•Ü5"GloM50"C
O 5 Vio 17 V1 Wall
Strusscs abnva llwsa M/itf undvr "Ab.ialutaMnslnwrn nntinfiíi" mny cnuso pnrm^nnnt üawagtt f / j thnclQvicn. This !s a síross rnüng only hnd lunaionnl o/wn-llon o( the f/ov/ce fít Ihoso or any oirtfir cañamón.1; nbttvnthasa Inrilcatad ¡n thn oporation»! saclions oí lillaspeclücaHüii la not Impllad. Cxpoiure lo ¿Dsolute ntnxl-mum rating concütinns lor extanaen panods muy alfuctdevice reüability.
0"C [p 70nC, Vcc = 5V ±10%)
Symbol
VIL
VIH
VOL
VOH
IIL
¡ IOFL
[cc
Parameter
Input Low Voliajic
Input 1-IÍgh VoHncje
Ouipul Low Voltaíji]
Ouipui High Vohage
Inpui Load Curren!
•. Output Float Ltjaknge
^cc Supply Current
Mln. | Max.
-0.5 ' 0.8
2.2 • VC(;).5V
0.15
2 A
i 10
¿10
j MO
Unll
V
V
V
V
/'A
/'A
niA
Test Condíliona
Nol"; 1
No!% 2
VIN -VCC toOV
VOUT - VCG 10 J5V
CAPACITANCE (TA = 25°C, Vcc - GND = OV)
Symbol
CIN
cl/0
Parameler
Input Capacitance
I/O Capacílance
Mín. Typ. Max.
10
20
Unít
pF
pF
Test Conditions
(c= 1 MHc
Unmeasuicd |}ins ff.-jmttí lo Vjj
A.C. CHARACTERISTICS (TA = 0°C to 70°C, Vcc - 5.0V ±5%, GND « OV)
Bus Parameters (Note 3)
READ CYCLE
Symbol
1AR
1RA
'RR
'no
tDF
*RV
P a r a m e t e r
Address Siablc Beíore READ
Address Hold Time íor READ
READ Pulse Widih
Data.Delay Frorn READl4 !
REA'D to Data Floating
Recovery Time Belween READand Any Olher Control Signal
82
Mln,
50 '
5
•100
25
1
53
Max,
300 '
125
82.
Mln.
30.
5
300
25
1
J3-5
Max. ]
ii
200
100
Uní!
ns
ns
ns
¿/s
9-315
Unte!' 8253/8253-5
8253 READ/WRITE PROCEDURE
y/rile Operat lons-^e syslems so f tware musí progrnm oach countei.oí Ihe'8253 wtth Ihe mode and quantity desired. The program-'m»r mu»l wrlla out to tho 6253 n MODE con u oí word andtrie programmed number oí counl regisler bytes (1 or 2)"prior to aclually using the seíecled counter.
.-rué actual order oí Ihe programrning is quile flexible.;Wriling oul oí Ihe MODE control word can be ¡n any•" jequence oí counter selection, e.g.. counler flO does not
have lo be lirst or counter «2 last. Each counter's MODE'.'Vontfol word regisler has a sepárale address so Ihat ilsloadíng is completely sequence independen!. (SCO, SCI)
.ju--j-tlhe loading oí (he Count Register with Ihe actual count"^alue. however. musí be done in exaclly the sequence• programmed ¡n Ihe MODE control word (RLO. RL1). Thisí loading oí Iho counlef's counl regisler is slili sequence^.Jndependenl like Ihe MODE control word loading, bul
a seíecled counl regisler is lo be loaded it mus^ bewilh the nurnber oí bytes programmed in theconlrol word {RLO. RL1}. The one or two bytes lo
¿be loaded in Ihe counl register do not have lo lollow theJ associated MODE control word. They can be programmed"" it any lime (ollowing the MODE control word loading as; long as Ihe corree! number of bytes is loaded in arder.
••[Al! counters are dov/n counters. Thus, the valué loaded! Into the coun! regisler will actually be decremenled.![loading all zeroes into a count register will result in the;; máximum count (2H lor Binaiyor 10'lor BCDJ. InMODEO] the new count will not reslarl until the load has bcen.» completed. It will accept one oí two bytes depending oni how the MODE conlrol words (RLO. RLl} are program-£ med. Then proceed v/ith Ihe reslarl operalion.
MODE Control WordCounler n
t co Counl Reyiiior byteL-^>" f,
Countar n
M_ Count RegisterbyteCounler n
Note: Foimai ihown íi a limpie exaniple o( loading Ihe 8253 ond
docs nol imply lliat il ii Ihe only (orn«i ihal can be uied.
Figure 8. Programrning Formal
No. 1
No. 2
No. 3
No. 4
No. 5
No. 6
No. 7
Na. 8
No. 9
No le; Tarr¡s
MODE Control WordCounter 0
MODE Control WordCounter 1
MODE Control WordCounler 2
• Count Ruyisttít ByteLSB
Counter 1
Counl Register ByleMSB Counter 1
Count Register ByteCountor 2
Count Hetiister ByieMSB '
COUIIILT 2
Count Rüfjistei UyleCouiUfir 0
Counl RKiiislrii ByteCounlüi 0
A1
1
1
1
0
0
1
1
0
0
A'O
1
1
1
1
1
0
0
0
0
ne excluiiuc atiriresscí oí each counur'i counl legisler makoie laik of p<ogrüinmIrHj Ihe ü'253 a v*ry limpie moilof, ntx!j*¡rnum •Üecllwumnl ih«dp^!cíw¡||n!ul[il ihii 1 «a tur*fully utili/ed.
Figure 9. A l té rna le Programrning Formáis
9-313
8253/8253-5
A.C. CHARACTERISTICS (Conllnued)
WRITE CYCLE
aymbol
'AW
[WA
lww
IDW
IWD
IFW
ParflrnBter
Address Siable Bc fo ie WRITE
Address HoldTlmc for WRITB
WR ITE Pulse Widih
Data Sct Up Time tor WR ITE
Data HoldTimfi (or WRITE
Recovery Time Between WRITEand Any Other Control Signal
(1253
Mln.
50
30
4OO
300
40
1
Max.a
Mln.
.30_ _.
300
250
30
1
3.6
MRX. Unlt
ns
ns
ns
Di
ns
CLOCK AND GATE TIMING
Symbol
[CLK
tpvVH
1PWL
tQW
IGL
IGS
IGH1OD
IODG
Parameter
Clock Period
Hígh Pulso Width
Low Pulse Width
Gate Width High
Gate Width Low
Gate Set Up Time to CLK!
Gate HoltJTime Alttjr CLK1
Output Dalay From CLKll4!
Oulput Delay From Gate l I4I
82
Mln.
380
230
150
150
100
100
50
53
Max.
de
100
300
8253-5
Min. 1 Max. '
3BO ¡ ar.
230
150 ,
150
100
100
50 í
| 400
] 300
Unit
ns
m ¡
ns
ns
ns
ns
ns
ns
ns
NOTES:1. IOL n 2,2 mA.2. 'OH = -4oo ^A.3. AC tlmlngs measured al VQH 2.2, VQL B 0-8.4. CL = 1SOpF.
A.C. TESTING INPUT, OUTPUT WAVEFORM
L imiNG iNi'iiiüAiit: urnviMAis jvron *I.(H;.Í; i ApjnmwrlOTi'C O ItMiNG WfASUREWEHlS *Í1L MAÍJi -M ?ÜVlii lt A LOÍÍtC
' ( O O s V K'« * LUCiC O
A.C. TESTING LOAD CIRCUIT
C, INCLUOt S J'G C* WC" *''Cf
9-316
8253/8253-5
WAVEFORMS
WRITETIMING
BATA BUS
READ TIMING
*o-t-" X"
S' \í'úfá'\\M\\\E *;'•''. 4-1 VA"'///£•• • __ . . ' •.-..:.i
O
CLOCK AND GATE TIMING
. O
.
Vi
r^L.l*» . f*-'•
2732A32K (4K x 8) UV ERASABLE PROM
• 200 ns (2732A-2) Máximum AccessTime . . . HMOS*-E Technology
• Compatible to High Speed 8 MHz8086-2 MPU . . . Zero WAIT State
• Two Line Control
. Pin Compatible to 2764 EPROM
Industry Standard Pinout. . . JEDECApproved
Low Standby Current . . . 35 mAMáximum
±10% VccTolerance Available
O
The Intel" 2732A is a SVonly, 32,768 bit ultraviolet erasabie and electricaily programmable read-only memory(EPROM). It is pin compatible to Intel's 450 ns 2732. The standard 2732A's access time ¡s 250 ns with speedseleclion (2732A-2) available at 200 ns.The access time is compatible to hígh performance microprocessors,such as the 8 MHz 8086-2. In these systems, the 2732A allows the microprocessor to opérate without theaddítion oí WAITstates.
An importan! 2732A feature Is the sepárate outpul control, Output Enabie (OE), from the Chip Enabie control(CE). The OE control elimínales bus conlention in múltiple bus microprocessor systems. Intel's ApplicationNote AP-72 describes the microprocessor system implementation oí the OE and CE controls on Intel'sEPROMs. AP-72 is available from Intel's Literature Department.
The 2732A has a standby mode which reduces the power dissipation wilhout increasing access lime. Themáximum active currenl is 125 mA, while the máximum síandby_curren! is only 35 mA, s 70% saving.Thestandby mode is achieved by applying aTTL-high signal to the CE ínput.
The 2732A is labricated wlth HMOS*-E technology, Intel's high-speed N-channel MOS Silicon GateTechnoIogy.
'HMOS is a palented orocess of Iniel Corporallon.
Vcc t
G N D c
V P P (DATA OUTPUTS
Oo-O;
PIN ÑAMES
AO-AIICECE
OQ-OJ
ADDRESSES
CHIP ENABLEOUTPUI ENABLEOUTPUIS
*iC
A'CSCA'Cse*)C*••£
A"C"wC
fiC(1/C
CNl»C
1
7
1
4
!.
L
í
N
1
10
11U
"foi u|nji
'C
ÍJ
3J
31
7D
J732A 1
*,. • ' J
é
i
'3
3vec 'CJ-' «C"JA- &C34i- • CDÓÍ V,, jQ
Dft'f JC3¿í iC3»- oC30, oDC3°*' • °'CJ». o? C.TOi ON"C
_ , -
J í
1 &
t S
1 •t 1
37W j
1 I
« 0
10 9
It ítí 7
13 *
H |1
DVCC3FQM
) MCl»
3 *••
3 *»n»,,DOÉ
ID *ioner3 oíD°*D DS-3 u.
DOJ
«aibildy lü JCDCC iDpm.rd l?í"i f.rHOMt, P(D>IÚ> *n iDUtni Imr |u[>.ii26 Foi comD*tit)'lH> -HH|ní373?A«na32K ROMi. oto.'O* i luceId DHi 76
iomVcc
Figure 1. Block Diagram Figure 2. Pin ConNguratíons
'•H.ICoipoi.lipn Aiturtf
°WIEL CORPQRMIOM
NrH.too'itiOillv l.1i Ifir üif ct Any Ciirf'Hv Oltiei Ihmi Cirtuitiy EmbdOied .n »n Inlfl Pluducl No Omr I Cuculí P»1.n| Lic»n» ,
- J
2732A
r
O
ERASURE CJHARACTERISTICSThe erasure characlerislics oí the 2732A are such Ihatetasure begins lo occur when exposed lo light wíth wave-lenglhs shorler Ihan approxímalely 4000 Angslroms (A).II should be noted thal sunlighl and certain lypes oílluorescenl lamps have wavelenglhs in Ihe 300Q-400QArange. Dala show IhaL constan! exposure to room level(luorescent Hghting could erase Ihe typlca! 2732A Inapproxlmately 3 years, while U would lake approximalely1 week to cause erasure when exposed lo direcl sun-Mght. II the 2732A is to be exposed to these tyoes oí llght-Irig condllions lor extended periods of lime, opaquelabels are available Irom Inlel which should be placedover Ihe 2732A window lo prevenl unintenlional erasure.
The recommended erasure procedure lor Ihe 2732A isexoosure to shortwave ultravlolel llghl which has awavelenplh oí 2537 Angstroms (A). The Integraled dose(i.e., UV Inlenslly X exposure lime) íor erasure should bea mínimum oí 15 W-sec/cm2. The erasure ¡Ime with Ihisdosage is approximalely 15 lo 20 minules using anullovíolel lamp wllh 12000fjW/cm2 power raíing. The2732A should be placed within 1 Inch oí Ihe lamp tubesduring erasure. Some lamps have a liller on Iheir íubeswhich should be removed belore erasure.
DEVICEOPERATION
The (ive modes oí operalion of Ihe 2732A are usted inTable 1. A single 5V power supply is requlredjn Ihe readmode. All Inputs are TTL levéis except forOE/VpP duringprogramming. In the program mode the OE/VPP ¡npul ispulsed Irom a TTL level to 21V,
• Tabíe 1. Mode Selectlon
"""""•^-^PINSMODE^""----^^
Read
SlantJby
Piogtam
Piocram Vetlly
Píogram Inhibil
CE(IB)
VILV,H
V-l
VIL
VIM
OEIV,P(30)
VILDon'l Caie
VpP
VILVPP
VGC|2<)
45
45
45
45
-5
OUTPUTS(9.11.13-17)
Dou-Hiph Z
OIH
DOU*Hign Z
Read Mode 'The 2732A has Iwo control funclions. both of which musí,be logically active in order lo obtaln data al |he outputs.Chip Enable fÜÉ) is Ihe powyr control and should be usedlor device selection. Output Enable (OE) is Ihe outputcontrol and should be used lo gate data la theouíput pms.independen! oí device selection. Assuming that addressesare stabje. address access time (tAcc)ls equal to ¡he delayIrom CE lo outpul (tCE). J3ala ¡s available al Ihe outputsalter Ihe lalling edge oí OE. assummg thal CE has beenlowand addresses have been stable lor at !east t A cc— I OE
Standby ModeThe 2732A has a slandby mode which reduces líie activepower curtenl írom 125 mA to 35 mA The 2732A is placed
in the slandby mode by applying a TTL-high signal lo IheC~E~ mput. When m slandby mode. the oulputs are in a highimpedance state. independen! oí the OE mput.
Output OR-TieingSecause EPROMs are usually used in larger memory ar-rays. Intel has provided a 2 Ime control lunction that ac-commodates this use of múltiple memory connection.The two.line control lunction allows fora) Ihe lowest possible memory'power dissipatlon. andb) complete assurance that output bus contention will
nol occur.
To use these two control Imes most elliciently. íl isrecommended that CE (pin 18) be decooed and used asIhe primary device selectmg lunclion. while OE (pin 20) bemade a common conneclion lo all devicos in the orray andconnected lo the READ line trom the system control bus.Thls assures Ihat all deselected memory devlces are in•Iheir low power slandby mode and that Ihe output pins areonly active when data is desíred Irom a parlicülar memorydevice.
PROGRAMMING (See Programming InstructíonSeclion lor Wavelorms.)
Programming is the same as ¡ntel's 450 ns 2732 except forthe programming voltage. In (he program mode Ihe 2732AOc/Vpp inpu! is pulsed (rom aTTL low level to 21V (25V lorthe 2732). Exceedlng 22V wlll damage the 2732A.
Iniílally. and aller each erasure, all bits oí Ihe 2732A arein the "1" state. Dala Is introduced by selectiveiy pro-grarnming "O's" into Ihe desired bil Iqcations. Allhoughonly "O's" will be piogrammed. both "Vs" and "O's" canbe presenl in Ihe data word. The only way lo change a"O" to a "1" Is by ullraviolel llghl erasure.
The 2732A is in the programming mode when Ihe OE/VPP
mput is at 21V. U is required Ihat a O 1 pF capacitor beplaced across OE'VPP and ground lo suppress spurious.voltage transients which maydamage the device.The datato be programmed is appiied 8 bits in parallel lo Ihe dataoutput pins. The levéis required lor the address arrd datainputs are TTL.
When the address and data are slable. a 50 msec, activelow. TTL program pulse is appiied lo the CE input. A pro-gram pulse must be appiied at each address locatlon to beprogrammed. You can program any localion at any time—eilher Individually. sequentially. or a! random. The pro-gram pulse has a máximum widlh of 55 msec. The 2732Arpyst not be programmed with a DC signal applíed to IheCE mput-.
Programming oí múltiple 2732As in parallel with thesame data can be easily accomplished due lo the simpli-cuy of Ihe programming requirements. Like mpuls oí theparalleled 2732AS may be connecled lopether when Iheyare Dtogiammed_wllh the same dala. A low level TTL pulseappiied to the CE mpul ptograms Ihe paralleled 2732As.
inte! 2732A
r
o
Program Inhibit
Programming oí muliiple 2732As ín parallet wilhenl dala is aíso easily_accomplished. Except lor CE. alllike inpuls (íncludlng OE) oí the paralle! 2732As may becommon. A TTLJevel piogram pulse applled lo a 2732A'sCE input wlth OE/Vpp at 21V wfll program iha! 2732A. Ahigh leveí CE inpul inhibils the other 2732As ¡rom beingprogrammed.
Program Verify
A veri (y should be performed on Ihe programmed bus todetermine Ihal Ihey were correclly programmed. Theverily is accompiished with O^/VPP and ÜE at V[L. Dalashould be verlfied IDV alter the laüing edge oí C~£.
System Consíderatlon
The power swltching characierislics oí HMOS-E tfPROMsrequire carelul decoupling of Ihe devices.Thesupply cur-rent. lcc. has three segments thal are oí interesl to thesystem desígner—Ihe slandby curreni level. the activecurrent level. and the ttansient current peaks thal are pro-duced on the falling and rising edges oí Chip Enable. Themagnilude oí these transient current peaks is dependen!on the outpul capacilance loadmg oí the device. Theassociated transienl vollage peaks can be suppressed bycomplymg with Intel s Two-Lme Control, as detailed inIntel s Application Note. AP-72. and/or by properlyselecíed decoupling capacilors. !t is recommended thal a0.1 ¿iF ceramic capacitor be used on every device betweenVcc and GND. This shouid be a high írequency capacitoroí low inherent inductance. Iri addition. a 4.7 uF .bulkelecírolytic capacitor should be used between Vcc andGND lor each eight devices. The bulk capacitor shouldbe located near where Ihe power supply is connecled tothe array. The purpose oí the bulk capacitor ¡s to over-eóme Ihe voltage droop caused by the induclive elfecis o(the PC board-traces.
O
2732A
ABSOLUTE MÁXIMUM RATINGS*
Tempcraluie Undcr Blas - 10'C to * -80"CStüiageTempera!ure -65"Cío -M25'CAll Input or OulDul Vollages with
Résped loGiound •*• 6 V t o -0.3VVpp Supply Vollage wllh Respecl lo Ground
Dufing Piogramming + 22V lo -0.3V
'NOTICE. Stresses above Í/IO.TO ittted under "AbsoluteMáximum Ftalmgs" may cause peimanent tíamage ¡o ttieüevice Ttus is a stress lalmg only andlunclional operationoí ¡he dcvice af these oí any olltei conditions above Ihoseindicated m the opetaítonul secíions oí ¡hts speciiicattonis no! implied fiypusu/e to absotuie máximum raímg con-dttions Sor extended portods may allect device retiabtliíy.
DC AND AC OPERATING CONDITIONS DURING READ
Operalmg Temperalure Range
Vcc Power Supply
2732A/A-2/A-3/A-4
O C - 7 Q C
5V - 5%
2732A-20/A-25/A-30
OC-70'C
5V = 10Q0
O
READ OPERATION
D.C. CHARACTER1STICS
A.C. CHARACTERISTICS
I.L
'LO
'cci
'ce?
V,i
VIH
VOL
V0H
Input Load Curren!
Ouloul Leakape Current
Vcc Cuirenl [Slandbyl
Vcc Curren! (Active)
Input Low Vollage
Input High Vollage
Oulpul Low Voltage
Oulpul High Vollage
Mín.
-01
• 2.0
!
2 ¿
LimilsTyp.l') Max.
10
10
35
125
0.8
Vcc-1
0.45
yA
uA
rr.A
mA
V
V
V
V
V(N = 5.5V
VOU1 ^ S.SV
CE = VIH.OE = V1L
OE = CE = VIL
1OL = 2.1 mA
IOH- -400 ^A
Symbol
Ucc
'CE
IOE
'o.121
1OH
Parameter
Address to Oulpul Delay
CE loOutput Delay •
OE toOulput Delay
OE High to Outpul Float
Oulput_HpId Irom Addresses.CE or OE Whichever OccurredFusl
2732A-22732A-20
Mln.
0
0
Max,
200
200
70
60
2732A2732A-25
Min.i Max.
250
2732A-32732A-30
Mln.
250 |
, 100 ¡
0 ¡ 90 . ! 0
0 :
i0
Max.
300
300
150
130
2732A-4
Mln.
0
0
Max.
450
450
150
130
Unlts
ns
ns
ns
ns
ns
TeslConclilions'
CE -- Oí - Va
O E - V I L
CE = VIL
CE •= V1L
CE = OE = Va
2732A
•A.C. TEST CONDITIONS
Outpul Load l TTL gale and CL = 1 00 pF
Input Rise and Falf Times <". 20 nsInput Pulse Levéis 0.45V lo 2.4VTiming Moasuremenl Relerence Leve!:
Inputs 0.8 and 2.0VOutpuls 0.8 and 2.0V
CAPAC1TANCE121 (TA = 25'"C. f = 1 MHz)
Symbol
ClMl
ClH2
GOUJ
Parameler
Input CapacitanceExcepl OE/Vpp
OE/VPP InpulCapacilance
Ouipul Capacitance
T.yp.
4
Max.
6
20
12
Unlt
PF
pF
PF
Condltlons ;
V,rj = OV
Vit; ;- OV
VOUT = ov
A.C. TESTING INPUT, OUTPUT WAVEFORM
1 IESI POIHTS
»C ItS'tNG 1' UT.tnt DRivEUA' 'JVf..»liL'td'C ' ANf U JSv'O»* tOG'l ( nui'íG >.'[*Siif|M['J'S AMF tSW: A' .'Ow M1» * KXiH <A'ÍÜl'ev ftiR ALC'G .'
A.C. TESTING LOAD CIRCUIT
1
2732A
WAVEFORM
NOTES;1. Typical valúes are for TA - 25°C and nominal suppfy vollages.2 This parameler is oniy sampled and is nol 100% lested.3 OE may be delayed up_to Ucc^'oe a"Bf tne f^lling edge o( CE wllhoul impactmg Ucc-4. IDF is specflied (rom 0£ oí CE. whichever occurs lirsl.
PROGRAMMINGD.C. PROGRAMMING CHARACTERISTICS15' (TA E 25 = 5eC.Vcc = 5V = 5%. VPP « 21 V = O.SV)
Symbol
'u
VOL
VOH
Ice
VIL
VIHIPP
Parameler
Input Curren! (All Inpuls)
Oulpul Low Voilage Duflng Vetlly
Oulpul High Voilage During Verlly
Vcc Supply Currenl
Inpul Low Level (All Inpuls)
Input High Level (All Inpuls Fxcepl OE/VPP)
Vpp Suppíy Curren!
Llmlls
Min.
2.4
Typ.
85
-0.1 |
2.0 |
1
M»x.
10
0.45
125
0.8
VCC-M35
Ünlis
pA
V
V
mA
V
V
mA
Tes! Condltlons '
V|N=V|L°rVIH
IOL=2.1 mA
IOH= --IDOjjA
"CE=V|L. ÓE=VpP
NOTE; !5, Wnen proorafnfiilng the 2732A. a 0,1 F capacitor Is icqultod acfossOE'VPP and o'ound to suppress spurious voltage Iranslenls
which may damitge the dovlce.
2732A
A.C. PROGHAMMING CHARACTERISTICS (TA = 5nC, Vcc = 5V = 5%.VPP = 21V • O.SVj
Symbol
Us
IOES
tosUH
"OEH
'OH
ÍOF
IDV
IPW
tpRI
IVR
Parameter
Address Setup Time
DE SelupTime
Dala Setup Time
Address Hold Time
OEHoldTime
Data Hold Time
Chlp Enable lo Oulput Float Delay
Data Valid from CE
CB Pulse Width During Programming
GE Pulse Rise Time During Programming
VpP Recovery Time
Límits
M¡n.
2
2
2
0
2
2
0
45
50
2
Typ.
50
Max.
130
1
55
Unils
HS
MS
MS
fJS
MS
ps
ns
ps
ms .
ns
ys
Tesl Condllionsf
!
CE=vlL.üE = vIL
|A.C. TEST CONDITIONS
o-
O
Input Timing Relerence LeOutput Timing Relerence
WAVEFORM
PROGRAMMING
— .
AOORtSSES Y
DAIA • /
/
10 MÍ "*
V...
vel ..,,,,.,_evel
.. 0.45V
.. 1.0 í...0.8 í
'lo 2.4V.ind 2.0V 'nd 2.DV
HD»ROCA*y i
ADDHISSN
Ui¡;
«OÍ, K(2,
¡:
.
; IHt INPI.il UMINi!
\l
DMA IfJ S l A R l I
¡ '
AHÍ Mlf>MRiNCI
/
tsl\J
17
ky
\. 7
\ Í5r 1
NItM AN[I IN. SIL UNÍ IKM1IHI H*VI1 1 r. iv- Mil A v(1 AM(( '/v itm n
v£c"" -1
:Ki1
A O A 1 A O U ' VAHO V\D s y
0 "" /
/
i
o
o
HM6264P-10, HM6264P-12,HM6264P-15 r
RAM'
• FEÁtUNES ' ""M'T• fait acceii,Tlme ;/¡X.Í• LoW PoWor Standby ;:.,,
"i i>* I ''Low Powar Op9f»íldn. ¡.v
. ,';100ni/120ni/lBOni (rnax.) "i ' f . Standbyi , 0,1mW (typ.),,.
... Operátlng: 20ÜmW {typ.J '..
• Compieteiy Statlc Memory'.,. ,*. No cfock or tlmlng Strobé Requlrad• ÉqualÁcceii árid Cyclfl Tima,,/.') ",. i".'"!'"*.. . - ' * « ' } . . ' " ' • " • '• Cbmmon.Dafa ínpdl knd Ouíput, Threa State Output • •.; ! '*• .ÍDirflctly TlL Compatible! 'All Inpüt ánci Output, • ' . - j . " - " ' , , ,.-'." ,• Standard 28pín Package Coníiguration• Pín Out Compatible vtíth 64K EPROM
• BLOCkblAQRÁM
1. ¿
i ÁBSOLÜTÉ MÁXIMUM RATlNlQS
• • Iteni ' : " "'•* '.-'''Totmlnil.Voltigc *,• ;~ ~-¡ —Po werDIn lp iUon , . . ' , . . j , .,/',,Opeíatifig Tcmpentuic '"1 jStoi»i« Temp«r«tut» i\i>\3tort|e Tcmpcriture (Uudcr Blat)
Symbol- - K r -./T .
' ' Topr. r»tt -i.-, ñu»»
Ratbig-0.5 •Mo+7,0
• i.o . .Oto +70 .
-55 to-H25-10 to ,t85
UnltV
w . . «' Kc •"
• t Bc •"*c
WlUireipecttoGND. '" •
Pulse width;f' ! 1
thÜtHTÁSLE"".^;'' ^.r-
(DP-28)
" PIN ARRANGEMENT
(Top Vicw)
WE'XXHH -
L .1
TX¡HXLLLL
CS,X .L ..HH
H
H
SíX .
•xt..H •
UH,L-
'! -. Modc , 'NotSelcclcd' ;,.(PqWcr Dowiij _ .Oulpul Ofjjiblcd. .Read. .. . ¡
Wtllé ('' : I ". ¡•i ' -' i "• '
,-.. I/O PinHIghZHlgKZHlgh ZDoutDin ,Din
YCC Cutrcnt/SB./SBl
/SB, /SB2
/CC, /CCI
ycc,/cci, . /ce, /cci
/CC, /CCI
. Note . ,
,
- < - i . 'W r l t e C y c i c ( l ) . . ..WiUo Cyclc (2) . .,
HITACHI 207
AffV4U*r< («i iiwiu*y>y;ft4j IJMU^UHJ'-IU .," .•'-/;.! ;(.".j 'UM ,v ,' «'' u Tuv,.. ,. ! 0 , ; V - , ,• . v . j .,,.
• RECOMMENDED DC OPERATINQ CONDITIONS (Ta - 0 to +7Ü°£) )( --J ¿v • .;„: ¿pt . ' • _ . . «, ,¡. ;. ^
' •• ' lUm
Supply VolUge
Input VolU|i ' •"
Symbol
VccCND
VIHVIL
mln4.5
02,2
—0.3'
typ3.0
0
-- '
max3,5
06.00.8
Unlt' '-'" • J »" •*""•«*•(•«,- * : í Tíiin n
v . : , • 'v . . . . . ; . .. / , . .
v "•. '' ~" \• •" ' » • • " • '''•; l" PuUaWIdthSOni: -3.0V ' 1 l " '" ; ''" " - f c j - ' 1 " 1 - 1 1 ' t •" '" . .u- . . '
p DC AND OPERATINQ CHARApTER|STICS (Vc¿ " 5Y±10%, GND - OV, Ta - O to +70°C)
! I'!/??1.-' ítem 'j InpUt L«»ka*e Curten t
! Output L«akii¿« Cu{rint ' . • • .
1 Opentlng Powei Supply Cuncnt
Avciago Opei*Üng Gummi
Standby Powei Supply Cunenl
Output Vojt*4C ) ' i
Symbol
i/ai1
l/¿ol
IceleafSB •
ISBl**
/SB2»*
KOL
VQH
TtitCondltlon
K(f,-CND to Kcc • ' •*'<•' '" '"/• ' . > ' • • ' •
CSl-Kj/í oí CS2-K;z. or OE-K/H Kj/o-GND'1
C'Sl-Kjz,, CS3-K/H. ///o-OmA 1|r'l '' ' ' '[ '
Mln. cycle, duty-100%, CSl-Kji,, CS2"[/j/i
CSl-KjW or CS> K/t. ///o-OmA
CSl^KCc-0.2V,CS2^Kcc-0.2V«CS2á0.2V
CS2¿0,2V • : j ¡ i
/OL"2.1mA-í- i - u !. j - :
/OH"-l.OmA ¡ 1 - j ! ..
mln
•- '•
' i - i— í
-
-
-'.
'-
-
2.^
typ'•,
' r '•40
60
1
0.02
0.02
-
-
m«- 2.. t i .
80
110
3
' 2
2
0.4
-
Unlt •
MA '•
WA j
mA
mA
mA
mA
mA
V
V
• «* K;tmln--0.3V '•• ! • ' . • ' • ' '" ' ' ' - * '• '
• CAPACIJANCE (T- IMHz, Ta - 25°C) '
• • .- ítem 1'Input CiptclUno 'Input/Output Capacltancfl
SymbolCtn
O/o
TeitCondltlonVtn " OVV i/o - OV
''¡••••'••F'^^4'''typ
-
m.txe !8 •
UnU'".'¿'.':PF ! J ! .pF - ~(. ....
• i-.-
tr
Not*)ThiipEísUTieter U wunpled uid not 100* teited. •_''•••
• AC C'HARACTERISTICS (vcc • 5V±io%, r« - o to +70°c|• AC TEST CONDITIONS : , . !
Input PufM Ltvili: 0£ to 2.4V
• Input RIjf «nd Ftll Tlm«; lOni, |nput «nd Output Tlmlno Rfl(»r«nci Ltvil: 1 .BV
Output Lo»d: 1TTLG»u.»nd C¿." 100pF ilncludlng wopt tnd flg).• READCYpLE > '"' ' : ';lt ''
J
. • . 1 1 ; .ítem M ,! '
Rotd CycUTlmc 1 • ' ! ' ! '
Addreu ACCCÍI Time '
Chlp Sílecüon lo OutputCSTCS 2
Ouiput EnibU to Output Villd ;
Chlp S«tecüon tó ¡ "Output I n L o w Z !
CS1 "'
CS2 •
Outpul Emble to Outpu t ln LowZ •'' •
Chip Dcwlc: Output ln t
•i \n to ¡
i l g h Z ' *CS1 "
• CS2
Output Dlublo to Output ln HiKli Z
Output Hold ftom Addieu Chinge
Symbol
(RC
IAÁ¡COÍ
ÍCOS
tOM
.¡LZl
iLza
lOLZ
tHZl
tHZ3
'OH2
'OH
HM6264P-ÍQ
' mln
100
-
-
-_• ' '
10
10-
• I * -- O" '
• 0
0
10
.mix1 1 • »
100
100
100• 50 -
- -¡- .
. 35 '
33
35
-
HM62$4M2 'mln i
120 :
, _
-
-
10
10
5
0
0
0
10
ma?t
-' 120 '
"I2Ü "
120
-60
.. i~* i ••- .
40
40 '
40
-
" HM6264P-13
mln .
150
-
'. -i ••
..•; 13 .., 15
'l\¡ '. V 0 '
• o0
15
m*x
130
150
150'
• 7 0i
__ 1
-50
50
50_
UnJt í'1... .. • ,i '
nini '
. ni
'•ni '!""
'n i • '
. ni
ni ,
'- ni "•
ni
ni
ni
ni
NOTES: 1 ÍHZ "ní* {OHZ **e dcflii»d u tht tlm« »t whlch the outputi »chiovc the open cuculí condiüon wid «e not i'eferrcdto output voltaje leveU.
2 At any glvcn teniperiturt tnd volUjí condición, ÍHZ mtx U ICM Ulan ilz mln both fof • glvcn dovlce and froradevlca to device, i . " '
20B ® HITACHI
HM6264P-10, HM6264P-12, MM6264P-16
Dout
NOTE: DWEUhl jh ío r 'Read tycl. ' ' ' ; ' '''' ' - ' • "- '• 'VVÍ - . Í - Í - - ¡i.. •- .i ' f
* ' '. ' ' • • - , ; • • \ • • • ; - . ',1' .' - T r •''.¿V -I. •' • • • : - . . <
• WRITECYClE
- •'.' ' • í : í tem' -: "••'. ' 'V
WriteCyclcTlme • ".. " . ; '
'*, -i ChlpSclectíon (o End ofWrl te • • ' , . . . - . . .
! ; , AddreiiSatupTIme . '• - . ,
A d d r c j i V i l I d l o E n d o f W t U e > • .'
. ; WriíePulwWldth >j.¿!... \
Wríte kecovérV Time •'.'.: • - .«. -. ' . M-
Wrlte t o O u f p U t l n H i g h Z
CS1.WE
•-,CS2 -.),- t i . • : . ' • . • ; •
/ DititoWriteTlmeOveilip , i
DaU Hold ftom Wrttc Timo • i • ' • •
. - ÓÉloOulput ln H l g h Z ' ; :
_' Output Active from End oí Wrtte
.Symbol
' *WC
'cw
•tÁ9
tÁW
1VP '
IWRI •
IWRS .
1 ÍU'HZ
IDW'DH*OHZ
tow
HM6264P-IO
, mln
100 ¡
. 80 ._
0
. • 80 i
60
5 '
15 1
• 0 '
40
. 0
, 0 •
3 ;
max•: , .
.-
-
. . - "-•i.
-
-
• 33
-
-35
-
HM6264P-12
mln
120
85
0
85
70
• 5
15
o.30
0
0
3
max
-
-
-
-
-_
_
40
-
-40
-
HM6264P-15
mln
1 150
100.
0
100
90
10
15
0
60
00
10
max-
-
":.-
--_
. 30
-
.. -,
50
-
Unlt _ .
ns
ns
ni
ns
n*ns
ns
ni '
ni
nsns
ni
0JHITÁCHI 209
HM6264P-10, HM6264P-12, HM6264P-15-
. WRITECYCLE MI (OE clock)
' WRITE CYCLE (2) (OE Low Flx)
O
o
NOTES; 1) A_write occun duiins Ule ovetlap of a iow CSÍ, a jijgh CS2 and a lowWE. A wtile beginj at thc lalest transilloii aJitong CSI gomg low, CS2gotng high and WE goíng low, A write eridj at the cailkst transí lionainong CSÍ güüig liigh, CS2 gotng luw and WÉ golng high. IWP iimcasurcd froni Ule bcgiíinlnilg of wrítc to tllc end of write.
2) ¡cw I' nicasured froin tlic latcr of CSÍ golng ¡ow or CS2 gouig Iii li tothc cnd of wrltc.
3) t¿s '* incasuicd froni thc addicis viüd to thc bcgiimlnjí of write.4} /n'R U mcasurcd (rom Üiu cnd of wiUcJo tllc addicss cíiajtuc.
'WHl appliei in case a \vrltc cndi al CSl or WÍtgoíiig liigh.'U'/12 applici In cate a willc cndi at CS2 goíng low. ,.
5) Dmiiig this pcilod, I/O pinsaic ín Ihc oulput slatc, t]icieforc thc ínputsignáis of opposltc pilase to thc oulpuh inusl not be applícd. ._'
6) lf CÜ1 gocs low simultancously wilh WÉ go'mg low oí aftct WUguinglow, tlic putputj icinain in liigli tinpcdance statc,
7) Doul is in tlic same phasc of wrlllcn data of this cyclc.8) Dout is thc rcad data of llic new addrcss.9} lf CSÍ' ¡s low aiid CS2 is higll durlng thls pciiod, 1/0 pins are in llie
output stülc. Thcrefüie, Ihc Ínput signáis of opposíle phasc lo theoutpuls must nol be applicd to thcín.
210 •HITACHI
National - , • • • • ' • • .Semiconductor- , - • . • • < - ,Corporation. . , , , . • , • • ¡
OACÍOOO; DACIOOli DÁC1002, DÁCH006, DAC1007,OAC1008 |j,P Compatible,Double-Buf fered D tó A ConverlerfeGeneral Descrlptíbn ';..,"!'.':!,; !The DAC1000/1/2 and , DAC1006/7/8 are advancedCMOS/SI-Cr 10-, 9- and 8'-btt accUiate multlpiylng DACawhlch are dealgned to Interíace dlrecíly wlth Ihe 8080, B048,0085, 2-80 and other popular mlcroprocossors. TheseDACs appoar as a rnembfV lobátlon or en I/O port to Ihe |iPand no Inlerlaclng loglc Is needod. • ; . {¡ É| -
Ihese devlces, comblned wlth an extemal ampllllei ,indvoltage relorence, can be used BS standard t)/A,convérlers¡and the y are very eltracllve lor multlplylng' •ppllcallona(such as dlgllally conlrolled galn blocks) slpce thelr llriearltyorror Is ossontlally Independont oí Ih0 vbllage reíeronce.They becomo equally attiacllve In audlo s'lgnal procósslngoqulpmenl as audlo galn conlrols or as programmable al-lonualors whlch marry hlgh quallly audlo ¿Ignal procéssinglo dlgltfllly baped ayalems under mlcroproceaéor control,All oí Ihese DACs are double bulfered. They can load all 10bus or lwo 8-blt bytea and the data lormat can be elther rlghtjusíilied or Iflíl |ustllled. The analog oectlon oí these DÁCa Isessonllally Ihe same as that oí ihe DAC1020. \o DAC1000_serles aie'lhe 10-bl( members oí a larnlly oí
microprocessdr-compatlble DAC'S (MICRO-DACTW's), pornppllcallona requlrlng other fésolutlons, Ihe DACOB3Q Borles !(O bits) and the DAC120B and DAC1230 (12 blls) are avall- .nble alternativos. : ,• : ' ! . i '•
Features ../. • • •• Uses eaay to ad|uat END POINT apees, NOT BEST;' STRAIGHT UNE FIT
» Low power consumptlon • (
O Dlrect Irlleriace lo all popular mlcroprocessors.h Intogratód tilín Illm on CMO3 s'Uucture '• Double-bulíered, single-buHered .or llow Ihrough digital(, dala Inputs,B Loads lwo 8-blí byteg or a single 10-blt word.• Loglc Jnputs whlch meel TTL vollago level apeos (1.4V.t . loglc Ihreshold)... „ . . • •• Works wllh ±10V relerencs— ful! 4-quadrant mulllpllca-
-• tlón. i |• Oporatea STAND ALONE (Wlthout iP) l( deslred.• Ayallable Iñ 0.3" slahdard ¿0-pln and 0.6" 24-pln pack-, age. ' /• Diflersnllal nort-llnearlty Belecllon avatlable as speclal
order, • • ' .
Píirt ^
D AGÍ 000
D AGÍ 00 1
DAC1002
DAC1006
DAC1007
DACÍIOOB
Accurncy(bliit)
' ; 1Ó-.".
9
8
10
9
8 - ..
Pin
,24
' i» •'.ZG
iDaacrlptlan
t
Has all 'loglc , (
featuros t
For lolt- • rtjuslllled ' i -data _
Key Spéclflcatlóris• Oulpul Currehí Seltllng Time» Resolutlon» Llnearity
. . i • • '<u Galn Tempco . . , •• Low Power Dlaslpallon
(Includlng laddor) • , •• Single Powor Supply
500 nsj 10 bits
10, 9, and 8 blls' (guaranteed over lemp.J
-0.0003% of FS/'C20 mW
5 lo 15 VDC
o>O
Oooo3»Ooo
O— t,ooN)
OooO)
a>ooo-*J• ,a>o__toC3co
Typical Application;COM1ÍOL»UÍ
Cí
• DAC1006/1007/Í008
'M I t •' '
•oVoui j
MOTE: FOR DETAILS OF BUSCOMNECTlOM 5EE SECTION 6.0
4-41
ooO<rQ
r-o1—O
UD
O
QCN0OT—
O
ooo•fCn-- .O0O
CJ
n
Absolute Máximum Flatings iwoius i ¿tajU Mllilary/Aeroupace specilied devlces BFO required, ESD Suscoplibility (Noto 11} 800V
contad tha National Semiconductor Sales Office/ Load Tomp. (Solduiing. 10 soconds)Distributor» lor avallablllty and «peclflcatlona. Dual-ln-Uno Pachayo (plástic) 260'C
Supply Volfofjo (Vcc) 17 VDC Dual-ln-LÍno Packago (coramlc) 300"C '
Vollaga al Any Dloital Inpul VCG lo GNDVollDfloalVHEFlnput ±25V OpCfatíng RatingS (Nolel)
StoiaguTomporature Rango -65'Cto -MSO'C Tamporaluio Runga TM)N ^ "A •- TMAXn i rv i ,r 1 1- ™-.,- /M , n. e™ i.. Parí iiuiiibofs wilh 'LCN* sutllx 0*C lo 70"CPackago D^lpatlon at TA- 2S'C (Mola 0) 500 mW par( nu(nbflfs w|m <LCJ. su[[¡x _ 4Q.C ,Q + 85.c
DC Vollugo Apellad lo buri orloura Parí numbors wilh 'U' sufllx -5¿°Cto í-125'C
ÍNol° 4) ~ 1°° r/V to VCG Voltago at Any Digital Input Vcc lo GND
Eleclrical Characterísücsl'esled at VCG - 4.75 VDC and 15.75 VQC, T/, * 25"C, VHCF-IO.ÜOO VQC unluss olhBiwIso noted
Pafainetor
Ht nolution
Linoufity Eiror
DilíüfanlialNonlineatily
Monotoniclly
Gain Error
Guiri Error Tempco
Powor SupplyRolücllon
Ruloronca InpulRusislancü
OuipulFüüdílHouyhError
Output IQUTICbpacil¡-infa ¡t;UT2
bun'OUT2
Supply Curiont Drain
Condltlon*
Endpointntíj'uslonlyTMIN^TA^TMAX™* 1 0V *"* Vf' i '— ¿ ~i' 1 0V
DAC1 000 and 1006DAC1001 and 1007DAC100Ü and 1008
EndpointaüjuslonlyI"MIN<TA*Í TMAX• lOVí.Vf^ppá + 10V
DACIOOUand 1006DAC100I and 1007DAC1002 and 1008
TMIN<TA<TMAX— IOV¿VH^P¿ •*• lov
DAC 1000 and 1008DAC100I and 1007DAC1002and lOOB
UsínglnlernalRib-10V£VfirF£ + loV
TMIN^A'^TMAXUsinglnlernal RK,
All digital ¡npulslalched hiyti
Vcc=14.5Vto15.5Vll.SVto 12.5V4.75V lo 5.25V
^'RUF = 2UVp.p( Ira 100 kHz
See
4,7G5
4,765
4,65
5
6g
Alldatalnputs jlatched !owD PackajuN Packufje
All data Inputalalchad iúw
All data Inmutalalched high
TMIN-^A:* T"MAX 6
lo 15VDCÍ5%
Mln.
10g8
-1.0
10
Typ.
±0.3
-0.0003
0.0030.004
15
1GO90
6025025060
0.5
Max.
10
0.050.10.2
Ü.10.20.4
1.0
-0.001
o.ooa0.010
20
3.5
VC C=5VD C±5%
Mln.
10g8
-1.0
10
Typ.
±0.3
-0.0006
0.033
15
130GO
6025025060
0.5
Max.
10
0.050.10.2
0.10.20.4
1.0
-0.002
0.10
20
3.5
Unlti
bjls
% oí FSR% oí FSR% oí FSR
% OÍ FSH% oí FSfl% oí FSR
bitsbitsbits
% oí FS
% of FS/'C
% FSR/V% FSR/V% FSR/V
kíl
rnVp.pmVp.p
PFpFPF !PF
mA
l
4-42
ÜA
C10
00/D
AC
SJ c c o O — CI o >—
' o í o tr. O C u Ü
c 3-
t> U) O n tn O ."
SjS
•i
wi
0 ü
X co y o. >- H- c 2
c
c
o
oN
CM
i
x !
oo
c 5 Q.
O
OCM
O
J
i > i
;. T
- ¡ •
}!
o c-
! ^ -U C Ü CM < !—
C/0
0u
>—
in
~~
—
U
Q
CD
0
C3
m
37 "^-
"S
83
LJJ
(2
u —
¿ E
» í
0 o
ui 2
ndlU
ons
O E e IC o.
X < c
-a
c -a
t~ —
c V
i m
"í- "r
a Jd
'»
.£2
-; —
— —
—H
<
<
—
(V
o n
3
o 7:
- 2 c. 2
O
ü U
üC
- Q
O
CDCD
O O
o
•co
o.
o" m
"
•
o
CD
(fíx
.2
j=
S
.3
§.
i~
JJ!
"rc
^•^
-^ o
2H
- -J
X
D »
Q.
OC
0)
X 5
"5
ü ü
5 o
_, 10 °
I + ^ S
5 2 7 +
2 o
tD
CD
O5
O C
N2
V A
r-
V)
Wv 3
3<
a. a.
—,
CO
tO
y
O".
_!!
t- b
b
3 tn
£ §
'en O
Q
en c o1 t
n o o Y o r — > J?
rent
Set
tün
'me
o
tr)
tí!C
C
O 0
o m
W
OJ
o c
CV
Ot*j
tn
g g
00
tn c
\f-
C
í
co a
i
" U 3
0 i- M
_j
^>
H
¿ 1£T
9 an
d 5Í
PEu
lse
Wid
lh
•= a
.
c c
o o
r- tn
T-
CM
o o
CM
Oo
ir>
°§
o o
o
r^T- n
O)
|g|
° H
z—
* S
>
í-
_n c E
aS
elU
pT
tn Q
i
tn
tnc c
e^
tnC
C
i
0 O
CM
C
V
o o
co o
o o
'O
CM
o o
O
IOC
M
CM
en
m
^I'
ü 2
> f
,<
B =:
>
f-
_D
aH
old
Tlm
es O
.O 0
O O
O t
n
°g
tr 2
O 0
tn C
Mf-
C
í
ra
>"
X
10 f
i <-
K c
,*•
1 L
O (
^ '• lí
0 I_
V
—1
-^•>
i-
JJtr
ol S
el U
pm
e
o
tfi
tr)C
C
0 0
0 0
1 C-
0
O 0
Oí
13 P
2
0
}~ M
— '
2>
\-
¿? o E
trol
Hoí
d T
o O
cr
•>,
f- ,;
*J
Cí
I
1
b§
S-i
-"
1
1 í.
£
: 3
^
w-g
- *•
>.
=
S~¿
c
t
g
»
SÍ
i^-g
5
CE s
^c
i «
'o
st
r —
5
S
S *
S
=
l/J 3
B
l —
^
"t"
""5
c
" ^
i=
<
+
n
'c
*0
íiO
?1
"
a
'=6
~=
l •
= 2
?
o ^
v
"
~°
-|
"S
O-
o0
-5
"
5 -
g "
S
"*~
o
•g
¿"
ó5
" -2
r ~
"f'
=
"3'
— •
B e
=
'5 ^
•a
"í
O°
íí .2
ñ
3 ""•
c.
*
c'H
t-
:=
"ü
"a
-?
;i^
O
£-
n.P
=
« "
"« i
~-
5
r
V |
f:5
^ |í
1
t ^
t¿'
'^"5
-=>
S?
cI
-t
C-
' Í
"Í
"£
-Í
ñg
0
— í
S>
* T-1 -
JO
,
^
S°
o£
c-
B
*
°~
"=
a
•?
-
«c
•
TÉ s
•=
J2
~
=•?
1 1
1
„>
¿^^=
=.
-§
> ¿
1
5 ¿
B
' ."
¿
=
"5 =
7 -S
Í T
"í
| I
^
i^
sljjis
i5!^
Í3
«
fl |-2
-"^
I^
""o
t^
£^
|l-£
£l
5 ?
—
J5
- c
- U
c^
rí
^^
O*
— =
c
•" ~
S5
"?
s'^
^í.^
QP
fS
^'é
^'u
'ó
m c i
'o
.
g'o
'S
SS
o.-
t ^
7
gl
S^
aj
r.S
.¿
go
|l i |l if
& <
| |1|1í tí f
|?"
lH|í
1
i ¿1 iilflls
i I2
-a
o
E^
S°
5L
"T
í-
Tl~
^=
t^
"^
ll
í^
l||ifilÍtL ti tillé
is 1
^ í
" "
p
"
"g "
«=
f^
"5
"H j,
¿'
¿-
¿'
T- —
£3
5¿
l5
f5
5
¿lIS
í^
^o
c
O
u<Q
Q
UDOO
O
O
CMOO
O
Q
O
Q
Ooo
oQ
Switching Waveforms
CI. imi/tVtE? SDX-V
ICH
Typical Perfoi manee CharacLeristícsError» va. Supply Voltage
DDUO
-.011
-.OSO
-.OÍS
-.100
-.175
fi UHEAtWT EflROR
10
i VDLMPÍ v
0.100
O.OÍ5
X 0.0)0
8 O.OM
fi
ü! -0.02)
g -0.060
-O.Lil
-O.JM,
Errors VB. Temperatura Wrlte Wldth, tw
JS-li í I)
AMBIEKI lEW
it 11 |D9 121
lE |'C|-SS-35-1S í » 4S 65 15 IM I?S,
AMI1EN1 TtMKEfUIUBE ('CJ
Control Sotup Time,
TTTTData SeíupTiine,
-Si 31 -1¡ í 3Í ti Si li 101 1»
AWIIEHI TÍMPtíMÜfll ('C|
Dlgllalllirasholdva. Supply Vollage
Data Hold Time,
'•A:--35-li a ís <5 ES BÍ ios us
U, AMItLMT lEUHftAllMEI'C]
-S5-ÍS-U 1 Í5 11 6Í IS 101 II)
U.AMiKHt UMMHAIURE('C|
Digital InputThresholdvs.Temperatura
!*'" t—:n~r
I.O
a uoX
1 1-J
i ...g0.4
-Sa-OS-lS 5 35 45 »S 14 10) lli
IUITU VOl]í,U[ Yct (VI
4-44
DA
C1000/D
AC
1001/D
AC
1002/D
AC
1006/D
AC
1007/D
AC
1008
u3*
-i1O
T
T
CÜ
— -
5<
S
o
oC
h¿
lr-
4 B
E
m
<f
r*.
~
ot
EU
Fñ
SS
HS
ra w •c -o "5 0> « E o o Ü D
o
or-oo
O
LOoo
a<a
OO
O
Qt—oo
oQCDOO
U
Q
DAC 1000/1001/1002—Simple i íookup for a "Quíck Look"
O + 1 S V Q C V HSV0C
~ LSH 17
•A'IOIALOF (OINPU1 SWItí;tlC3 _^_ ___& iKHESISIOrtS ¿ -VflEl — — — 6-iSVoc
Nal.*;
I- Fu' V|1Lt ' tO IMU Vol: "'« oulpi't -.üUnot) sitias aro ufjpiOMio.iloly Hl >*i\ ««•
2 O{Juiptln n li uol u|i luí llow lliro«ijl>— nú lulcíilny ul iligitul li -ul 'Jala.
3 Su mi.' p -mi oiOuiid ¡tí Hl(0"(jl^ (uciirnriiutiücK).
DAC1006/ IÜ07/1003—Simple Hookup for a ''Quick Look"
p HSYuc
•A TOTAL OF (OuiPurswiTCiiES4 1K RESIS1OI1S 1 r A
TT •=• O - 1 5 V U C
1. F-'of VH(_J. - lU.2-lO.Vou tlio ou![Hit volUga slepa ÜIB approxiinalely 10 niV a>ch
2. SWI la ii tuHinaK/ clowd iwüch. Wtule !3WI Is cloaud, [lio DAC ttijj¡<H»r ¡s lalctiwl utlil rmw tí-ds
cari bo Iti/.Jcd ¡lilo lltu l::pul lulch vlb Huí 10 SA'lí swilchua,
/ilion S'.VI ís Momjii'any op¬1 lliu nuw dülu !i iiiitislwicitl Iioiti Ihe ínfui ..Ucli lo Iho DAC iuyisloi and is InlclurJ wliun S'A'I aijriiti closos,
1.0 DEFINITIOH OF PACKAGC PINOUTS
1.1 Control Signáis (Al! control -.sígnalo a.o levo! aclualed.)
CS: Chlp Sglncl — active lo*. I! "/Ill anebló WR (DAC 1003-1006} or WH] (DAC1000-100Í).
WR or W^T: Wiito — The eclivo low WR (or WfiT —DAC1000-1002) ¡s usad lo load 'ha digital dala bits (Di) IntoIha input lelch. The date In Iha Inpul lalch Is latched whanWR" (or WI1Í) la hlgh. The 10-bH input latch IB splil Inlo twolatchos; ora holtls O bits and (lio olhor holdg 2 bits, ThoBylal /Sylo3 control pin is ussd to eolecl both Input lulcheswhen Bytel/BytoS*-! or lo ovorwrlto tho 2-blt Inpul lalchwhon In tho low siglo.
WR^Extra Write (DAC1000-1002) -> The active low WR£\3 usad lo load the dala [rom ihe input lalch to the DACloglstar whllo XPD1 ia low. Tho data In Ihe DAC roglalerlnlalched when WR2 Is high.Byte1/Byt«2: Bylo Sequance Control —When thls controlis hlgh, all len locallons oí ths Inpul lalch are enabled, Whenlow. only two localions oí Ihe Input latch are enabled andtheae two locationa are overv-rillen on the second bylewrile. On fho DAC1006, 1007, gnd 1008, Ihe Syte1/5yte2muat be low lo transfer the 10-bit data In the Inpul lalch toIhe DAC roglster.XPER: Transler Control Slgnal, fjcilve low — Thls slgnnl, Incomblnallon wlth othets, Is usnd lo transitar the 10-bÍt datawhich Is avallado In the Input Irtich lo tho DAC reglstnr —sea tlmlng diagrama.
LJ/RU: Lell Justlly/Rlghl Jusllfy (DAC1000-1002) — WhenU/PP la hlgh Ihe parí Is set up lor loll ju-.tllled (dacllonal)dala lormnl. (DACI006-1008 have thla done Inlernolly.)VVhen LJ/R3 la lov/, the parí Is sot up lor rlyht Jusllfled (Inte-goi) dato.
1.2 Olher Pin Funcllons
Dl| (I * O to 9); Digital inputa — D!Q Is the Inast signilicanl bit(LSB) and Dlg Is Ihe mosl signlíicant bit (MSB).
|OUTI: DAC Curronl Oulpul 1 — IQUTI '3 e máximum lor adigllal input code oí all 1s and IK zoro lor a digital Input codaoí all Os.
'oUT2: DAC Curren! Outpul 2— IoUT2 's a conalant mlnus'ouTi..or
.1023VREF
1024 R
where R <* 15 kíl.
Rr p- Feedback Ros'i'or — Th1(> is providod on the 1C diíptor JJe as the shunt inodback rnslslor when an oxlerntil oparrp la usod lo próvido an oulpul vollage íor the DAC. Thison-chip roplctor shoiild always bo used (not nn exlerníil '=•alstc.') because II mnlchoa (tío insir.lora usnd In tho on-chlpR-?H laddor and Irnckn Ihoso losialora ovar tompcraluro,
VRÍ F: Relotonca VcHnge Inpul — This is the connoctlon larIhe extornal precisión volluge gourco whlch dilvos Ihn n 2Rladtlc-r. VRgp can rango Irorn -10 to +10 volts. This Is nl.noIhe fnalog voltaga Input lor a 4.quadranl muUlpIylng DACapp'lcnlion.
vco: Digital Supply Vollago — This Is tho powar supply pinlor Ihe parí. Vcc can bo Irom !- 5 lo + i 5 Vp^. Operation Isoptimum for + 15V, The ¡npul Ihíoshold vollagoa ate noarlyIndcpondenl oí VQC. (Soa Typlcnl Perfotmance Charactcris-llcs and Descrlptlon in Secüori 3.0, T2L compatible logícInp'/ls.)GND: Ground— Ihe ground pin (or the part.
1.3 Uollnltlon of Tflcrns
Hesolutlon: Resolution is direclly relaled to the numbur oíawltchoa or bita wtlhln the DAC. For examplo. tho DAC 1000has 21° or 1024 stopo and thereloro has 10-bll resolullon.LInearlty Erron Llnoarlty error Is Ihe máximum devlotlon.Irom a stralghl Une passing through ¡he endpoints oí theDAC iransfar charac'nrístíc. It !s moasured nitor ad|i!sllnglor ZBÍO and lull-scaln. Llnearily otror Is a parameler Inlrinslcto ths device and cp.nnot be extornally adjuslod.
¡ Nallonal'a llneatlty toat (a) and the "besl slialght Une" losl(b) usod by olhor suppliers aro Illustraled bnlow. Tho "boslslralghl lino" requlres a speclal zero and FS ad|ustmonl loreach part. whlch Is almost Imposslble lor user to dalermlne.Tho "tínd polnt tesl" uses a slnndatd loro and FS ndjusl-menl procodure and Is a much more slrlngont lest for DACllnoñrlty.
Powp- Supply Scnolllvlty: Power supply sensltlvlty Is amonsure oí the ellocl oí power supply changas on Ihe DACfulléale output (whlch Is Iho worst case).
póo
O
oor-o
O
oooo-vi
O
O—4Oott>
s. End Polnt T»Bt Alter Z«ro and FS Ad|. b. RostStrfllghtLIne
ITUH/SO'm-n"
o
03OO
O
Q
oo
O
U
O
CNooo
o
oQooo1—O
O
Q
Stíttllng Time: Sotllinij limo ¡s Iho tima roquirod liom ti codoUansilion unlil Iho DAC outpul tundios wítliin i '/2 LSB ofllie (¡nal outpul valúa. Full-scalo sollling lime requuos azarolo lulí-scalu oí íull-scalu lo 2010 uutpul chauna.
l:ull-Scale Error: Full ¿cale en oí i: a moasuie cjf tiio oulpulüíior botwoon an ¡dual DAC and llio aclual düviie output.lilually, lor Ihü DAC100Ü sorios, íull-scale is Vfl|;(: - 1 LSB.Por V¡iEF="10V and unipolar operalion, Vpun_.bCALE5"10-0000^ -9-BmV--9.Qj02V. Full-scate oiror IsüiJjuslablo lo zara.Monotonlcliy: II thu oulpul oí a DAC ¡nciuasua lor íncieas-Ing digital input codo, Ilion 11 is DAC Is monotonía A 10-bitDAC wilh 10 bíl monolunicily will pioduce an Incjeaslng an-alog oulpul whon all 10 digilal Itipuls aro oxetcised. A 10-bitDAC with 9-bit rnoMoioniciíy will he monotonía whon onlyIho most significan! 9 bits aie o:iercisod. Similarly, 8-bitmunotoniciiy is guaranlued whon only the most significan! 8bits ata exorcisud.
2.0DOUBL£BUFF!£n[rlGTíiosa DACs ato doublu-buííorod, inletoptocussor compali-blo vstslons oí the DAC1U20 10 bit niulllpl/Ing OAC. Theaddilion oí Iho budors lor Ihe digil.vl inpul dala nol only al-lows fot siomge oí lilis data, bul also próvidos n way toaoáembte tho 10-bit input data woíd from ív/o wrilo cycloswhon usíng an B-bil dalu bus. Thu^, Iho noxt dj!a updalü (orthü DAC output can bu tuade willi Iho compiulo nuv/ sol oí10-bit duía. Fuilhef, Um double bulíoiing alio/va maiiy DACsin a syslem lo stote cunont dala and also Ihe next íi.tta.Thoupüaling oí tho now dala lor eaLh DAC ¡s alsu nol timocillícal. When all DACy ate upduUi£!,.a common ilfobo sig-ndl can Ilion ba used tu cauae all DACs to swiicti lo theirnuw artalog output tovols.
3.0 TTL COMPATIBLE LOGIC INPUTS
To guaranloo TTL voltyys compalibiüly oí llio lugic Inpuls, anovol bipolar (NPN) reyulator circuit is usod. This makes thoinput logic thresholds oqual lo Ihe lor.vard dicp oí lwo di-odos (and also matchoa Ihe lomporatuiu vaiiutíon) as oc-cuis naturally in TTL, Tho basíc citcult Is shown In Figure ].A curve o( digilal input threshold as a luncíion of powetsupply vollaga is shown In the Typical Poriormance Charac-ludstics soclion.
4.0 APPLICATION HINTSTha DC slablllly oí Iho VREF sourco ls the inost Importanl(actor to rnaintaln accuracy of the DAC over tima and lom-porature changos. A 0oud singlo polnt ground for the analogsignáis is next In Importance.Theso MICRO-DAC converlors ato CMOS producís andrsasonabla care shoüld'be exorcised in handling Ihom pilofto linal mouriling o'n o PC board, The dígita! Inpüts aro pío-tücled, bul potrnan'ent damaga rnay occur il tha parí Is sut>-Jtícled to higti oloctroslDtlc lielda. Store unusod parta ¡n con-duclivo (oam or anll-sUitlc rails.
4.1 Power Supply Sequonclng & DecüupllnaSame IC ampliílars drcw excoasivo curionl (rom the Analoginputs to V- whon Iho supplies aro íitat turned on. To pie-vunl damago lo tho DAC — an ox.lernal Schouky diodecon-noctod (rom IQUTI or 'üUT2 1° 9'0u"d may bo requifod topiBvenldostiuclivü cununls in IQUTI °' 'OUI2- U anLM741or LF356 is usüd — theje diodos are nol raqui ed.
Tho •.'• 'iidard poworsupply docoupling capacitois whichaieusod lor Ihe op amp a'ru adoquáto for Iho DAC.
FIGURE I. Basle Logic Threshold Loop
4-48
Í.2 Op Ainp Blas Curronl & Inpul Leada
Tlio op ñnip blas curien! (IB) CAM CAUSE DC CnnORC Dl-FET'" op Rmps havo vory low Liías cunen!, a^d IheititoreIha anor Inlroducod 'Is nagligUjIe, Bl-FET cp mnps oresliongly fecommondbfJ íof thosu DACs.
The dislanco Iiom llio l^un P'n °í 'he DAC lo the invoil'ngInpul of llie op amp síiould be kopl as sliort m posslbki loproven! inadvorlont nolse pickup.
5.0 ANALOG APPLICrtTIONS
Iha analog socllon oí lliosa DACs usos an H-2H !at) Iniwhlch can be oporBltid bolh ln Iho curronl swllchlng mcdeind ¡n Ihe vollage swltchlng modo.
The major pioducl changos (comparad with the DACIO?0)liave boen made ln Iho digital (unctlonltty oí Ihe DAC. Tlioanalog lunclioníng la reviewod here lor comploteneas. Foraddilional analog applicalions, such as multlpliors, altonun-lois, digllaHy controllor! ampliHors and low Iroquency sinrjwava oscíllalors. islor lo Iho DAC1020 dala sheel. Samobasíc circull ideas are presenlod tn tliis sactlon in addition locomplolo appllcatlons citcults.
5.1 Oporatlon ln Currenl Swllchlng Modo
The analog clrcuílry, Figure 2, consiats oí a stllcon-chroml-um (SÍ-Cr) thln lilm R-2R ladder whlch is depositad on thesurlacfl oxide oí the monoülhlc chlp. As a rosoli, Iheie ¡s nopataslllc dlode connoclod to tho V^EF P'n as would 0x¡st Hdüluaod roslslora were used. Tho releranca vollngo Inpul(VHEF) can Iherelore jange (rom -10V lo 4-10V.
The digital Input codo lo tho DAC slmply controla thn posl-llon of the SPOT curront swltchos. SWO lo SW9. A loglcal 1digital Inpul cnus03 tlip currenl swllch to s'-^or Ihe nwnll-
aLi'o Indder currenl lo Uig IQUTI '-Hitput pin. Thoso MOSswltches opnrale In tho curronl mc'd's with a small vollagfdrop across Ihom and con therelorn swllch currenls oí a}-thcr polarity. Thls ¡s Iho bnsts lor tho 4-quadrant mulllplylng
oí thls DAO.
5.1.1 Provldlng a Unipolar Outpul Voltags with theDAC ln tho Currenl Swltchlntj Mode
A vollage oulput Is providod by nviking use oí an exlernslop ninp as a cunorit-lo-voHogn convorlor. Tho idoa ¡s to usethn Inleinal lootlback roaiíilor, npu, liom Iho output oí thoop amp to thn Invertlng (-} Input. Now, when curronl laenlered at this invsrling inpul, Ihe leodback acllon o( tho opamp keopg thnl Input at ground polonllal. Thls causos theapplled Input currenl lo bo dlvorlod lo the leedback resistor.The oulpul vollage oí Ihe op amp Is lorced to a vollagoglven by:
VOUT -• -('OUTIVRFB)hJoÜce Ihat tho slgn oí Ihe oulpul voltage dnponds on thedlmcllon oí curren1 llow Ihrough Ihe loodback resistor.
ln curranl swilchlníj modo applicallcms, bolh cufrenl outpulptns (loUTI ani 'OUI2) should bo opnralod at O VDC. Thla Jsaccompliahsd aa shown in Figure 3. The capacitor. C^, isUsed lo compénsale lor tho output capacilanco oí the DACand tho inpul capí'cllanco oí Ihe op amp. The requlrod lood-bock losiíítor, RPB. is availablo on ího chlp [onp end Is ¡nlor-ntiily tlod to IOUTI) and must bo usod slnce an extsrnalroslslor wlll not próvida [he noeded maiching and lempera-luie íracklng. Thls clrcuíl can therefore be slmplifled as
DIGITAL INPUT CODE
(MSB) Dlg Día ni? (UB|
•'tRHIH*I|OHa
MB
VvV_r-_VyV-1I Zfl -i-
Oo—j,ooo
O
O
O>O
OoK>
O>o_L
Oo
a>o-4.
OCD-J
O>O
oen
PICURE 2. Curront Modc Swllchlng
-l'ouii>
OP AMP
LpasaLF351
LF357
CCPF
22 '
24
10
R!
> DO
DO
2.4 tí
1» ¡íS
•-• 3'
4
1.5
4-19
DA
C1
00
0/D
AC
10
01
/DA
C1
0Ó
2/D
AC
10
06
/DA
C1
00
7/D
AC
10
08
-shown in Figure 4, whoie Iho sign oí the reloronce vollagehas been changad lo províde a positiva outpul vollage. rJoteIhal Ihe output currenl, loUTI. now "ows through the R>Bpin.
5.1.2 Provldlng a Bipolar Output Voltago wlth theDAC In the Curront Swltchlng Modo
The addillon oí a second op amp to the clrcuil oí Figure 4can be usad lo genetale a bipolar oulpul vollage [rom alixed relotonce voltcige Figure 5. Thls, In ellecl, gives signsignilicanco lo tho MSB oí Iho digital Inpul woíd lo ullow twoquadranl m'ulliplicalion of the roluronce vollogcj. Tho polarityoí Iho relerence can also bo reversad to realizo the (ull lour-qundianl rnulllplicolion.
Tha appliud digital word is ollual binary which ¡ncludes acoda lo oulput zoro volts wilhout Ihe neod oí a ¡argo valuedresistor common lo exislíng bipolar mulliplying DAC circuils.Ollsel binary code can be duiived (rom 2's cornplenientdala (mosl common íor sicjned procussor atUhMotie) by In-vurting the slnlo oí Ihe MSB In oithar software or hardware.Altor doing Ihis Iho oulpul thon responds In aücordance lothe lollowlng expression:
whore V^EF can be positiva or negalive and D Is the signaddecimal equivalen! oí Ihe 2's complement processor dala.(-S12£D£+5|1 or1000000000SD¿01 1111 111 IJ.Iflheapplíed digital Inpul Is iriterpreled as the decimal equivalen!oí a Irue binary word, VOUT can- be lound by:
„ ¡D-5\2\h Ihla conllguralíon, only the ollset vollags o( amplílier 1
need be nullod to preserve llnearily oí the DAC. The ollsalvollage error oí Ihe second op amp has no ellect on llnoari-ty. It présenla a constan! oulpul voltage error and should benulled only If absoluto accuracy ¡s needsd. Anolher advan-lage oí this conliguralion is that the valúes of Ihe exlernafreslstors raquired do nol have lo malch the valúa oí trieInlornal DAC resislors; they need only lo match and temper-atura Irack each other.A thin film 4 resistor nelwork avallable from Beckman Insl/u-monta, Inc. (part no. 694-3-R10K-D) la Ideally suiled lor thíaappllcalion. Two of the four avallable 1 0 kíl resistor can bepatallelod to lorm R in Figure 5 and the olher two can beused separalaly as the rosistors labeled 2R.
Operallon ¡s summariied In Ihe lable below;
Applied2's Comp. 2's Comp. Appllítd Tru« Blnary VOUT
(Decimal) (Blnary) Dlgllnl Input (Decimal) + VREF . -Vflgp
+ 511 0111111111 1111111111
+ 256 Oí 00000000 1 1 00000000
0 0000000000 1000000000
-1 11 11 1111 II 0111111 11
-256 1100000000 0100000000
-512 1000000000 0000000000
IVREF!Willl. 1 Lw/U ^^ _ — M
I 'OUTi
fl|B_ "V, iQUIlVA '-c
-VflEFO — ' MlfflD-DAC ^>
^s- ^
1023 VBEF"! LSB -jvREf:| + l LSB768 VñEF/2 -|VREpl/2
512 0 0
511 -1LSB -M LSB
256 -VREF/2 +|VnEP|/2
o -VREF +|VREF[
OA J^>— i— Oí'out
! s^
FIGURE 4. Provldlng a Unipolar Output Voltagevcco|i*»vi ;
Kll ^^'üUlf V. ' '
¿VflCfO— f- MICRQ-OftC \C i<¡^'" t
i -zL-
ÍBr — VvV 1
2R / ~
FIGURE 5. Provldlng a Bipolar Output Voltage wlth tho DAC In the Curront Swltchlng Mod«
4-50
c
S.2 Anolog Operallon In th« Vollsge Swltchlng Modo
Some usalul appllcíjtíon clrcults result II Ihe R-2R laddor Iscpornlod In the vollage swltchlng modo. Thore aro two voryímporlanl Ihlngs V remembor when uslng the DAC In thevollage moda. The roference vollage (I-V) rrusl aiways beposjlk'u since Inoro are parnsillc diodos to ground on the'OUTI pto which would turn on II Ihe reloronce voltago woritnegativa, To malntaln a drjgrndallon oí llnontity loss [haniO.005%, keop -l V .< 3 VDC nnd Vcc at loasl 10V moreposillvo ihun ! V. Figuras 6 nnd 7 show thoíin otrora Inr thovollago swilchlng modo. Thh oporallon nppoms uiii"-.ual,sinco a (oíoienco vollago (-)•'/) is ap|)liod lo Ihe IOUTI P'nand llio vollago outpul Is thn VRCf: pín. Thi'i baslc k'na Ifishown in Figure 8.
ÍMs VQUT ¿anfje can be scalrd by uso oí .'i non-in\"Tíinggain slago as shown In Figutn 9.
O 1 í J * 5 1 / I
fltFFJltHCE VOLIA5E. +¥ (VDC)
Nollco Ihal Ihlo Is unipolar oporaüon alnco nll vollagos areposillve. A blpola' output voltaga cnn be oblalnod by using asingle op omp es shown In Hguio 10. For a digilal Inpulcodo oí all reíos, Iho oulpul vollage Itom Ihe VREP pin Iszoio volts, The oxlarnal op amp now has a singla Inpul oí-I-V and Is opetntíng wllh a gain oí - 1 to Ihís Input. Tliooulpul oí Iho op amp Ihorolure will be al - V (or a digilalInpul oí all zotos. As Ihe digilal codo Incfoasos, Ihe oulpulvotlage ni Iho Vnep pin incienso;;.
Hallen llint Iho [inin oí Iho op n ;p to voltngos v/hich níanppllod to Iho ( l ) Inptil is -I 2 nnd the gnín to voltarjcswhich aro Bppliod to Ihü ínput rcsíslor, R, Is • 1. Tho oulpulvnltngo oí the op arnp doponds O'i bolh oí llinso inpuls :inci1.; givon by
__
'
— V » V -
iy
-
....UN
AIH
ÁM1
h>-IHE
—
7 ÉRÍtiS-.__[._
;T 'mgi _
— —
oo_J.ooo
O
O
O>O_>.ooro
63>aooCT
a>o
o>o
C V 4 • 1 t 10 fl 1< ]t
IUPFLY vnuA
FIGUHÜ7
{MSfl)
DIGITAL INPUT CODE
0<9 DI) DI; • * • • • Dl| Dio
FIGURE 9. Vollnge Mode Swltchlng
FIGimc D. AmpIMylng th« Vnttnni Modn Oulput (nlnatn Ütipi'IV Opurnlltm)
4-51
C
O<O
o<Q
uQ
OJoo1—
oQ
oo1—
oQ
Ooo
O
Q
FIGUrili 10. Provldlna n Bipolar Oulput Vollaga wlth a Singla Op Anip
VCC
TUH/SCOB-I:FIGURE 11. Increaslng the Oulput Voltage Swing
IIiu ouluul voltage swing can bt. üxpandod by aüüiny 2lüKlslors. lo Figuro W ps shown in Hyuro u. Ttiuso addudrcr.iislois nio uBod lo nllunuola tho h V voltayo. "Iho ovoiullgain, Ay(- ). doin Iho -i V termina! to the oulpul oí UIQ opamp doloiminos Uiu mosl nogatívo oulput vallago, • 4( I V)(V.IIQII tho VUEI: vüllaya al Iho -I ínpul o[ the op amp iszeio) with tho componüiil valuos uiiown. Tho cornplola üy-númic rpngo oí VQUT ^ provitJod Ly llio gain írom the ( I - )Ínpul oí tho op amp. As the voltayo al Iho VH^F pin ranyosffom OV to I V(102D/1Ü2^J Ule output oí the op amp willrango liom -10 VDC lo 1 10V (1023/102-5) when using a-i V vollago oí -f- 2.500 VDG. Tho 2.5 VDC loloionco votlagecan bo easily dovelopod by USÍIIQ Iha LM336 zonor whichcan be biasoj tluough Iho RPQ inUmial (oslaloi, ci'iinoclodlo Vcc.
5.3 Op Amp Vos Adjusl (Zero Adjust) for CurrenlSwilching Modo
Píopor opotalion oí ího laudar ruqnlros llial all oí thu 2illoga always go lo exactly O VUQ (ycound). Thoroloio ollsulvullago, VQS, °' ['ie exloinal op amp cannol ba loloiatod asovory rnillivoll oí VQS vvill intioducti U.OI % of addud '¡neaillyunor. Al liist Ihis -sc'uins unusually sjusitiva, unlil U bucomosch.ar Iho 1 mV is 0.01°,: oí Iho 10V roluioncol Hiíjli rosolu-li.jn convoitüís oí h¡uh accuiacy foquiío oltunliori lo ovmyd'ílail in on jpplicíilion lu achiovu íhü availabloporloimaiicsv.hich is inhuiüiit In Iho parí. To ptuvonl this sourco oí onor,liu Vos °' "Í0 °P utnP has lo bu iiniially zorood. Tliiu is Iho"íüio adjusl" oí Iho ÜAG cnlibraUon soquonco and shouldbo dono liíat
U thu VQS ¡3 lo bo adjuulod Ihoie aro u low polnls lo consid-or. Nulo tlml no "de balanclng" reslslance should bo usodin Iho giouridod positivo inpul load oí Iho op amp. Thls le-síslance and Ihe Inpul current oí tho op amp can also créaleoirors. The low Inpul biasing curren! of Iho Bl-FET op ampsmakes Ihom idoal lor uso in DAC curionl to voltage applica-líons. The VQS o[ Iha op amp should bo adjutited with adigital inpul oí all zaros lo lorce lour " ° mA. A 1 híl loslslwcan be teniporarily conneclod Irom Ihe Invuiting ¡iipul toground lo provlde a de gain oí apptoxirnalely 15 lo Ihe VQSoí Ihe op amp and mako the zeroing oasier lo sense.
5.4 Full-Scaltí Adjust
Tho lull-scalo adjust piocoduío deponds on Iho applicalioncircuil and whelher tho DAC is opsralud in tho cunonlswilching tnode or ¡n tho voltage svíiicliíng nuda. Tecli-niquos are givon bolow lor all oí the possíbld applicalioncircuils.
5.4.1 Current Swltchlnu wlth Unipolar Outpui Vollage
Altor doing a "2010 adjusl," sot all oí llu digital inpul levéisHIGH and adjusl the niagniludo oí VR^ lor
1U20VQU | ~ ~ (ití
'Ihis coniplütos tho DAC cnllbralion.
4-52
5.4.2 Curmil Swllchlng wlth Bipolar Oulput Voltage
Tho circull of Figure /¿shows the 3 adjuslmonls needed.Tiin fltsl slnp |S lo sol alt of Ihe digital Inpuls LOW (lo lorceIOITI to 0) and Ihen Itlm "zero adj." lor zero volts al IheIrw"i|Ing ti'put (pin 2) oí OA!. Noxt, wlth a codo oí all zerossil" qpplfH, ad|ust "-FS adj.", the rolorence vollage, lorV0'JT™ ¿[(Ideai VRGF)[- The etgn of Ihe outpul voltags willba opposlto thal o( the appüod leference.
Fiímlly, sol all oí Ihe digital Inpuls HIGH and ad|ust "H-FSad|" lor VOIJT-VREIS (511/51?). Tho slgn of lito oulput atlilis limo will ba [ha same as thal oí the reloronce vollage,llio adtíilíon oí Ihe 20011 rosíslor ín sedes wlth the VREF pinoí Ihe DAC is to lorce Ihe círcuil y-iin en oí Irom Ihe DAC lobo nognllvo. This insuies Ihal addíng roslslanco lo R|b, wilhllie SOOíl pot, will always compénsalo Ihe galn enor of IhoDAC. *
5.4.3 Voilage Swltchlng wlth a Unipolar Output Voltage
Reler lo the clrcult oí Figuro 13 and sal all digital InpulsLOW. Trlm tho "zoro odj." lor VQUT*O VDCÜ mv- Thensel all digital Inputs HIGH and Irlm the "FS Ad|:' lor:
5.4.4 Vollag« Swllchlng wlth a Bipolar Output VoltageRolsr lo Figuro 14 and sel all digital Inpuls LOW. Trlm tho" - FS AdJ." foi VOUT- « - 2.5 VDC. Tlmn asi all digital InputsHIGH and Uini Ule "H-FS Adj." lor VOÍJT~ +2.5 (51 1/512)VDC.-Test the 7oro by satllng the MS digital Inpul HIGH andall Ihe rest LOW. Adjust VQS of amp #3, if nocossary, andrecheck Ihe lull-scale valúes.
O>O
ooo
O>O
O>ooo
O>O
Ooo
a>o_LOoCD
FIGURE 12. Full Scalc Adjunt — Curifint Swllchlng wlth n'polnr Oulput Voltngo
1
FIGUnE 13. FuIIScflle Adjunt — Vollage Swllchlng wlth n Unlpolnr Oulput Voltngn
O
COoo0
O""•-oOT—
O
10oo
üp
oo ,f— •
O
O
oCD
0
Q
oOCD
f •)
,
•»
i —^x
MIL'flÜ'UAC
/
>1-
* — -
•i " íH
^' 'r~<^'
X,
. — -
AUJ,
• i.
"I
fV
r ~ i ~FSn no o t< <
\0 J)
v r<!.'•<
i
Cl
AUJ- ^ H- MAI-.H ID 0.01%P - ^
^X^ ^ H*
~^^^\K
- 2 5 V
fl-
liK
X.
J \*.
>^< v 0 u r « ? 5 ( *
--OVflUI
) V
It/H/seea-is
FIGU.tE 14. Vullage Switchlng wilh a Bipolar Output Vollat¡a
' G.ü DIGITAL CONTROL DESCRIPT ION'Ihü DACIOOU solios oí pioducls ion bo usod in a widovadoly oí oparailng modos. Mosl o( ilin opiians ara shownin labio 1. Also shown in Uils table EIIU Ihe seclíon numbeíaot II iia da a sheet whore oach oí l!;u oporaiiny modos Isdli,cussod, For oxamplo, 11 your man ¡ntorant in intorfacingto a ;¿P wilh an B-bit dala buu you will bo diroctod lo Soclion6.1.0.
tiarislor, or updulhig, oí moro titán ono DAC.Für oporoting wlthoul a /ip ¡n Iho stand alone moda, íhiaeoplíons aro piovidüd: 1) uuing only a single digital data bull-er, 2) using both digital dala buüers — "double buflaied," a3) olíowing Iho ¡nput digital dala to "Ilow tlirouijh" to jTiovitlatho analog output wilhoul Iho usa of any data latchos.To loduce Ihe requiíed re^ding, only the appücable soctions
11 10 (irsl consid jralion is "will tho DACboinloifíieod te a fiPwith an B-bil or a 16-bil dala bus oí Ubud in tho nlaní-ylonemodo?" For lito 8-bit data bus, a soc ¡nd süloclion -son liow tho 2nd digital dala bullor [1
inadoi.i DAC Lalüi) h updat-
od by a transitar Ironi iho Ist digital -ulaLalch). Throe options ato piovidod:
bulluí (Iho Inpul1) ;m auloniulíc liansíer
of G.1 through 6.4 neod bu consldered.
6.t Interlaclng lo an 8-Uii Dota Búa
Tiaiislonlng 10 bits oí data ovor an B-bil bus roquiios lwov/iitu cyclos arid provides lu'-'.r possible combinalioii3 whicddopond upon two basic dala lortnal and protocol docísions:
whün tho 2nd data byle is wriilan lo tlu DAC, 2) a ira-r.íor ] _ ],,which is undor Ihü control oí Iho /¿P tmd cnn includü more
Ihe data lo bu lolt ¡usliliod (considerod as (raclionalbinary dala wü\o binaiy poinl lo tho loft) or ilghl iusti-
tlinn ono DAC in a simultunaous Iranslnr, or 3) a Uonsfer [¡utj (Considoiod as binaiy waighted data with the binarywhich is undor Iho control ot axioma! Inylc. Furthot, Iho tlatalonnat can bo oillior lufl ¡usliliod or iii¡!il Jusliliod.
(Wlum intuí íacing to a ftP with a 16 t"t dala bus oniy twosriluclions are avaiiablo 1) operaMng tiif) DAC with a smyle
poínl lo Iho rkjhl)?
2. Which byte will be trans erred firsl, Ihe nmsl signiticanlbyle (MS bylo) ot Ihe least significan! byla (LS byte)?
digilnl dala bulíor (the Uanslor oí uno UAC doos nol hrwo tobo üynctironizod with any other DACs in ihe syslom) ur2opoialing wilh a doublo digital dala liulínr lor siinultanoous
Operalnig Modo
Dala Bus
0-BHOalu Bus (0.1.0)Rinht Jusliíiod (6.1.1}LoltJusti(iod(6.l.2)
Automntic
Soctlon
6.2.1
G.2.1
TransNir
Figure No. j(^4-Pln) (20-Pln)
Ifi17 18
Sinn1-' Rullorod
G.3.1 1(1 20
Sincjli BuElmeri
0,4.1 10 20
lable 1
¡iP Control Transler
Sectlon
6.2.26.2.2
Figure Ha.(24-Pln) pD-p'ln)
16
17 18
Double Bufleíod
6.3.2 19 20
Doublo Bulíeíod
Ü.4,2 ID 20
Externa! Transita
Section
6.2.36.2.3
Figure tío.(24-Pln) [20-Pln]
16
17 16
Flow Through
Nol Applicíiblo
Flow Through
G.4.3 10 NA :
4-54
O
TI.'ÍSQ dota p.issIbilíLias nri? r.hown )n l:igiiro 15. Noto thatIho ¡uslHication oí dala r^rorids on how Iho 10 bit clnla«oíd la locp.lpd witbln Ihg f'j-bll data s?nrco (CPU) legislar.ln antier caso, (hero \r, a sur plus oí fi hits and l'inso ares'-iwn ns "ilon'l caio" lt»n»i<i ("x"J in ííils llgute.íi'i oí tlioso DACs load 10 bits on ihn |st wrilo cyclo. Ap.—iiculaf srt oí 2 bits In 'lian ovorwill'pn on Iho 2rid wrilnr/clo, doponding on Iho ¡uslilicnlion oí Iba dnln. Thls ra-tíut'os tho Ist wrlte cycli? lo cotilnln Itia LS or LO Dylo dulagmup lor el! ilglü Juslillod data opilan-; Por olí left justllioürhln oplions, Iho Ist writn cyclo musí conlaln Ihfl MS or HlÍí',10 dota gtoup.
E.1.1 Provldlng lor Optlonul Dalo Formal
TIw DAC1000/1/2 (ZA-p\n parís) can bo used (or oilhor(iota lormalHru? by lylri(] Iho LJ/rD pin elltior hlc]h or low,tt"ípi)ttivo[y. A sirnptKíGd logic díngram which shows ihe ox-larnal connoctlons lo tho dnto bus and !he Intornal funcllonso( both oí Iho dala bul'or roglslors (ínpul Lntch nnd DACBegialorJ'ts shown ln Figuro 16 lor Ihe ríght Jusi'liüd dotaooofalion. figure Í7ls íot Is(l fuslilled dala.
6.1.2 For Loft JuatKled Dolí
Por apclbalíons which roquli" loíl lusllllod dala. DACI006-1008 (20-pin parís) can bo u—'d. A slmpllllod logic dtagramwhich shows tha fxlamnl jo-inoctlons to tho dalo bus andIho Inlornnl lunclions oí ho'h oí Ihs dala bullor logislors(Input Lulch and DAC Ro^l-lor) ls shown ln Fiyurc IB.Thoso parís roquiro tho N''> or Hí Byto dala group lo beIrnnsloried on Ihe 1st wrlto •••/cío.
6.2 Corlrotllng Da'.a Transípr (or an 0-Bll Dala Bus
Thiee oporallng modos aro pbsslblo [or contíolllng theIranpíor oí data (rom Ihe ln|)Ul Lalch lo the DAC Reglsler.whoro II wlll updoto Iho annlog outpul vollago. The slmplostIs Iho aulomallc translor modo, which csusns the datatransíor lo occur al Ihe lln>" oí Iho 2nd wrlle cyclo. Thls Isrocorriniflndod whon thu exnct llmlng oí Ihe changos oí thoDAC annbg oulpul aro nol crilical. This lypically happonswhnre oacli DAC is oporaüng Individually !n a syslom andtho annlog updatíng oí onc OAC la nut roquitod lo bn nyn-chronizod lo any other DAC. For synchtonlzod DAC updnt-Ing, tv/o optlons are prov' '?d: pP control vía n commonRFETT clrobe or oxlarnal U|:'!M!O Ilrnlng control vln nn'oxtar-nal slrobo, The d^talls o( H'uso oplions ara now shown.
... — - 1 1 1 1 1 I I I I- OM1 ÍOU»crnOlSll* "OlpiHD "0 IH W wO'lf •1 1 I I , , 1 1 1 . 1 . 1
_ . -
Uí( — - 1 1 !lili JUtriniDD'ti
J... 1 . .1" - lli 1 í '•
I I
'[ „„__«( IT]f
E
pO-
ooo
O
Ooo
O
O
Oo
O
O
o>ooo
O>ooo
FIGURE 15. FlUIng o 10-Bll Dula Word Into 16 Avnltnbln Bit LoruLIon»
DAC1000/1001/1002 (2-t-PlnPmtn)
n—íhrvT*íi p~-iM__/^^
Mil]
1»)
P"
D 0D Q
g "" o0 ISfUI °o UICM °0 0
0 D
D n
-yj Wlf
: ''ffi ;•*" UICH ° "
t ' K,
FIGUHE16. tnputCDnneclloniinnd Controls for DAC 1000-1002 Rlght J'-illlled Dnla Opilan
-J-55
cOOo
O<Q
r^oo
O<Q
tooo
o<a
o<Q
ooi—O<ooooO<Q
DA0100G/1001/1002 (24-Pln Porta)
rwm fiíHi
uTV
flU'fim FOLIO* D I
>f B U UltXCD. '
IIHIfPNAL LOOlC U JHOWHfOBU/IQ-1-UFI JUIlIflEO
FIGURE 17. Input Connectlons nnd Controli for DAC1000-1002 Leit Juitllled Dala OpUon
DAC1006/ 1CO7/1008 (20-Pln Parta for Ult Juttlfled Data)
FIGURE 1Ü. Input Connectlona and Controls lor DAC1006/1007/1008 Loll Juslllled Data
4-56
6.2.1 Automatic TransforTWa makea uso oí a doublo byte (doubb precisión) writo. Tho llcst byle (8 blls) la strobod Into tha Inpul lolc.h and the sucondbylo causen a slmullanoous strobe oí the two remalning bits ínlo íhe inpul lalch Bnd also the transfer oí the complete 10-btt Wordítem Ihe Inpul latch lo the DAC reglsler. Thle le shown In Iho lollowlng limlng dlagrarnc; the polnl In time whore Ihe analog outpulIs updalod Is also Indlcaled on those diagrama.
DAC1000/10Q1/1Q02 (24-Pln Parts) DAC1008/1007/10Q8 (20-Pln París)
im
TL/H/CG0B-18•SIQNIFIES CONII10L INPUTS WHICH ARE ORIVEN IH PAHAULEL
ViSlroke
The Input latch la loaded wilh Ihe llrat two wrile strobos. The 5ÍFüH slgnal Is provided by oxternal loglc, as shown below, lo causeIhe transler to be accompllshed on a thlrd wrlte strobe. Thte Is shown In the lollowlng diagrama:
-A
DAC1000/1001/1002 (24-Pln Parts)
A rJ Y y mu
mi itrji
• DAClUOS/IOOT/IOOa (20-Pln Parts)
"A /í^ £
A. —e?- A ^-WHEdETHf IfíH CDHTDOLCAH l( BÜHERAUD II U11NÜ • ItCOND CH1F UUCI'AJ:
oAND IHI ITTI CCWI.tDl. CAH U MN'Vtí f"OM IH( AOD'E» *UI tK)H*lÍ,
TL/lt/5l^6fl-í9
8J.3Transfer Uslng an External Strobe
This Is similar lo Ihe prevlous operatlon except the XFEFÍ slgnal te not provldod by Iho fiP, The tlming diagmm lor thls Is:
DAC1000/ 1001/1002 (24-Pln Parta)
— \ \a (20-PIn Parts)
o>o_J.oooo>Ooo_A.
O
ooohoO
O
ooen
O>.O
oo-viD
O
oo
4-57
O
OO •oo
O<.O
oo
O
Q<n0o
O
O
OJOO
O«TQ
o
/DA
C1
0
OO
O
O
6.3 Interfaclng to a 18-Blt Data Que
The Interlace to a 16-bit data búa Is easlly handled by connectlng lo 10 oí Ihe avallgblo bus linos. Thls allows a wlrlng selecledright ¡uslilied or lelt justified dala formal. Thls Is ühown In the connocllon diagrams oí Figures 19 and 20, where tne use oí DB6to DB15 glve^ lell ]ustl(¡ed data operation.Hi.
JunirKQ. MIlHt LEMV lili DI)S ,, Dl9
_l\0\ '\ , í
\
/ U/ i
[ / 'y°*+ DI< DI,
' *<í*+»«° ,
if 3Blfl0' — t -o\
ilfíJIl mío rf-*l \o — *}-«t—
U/«-(Q y,(DOti'l UR£)^ T
Note Ihat any part number can be used and the Bytal /Byte2 control should be wifed
10- III* : .«T*, J
D-Q .
D u
rO~~^, — 1
D
, B o 10-|(l o , » i". ,-J*1-, o ._ — CUH1IM1
«til lltA SWIICHEI
n• '
puiíJií folla*' ó INfUH.Hita rvxáiE-9. O«IA1.1 UII LA1CKEO.
FIGURE 18. input ConneUIon* and Logic for DAC1000-1U02 wlth 1G-Blt Data Bui
un i QAC1DÜÍ/IOÜ1/100S [30-flH rAHU]
^ DB]i 9! Oí? [MSh|
K «t
\p
/ "¡/ 1»
I/ isj
,1
1
CDNIHDL 1tus 1
4 1
I3¡
*Vcc^rr-f twuiv*!|1« l/íTÍTí fOH lili
*"
=o— i — v
QDDDU IDn 1"o LA
D
0a
-«LA-^EHl ItlGIC ÍMÜWHí PIN HIUH]
u00
BIT aCH ¡¡
aaa
R1CHEHiBtE
D au aD D
U 0a IO-BII o0 . ÜAC B
D Q
D UD 0
ttICH
WHEHTA
OUI
AI ü
«SB \
CH EfT*8UIS FOLL
CTTERiSIti LAICH
10— CliRHEHl
IWIICIttI
Txi.o3WPIHMJ1Í.
T-0. DAIAEB.
FIQURE 20. Input Connectlon* and Logic (or DAC1006/1Ü07/1008 wlth 16-Blt Data Bu»
4-58
Three oporating modas are posslble: ílow through, single bulíorod, or double buflered. The timing diagrama [of Ihasa aie shownbelow:
6.3.1 Singla BultercdDAC1000/1001/1002 (2-J-Pln Parts) DAC1006/1007/1000 (20-Pln Parta)
WUCTJi*. 1,1-171 iir«* i/i,ti 1-1fín*í
V L»ICHCt DMA WN D * C M G i m «
lü»ü WUl UICH iifM !0 D4C*EC11If«
\X "fí" *ND WC!1 ' \C MCISIE*
rrn.o ouirui11
v/ \wf«i OAIÍ nV NlMCHtO
10*0 INrtl! UICH
o>
oo
O
o
fl.3.2 Double BulícredDAC 1000/1001/1002 (24-Pln Parto) DAC1006/1007/1008(20-P[n Parta)
1
6.4 Stand Atona OperallonFor applicalions for a DAC which aro not under ^P control (stand alono) Ihme aro two basíc oporaling modcs, single buderadsnd doublo buflered. The tlmlng diagrams (or thsse are ahown below:
6.4.1 Singlo Bullered
DAClOOO/1001/1002(24-PÍn Parts}
UICH lt*Wl UICM
B.4.2 Doubla Bufferod
DAC1000/ 1001/1002 (24-Pln Partí»)
DAC1006/1007/100Q (20-Pln Parts)IFE« IU OIC "f CU TIU
AhM.no/OUIrUI/lira Al [1
LAICHÍI om IM ntc miwn(IWMll DÍH »U1I M-IÍIN >*LIOUN1JLIH1 II-E]
o>O
O3>
O
Oooo
ÜAC 1006/1007/1008 (20-Pln Parta)'
'fu • coor>*ctlofi dingrcm oí Ihl» opmallno modo u»« Flgí** 18 fot llw Logte orid Figure 20 Ía< Itw DH!B lopol copM.-icIlorm,
4-59-
ooO<O
ooO<aoo1—O<fOcjOoT —
o<íD
6.4.3 FlowThrough
This operatlng mode causes Ihe 10-blt ¡nput word lo dlieclly créate Ihe DAC oulput wlthoul any lalching Involved.
DAC1000/100l/10Q2(24-PlnParU)
Bytu ]/üyüT2~l
7.0 MICROPROCESSOR INTERFACE
The IUQÍC íunclions oí tho DAC1000 lamily havo bsen oii-enlod lowards an oase oí ¡nloríaco wlth cll popular Ps. Thelollowing socllons discuss in detall a lo* uselul Interlacesahornos.
7.1 DAC 1001/1/2 to INSQ080A Inlorlacefigura 2! illuslrales the slmpílcity oí Interladng IheDAC i 000 to an INS6080A based mlcroprocessor syBtem.
Tho clrcull will purlurrn an aulomutlc iransíor oí the 10 bitsoí oulput dala Iior» the CPU lo Uto DAC regíslor as oullinotJIn Secllon 6,2.1, "ConUolling Dala Transler lor an 8-B¡l DaUBus."Since a doubla bylo wiile ¡s nocessaiy lo control Iho DACwllh Ihe INS8080A, a possiblu ¡nstruction to achlove lilis is«PUSH of a regislor palr otilo a "atack" ín memory. The 16-blt reglsler pair word will conlain the 10 bits oí Ihe eventualDAC ínpul data In the proper soquence to conlorm to bol!)
O
Qooo
q
Q
VOUT
(JOTE: DOUBLE BYTE STORES CAN BE USED.
o.g. THE IWSrRUCTIOH SHLD ?00\S THE L
MEO INTO BI ANO THE H REG 1N1O B2ANO
TRAHSFERS THE RESULP TO THE DAC HEGISIER.
THE OPERAND OF THE SHLD 1NSIHUCT1ON MUST
DE AN ODD ADDRESS FOH PROPER TRANSFEn.
FIGURE 21. Int.rfaclng tht QAC1000 lo the INS60BOA CPU Group
4-GO
Ide requlremanls oí the DAC (wílh regard to right or leuluslüíed data) and the Implementation of Ihe PUSH instruc-Itan which will oulpul Ihe higher order byle oí the registerpa'r (Le., regisler B of Ihs BC palr) lirst. The DAC will actual-ty tippoar RS a two-by!e "stack" In memory to the CPU. The«uto-decrementing o( Ihe slnck polnter during a PUSH al-tows usíng address bit O oí Ihe stack polnler as the Bytel/Syínlí arid XFER slrobes il bii O oí the stack polnler address'-1, (SP-1). Is a "1" 93 presentad lo tho DAC. AddillonalacMrass decodíng by the DM8191 will gonerate a uniqueOAG chlp selecl (CS) and synchronlzs Ihls CS to tho lwomoinory write slrobes oí Ihe PUSH instruclion.
Tu resal (he slack poinler so new dala may be oulpul lo Ihesanie DAC, a POP Inslrucllon (ollowed by Instructlons toInsure [hal proper dala Is In Ihe DAC dato regisler palr be-lora il is "PUSHED" lo the DAC should b« executod, as thePOP Instructlon will arbitrarlly aller the conlents oí a registerpalr.
Anolher double byte wrlle Inatructlon Is Store H and L Direct(SHLDJ, where the HL reglalor palr would temporarlly con-I01n the DAC dala and the two sequentlal addresses lor theDAC are speclflod by the Instructlon op codo. The auto In-ciamenling oí tha DAC address by tne SHLD Instruclionparmlts the samo simple scheme oí uslng address bit O toflwnerate the byle number and Iransler strobes.
7.2 DAC1000 to MC6820/1 PÍA Interíace
In Figure 22 Ihe DAC 1000 Is Interlaced to an M6BOO syslemIhrough an MC6820/1 Perlpheral Interlaco Adapter (PÍA). Inthis case the CS pin oí Ihe DAC Is grounded slnce the PÍA Is•Iresdy mappod In tho 6800 system memory spaco and nodocodlng Is necossary. Furthermore, by uslng both Porls Aend B oí the PIA the 10-bil dala Iransler, assumod ríghtJusllíied agalp In two 8-bll byles, Is greatly símplitíed. TheHIGH byte la loadod Into Output Regisler A (ORA) oí Ihe
PÍA, and Ihti LOW byte Is loadod Inlo ORB. The 10-bit datatransler to tha DAC and the cormspondlng analog outpulchango occur slmullaneously upon CB2 golng LOW underprogram conttcl. The 10-blt dala word In Ihe DAC reglslerwill be lalchnt! (and honce VQUÍ w"l DG Hxod) whon CB2 Isbrought back I:1GH.
II bolh oulput porls oí the PÍA ara not avallable, It Is possibleto inlerface Ihe DAC1000 through a single por] withoutmuch ellort. However, addilionBl logic at Ihe CB2(or CA2)linos or access to sorna oí Ihe 6BOO syslein control Unes willbe requlred.
7.3 Noloo Conslderntlons
A lypical digital/mlcroprocess'ji bus environmonl Is o tre-mondous potontlal sourco o! high Irequency nolse whichcan be coupled to sensiíive annlog cltcuilry. The lasl adgesoí (he dala and address bus signáis genérale Irequencycomponenls oí 10's oí megíihprtz and can cause noisesplkes to appear al the DAC oulput. Trióse noise splkesoccur when the data bus chongos slalo or when data lstransíerrod botween the lalches oí Ihe devlce,
¡In [ow Irequency or DC applie^ílons, low pass [íllering can: reduce these noise spíkes. This Is accomplished by over-compensaUng the DAC output ampliller by increasing Ihevalué oí tho loadback capocllor (Ce In Figure 3),
In applicallons requlrlng a last Iransionl response (rom IheDAC and op amp, Illtering nny nol be leaslblo. Addíng alatch. DM74LS374, as shown In Figure 23 Isolales the de-vlce Irom tho dala bus, thus ollmlnallng notse spíkos thatoccur every Hipe Ihe data bus changes álate. Anolhor malh-od lor ellmlnaling nolsa splker. ls to add o sample and holdalter the DAC op amp. This al':o has the advanlage oí ellml-naling nolse spikes when changlng digital codes.
O>OoOo
aj>o_toCJ_A
ai>o.j.ooto
a>o
ao_i.oo
aoo
Voui
+ 15V
FIGURE 22. DAC1000 to MC6820/1 PÍA ¡nterloce
4-61
o<or--ooO<OUDOOY—
O<Q
CJooT-
o<Q
O<Q- ,OooY—
o<o
NOTE: DATA HOLO TIME REDUCED TO THAT OF OM7-ÍUS37-» (c lo m]
lilh-UUflLtt »JI I
ICwflM l[il IHlftM FM lili 1)
FIGURE 23. Isolatlnfl Data But trom DAC ClrcuUry to Elimínate Dlyllal Nolso Coupllng
T ? ? T T ? T T T ?
TL/H/5G8a-2«
FIGURE 24. Dlgltally Conlrolled Ampllller/AUenuator
7.4 Dlgltally Controllod Amplllior/Att«nuator
Ari unusual applicatlon oí the DAC, Figure 24t appliea theInput vollage vía tlie on-chip feadback resistor. Tlie lowerop amp aulomaltcally adjusls Iha VREF 1H voltage such lliat'OUTI 's equal to the Input currenl (Vi^/RIs), Tho nagnltudeoí this VREF IN vollage depends on the digital word which Isin the DAC regíster. IOUTZ tr)en dependa upon both (hemagnitude oí VIN and the digital word. The second op ampconvetts IQUT2 'o s voltage, VQUI. which ls given by:
/1023-N^
Jw\. where O f N £ 1023.
Note that N - O (or a digital code oí all zatos) Is nol altowedor lh¡9 will cause the output amplilíer to salurate at eJlha±vMAXi dupendlng on the sign oí Vj^.To próvido a digitally conirolled divlder, the output op ampcan be ellminated. Ground the Ioui2 P'"1 °' (he DAC andVQUT 's nüw 'a^en Irom the lower op amp (which alao dfrveíthe VREP Input oí the DAC). The expression lot VOUT '> iw*given by
VVOUT ' i whore M* Digital Inpul (expressijü as a
M iractlonal binaty numbet).
4-62
DA
C10
00/D
AC
1001
/DA
C10
02/D
AC
1006
/DA
C10
07/D
AC
1008 oí c «5 en 3 a D
.' E •H : •
--
*'-'
•*-
7 *
4-L
O b r- £ b Ü ¡n o O ¡o to I 6 En o -K £ O í
"'-"F
---i
*'" ¿
_
1 15
...
V
O
*- -o
IL
,"—
< j;
^Z
2
— ' Ij Z
jO
T
- C
J2 o o
O o O
o o
oQ
Q
Q
*.
~3
- 3
O
' C
Mo
-
o-O
:
o
or
o<
r <
,Q-
D.,
; • ¿
-
i €
""?"
- "7
i *"""
iO
cs
l"O " O
.5~
oO
-r> O
• ~
—
"li -
•-.-¿
" 3
^.e
.—£
0 0
°LfL
?.
(M Z.
' - •
' TM
• —.
"""
•; f •% •" '•'~
'tsí
-.- - _
•(D 'H .O)
C»
•w o-a
.
~ C3!
C c o B Q.
£ _c 1- ^7 •« -r
— ;
...
'_!
. :i
O b r- ~r o b O En -S o to to -1.
O rv (D O O b ••t _J . ?
-7-, -•o
-.
.-•e
'-'. 3
-
-O l
• ^^
— --
O Ü
O_J
_J
_Jtu
r-
ra
O D
O
O O
O
O Ü
Ü
D D
Q
3" 3
co
oo
oO
—
O
o"-
oD
Q
- -7
--
"3='g
0
__
0
."£ ""¿
í£Ó
O
*c
- Q
^ D
^-
,-.,_
_
' '
'.* ¡
;
' ^
^•? ?
••-"
2.
S-
K °
°o
" °
i..°
o cy ~Z-
o —3 _. ^ £
• O CJ
~7 0)
3 O o CE o o CL
^- •
.y -
í.-
f
O
o00co
OO
3CQco
iQO
o
NationalSemiconductor
CD4013BM/CD4013BC Dual D Fllp-Flop
General DescrlptlonThe CD4013B dual D Illp-llop is a monollthlc comploinenta-ry MOS (CMOS) Inlegraled cliculi consüucted wlth N- andP-channel enhancemont mude Iransiators, Each Illp-llophas ¡ndependent dala, sel, resel, and clock Inputs and "Q"and "Q" oulputs. These devlcoa can be used lor shlfl regla-ler appllcatlona, and by connecling "O" oulpul to the dataInput, lor counler and toggle appllcatíona. The logic levelpresen! at Ihe "D" Input Is üanaíerred to the O output durlrigIho pooltive-gotnfl líanaitíon oí the clock pulas. Settlng orreaelllng Is Independen! oí the clock and la accoinpllshedby a high level on the set or resal Una respectively.
Features• Wlde eupply vollago lango• High noise Inimunlty
• Low power TTLcompatibllity
Applications• Automotive 'm Data termínala0 InstrumentaUonN Medical olaclronlcs
3.0 V lo 15V0.45 VÜO (typ.)
lan oul oí 2 drívlrig 74Lor j drIving?4LS
• Alarm systom• Industrial el o c tronica« Remóle moteilng• Coniputera
Connectlon Diagram
Dua|-fn-Un» Packag»
02 CLOCK 1 REICT2 O A T A 1 UT2
I
Ord«r Number CD'iO! 3.B*pleo-M »• S«clion 8, Appnodlx D
f •voiltblUtí' oí vtrfoui pickagt lypat.
1 3 4 1
Oí CLOCK 1 RESETt DATA I
Top Vlew
Truth TableCLt
. _s~_/~"X_
X
xX
D
01X
X
X
X
R
00010I
6
0. 0
001
• 1
Q,
01Q'011
a10a101
No el 1*00*) — L*v»J chuno»x ~ Don'l can ca«o
6-39
Absolute MaxlrtuH UIHUry/A«rótp*t« ip«áDont*ct th« Hatlon»! BtWitrtbutor» lor ivalliblllt1DC Suppty Voltage {VDo)
StwaQeTenlp. Ranga (Ts)
Poww Dlsalpatlon (Poí. Dü*!-tn-Une f 1 : "
Stnall Oulllno< ' ; í .
Iwd Temperatura (TJ(Soldertng. 10 seconda)
DC Elecirlcalcru
ipnbrf
to •
V(X.
YOH
L
YH
be
bH
*
Pirim«t»r .
Qulescent DévlceCunent '.,i.'. , ,
LowLeyel .Output Voltag*
HlghLovol • • ' •Output Voltage •
i
Low Level \t Vollaga |
. , I
Hlgh Levol jInput Voltage j
Low Level OutputCurren! (Note 3) j
iHlgh Levol OulputCurren! (Note 3) i
Input Curran! '1
im Rátlngstclfl*d. d»vlc*í fiHtrnlcóndUctor 8*1t and «iwcinoatlor
-0.5 V'oc-0.5 VDC tó VD
' — 66'C
• ¡H ;, . i
• • í •:;.. -.;• • ¡..-H
iraclérlstícs
Potosí 42) Vi r«qulr»d,k« Offlc»/» . r r i ¡ r '
n -j- 1 R VrM-1
D+0.5^DC- !
to + 1 BO-C '
I . . . r700mW „'500 mW
Í '. ' !.260-C ,
, ' ••* iCD40Í3BM(Nd
'i .) j . i. i ,' .. Condltloni1 • •'! > t . "
I
yD6-5V,V|M-VD OorVssVDD - "loV.y^ - VDoorVgs .,VDD - .1 5V( VIN - VDD °* vss
VDD - GV iVOD - 10VVDD - 15V ¡
vSo-sV i )(-¡-
VD D-15V' '
||0| < LO HAVDD *• 6v( VQ - pVDD- 10V.V0-VDD- 15V,V0-
1 •
.5V or 4.SVLOVorO.oV1
1.5Vbr 13.6V
VDD - BV, V0 - 0.5V or 4.5V .,VDD-" 10V(V0 7 tÓVbrQ.OV
V D O " 5 V , V c j - 0 . 4 VVDD- 1ov,v0-o.5VVoofc 15V,V0- 1.6V
' ' \' 'V ' í
V D 0-5V ( V 0 -4 .6VVDD - WiV0 - 9.5V -VDD - 15V,V0 - 13.5VVDD - i5V,V|fj - OV
15V '
• Recommérided Operátlng . ' 'CoñdltlÓhS (Note 2)DCSupplyVoílá'ge(VOD) _ ' 4-3 V^ to +15 V^
Input Vollago (V,N) ^ 0 VDC to VDD VQCOperatlng Temperatura Rangé (T/0
CD4013BM ' ' ' - 55'C to 4-1 25'C"CD4Ó13BC • •' • 'i -40"Cto+85'C
' . • [ ' • , ' • >
1 ile 2) '» , ' • • ' .
i -55'CMln
i . ,. r.
4.05' 9.9514.95
'
3.57.011.0
0.64
•1,6.4.2
-0.64-H.é-4.2
i i .
Max
1.02.04.0
0.050.050.05
Í.53.04.0
-0.10.1
"I
-f-25'C
Mln
i'
4.959.9514.95
3.57.011.0
0.51
1.33.4
-0.51
-3.4
-Typ
•
0.882.258.8
-0.88-2.25-B.8
10-5
Max
1.02.04.0
0.050.050.05
1.53.04.0
-0.1• 0.1
-M25-C
Mln
- -
•
4.959.9514.95
;
3.67.0
•11.0
0.38
0.92.4
-0.36-0.9-2.4
Max
3060120
0.050.050.05
•
1.53.04.0
-1.01.0
UnlU
jiAfiA
V• v
V
V' V
V
VVV
VVV
mAmAmA
mAmA .mA
fiAUA
DC Eléctrica! Characterlstlcs cD4oi3BC(Noto2> '
Sjrmbol
te1 '
V
YOH.
"•
• |
Quleocent DevkiaCurrent
; ' ' i
Low Level jOutput Vollago ¡
Hlgh Level |Output Vollage ¡
• i . 1
' ' • - . íLow Level .Input Vollage
| CoiíaHlon»
VDD - BV, Vjf4 -
VDD-ISV^VIN
' II
- VDDorVss
- VDD or Vsg
VDb - 5VVDD - 10VVDD" 1GV
VDD - 5VVDb - IPV •VDD - isv
VDD-GV.VO-VDD- 10V,V0
VDD- 15V,V0
- :
::i0.5Vor4.6V
- 1.0Vor9.0V- 1.5Vor 13.5V
,,, '~40-C +28'CMln M«x Mln Typi 4.0
8.016.0
0.050.050.05
4.95 ' 4.959.95 6.9514.95 ' . 14.95 •
1.53.04.0
Max4.08.016.0
0.050.050.05
1.53.04.0
+ 85-C
Mln
t
4.959.9514.95
Max3060120
0,050.050.05
1.53.04.0
UnlU
ÍA
Vvv
vvv
vvv
CD
40
13
BM
/CD
40
13
BC
omCO
ao
CQCO
QO
DC Electrical CharacterÍ8tÍcs.cD4oi3BC(Naia2)(Conunued) • >. ' -• < . . • • . • • • * * . '^
SV..-a.i
VIH
IOL
IOH
IIH .
Pariimoler
Hlgh Lovol
Inpul Vollage
Low Levol Oulpul
Cuirenl (Note 3)
High Levol OutputCurten! (Molo 3)
Input Cutrenl
CopiJlUon»i '..-' . '. . ' .' i
VDD - iov,v0 « i.ovors.ovVDD- 15V,V0- 1.5Vor19.5V
VDQ ~ 5V.V0 - 0.4V
VDD^ 10V,V0 - 0.5VVDD- 15V,V0- 1.5V
Voo-5V .Vo-4 .6V
VDD" lov,V0- 9.5V '-' 'VDD - 15V,V0 - 13.5V
v":Xi?L"-Holt 1; "Absoluto Ma>liiHim RaUngt" ne ibote valuai bsyorri whlch tí* ulotyihoold b« opwaled « lh«»a linilli. Tb« Ubleí oí "R»comrn*iKlfld Oper*Ungoptumllon. • . tMol* 2: Vg9 - OV unión oltwxwU» «poclflad. ' . , •
NoU 3: IQH and l<x u* rrw»aw»d or» outpul at • lliifc. • •' ;
AC Electrical Characterlstlcs* TA -| 25-0.Symbol . Paramet«r
-«cMln
3.57.0 •11.0
0.521.33.6
-0.52
-1Í3
'-3.6
iI •
reMax
•'
-.Ot30.3
, ' -f25'C' ' ' ' H-85'C
Mln >
• 3.57.011.0
0.44
1.13.0
-0.44
-1J-3.0
Typ
0.88
2.258.6
~o.ee-2.25
-6.8
10-6
;orKJÍtlom" uvl "Elscl/lcaJ CliaííCliHJitici"
CL - 50 pF, RL « 200k. unloss oü
Condltlone
CLOCK OPERATION ' ' "' ' ' .
LPHL.'PLH;
ITHL. ITLHi
IWL.ÍWH ¡
IRCL. IFCL '
.. 'su ' ' •.
ICL• - i
Propagatlon Delay Time
TransitionTíme ' :
i i ' . !Minimum ClocK i
• » pulse Width •: ! • • \m Clock Rlse and
MinimumSal'UpTime
Máximum Clock . i^ Frequency . . ; • 1 .
VODVDD
VDDVDDVDD
VDDVDO
| YOD
VDDVDD
' VDD
• -VDD'VDD
- 5V- 10V,* 15V
- 5V
- 10V
-15V
- 10V
- 15V
-•5V
-10V- 15V
-.5V '
- 10V
« 15V
- 6V- 10V
-15V.
SET AND RESET OPERATION ' ' ' • ; "'
tpHL(R). '
.EpLH(S) . '
'WH(R)- j
'WH(S) ¡
Cjjj
Propaya
t
Ion Delay Time !
Minirnurr) Set and •Reset Pulsa Wítjth . !
. 1 . ¡
AveraQQ Input Capacítanos
VDDVDDVDD
VDD
VDD
- 5V
-= 10V
- 15V
- 6V • '- 10V
- 15V
Mln
Max Uln .
3.5' 7.0
11.0
0.38
0.92.4
-0.36
' ! -0.9
: -2.4
-0.3
0.3
Mu
Y• V
V
(MfM
mA
él
-1.0 ^
1.0 fl(
M pot iw*nl lo kiyily th>l lh-« A*nMJfOvtós co«diUoni Itx ictua! ótvct
iorwlsa notod
• Typ Max Unll»
. ' • '
i
I
• ' n 'i
- J
'i
. '•'. ..-'•.
r ., .
• .. 2,5,..,,6.27.6
200 ". , 8Q . '.
65 '
" ' 100 '. .50
! 40 '
-- ' too. i
. 32
K , • ' 1i
.20 ..15
1 12'
512.515.5
350160120
200
'10060
-. 200
. 80 '
65
" 1510"
5
30
'. *25
i ,
na; n»
na
' nsni
1 naniru
• i
• (U
nsnini
MHz: MHz
MU:, • ' • • ' i , !
. Any Input
' ' ' ' , - ' ' i • ' ^Y"
1
.159 ,65 i
• 45
•;• 90 1
25
' 5
300 .
13090
- leoeo50 ' '
7.5
; tu: rvi
ni
10
: rn
M
i p,:
: ' t • . ' ,V " ' • '
6-36
CD
4013
BM
/CD
4013
BC
E eo en
-
5 ':'
Jr-~-i
iH
-H
,7t-r-
nl-*-
k
T.Í
T
llm
lmrr
rT
.fT
L'd
•""
IHln
íí—
if-
f— I
03 E'.i
<Ü
-^
M
"J
-C
'«
Ü co
. 1-*-!
o
ai
>
.3
£ S
ni
.111
Logic Dlagrarn >/,-:. t i , i !o
o
m
oDO
¡ OA1AO—
REIETO
Swltchlng Time V.'aveforms
"i it ' ' i VD[1
5-40
MOTOROLA
Acívance I n f o r m a t i o n
1-OF-8 DGCODeR/DEMULTIPLEXER
The MC54/74HC138 is ídemicsl ¡n pinout £o [he LS138. The device in-puts are compatible wílh standard CMOS ouipuis; with pulluprnsisiors, (hoy uta compfjliblo wilh 1.STTL oulpul:.
TÍKÍ HCICÍO üücudu:i n ihfüu-ljil Addruu;; lu niw ot-olgM «ciiviHowouiputs. Thís dcvico (satures ihrae cliip select inputs, lwo oclive lowand one active high lo facilítale the demultiplaxing, cascadíng, andchíp-selecting functions. The demultiplexing íunctíon ¡s accomplishedby using the Address ¡nputs [o select the desíred device output; one ofíhe Chip Selects Is used as a dala ¡npul whíle the olher Chip Selecls areheld in Iheir active states.
• Low Power Consumplion Characleristic of CMOS Devices• Output prive Capability: 10 LSTTL Loads Mínimum• Operatíng Speeds Similar to LSTTL• Wide Operalíng VoJtage Range: 2 to 6 Volts• Low Input Curront: 1 A Máximum• Low Quiescent Current: 60 jtA Máximum (74HC seríes) ••• High Noíse Immuníty Charsclen'stic oí CMOS Devices• Diode Proiection on All Inputs
BLOCK DIAGRAM
AddressInpuis
AO
Al
A2
Ctiip-SclBCIInputs
CS3
CS2
CS1
Y2
InvoflmgOutpuls
VCC"Pinl6GND - Pin a
MC54/74HC138
HIGH-PERFOnMANCECMOS
LOW-POWER COMPLEMENTARY MOSSlLICON-GATE
l-OF-8 DECODER/DEMULTIPLEXER
J SUFFIX N SUPF1XCEHAMIC PACKACE PLÁSTIC PACSACC
CASE 570 CASE &18
OBDERING INFORMATION
54 Sones; ~55°C lo * t25"CMCWHCXXJ tCefaniic Pacfcage Only)
74 Sories. --10"C lo t-85"CMC74HCXXN (Plástic PackagolMC74HCXXJ (CcrainJc Packagel
PIN ASSIGNMENT
AO íT^
Al C 2
A2 C 3
CS? C -1
csj i: bCS I C G
Y7 C ?
GND q a
~S~\Q
15
.14
13
12
11
10
9
3 VCG) YO
) Yl
) Y?
j Y:I
) Y^
I Y5
1 Y6
TRUTH TABLE
CS1 CS2 CS3 A2_A1
H L LH L LH L LH L I.H L L'H L LH L LH L L
X X X
X X X
X X X
L L LL L HL H LL H H
H L LH L HH H LH H H
OutputsYO Yl Y2 Y3 Y4 Y5 Y6 Y71-1 HH HH H
H H H HH H H HH H H H
L HH 1.H HH H
H H H HII I! II HL H H HH L H H
H HII 11H HH H
H HH HH IIH H
H H L HH H H LH H H HH H H II
H HH HL IIH L
H - high leve! (sloadyL = low levol Isleady siX- don'l caíe
5-114
MC54/74HC138
Symbol
VCGV(n
V0ut
I¡n
'out
'cePO
T5lq
TL
Parnmuter
DC Supply Voliago IRülüfuncotl lo GNOI
DC Input Vollago (Refeienced 10 GND)
DC Ouipul Voliage [Referenccd to GNDJ
DGJnpul Cuficní, per Pin
DC Oulpul Cur/enl, por Pin
DC Supply Cunen!, VCQ and GND Pins
Power Dissipallon, por Pacfcaget
Siorage Tempofaiuia
Lead Témpora lute 110-Socond Üoldoiingl
Valuó
-0.5 lo +7.0
- 1.5 lo VCG + '-5
-0.5 (o Vcc + 0-5
±20
±25
±&0 •
500
- 65 lo 4- 150
300
Uní!
V
V
V
mA
mA
. mA
mW
°C
°C
' Máximum flalíngs aro thosa viituos bnyond which durare lo llio dovlco mny occur.tPowcif Dissipalíon Tümperaiure DonHing:
Plástic "N" Package: - 12mW/ "C liom 65°C lo 85°CCoramic"J" Packsge: - 12mW"C lítim 100'C lo 1250C.
Thía dovico cnntiiins circuitry lo piolocl ihoInpuis oQuinül damiigu due lo high stuiicvollage3_0f oleclfic lields; howavor, ii is ad-vised that norma! precaulions be laken loavoíd applications oí any vollaga highcr Ihan
maximurp raied yoliagos to ihis high-Impedance ciiculi. Fot propci opoiation ii isrecommended ihat V¡n and Voul be con-stralned lo ihe fange GNDi|V¡n or
Unused ínpuls musí atways be tiutí lo anapproprlalu logic valmgo levul (e.g., oilhurGND or VCC).
RECOMMENDED OPERATING CONDITIONS
Syrnbol
VGC
Vin.Voui
TA
Ir. tf
Paroinelor
DC Supply. Vojtaga (Relerenced lo GNO)
DC Inpul Voliage, Ouipul Voliage[Referenced to GND]
Oporaling TomporaturB — 74 HC Sosias'54HC Suries
Inpul Rise or Fall Tima IFiguie 21 ,
Mln
2.0
0
-40-55
-
Max
6.0
VCG+ 85
4-125
5CO
Untt
V
V
••c
ns
ELECTR1CAL CHARACTERISTICS (Vollagos Raloioncad lo GND)
Symbol
VIH
VIL
VOH
VOL
l¡n
'CC
Paromater
Minimum High-Lavel InputVollnge
Máximum Low-Lovol inputVoltagu
Mínimum Hígh-Loval Oulput
Voliage
Máximum Low-LevsI OulputVolingc
Máximum Inpul Leakagc Cufrcnl
Máximum Quiascenl SupplyCuifunl IPüi Pückagul
Tus: Condltlons
VQUt-O.I VorVcc-0.1 V|Ioutl-M/.A
VoU l -o i vofVcc-o. i v|Ioml-»M
Vjn-V,HorV|Lloui--20/tA ' '
Vin-VinoiV,L
IOU|- -4.0 mAlou[- -5.2mA
V¡n»VlH w VILIour.20j,A
vin-vin.»vn.I0ui""l-ü (r|Aloul-5.2mA'
V|n-VccorGHDVjn-VccorGND'oul-0^A
VGC2.04.56.02.04.56.02.04.56.0
4.56.02.04.50.0
4.66.06.0
6.0
. . 25°C'54HC¿rid74HCTy pical
1.22.43.2O.G
1.82.4
1.998
4:4995.999
4.20
5.80
0.0020.0010.001
0.22
0.18
O.COOO]
"
85°C74HC
125 °C54HC
Guaranteod
1.53.154.2
0.30.91.2
1.9. 4.4
• '5.9
3. 985.48
0.10.10.1
02(10.20
±0.1
8
1.53.154.2
0.30.91.2
1.9• 4 4
5.9
3. 045.3-i
0 1O.t0 1
o.:i301G
±1.0
80
1.53.154.2
0.30.91.2
1.94.45.9
3.705.20
0.10 10 1
i). 41)0.40
i 1.0
IDO
Unít
V
V
V
V
V
V
,,A>,A
5-115
MC54/74HC13S
SWITCHING CHARACTERISTICS IVC C-5V. TA'?'-"t:. q - 15 pF. Input i, - U-fi nsl
Symbol
IPLHIPHLIPLH'PHL
'PLH
IPHLITLH-ITHL
Piiruiiíülof
Máximum Propogation Delay, .Inpul A 10 Oulyul Y • • - ' - - .. (Figures 1 and 4} . . . . . . - . 'Máximum Pfopagaiion Delay, CS1 ID Y
¡Figures 2 and 41 . . . .Máximum Ptopagation Delay, CS2 and CS3 to Y
{Figures 3 and 41
Máximum Ouipul Tronsiiion. Time. Any Ouipui[Figures 2 and 4) • '
frinc
Typlcol1320
13
1413
17'
5
».jlJMHC_Ciuiic uní nuil
Ltmll25
3525
25.25
30.
10
Unilns
ns
ns
ns
SWITCHING CHARACTERISTICS fCL - K) pl-, Inpul i, - u - B ns)
Symbo!
IPLH
'PHL
IPLH
'PHL
'PLH
IPHL
ITLH.ITHL
cjn
CPD
Poromuiur
Máximum Piopagaiion Delay, Inpul A'lo Ouipiil Y(Figures 1 and 4) '
Máximum Propagntion Datoy, CS1 lo Y(HüUios 2 ond -1)
Máximum Pfopagotíon Delay, CS2 and CS3 lo Y(Fígutes 3 and 4)
Máximum Oulput Transilion Tima, Any OuipniIFlguios.2 and 4)
Máximum Input CapaciíancePower Dissipaiíon Capaciíance"
VCG2.04.5
'6.0
•2.0
M.56.0
•2.04.5
• '6.0
2.04.5.
•6.0
2.04.5
;>;6.0'2.0 '4.5 '-6.0.
2.0 -4.6 '6.0
25 "C54HCand74HC
Typlcal
'751513,.;
1CO".2017
.75• • 15 .
13 :75.15 ,.
• - 13 . .
75:15 -
.-13 i.' • -88.
•• -is :15'39
• Q~.6
5 -
• 60.
85 "C74HC
125 DC54HC
Gunranleod Llmíl• 150
••30...26 .
.20040
. 34
.. 15030
'-26
150. -30
261503026
1753530
751513
10
-
189• 36.'.' 32
252• . 50
•53
1093832^
1893832
1893832
221443r351316
10
-
2244538
2986051
2244533
X2244538
2244533
2615244
1102219
10
-
Unilns
ns
nr.
ns
ns
ns
113
PfpF
" Cpo is usad lo determine Ihe no-load dynamic pov/er consumplion: PQ «= Cp0 Vcc2f-f ICC ^CC
PIN DESCFUPTIONS
INPUTSAO, Al, A2 (PlfJS 1, 2, 3( - Atldruittlinpiilii. Ihosn intints,
whuii ihü cliip is sGlocifld, doiurniino which oí the eight oui-puis ¡s aclive-low.
YO-V7 {PINS 15, 14, 13, 12, 11, 10, 3, 71 - Activo lowDecoded ouiputs. Thsse outpuis assume n low levül whenoddressed arjd ihe chip ¡s selecied. Thesra oulputs remainhigh when not addressod of Ihe chip is not selectGd.
CONTROLS
CS1/CS2, CS3 (PINS 6, 4, 5) - Chip sulncl Intuís. PorCS 1' al a logic high and CS2, CS3 ai a logic low. Ihc chip isselecied and ihe;qulpuis.w¡ll lollow Ihe Addrcss inpuls. Porany oiher cornbínalíon of CS1. CS2, and CS3, ihe outputswíll be at 'a logic high.
5-116
MC54/74HC138
OWITCHING WAVEFORMS
• InpuiA
, 'PLH
Oulput Y
.. FIGURE 1
•50% y rIPHL
FIGURE 2
InputCS)
•OutputY
90%50%
10K
ITHL
vcc
GND
—'TI.H
FIGURES
Oulpul Y
FIGURE 4 - TEST CIRCUIT
LOGIC DIAGRAM
AO-7
5-117
íi-CMANNCI. 50URCE URIVIKSrvj.l^f^rfu^Vr^f^J^Uffn.miJi •••"• 11 n T.
SERIES UDN-2980AmGH-VOLTAGE, HIGH-CURRENT SOURCE DRIVERS
FEATURES• ITL. DFL, PMOS, oí CMOS Compatible Inpuls
• 500 inA OuípuE Souice Ciment Capabilily
• Iiansieilt-Piolecled Üulpuls
• Oulput Bieakdown Vollage to 80 V
p ECOMMENDED forapplications rcquiringsep-•*- - arate logic and load grounds, load supply voll-agc to +80 V, and loud currenls to 500 riiA, SeriesUDN-298ÜA source drivers are used as intcrfacesbctween standard low-power digital iogicandrelays.solenoids, stepping inotors, and LEDs.
Under normal operating condiüons, (hese dcviceswill sustain I2Ü niA continuously for each of thceight outputs at an ambient teniperature of +50°Cand a supply of -1-15 V. Al! devices in üii.s ;jjcriesíncoiporatc input current limiting resisiors and out-put Lransient suppression diodes.
Type UDN-2981A and UDN-2983A drivers areTor use wiili -í-5 V logic sysleins — 'ITL, SclioltkyTI'U DTL. and 5 V CMOS. Type UDN-2982A andUÜN-2984A ílrívers are intcnded for MUS ¡nierface(PMOS and CMOS) operaung froin supply vultuges
of 6 lo 16 V. Types UDN-298IA and UDN-2982A ]will wilhstand a máximum output OPF voltage of •+ 50 V, while Types UDN-2983A and UDN-2984A ]will wíihsland an QUtput volíage of +80 V. In all '!cases, thc pulpul is switched ON by an active high •Inpul level. \\s UDN-2980A high-voltage, high-current \e drivers are supplícd in 18-!ead duaJ in-ünc (
packages. On special order, hermetícally-sealed ver- ¡sions of ihese devices (with reduced package powcr jdissipaüon capability) can also be furmshed. *í
AB50LUFE MÁXIMUM RAÍIHGSat 25"C Free-Air Teniperature
Outpul Voliage Range. VC£ (UDM-2981A & UDN-Z982AÍ + 5 V ío + 50 V(UDN-2983A¿ UDN-2984AÍ + 3 5 V t o +80V
Input Voltage, Vm (UÜN-298IA & UON-2983A) +15 V(UDN-2982A¿ UDN-2984A) +30V
Output Cunent, lwl - 500 mAPowei Dissipalion, Pn [any onc dtiver) 1.1 W
(total package) 2.2 W*Qperaling Fempeíatuie Range. Tt - 20°C to + 85'CStotage lemperatufe Range, Ts - 55"C lo' + 150°C•Deía leat t l ie ía leo í ISmWrCabove -t-25'?C.
StliltS UÍJN-2980A8-CHANNEL SOURCE DR1VERS
POWER DISSIPATIONASAFUNCTIONOFAM8IENTTEMPERATURE
2.5
S 2-°<IL
° 1 5o- 1-J
0.5
V
O 50 101 150AMBlENf lEMFERArÚRE 111 "C
O-, lio A-M.1IJA
ELECTRICAL CHARACTERiSTICS at TA - 4-25°C (unless otherwise specified)
Chaoctenslic
Oulput LeaVage Curtent
Cíilectot-ErnitlcrSaluiatioit Volt a ge
!ílpul Cuiient
Sutcui Souice Cimeiit
.^'•f'y Cunent
',/uiíuts OoenJ
^"ip Diode
J¿£^Cutrent
SXl___
_____^
c^___
Symbol
leu
*CH«t|
IIMW
'(HJf
1,
'<
v,
ton
U,
ApplicableDevices
UDN-298I/82A
UDH-2983/84A
All
UDN-2981-83A
UDH-2982/84A
UDN-298Í/83A
UÜN-2982.84A
Uüf 1-298 1/82AUÜN-2983;84A
.UUN-298Í/82A
UDN-2983»84A
All
All
All
íest CondiÜons
VH, = 0.4 V*. V, = 50 V. I, = +70"C
Vw = 0.4 V*. Vs = 80 V. f t = T/O'C
V« - 2.4 V. lom = - l O O m Ay _. 2. i) V, ln = -225 fiiA
Yh = 2.4 V. I,,,, * -35ÓHIA
V« = 2.4 V
V,, - 3.85 VV,, = 2.4 V
Vw - 12 V
V,, - 2 . 4 V . V c r - 2.0 V
V,, ^ 2.4 V, VÍE = 2.0 V
Vw = 2 . 4 V ' . V , - ^ 50 VVJN = 2.4 V*. Vs = 30 V
Vfi - 5 0 V . V W * 0.4 V
VH = 30 V, VIN =* 0.4 V
If = 350 mA
0.5 E,, lo0.5Ew,. Rt - IOOÍ1.Vs - 35 V
0.5 E,, lo 0.5 E.*,,. Rt » 10011.V, .-- 35 V
Test
fig.
1
!22
2
3
333
2
• 2
4
4
55
6
—
—
Min.
—
—
———_
™__
—
-3M
-350
——
———
—
—
Lilyp
—
—
1.61.7
[ 8
140
31Ü140
1.25
—
—_
——
—1.5
LO
5.0
mitMax.
200200
1.3
1.92.0
200
4502001.93
_
—
1010
5050
2.0
2.0
10
Unils
• MAMAVV
V
M¿
MA/iA
mA
mA
mA
mAmA
MA
MAV
Ms
MS
C M A N H C L S O U R C E DR1VLRS
TEST FIGURES
i ... 1CEX
Figure 1
1DWG. NO. *-n.o«i
Figura 3
OPEN
i-DWG. HO. *-H.Oflí
Fígur* 5
OPEN
OPEN
OWG. NO. X-11,0
Figur» 6
3—64
ALLOWABLE PEAK COLLECTOR CURRENT
AS A FUNCTION OF DUTY CYCLE
TYPE UDN-2981A/82A
3—65
MKIL. UlJfi y /M ' / i
8-CMANNEL SOURCE DRIVCRS
ALLOWABU PEAK COLLECTOR CURRENTAS A FUNCTiON OF DUTY CYCLE
SERIES UDN-2980A
10 20 30 la SO 60 70 80 90 100PE* CENT DUIY CYCtE
O-i •">. MI.IMt
j ! . . . v .' V ' l ' i l < /ÜUA
8-CHANNEL SOURCE DRIVERS
ALLOWABIE PEAK COLLECTOR CURRENT
AS X FUNCTION OF DUTY CYCLETYPES UDN-2983A/84A
O 10 20 30 ÍQ SO 60 70 BO 9Ü 100TEH CElil DUIY CYCLE
•S-j. Mu. '-11.IU9B
30 (O 5CfE» CENÍ DUIY CYCLE
ao fu 100
8-CHANNa SOURCE DRIVERS
INPUT CURRENT
AS A FUNCTION OF INPUT VOLTAGE
¿ 6 3 10 12
INPUr VOUAGE ¡VOLTS)
TYPICAL ELECTROSENSITIVE PRINTER APPLICATION
TYPICAL VALÚES; Vs - SO V!OUT - 20Ü-300 mA
U)0)•cO)
.-JCOLO
unLOT~
ü-
Operational Amplifiers/BuffersNatíonalSemiconductor
LF155/LF156/LF157 Series MonolithicJFET Input Operational AmplifiersLF155, LF155A, LF255, LF355, LF355A, LF355B Low Supply CurrenlLF156, LF156A, LF256, LF356, LF356A, LF356B Wlde BandLF157, LF157A, LF257, LF357, LF357A, LF357B Wlde Band Decompensated (AyMlN =
General Descriptíon
8!-FETT.chnoli>flV
These are trie first monolithíc JFET input Operationalampiifiers to incorpórate well matched, high voltageJFETs on the same chlp wíth standard bipolar transistor{BI-FET Technology). These amplifiers íeature low inputbias and offset currcnts, low offset voltage and offsetvoltage dríft, coupled wíth offset adjust which does notdegrade dríft or common-mode rejection. The devícesare also designed for high slew rate, wíde bandwidth,extremely fast settling time, low voltage and curren!noise and a low 1/f noíse córner.
Advantages« Replace expensive hybrid and module FET op amps• Hugged JFETs allow blow-out free handlíng compared
with MOSFET ínput devices• Excellent for low noise appÜcations using eithcr high
or fow source impedance—very iow 1/f córner" Offset adjust dous not degrade drift or common-mode
rejcction as in most monoÜthíc amplifiers.• New output stage allows use of large capacitive loads'. {10,000 pF} without stabtlity problems• Interna) comperisation and large diíferentíal input
voltage capabilíty
Applications.« Precisión high spacd integraíors• Fast D/A and A/O converters» High impedance buffers• Wídeband, low noise, low drift amplifiers• Logarithmic amplifiers
• Photocell amplifiers• Sample and Hold círcuits
Common Feátures(LF155A, LF156A, LF157A)
« Low Ínput bias curren!« 'Low Input Offset Curren!• High Ínput impedance• Low Ínput offset voltage
• Low input offset voltage temperaturedrift
• Low input noise current '•,. 0.01• High cornmon-mode rejection ratio• Large de voltage gain
30 pA
3pA
1 mV
Uncommon Feátures
LF155A LF1B6A
Exirernt-lyfast setílingtime to0.01%Fast slewrateWíde gainbandwidthLow inpuínoise voítage
52.5
20
1.5
125
12
LFT57A
(AV - 5}
1.5
5020
12
'HrlOOdB106 dB
UNITS
MHz
Simplified Schematic
LF1
55/L
F156
/LF1
57 S
erie
s5¿
S S
- o
£ §
> >
1
o b
(o
~—
O
. -
- * 5
S
>
.'£
• E
5-
s ..
-. ---.
a " s
t
a
> >
u
E E
<
<
!a c
t>
>
>
•
Q
tw
in
i
tf)
U)
rs
IÑ
m .—
-.
• ;:-
CM
O I
* £ !
. a £
GS
" Q
í-
2.
!5 x
lu'2
e te
f>"
>"I -
T| -
T]<
XN
^~1
o».
vi;
.
li»^
ixit
fi
i* *
g« S
lpn»
!
ln
-
1-1
S0£
=
.2
a 5
< H CO _O _"w _5 "o ns i_ ra jr ü "ñ _y "o _0)
LÜ •o
1-
!=*•
= c
—
a
í <
e
_
—
— - -
(é
LF15
5/LF
156/
LF15
7 S
erie
s
O
¿"
.?
J*
Cl
, M
=;
• O3
3!
?
5
=.
=•=
.=
. a
5
" í
5 .
=
2.
Z
g'
í _
7 "
-,
oÜ
. S
—
—
— —
3;
~
r-
r-
~
~
? "
~
<
< >
j •
1* ^
u
o c
«*J
""
*'~
• M
' m
: .
••;:/_
;':, '/
'-.;-.
• • •
-
í r-»
1
...'.:,
.-",-^
,-.. ~
,--
•
u
oo
"—
• —
"
— •"
•' '
oí
' — •
'b o
• w
"™
•
"•
«!
_ -.
.
. w
..
.,
-- E
w o
I
" -
•• "
'•••
"-.'
• '
U
QO
—
• —
" ' —
-1
.
M
K
\ -
- -
\ I>
< <
'
\- '
c- 'J.
T, "r.'n
*
v ^ í
7
•v 1 — t
TS z -H -í 1
SY
MB
OL
AH
AM
E7
m n gS
NO
UIC
rW
T
í
* « ¡i ce r *
u C
u
m r-
U U
l
(-
s s
(J ^
c i
o m CD 0 '
— . o C
U S O ÍD w"
O H"
n Ul
n < 1
Suiíply C
u
í " - £. - - Ul
- « o Ul o '.-a X -C -o X -í -a X -í -c X - X -í -í -a X
PA
RA
ME
31 ¡ r
u
— H
Í
Ss
£s"
gm
r- -T\i
Oí
*J
—
«1 -1
O U
l
-n u í> tn
r r-
Cl
Ul
G > •n > u
c
O o m O
--
o O Oí
O » íñ'
o (A -i "• cr. a < <
*0
O
<
<
>s,
31
n
. o
<^
33
3 .
O
31
V
» =i
O
<
=•
O
Or-
»-
-£
oo
o^
. c
..s
°-
2-
=3
££
c . '
¿-
- 5
*
? "
~
-
% °
^ F
1 '
s- 1
S "
" &.
S
3 l
•£
<•*
™
r
•*
o33
33
5:
:
w .
--•
—
• s
' *.
«í
S '
S
ir '
=
C1
<
<
<
O <
<
Bl
Ü
' _ "
^ ^ "
<
; <
.<
3
_<
: <
' J
C O
r U
r
O5
tD
--
. —
—
M
C
- -i|
••••|-
'"¿-¿
--:25
-"."
.-|
- •
-v..
—
-•
•-
• -.
H-
t „
>
,
(jl
S
—
O
v)
oí
S
' 1
V-
R•_
_
.*
—.—
"-
- —
--
•»
^C
Q
.f-J
.líl.W
lA
C
* c
• •
s -i_
*;•
• •
c,
•
^
^
«;
5
O
o
o M
tn
o
• _
_
J.
-±
^ "
- „
'
* •
Q
* •
O
•*!
VI
rJ
U
r~
i
i < .
<
t- í
z !
M .
n
o
w
: i
i 5
^<
E
>
5" •
r F
. í.
Q
O >
=•
?*
-• 2
* o
'— <
*
2
I !
F
ñ •
-S--
S S
2.
<
! ~
3 j
^
c .
o~ .
o
_| j^
-^
^
_,
. ^3
3
JO
33
. JIA '
IA
' j
"
"
* ^
t^
'-H
.^
J^
in
i V
I W
Mw
i°Í
» X °i
—
* '
&
es
*
oO
tS
n^
O;
C
r?
33
1 ,c
i -
2
í *
= ?
s f
! ?
. !>
5 ?
! -
s ¿
u
i-» i
—
*n'
u,
01 ."
- 0
i
. '
'
- '
-.
-•-,
'-
*'
i-
**•»
** ,^
*
-5_
- ' -
•" "
- "ií ; g
,-
-:. V
^j "
,.
i i
'a o
o a
S
3 1 •
,
°. ."
« .
' :w V
-'_ S
.-
• w i\-
j11
1 o
"" a
'
*
MI
S
í w
i j —
3-
y
" ~
'u.
-»
-o
- -"
.'oí.-
Vw.w
^ :a
.--
.-d
-
• ,
-* >
.••»
» *
••*-
-
- -.-
.- «
.-
-í .
- •<
. ,-
••-* -
ív -
^~_.
~*
.-
co
•-)
«J
m
—
—
8¿J
U
0
''!*
5-5 J
c-;
.¿.i i í ;
J «
• „•
¿ f
/? ** ^ X 7 •H X 3 H - X
SY
MB
OP
AR
AM
E
ni
3J O O z
SN
Olil
•n m
t~ Oí i;
CD «
ra
"
f- in S i
0
!
"n i
o
:
"/É
f_"
"S i r-
t/T 0 ™ U)
i * ' • -
,
LF15
5/LF
156/
LF15
7 S
erie
s
>- í
—
^:' |
•s .i,"
1j
^~£ x |
I <
?
s 2
b"
dn
al
s mu
ipai
*v«i
Qha
ract
erís
ticp«non
luí
ih«M
dw
icei
fiiu
ní
«vjil
able
paiv
et
diis
i
0 -
<Ü
J 1
¿
ifíiu
«ppl
"3
I i
1 J o C en <a a \í> Wl
n u.
-l < S 1
—
1-io
"°5
m U)
¡r J
• u '
m i
57
vi P
u o
>
*O
-f
i'i- 1 b
'?
"
'o
VI
*,
W
Vi
VI
H
xo "U
o
-H
'O
+
.ilS
V ¿
Vs£
í20
V
.
-26
"C
<T
A<
lB5
*C
+8
5"C
gfe
^* >
íV
I "
(J
> ,°
lo
\f¡, tn
ÍN
to
V)Q>
*CQ)
DC Performance Characteristics
Inpul
41LO7-
-Ü.
Op»n Loop VotUfr* Oiin . ... OulpUl Vo
V t - tllV
Typlcal AC Períormance Characteristics1 ' ' ' '
il AC Performance Characteristics (coMtumuí
i Op*n Loop
«t*rS-Ml[r>f Tim« .- .« .•' In¡«rl»f S«nIlnoTIrr>«
yiHV
T
£
I.1C .
•• M»
HHms4. AV -'
,r. " "I J; , itmihcTiMCUPv
T; . ' - '¡;T'
1 1 PlOt . . -
11 1M 1k !« IWh llt IM
NQ Tl«« W
— V j - U S V
.»:*: , • "ÍJ¿)'1 ''FPEOUEHtV WHi) .
.P-' ^ ''
^rft:/ • • • • •Cofnmon-^lod« R«i»ctíonMía
V,- mv_ n L - n _
fREQUEhCYtWHt
i j PoworSupply Rt]sdÍon R"ll'
= IMLIIH
T A -1S 'C
— v,- t t i v *. .. rniuivE\_\iUrri.Y _
• ICAT1VEsumv
i , • j Pow« Suppty R»]*ctltwi
' = lí* I
í \\» IMt 1U 10U
5^>> '•' ' FHfOU£«CY«li |
í'wdiitotled Onipiil Voltage Swing
1» 1H «
fRínUENCYtHi)
EquIvtfnrU Inpul Noii» Vo lftg«
IB» IM
Fnt'nilIKCT (Hí)
Eqn!vil*ni Input fio!»Volt»»» |Exp»rxf»d St*M
£ IM
n
2
5 I l-1-
~V,-il^v"
en
TI
"H—4.en
(D3.O)
c»
LF15
5/LF
156/
LF15
7 S
erie
s
LF15
5/LF
156/
LF15
7 S
eri
es
• , CuO."»' 'C
6 ,. 0)V (/>: h-i' IO
T—LL
.,. . ID
LL• ' _J- ••. íB
LO
LÜ
Typical Applications-
Sdtling Titn» Tm Cffcult
• S»Hl'ng tlm» li t»»Ud w!lh ihe LF155/6 conneci»dit unliv o^in Invttt«r and LF157 conn»cted lorAV- -S • • .
• FET uted to liolais ihe probé capocltanc»
• Output - 10V itL'p
• AV --B for LF1B7ni -o-iiv • .I J h U l f
l.ow Di!/! Adjuiisbl» Voll»jt R«f*f».ix:«
AII feílsiori índ poiemiomelert thould [>*
Pl: diili adluít
P2: Vou-j- ndjuíi
UtrLF155for
Low wpply cuf
3-30
Apical ApplicatiOliG ÍContinued) •
•í'í'' ' ' . « • ' í ' 1 ' *^~ '• . ' "4'-';' ; o < • ' ' ' • 1 ! • t ' ¿ÍV i ' ; - 1 .
' V*"f • ' r>. ' 1 1 ^t •,*•—•• ' "*» '" i fx. T * Dyn»niíc r*»*»*: 10O jiA ¿ l| ¿ 1 mA
',.$? ** "' "'' """V. ' ' ' " ' • —i^^^-. ' * Tiwu »nt r»tpon*«; 3 H' l°i ^l¡ " 1 d«c»cí*
:.? -: Í : J l- *S \ ' " C1- C2- R2' R3: ^d*11 d^nimlc comp«n-f*":.* i * _/\ ' Q *•' j *Xfi wlion '
i- • -¿r ^ 1 « • •» *Y' » 'i .- "i :• ' "* • •=• l 1' U U « VQJ »d(uu tht LF166 10 minimin guíate* nii» • " * '- ' « M^ «fior •-
rí¿ • • - , ' - : . • ' ' • - : ' _ " * ' • - •rW" ( R2 kT ' R, ' I
*y!,.' • • ' -, ! •' • . ' -Pr»citlonCutr»fH MonitOf
&-4í'j' r.'" ---•;•—-"•'- — ÍL^_ • ' ,..••ft;: • ' . ¡ | . ' *ÍSl;; : '*•••;* \ ,f\ ? -r' ' J • " • ' • . ' • • • :
í'^^ré.I;. %K .{._/x. Sw!¡, :•- ^UM* J>t_ t,m- ' . VO- 5 R1/R2 IV/mA ol(5l•Í6"í -,"' i '' - . J V j * -í\ ' RI.R2. R3: (U* i.iiiiof,
$&?' • ' -" '+ 1' .' 1 » ' • • U.e LHlbblof'»í*' ' ,. ' " = • ' ' ' ,- J_ • • ' ' f Comnion nt(xJ« lange tu tupply i*it&<
5^í^'*i;'.1 ' ' ' ' ' ( '' ' ' ' ' " ' ' " ' ' , ' ' • " • * Lo" tlJPP!V cuneiit
''5* ii'1 ' >"' • ' . ' . • " '
Y>Í¿' • 8-Blt D/A ConvMtvr wtUí Symm«ulc«l O(!M| Biiiity Optrilion
•ft-í^,' ^ uv
' Vi- ' ' * * ! ! '
•TL'.Í. ' ' ' wt LII i\ttrt-'- * ' 1W •' *' l] " " " " " .-AJvv-i
|:1 ' """""™] ~ ¿¿> "Á ;i - %. - A -jLí1?^*"','* -|1V
J^?' -v" - • ' • • m, R2 thouldbe ninicticd whhlri tO.OSX
' J»f|ji' • • Full'iCílt mpome tlrtii: 3 jJi , >
l jj;-.;- / , . _ ' Eo ' B1 B2 83 B4 BS 80 B7 B8 COMMENTS
-fe'fí.*»'.;-' • i i +9.920 1 1 , 1 1 1 1 1 1 Poiiiiv* Full-Sc»!*
«tf*1'-.'' '"-'' • ' • *O.CMO 1 u' 0 0 0 0 0 0 (+) Ze roSca B
u .-- ; - ' -0.040 0 1 1 1 1 1 1 1 Í-) Zno-Scale
J -'i • , -9.920 0 0 0 0 0 0 0 0 N-tpl¡ve Full-Scjle
ríí — _A
TI
Oí<=nr-"TI:156/LF
157
e/>O>13.co"
C* .
•' \ i; '••
. / >, .
-
rÉÜíiHw^a¡
1
3-31
LF15
5/LF
156/
LF15
7 S
erie
s
~ c
_
HH
M
TV "
Hh
....
'Ih^w
^
§
LF15
5/LF
156/
LF.1
57 S
eries
¿£
Q
•I
• ¿ S íl
c-
O :
o. a O'
"a. .
MOTOROLA MC54/74HC373
Advance Information
OCTAL 3-STATE NONINVERTING D-TYPETRANSPARENTLATCH
The MC54/74HC373 ts ¡dcnücal ¡n plnout to the LS373. The device ¡n-puts are compatible wiih standard CMOS ouiputs; vvith pullupresístors, Ihey are compatible with LSTTL ouiputs.
Thcse ¡atches appoar transpatent to data (i.e., Ihe outputs changeasynchfonously) when Lalch Enable is high. When Latch Enablu goeslow, dala mealing the satup lime becomes latched.
The Output Enable ¡npui does not allect the state oí ihe latches, bu!when Output Enabla ¡s high, all outpuis are (orced to tho hiyh-impedance state. Dala may thus be lalched even when the device is notselecied.
Tho HC373 ¡s ídontical ¡n íunciíon to the HC673, which has tho iiipuipins on tho opposlie sida of Iha packago /rom trie output pins. Thisdevico is similar ¡n lunctíon to ihe HC533, which has Inverting ouiputs.
• Low Power Consumption Characturístíc of CMOS Devices• Output Orive CapabJüty: 15 LSTTL Loads Mínimum• Operatíng Spetíds Similar to LSTTL• Wide Operating Voltaye Range: 2 to 6 Volts• Low Input Current: 1 /<A Máximum• Low Quiescont Curren!; 80 pA Máximum (74HC Series!• High NoLsa Inimunity Characieristic of CMOS Devices• Diode Proleclion on All Inputs
BLOCK DIAGRAM
DalaInpuis
3
•J
7
a13
u17
Ifl
2
5
fi
g12
15
16
19
NonirwertingOuiputs
Loich Ensltla-
Ouipul Ennble-
Ptn2Q- VCGPin 10»GND
"i Oocumuiü coDinnu jiiloin^l'cín on o n«« ptoducí Sp«itairions ontt 10)011 rwttton hc siibjeci [o chflfi()ii wuhoiit fioliCH
HIGH-PERFORMANCE
CMOSLOW-POWER COMPUMENTARY MOS
SILICON-GATE
OCTAL 3-STATENONINVERTING D-TYPETRANSPARENTLATCH
J SUFFIX -CEHAMIC PACKACE
CASE 732 • ,N SUFFIXPLÁSTIC PACKAGE
CASE 73a
ORDERING INFORMATION
b4 Seiios: - 55nC lo (• ]25°CMC54HCXXXJ (Cutamic PacíoQü Onfyt
71 Series: -40DC lo -i B5"CMC7^HCXXXN (Plástic Package)
: MC74HCXXXJ.(Cvrainic Packaga]
PIN ASSIGNMENT
Oulput Enablat
DOLO
OK5
02[Q
D3t(i
03 qg10 u
20 J VGC19] 07
IH]D7
17] l)fl
16 106
15 ] 05'
14 ]D5
13] 04
12]04
]Laicfi Enabla
FUNCTIONTA8LE
OutputEnable
LL
L
H
L alelíEntibia
HH
L
X
D
HL
X
X
Output
HL
nochango
2
X- don'I cure
5-277
MC54/74HC373
C,
MÁXIMUM RATINGS'SymboJ
VCGV|,i
Voui
lin
[out
'cePD
Tslg
TL
Parame ter
DC Supply Vollaga (Relerenced lo GND1
DC Inpui Vollage [Holeiericod to GND)
DC Output Vollage [flnlaronced to GND)
OC Inpul Cutpent, pet Pin
DC Output Cuiten!, peí Pin
DG Supply Curien!, VCG and GND Pitia
Power Disslpation, per Packagat
Slorage T.ampotalure
laad lemperaluíe 110-Second Soldeilng.)
Valué
-0.5 to +7.0
-1.5 lo Vcc+1'6
-0.5 to Vcc + 0.5
±20
±35
±75 •
600
-65 to -f 150
-""•• 300
Unlt
V
VV
niA
mA
mA
mW
°C
°C
"Máximum Rntings are those vainas beyond which damage to the devíce may occur,
íPower Dissipation Tamfwature Oafaling:Plástic "N" Package; - 12mW/°C (rom 65°C lo B5"CCaíame "J" Package; - 12mW/ "C [rom 100°C to 125-C
Thls device conlaina circuítfy to pioiect ihe[npuls againsl damage due to high stalicVoltagea or elacttic (¡oída; however, it is ad-
vlsed that notmal orecaullons be taken loavold applicatlons o( any voltage highar than
máximum rated voltages to tliís high-impedance círcuil, For proper operaiton il islecommandad that V]n and Vout be con-strained lo the rango GNDj£(V¡n or
Unused Inputs musí alwnya b« tled lo ari
appropriate loqíc voltage level le.g., eíther
RECOMMENDED OPERATING CONDITIONS
Symbol
VGC
Vln.Voo,
TA'r- <(
Patametef
DC Supply Vollaga (Ralüjenceií to GND)
DC Inpul Voltage, Ouiput Voltage t .(Raíaroficf^ t- nNDl
Opataling Temp«ratuta — 74HC Series54HC Seríes
Inpul Rise and Fall Tima (Figure 1)
Mln
2.0
0
-40-55
-
Max
6,0
VCG+ 85+ 125
500
Unit
V
V
°C
ns
ELECTRICAL CHARACTERISTICS (Voltages Raíarenced to GND)
Symbol
VIH
VIL
VOH
VOL
lin
ioz
ice
Paiaittelar
Mínimum High-Level Input
Voltage .
Máximum Low-Level InpUlVoltaoe
Mínimum High-Leve! Ouiput
Voltage
Máximum Low-Leve! OutputVoltage
Máximum Input Leakage Cunent
Máximum Thiee-Siate LeafcagaCunen!
Máximum Otiiescen! SupplyCuiient ÍPar Packaga)
1
T*st Condition»
Voul-0.1 VorVcc-0, l V
|loutl"20^A
Vou[-0.1 VorVcc-0.1 Vlloutl-20M
V¡n-ViHorV1L
lout-^20^A
Vln-V|Ho( VIL
'- lOU|--6.0mAIout--7.8mA
V|n-VlHorV|Lloul-20^A
V|n-V|HorV|L
• i I0ut"6-0 mA'oui-7.8 mA
V|n-VCc°rGNO
Oulput Enabia-V|H
V0ut-.VccorGND
Vin-VccorGND
loui-O^A
VGC2.04 56.0
2.04.56.0
2.04.56.0
4.66.0
2.04.56.0
4.56,0
6,0
6.0
6.0
26 "C64HCand74HC
TypicBl
1.2243.2
0.61.82.4
1.9994.499
5.999
4.205.BO
0.0010.0010.001
0.200.20
O.OOC01
—
~
86 °C74HC
126 °CE4HC
Guaranteod
1.53.154-2
0.30.9i. 2
1.94.45.9
3.985.48
0.10.101
0.260.26
±0.1
±0.5
8
1.53. IB
4.2
030.91.2
1.94.45.9
3.845.34
0 10.10.1
0.330.33
±1 0
±5.0
80
1.53.15
4.2
0.3091.2
1.94.4
5.9
3.705.20
0 1010.1
0.400.40
i 1.0
±10.0
100
Urvt
V
V
V
V
V
V
*A
*A
fA
5-278
MC54/74HC373
5°C, Input i r - t f«6nsl
Symbol
IPLH
ll'HL
•IPLHIPHL
'PLZ
'PHZ
'PZL
iPZH
'1LH-ITHL
Para moler
Máximum Piopagatlon Delay, Iriput D lo Q :
(Figures 1 oruiSl
Mdximiim Propagan'on Delay, Lalch Enable to Q(Figures 2 and 51
Máximum Propagaiion Deíay, Output Enable to Q
(Figures 3 and 61
Máximum Piopagation Dolay, Oulpul Enable to 0
(Figuios3«-mdG)
Máximum Oulpul Tiansilion l'ime, Any Outpul(Figures 1 and 5)
CL-50pF
Ct = 50PF
CL-SpF
CL-6QpF
Ci_ = 50pF
54 HC and 74 HC
Typlcal
13
13
1515
'"i 3
13
14
14
5
Guaranl&edUmit
25
.25
3030
25
25
28
28
10
Unii
ns
ns
ns
ns
ns
SWITCHING CHARACTERISTICS ([npul t f- i f-6 nsl
Symbol
'PLH
IPHU
'PLH
IPHL
'PLZ
'PHZ
'PZL
IPZH
1 Paramóte*1 : •
Máximum Piopagation Ddlay, Input D to Q(Figures I and5)
Máximum Pfopagalion Delay, Latch Enablfl lo Q(Figuies2and5)
•' ' i l
I i ;
i : :
' • i ii
Máximum Propagaron Dolay, Oulpw Enabla to QIFiguies 3 and 61
Máximum Propagaron Delay, Oulpul Enable lo Q(Ftgures3and6)
CL-50pFCL-IBOPFC[.-50pFCL- 160 pF
Ct-50pFCL-ISOPFCL-BOPFCL-I&OPFCL-BOPFCL=150pF
CL-50pFCL-150 pF
CL-50pFCL-150pFCL-50pFCL-150pF
CL-50pFCL-150pF
CL-EOPFCL-f5í)pF
CL-MPFCL-I&OPFCt^&OpFCt-150 pF
CL-BOpF
CL^&OpFCu=150pF
CL-50 pFCL-150pF
Cu-50pFCt-150pF
CL-SQpFCL-150pF
CL-50pFCL-150pFCL-50pFC|.-lSOpF
VCG2.0
4.B
6.0
2.0
4.5
6.0
2.0
4.5
G.O ,
2.0
4.5
6.0
2.04.56.0
2.04.56.0
2.0
4.5
6.0
2,0
4.5
6.0
2S"C54HCat>d74HC
Typlcal
75100
1520
1317
75100
1520
1317
88113
1823
1619
88113
18
' 23
1519
751513
751513
75100
1620
1317
76ICO
1520
1317
86 °C
74 HC
12S°C54HC
Guaranto«d Umíl
150200
3040
2634
150200
3040
2634
175225
3545
3038
175225
35
' 45
3038
1503026
1503026
150200
3040
263-)
150200
30. 40
2634
189
252
3950
3243
189252
3850
3243
221284
4457
3748
221284
44
57
3748
1893832
1893832
189252
3850
3243
189252
3850
3243
224298
4560
38 -51
224298
45CO
3851
261335
6267
4457
261
335
52
67
4457
2244538
2244538
224298
4560
3851
224298
4560
3851
Unh
ns .
ns
ns
ns
ns
ns
ns
ns
5-279
o
MC54/74HC373
1
SWITCHING CHARACTERISTICS Ilnpui !,-![- Gas] IConllniímJI
Symbol
"TLH.'THL
CDU|
Qn
CPD
Paramoler
Máximum Oulpid Tiansition Time, Any Oulpul(Figures 1 and 5)
CL = 5QpF
Thiee S tnle Ouiput Cnpacilancü (Oulpul En;iblc¡= Vrr.1
Inpu! Capaciliince
Powof Dissipalion Capflcitanco"
VCG20-156.0
-_ .
-
25"C
54HCand7")HC
Typical
30G5
7.5
5
50
85 ÜC74 HC
Guaranieed L
GO1210
15
10
-
751513'
15
10
-
125"C54HC
mil
901815
15
10
-
Unitns
PF
PF
PF
is usod lo delmmitm tlio no-load dynnmic powm corisifmplion: PQ™ ' '' 'CC ^CC
TIMING REQUIREMEWTS lliipui lr-i|»6nsl
Syiubol
"su
ih
'w
lr. U
Paramaler
Minltnutn Solup Timo, Input D lo Laich Enable(HguiB4f • , ¡
1
Minimum fluid Time, Laich EnaWo lo Inpul D .(Figure 4| ' i . . •'
1 • i
Mínimum Pulse Widlh, Lalcli Enable(Figure 2) • '
Máximum Input Hise and Fall Timas (Fiyuro 1)
VGC2.0•1&6.0
204 560
20-1.5
6.0
-
25"C
64HC and 74HCTypícal
- 1001
255A
•10
87
1000
85 "C7-iHC
125°C54HC
Guaianteed LImít
555
50109
801ÜM
&00
555 •
631311
101
2017
íiOO
555
751513
1192420
EOO
UnltnS
US
ns
1)5
LOGIC DIAGRAM
DO DI • 02 03 D<\5 Üfi D7
2 . B . a . .2 .B00 ' 0 1 02 03 04 05 06 07
5-280
MC54/74HC373 '
SWITCHING WAVEFORMS
FIGURE] FIGURE 2
Input D
ITI.H
FIGURE3
-50% ^
A
•¡
-50%
^1P2H .PHZ-v]
'.
-50%r 90%
GND
HighImpodance
HlflhImpedance
FIGURE 5 — TEST CIRCUIT FIGURE 6-TEST CIRCUIT
DeviceUndarTesl
Q
frDevicaUndarTosí
Q i'vn ';
i;-. (Conneci lo V^Q when
Connect loGNDwhanlesiing IpHZancllPZH
I
5-281
Recommended