Connect with us

Dyslexic Data sheets reading

Discussion in 'Microcontrollers, Programming and IoT' started by camerart, Jun 2, 2021.

Scroll to continue with content
  1. bertus

    bertus Moderator

    1,754
    676
    Nov 8, 2019
    Hello,

    @Harald Kapp , I could see the posted page.
    I printed it to PDF and posted it here for you.

    Bertus
     

    Attached Files:

  2. camerart

    camerart

    109
    2
    Aug 18, 2010
    Hi H,
    I think the interesting bits are here:

    I have found programming the setting immensly difficult, so I made a collour chart:

    Reading through all of the notes, on how to do this,
    1/ The MASTER should be set to the SLAVE settings.
    2/ Different manufacturers, use different 'names. e,g, CPOL and CKP.
    3/ CPOL is the same as CKP, but CPHA is the inverse of CKE.

    Seems simple, but it's taken hours to make my colour sheet, as things change as they're being read.
    Anyway, perhaps you would scan through it please?
    C
     

    Attached Files:

  3. camerart

    camerart

    109
    2
    Aug 18, 2010
    Hi B,
    Thanks, I received your message 1/2 way though writing mine :)
    C
     
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    11,415
    2,619
    Nov 17, 2011
    Of course, Master and Slave settings need to match.
    Right, found that info also here. I wonder why Microchip does this.
     
  5. camerart

    camerart

    109
    2
    Aug 18, 2010
    Hi H,
    Most manufacturers are experts so all this is easy, but in my example and yours, neither compare CPOL with CKP and CPHA with CKE, although mine does show them on 2x pages. And on mine there is an [*] so another break in concentration, making it even more difficult.

    Give it a go! The BMP280 says this:
    [TheSPI interface supports both SPI mode ‘00’ (CPOL = CPHA = ‘0’) and mode ‘11’ (CPOL = CPHA = ‘1’)in 4-wire and 3-wire configuration.]
    So what are the CKP-CKE settings? How long does that take you?
    I'm using 4 wires.
    C.
     
  6. Harald Kapp

    Harald Kapp Moderator Moderator

    11,415
    2,619
    Nov 17, 2011
    With CPOL = 1 and CKE = 0 this should be equivalent to CPOL=1 and CPHA=1 (CKE = inverse of CPHA for whatever reason). So SPI mode is '11'. As you noted before this seems to work nd should be good.
    In my previous post #17 I didn't account for the inversion of CKE vs. CPHA (wasn't aware of that fact by then) and thus created a bit of confusion. Sorry for that.
     
  7. camerart

    camerart

    109
    2
    Aug 18, 2010
    Hi H,
    No need for an apology, I did the same, and it took many hours of headache to clarify it. While asking you in my last post, I now find it as easy as you after 'bashing it into my bonce' Let's hope it stays :)
    Onwards and upwards, thanks,
    C.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-