DAC R/2R Ladder Network

DAC R/2R Ladder Network
Çeşme:
https://www.tinkercad.com/things/gyeuuK0MBJ5-r-2r
  1. Arduino UNO
void setup() { Serial.begin(9600); } void loop() { delay(250); byte input = ( analogRead(A0) + 2 ) / 4; Serial.print("input: "); Serial.print(input); Serial.print("\t"); for (char i = 7; i >= 0; i--) { bool bit = input & (0x01 << i); Serial.print(bit); } Serial.println(); }