Professional Documents
Culture Documents
Sic 02
Sic 02
interfete seriale
I/O Synchronization
Scop: realizarea conexiunii dintre un uC si un dispozitiv extern
-BANDWIDTH <bytes/second>
-PRIORITY
Moduri de realizare a sincronizarii
(blind; busy-wait;interrupt; pooling; dma)
idle, busy & ready states
interface a flag
• The hardware will set the flag when the hardware component is complete
• The software can read the flag to determine if the device is busy or ready.
• The software can clear the flag, signifying the software component is complete
• This flag serves as the hardware triggering event for an interrupt.
I/O bound-unbuffered nterfacing
Utilizarea memoriilor de tip
FIFO
Buffered interfacing
First-In/First-Out (FIFO) Queues
Fifo_Put Fifo_Get
Order preserving
Producer(s) put (on tail end)
Consumer(s) get (from head end)
Buffer decouples producer & consumer
Even out temporary mismatch in rates
FIFO Operation
a- stare de asteptare
b- FIFO_put
c- FIFO_get
d-prelucrarea datei
FIFO Operation
a- stare de asteptare
b- FIFO_put
c- FIFO_get
d-prelucrarea datei
FIFO Queue Synchronization
Full duplex
Half duplex
Simplex
UART - Transmitter
Stop 7 6 5 4 3 2 1 0 Start
Shift 1 Data 0 U0Tx
clock
Transmit shift register
16-element
FIFO TXEF Fifo empty flag
• Tx Operation
– Data written to UART0_DR_R
• passes through 16-element FIFO
• permits small amount of data rate matching between
processor and UART
– Shift clock is generated from 16x clock
• permits differences in Tx and Rx clocks to be reconciled
One frame
Stop 7 6 5 4 3 2 1 0 Start
Shift 1 Data 0 U0Rx
clock OE BE PE FE Receive shift register
RXFE Fifo empty flag
12-bit, 16-element
FIFO
RXFF Fifo full flag
Read data UART0_DR_R
Receive data register
UART - Receiver
• Rx Operation
– RXFE is 0 when data are available
– RXFF is 1 when FIFO is full
– FIFO entries have four control bits
• BE set when Tx signal held low for more than one frame
(break)
• OE set when FIFO is full and new frame has arrived
• PE set if frame parity error
• FE set if stop bit timing error
One frame
CDEFGHIJKLMNO
"A"=$41 "B"=$42 "P"=$50 "Q"=$51
s 0 1 2 3 4 5 6 7 s s 0 1 2 3 4 5 6 7 s s 0 1 2 3 4 5 6 7 s s 0 1 2 3 4 5 6 7 s
• Rata<1Mbit/s
• Bitstart-cod operatie-adr-data
SPI (Serial Peripheral
Interface)
• Rata <3Mbiti/s
• Cuvintele sunt de 8biti
• Are semnal de ‘HOLD’
• Poate transmite ‘blocuri’ de date
Network Communications