ADS 1115

+- 15 bit A-D Wandler 1-4 Inp...... von TI

tbegle
Benutzer
Avatar
Gender: n/a
Age: 64
Posts: 150
Registered: 01 / 2018
Subject:

ADS 1115

 · 
Posted: 29.12.2022 - 09:12  ·  #1
Ein Hallo an den Rest der User,

hat schon jemand einen Treiber für den ADS 1115 geschrieben?

Ich komme nicht klar - viele Variationen mit dem TWI ausprobiert, ich bekomme
einfach die Werte nicht ins Config Register! dadurch auch keine vernüftigen Werte

// 15-14-13-12 - 11-10-09-08 - 07-06-05-04 - 03-02-01-00 Conversion Reg
// 1 1 0 0 0 0 1 1 0 0 0 0 0 0 1 1 AIN 1 - 4,096(Ref) - single - 8SPS ...

procedure ADC_1115; // ADs-1115 Test +-15 bit 4 Inputs
begin
if TWIstat(ADC_) = true then // ADC TWI ok
writeln(Serout,'ADS-1115 Adr $48 ok!');
// ------------------------------------------------------------------------
TWIout(ADC_,0,1); // Conifg Reg.(adr 1) ?????
TWIout(ADC_,0,$C3);TWIout(ADC_,1,$03); // HB+LB single AIN 1 - 4,095V Ref - 8SPS -dis Comp
// TWIout(ADC_,1,$C3);TWIout(ADC_,2,$85);
TWIinp(ADC_,ADC_H);TWIinp(ADC_,ADC_L); // 133 133 ????
Writeln(serout,'ADC_01 HB+LB : '+bytetostr(ADC_H)+bytetostr(ADC_L)); // rea dHB+LB ?? 133133

TWIout(ADC_,0);mdelay(100); // Start Conversion Reg.
//TWIout(ADC_,1);
TWIinp(ADC_,ADC_H);TWIinp(ADC_,ADC_L); // HB + LB ?? 133133
Writeln(serout,'ADC 01 HB+LB: '+bytetostr(ADC_H)+bytetostr(ADC_L));
// ----------------------------------------------------------
else
writeln(Serout,'ADS 1115 F!');
endif;
end;

Ein guten Rutsch ins Jahr 2023

Toni
Harry
Moderator
Avatar
Gender:
Location: zwischen Augsburg und Ulm
Age: 59
Posts: 2078
Registered: 03 / 2003
Subject:

Re: ADS 1115

 · 
Posted: 29.12.2022 - 09:49  ·  #2
Nein hab ich nicht, aber laut DB wird die Config in einem Rutsch geschrieben.
You must be logged in or your permissions are to low to see this Attachment(s).
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   50   64 · Page-Gen-Time: 0.028374s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI