Shop OBEX P1 Docs P2 Docs Learn Events
Basic Stamp-ADC0831: Pre clock or post clock — Parallax Forums

Basic Stamp-ADC0831: Pre clock or post clock

AYAY Posts: 1
edited 2008-07-16 21:09 in BASIC Stamp
Good day, All.

I am trying to learn how to use the SHIFTIN command on my BS2. Specifically the applications of the 'MSBPRE' and 'MSBPOST' mode.

Following is the link to the data sheet of the ADC0831. It appears that the data on the DO line becomes valid on a falling edge of the clock. In "Basic Stamp II Application Notes", page 357, it indicates that a falling-edge should use SHIFTIN with the "pre-clock" input. However, on page 359 it shows a sample program to read the ADC0831 and it uses·the SHIFTIN with MSBPOST mode.

Am I looking at the data sheet timing diagrams incorrectly? I am having trouble looking at the diagrams of any serial-connected IC and figuring out whether it should be pre or post clock.

Any help or insight is appreciated. Thanks in advance!

ADC0831 Data Sheet
http://cache.national.com/ds/DC/ADC0831.pdf

BS2 App Notes
(http://www.parallax.com/dl/docs/prod/stamps/BS2Appnotesv1_9.pdf

AY

Comments

  • FranklinFranklin Posts: 4,747
    edited 2008-07-16 21:09
    For the help part, I would do what Parallax says, it's their stamp and program. Now for the insight, I have none, the code works for me so I leave it at that. I'm sure someone here has more to say and I will bw listening.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
Sign In or Register to comment.