This preview shows page 1-2-17-18-19-36-37 out of 37 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 37 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 37 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 37 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 37 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 37 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 37 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 37 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 37 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Parallel IO (Input/Output)(pp)Parallel IO – data sent over a group of parallel wires. Typically a clock is used for synchronizationTypically, a clock is used for synchronization.CPU #1D[15:0]CPU #2clkCPU #1clkA 16-bit data channel is shown above. If data is transferred each rising clock edge, and clock rate is 300 MHz, then the data transfer rate(bandwidth)in bytes/sec is:transfer rate(bandwidth)in bytes/sec is:2 Bytes/clock period = 2Bytes /(1/300e06)s = 2B * 300e06/s = 600e06B/s = 600x106B/sV 0.7 1300e06/s600e06 /s 600 0/sSerial IOSerial IOdata sent one bit at a time over a single wireSerial IO –data sent one bit at a time, over a single wire. A clock may or may not be used for synchronizationDCPU #1CPU #2clkQuestion: Assuming one bit is sent each rising clock edge, how fast does the clock have to be achieve 600 x 106B/s? 600 x 106B/s = 600 x 106B/s * 8 bits/1Byte = 4800 x 106b/s1 bit/clock period = 4800 x 106b/sp1 bit * Clock Frequency = 4800 x 106b/s Clock Frequency =4800 x 106Hz = 4 8 GHzV 0.7 2Clock Frequency = 4800 x 10Hz = 4.8 GHzParallel vs. Serial IOParallel IO Pros/ConsdiSerial IO Pros/ConsPros: Cheap, very few wires Pros: Speed, can increase bandwidth by either making data channel wider needed. Good for long distance (“inches to feet”) interconnect.dhf ilgor increasing clock frequencyCons: Speed; the fastest serial link will typically have lower bandwidth than the fastest Cons: Expensive (wires cost money!). Short distance only–longparallel link. However, due to faster integrated circuit technologynew fast serial IOdistance only long parallel wire causes crosstalk, data corruption.technology, new fast serial IO standards (USB2/USB3, Firewire, SATA) have replaced ld ll l IO d dV 0.7 3older parallel IO standards.simplex vs half-duplex vs full-duplexpppFor communication channelsCPU #1CPU #2CPU #1CPU #2simplex: communication in one direction onlyCPU #1CPU #2orHalf-duplex: communication in either direction, but only one way at a timeCPU #1CPU #2Flldl iti ibthdi ti tV 0.7 4Full-duplex: communication in both directions at same time.Wires: Simplex, Half-duplexFor wires:simplex wire: communication occurs only in one direction.direction.uni-directionalTxRhalf-duplex wire: communication can occur in either direction,TxRxhalfduplex wire: communication can occur in either direction, but with voltage signaling only one direction at a time.Oebi-directionalTxRRxTxV 0.7 5RxOeSynchronous Serial IO CPU #1Synchronous Serial IO ChannelCPU #2Internal clock frequencies match toSynchronousserial IO eitherInternal clock frequencies match to within a tolerance value. Can be out of phaseSynchronousserial IO either (a) sends the clock as a separate wire OR(b) receiver (CPU #2) extracts clock from data stream or uses a Phase-() ( )Locked-Loop (PLL) and changes in the data stream to synchronize internal clock (phase alignment) to data stream. For PLL synchronization the data line must be guaranteed to have aFor PLL synchronization, the data line must be guaranteed to have a minimum number of state changes (0 → 1 or 1 → 0) within a particular time interval (transition density). S h i l IO hi hi h d ll hi h d i lV 0.7 6Synchronous serial IO can achieve high speeds; all new high speed serial standards are synchronous.Asynchronous Serial IOCPU #1Asynchronous Serial IO ChannelCPU #2Internal clock frequencies match toInternal clock frequencies match to within a tolerance value. Can be out of phaseAsynchronous Serial I/O does not transmit the clock on a separate wire nor does it guarantee a particular transition di(ih d li ld i i hdensity (ie., the data line could remain in the same state, either ‘1’ or ‘0’ for the duration of the transmission after the initial state change indicating start of transmission).gg )Asynchronous Serial I/O is used in older standards, is easy to implement, but is slower than synchronous serial standards.V 0.7 7A Three-Wire Async Serial Interface We will use a three-wire asynchronous serial interface to connect the PIC to an external PC. ifhiifddik(hA version of this interface standard is known as RS-232 (there are more wires defined in the standard and different voltage levels; we will only use 3 wires)y)CPU #1CPU #2Tx: transmit, Rx: ReceiveTx RxRx Txgnd gndEach wire is simplex, but communication V 0.7 8channel is full duplexAsynchronous Serial Data FormatsData sent LSb to MSb.On the PIC24 µC, will use 8 data bits.V 0.7 9µ,Copyright Delmar Cengage Learning 2008. All Rights Reserved.From: Reese/Bruce/Jones, “Microcontrollers: From Assembly to C with the PIC24 Family”.Parity•A parity bit is an extra bit added to a data frame to detect a single bit error– A single bit error is when one bit of the frame was received incorrectly (read as ‘0’ when should have been ‘1’, or vice-versa). – Not guaranteed to detect multi-bit errors• Odd parity – parity bit value makes the total number of ‘1’ bits in the frame oddFor 7bit data value 0x56 (1010110)–For 7-bit data value 0x56 (1010110), odd parity bit = ‘1’• Even parity – parity bit value makes the total number of ‘1’ bi i h fbits in the frame even– For 7-bit data value 0x56 (1010110), even parity bit = ‘0’V 0.7 10ExampleV 0.7 11Copyright Delmar Cengage Learning 2008. All Rights Reserved.From: Reese/Bruce/Jones, “Microcontrollers: From Assembly to C with the PIC24 Family”.Receiver Samplingpgone bit timenext bit0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4sample hereReceiver clock; period is either 4x or 16x the bit time (above is 16x).sample hereAt start bit, an internal 4-bit counter set to 0. Data is sampled at the mid-point of a bit time (counter value 7 or 8, some receivers sample at 7, 8 and 9 and only accept bit if all values are the same – do this for glitch rejection). Receiver/Transmitter clocks are not perfectly matched. Our tolerance is ½ bit time (50%) spread over entire frame. Assuming a 10 bit frame, maximum mismatch between Rx/Tx clocks is 50%/10 = 5%.V 0.7 12Copyright Delmar Cengage Learning 2008. All Rights Reserved.From: Reese/Bruce/Jones, “Microcontrollers: From Assembly to C with the PIC24 Family”.Baud Rate vs Bits Per Second• Baud rate is the rate at which signaling events are sent•Bits per second (bps) is the number of bits transferred perBits per second (bps) is the number of bits transferred per second (any type of bits, data or overhead bits)• If only a ‘1’ or ‘0’ is sent for each signaling


View Full Document

MSU ECE 3724 - Parallel IO (Input/Output)

Documents in this Course
Timers

Timers

38 pages

TEST 4

TEST 4

9 pages

Flags

Flags

6 pages

Timers

Timers

6 pages

Timers

Timers

54 pages

TEST2

TEST2

8 pages

Load more
Download Parallel IO (Input/Output)
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Parallel IO (Input/Output) and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Parallel IO (Input/Output) 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?