Shop OBEX P1 Docs P2 Docs Learn Events
AtoD Speed — Parallax Forums

AtoD Speed

UltrasonicerUltrasonicer Posts: 3
edited 2005-05-20 19:59 in General Discussion
Is there any way to speed up the sampling rate using the ADC0831 chip used in APPNOTE7 ?

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-05-20 14:19
    You can't change the speed of Javelin methods -- you may look to your code to see if there is an opportunity to examine the device more quickly.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-05-20 15:31
    If you examine the read method, you see it calls calcMV(), which in turn

    calls multiply().

    If you stick to the raw data (i.e comment out calcMV() in read)

    then you get a much higher sample rate.

    I suggest you copy the read method and rename it to readRaw or something

    like that and remove calcMV() from readRaw().

    It is usually better to work with native units (raw data bytes) and only convert to human-readable

    values (millivolts) when necessary, not for each read.

    regards peter
  • UltrasonicerUltrasonicer Posts: 3
    edited 2005-05-20 19:59
    Jon and Peter> We applied your suggestions and got an immediate 10x increase in sampling rate and are hoping to increase that still. Thanks again.
Sign In or Register to comment.