-
max517 don't work
i have a dac max517 in my application which won't run :
Code:
schematic:
|--V--|
v-meter ----| |---- Vdd (Ref0)
gnd ----| |---- Vdd
scl ----| |---- gnd (AD0)
sda ----| |---- gnd (AD1)
|-----|
code:
slad con %01011000 ' slave address 00
comb con %00000000 ' command byte
volt var byte ' output voltage
init : clear
high sda
high scl
volt = 255
SHIFTOUT sda, scl, 5, [slad, %0\1, comb, %0\1, volt, %0\1]
as result : the v-meter output stays ever 0V. can't see what i make wrong. thanks for any help
-
try I2CWRITE instead.. it's still an I2C device ;)
Code:
SDA var PORTB.0
SCL var PORTB.1
Loop var Byte
DACAddressByte CON %01011000 ' DAC Address byte
DACCommandByte con 0 ' DAC command byte
start:
'
' this loop will generate simple ramp-up and down
' on the DAC output
'
For Loop = 0 To 255
i2cwrite sda,scl,DACAddressByte,DACCommandByte,[Loop]
pause 10
Next
For Loop = 255 To 0 Step -1
i2cwrite sda,scl,DACAddressByte,DACCommandByte,[Loop]
pause 10
Next
GoTo start
-
thanks a lot
so it works fine, i just include some pull-ups
was me really a help, thanks again