Hello all,
I'm a newbie for the most part to arduino. I am trying to get a DS1803-100 to work. I'm having problems. I have poured over documentation and examples, but still can't seem to get it up and running. I have my A0, A1, and A2 going to ground which should give me an address of 0x28 or 40(decimal) and I have pin 7 going to ground. I don't have anything hooked up for pot 1 only pot 0. I've got pin 9 going to A5 and Pin 10 going to A4 on my Arduino then I have Pin 12 which is Wiper 0 going to a 220ohm resistor thats hooked up to an LED. I've got pin 13 hooked to ground and pin 14 hooked to 5v then I have pin 16 going to 5v. The datasheet is here: https://datasheets.maximintegrated.com/en/ds/DS1803.pdf
and here is my code, any help is greatly appreciated:
#include <Wire.h>
byte val = 0;
void setup() {
Wire.begin();
Serial.begin(9600);
}
void loop() {
Wire.beginTransmission(0x28);
Wire.write(0xA9);
Wire.write(val);
Wire.endTransmission();
val++;
if(val == 255){
val = 0;
}
Serial.println(val);
delay(100);
}