Showing posts with label digital. Show all posts
Showing posts with label digital. Show all posts

Friday, May 31, 2019

Ways to Improve ADC Measurement Accuracy and Resolution Part 2

In part two of this 4 or 5 part series, we look at how the Successive Approximation or SAR ADC architecture works and understand its limitations. Note SAR based ADC architecture is what you typically find in microcontrollers.



To access the white paper that was referenced to derive the equation related to RC time constants and sampling time: https://www.silabs.com/documents/public/application-notes/AN119.pdf

Cutout from Silicon Labs App Note on calculating settling time for SAR ADC

Wednesday, February 1, 2017

Accessing Hidden Pins on the Arduino Zero

In this video we look at how you can access six additional digital pins from your Arduino Zero board. We also take a look at some flexible wired communication options you can take advantage of on the Arduino Zero.






Link to Adafruit tutorial referenced in the video: https://learn.adafruit.com/using-atsamd21-sercom-to-add-more-spi-i2c-serial-ports/creating-a-new-serial

Path on Windows to get to variants.cpp: C:\Users\yourname\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.6

Zero pin out chart from video:


//**********************Arduino Code from the video*********************
//This code is free to use and modify at your own risk

bool tog = false; //used to toggle LEDs on and off

void setup() {
  pinMode(38,OUTPUT); //This is the pin labeled "ATN"
  pinMode(22,OUTPUT); //This is MISO pin on ICSP header
  pinMode(20,OUTPUT); //This is SDA pin
  SerialUSB.begin(57600); //this is the native USB port
  Serial.begin(57600); //this is the programming port
  Serial1.begin(57600); //this is for pins D0 and D1
}

void loop() {

  if(tog) { //set each of the pins to high to turn LEDs on
    digitalWrite(38,HIGH);
    digitalWrite(22,HIGH);
    digitalWrite(20,HIGH);
    tog = false;
  }
  else { //set each pin to low to turn them off
    digitalWrite(38,LOW);
    digitalWrite(22,LOW);
    digitalWrite(20,LOW);
    tog = true;
  }

  delay(1500); //delsy for 1.5 seconds
}