1 / 19

Perifeeria seadmed MSSP

Perifeeria seadmed MSSP. Alvo Aabloo. Ülevaade. MSSP – Master Synchronous Serial Port 3 re žii mi Serial Peripheral Interface (SPI) Inter-Integrated Circuit (I 2 C) Master Mode Multi Master Mode Slave mode 3 registrit: SSPSTAT, staatus SSPCON SSPCON2, kontroll. SPI.

Download Presentation

Perifeeria seadmed MSSP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Perifeeria seadmedMSSP Alvo Aabloo

  2. Ülevaade • MSSP – Master Synchronous Serial Port • 3 režiimi • Serial Peripheral Interface (SPI) • Inter-Integrated Circuit (I2C) • Master Mode • Multi Master Mode • Slave mode • 3 registrit: • SSPSTAT, staatus • SSPCON SSPCON2, kontroll

  3. SPI • Võimaldab 8 bitist andmevahetust, saamtine ja vastuvõtmine • PIN • Serial Data Out (SDO) • Serial Data In (SDI) • Serial Clock (SCK) • Slave Select (SS-) * • Registrid: SSPCON, SSPSTAT, SSPBUF, SSPSR • Vastuvõtmisel SSPBUF, SSPSR kaksikbuffer, kirjutamisel on samased

  4. SPI skeem

  5. SSPCON1 (SPI)

  6. SSPSTAT (SPI)

  7. SPI algpaigaldus Control bits (SSPCON<5:0> and SSPSTAT<7:6>) • Master mode (SCK is the clock output) • Slave mode (SCK is the clock input) • Clock Polarity (Idle state of SCK) • Data Input Sample Phase (middle or end of dataoutput time) • Clock Edge (output data on rising/falling edge ofSCK) • Clock Rate (Master mode only) • Slave Select mode (Slave mode only)

  8. SPI lubamine • SSPEN ->0 • SSPCON laadimine • SSPEN->1

  9. SPI ühendamine

  10. SPI ajadiagramm

  11. I2C • I2C bus on 2 signaaliga serial interfeiss. • up to 100 Kbps, fast mode 400 Kbps. • Iga seade oma aadressiga

  12. Alustamine ja lõpetamine

  13. Aadresseerimine

  14. Ülekanne (Transfer Acknowledge) • Kõik andmed kantakse üle baidi kaupa, baitide arv sessiooni kohta pole piiratud. Pärast iga baiti slave genereerib ACK biti. • Kui slave ei genereeri ACK, peab master lõpetama saatmise. Slave peab SDA jätma kõrgaks et master saaks STOP genereerida. • Kui master võtab vastu andmeid, siis genereerib tema ACK biti, iga baidi v.a. Viimase baidi korral. See signaliseerib slave saatjale. Slave peab jätma SDA kõrgeks.

  15. Slave ACK

  16. Wait state • Kui slave vajab andmete vastuvõtuks pausi, siis ta hoiab SCL signaali madalal.

  17. Master saatja

  18. Master vastuvõtja

  19. Multi Master • Rohkem kui 1 master, arbitration, syncronization • Väitlus: SCL kõrge, SDA kaudu • Kaotaja võib minna slaveks

More Related