Diferencia entre revisiones de «C11 - UART: The serial interface»
| (No se muestran 2 ediciones intermedias del mismo usuario) | |||
| Línea 6: | Línea 6: | ||
**Incluye los delays de hardware mas los delays de software | **Incluye los delays de hardware mas los delays de software | ||
**En un input es el tiempo que pasa desde que el dato está listo para ser leído hasta cuando es leído | **En un input es el tiempo que pasa desde que el dato está listo para ser leído hasta cuando es leído | ||
**En un output es el tiempo que pasa desde que el dispositivo está en reposo hasta que tiene | **En un output es el tiempo que pasa desde que el dispositivo está en reposo hasta que tiene otro dato | ||
**En software es el tiempo que pasa desde que se supone que se hace algo, hasta el tiempo que realmente pasa | **En software es el tiempo que pasa desde que se supone que se hace algo, hasta el tiempo que realmente pasa | ||
*Throughput/bandwith | *Throughput/bandwith | ||
| Línea 15: | Línea 15: | ||
<br> | <br> | ||
<b>Tipos de sincornización</b> | <b>Tipos de sincornización</b> | ||
*La sincronización es la manera de que el software sepa cuando tiene que leer un dato, o enviarlo. Cuando envia un dato el software tiene que saber cuándo puede enviar el siguiente, y cuando se recibe un dato se tiene que saber cuándo se puede leer el siguiente dato | |||
*Hay 5 maneras de sincronizar el micro con el I/O device | *Hay 5 maneras de sincronizar el micro con el I/O device | ||
*Tipos | *Tipos | ||
**Blind cycle | **Blind cycle | ||
***Espera un tiempo determinado y luego asume que la operación se ha llevado a cabo | |||
***En operacions de input espera un tiempo determinado <math>\Rightarrow</math> asume que ha llegado el dato <math>\Rightarrow</math> lee la entrada | |||
***En operaciones de otuput se envia el dato <math>\Rightarrow</math> se espera un tiempo determinado <math>\Rightarrow</math> se asume que el dato se ha enviado | |||
***Se puede usar cuando los tiempos de latencia son muy breves. Ej. En un LCD se tarda 37µs en escribir un caracter Ascii | |||
**Busy Wait | **Busy Wait | ||
***Es un bucle que chequea | |||
is a software loop that checks the I/O status waiting for the done state. For an input device, the software waits until the input device has new data, and then reads it from the input device, see the middle parts of Figures 11.1 and 11.2. For an output device, the software writes data, triggers the output device then waits until the device is finished. Another approach to output device interfacing is for the software to wait until the output device has finished the previous output, write data, and then trigger the device. Busy-wait synchronization will be used in situations where the software system is relatively simple and real-time response is not important. The UART software in this chapter will use busy-wait synchronization. | |||
**Interrupción | **Interrupción | ||
**Periodic pulling | **Periodic pulling | ||
**DMA | **DMA | ||
<br> | |||
<b>Blid Cycle</b><br> | |||
[[File: Edx-blindInput.jpg]] [[File: Edx-blindOutput.jpg]]<br> | |||
<b>Busy Wait</b><br> | |||
[[File: edx-busyInput.jpg]] [[File: edx-busyOutput.jpg]]<br> | |||
<b>Interrupt</b><br> | |||
[[File: edx-interruptInput.jpg]] [[File: edx-interruptOutput.jpg]]<br> | |||
<br> | <br> | ||
Revisión actual - 09:50 2 abr 2015
Synchronization
[editar]
Conceptos
- Latencia
- Tiempo entre que se requiere un servicio de I/O y se inicia ese servicio
- Incluye los delays de hardware mas los delays de software
- En un input es el tiempo que pasa desde que el dato está listo para ser leído hasta cuando es leído
- En un output es el tiempo que pasa desde que el dispositivo está en reposo hasta que tiene otro dato
- En software es el tiempo que pasa desde que se supone que se hace algo, hasta el tiempo que realmente pasa
- Throughput/bandwith
- Es la máxima tasa de bytes/segundo que un sistema puede procesar
- Algunas veces está limitado por el I/O device y otras por le software
- Priority
- Determina el orden de los servicios cuando hay más de una solicitud
Tipos de sincornización
- La sincronización es la manera de que el software sepa cuando tiene que leer un dato, o enviarlo. Cuando envia un dato el software tiene que saber cuándo puede enviar el siguiente, y cuando se recibe un dato se tiene que saber cuándo se puede leer el siguiente dato
- Hay 5 maneras de sincronizar el micro con el I/O device
- Tipos
- Blind cycle
- Espera un tiempo determinado y luego asume que la operación se ha llevado a cabo
- En operacions de input espera un tiempo determinado asume que ha llegado el dato lee la entrada
- En operaciones de otuput se envia el dato se espera un tiempo determinado se asume que el dato se ha enviado
- Se puede usar cuando los tiempos de latencia son muy breves. Ej. En un LCD se tarda 37µs en escribir un caracter Ascii
- Busy Wait
- Es un bucle que chequea
- Blind cycle
is a software loop that checks the I/O status waiting for the done state. For an input device, the software waits until the input device has new data, and then reads it from the input device, see the middle parts of Figures 11.1 and 11.2. For an output device, the software writes data, triggers the output device then waits until the device is finished. Another approach to output device interfacing is for the software to wait until the output device has finished the previous output, write data, and then trigger the device. Busy-wait synchronization will be used in situations where the software system is relatively simple and real-time response is not important. The UART software in this chapter will use busy-wait synchronization.
- Interrupción
- Periodic pulling
- DMA
Blid Cycle

Busy Wait

Interrupt

Universal Asynchronous Receiver Transmitter (UART)
[editar]
Conversion
[editar]
Interfacing the Nokia 5110 using a Synchronous Serial Port (SSP o SPI)
[editar]