ADC Treiber mit ATXMega 384C3

  • 1
  • 2
  • 3
  • 5
  • 6
  • Page 6 of 6
pvs-deck
PowerUser
Avatar
Gender:
Age: 53
Homepage: pvs-deck.de
Posts: 1340
Registered: 02 / 2009
Subject:

Re: ADC Treiber mit ATXMega 384C3

 · 
Posted: 17.10.2019 - 21:59  ·  #41
Hallo rolf,

Steuerung ist versendet :-)
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: ADC Treiber mit ATXMega 384C3

 · 
Posted: 17.10.2019 - 22:14  ·  #42
Schaltplan etc ?
pvs-deck
PowerUser
Avatar
Gender:
Age: 53
Homepage: pvs-deck.de
Posts: 1340
Registered: 02 / 2009
Subject:

Re: ADC Treiber mit ATXMega 384C3

 · 
Posted: 18.10.2019 - 09:03  ·  #43
Quote by rh

Schaltplan etc ?


Hallo rolf,

Du kannst das TestProjekt von mir als Grundlage (Portbelegung usw.) nutzen.
Ich habe Dir Klemmenbelegung / Schaltpläne für:
Spannungsversorgung, RS485 (Debugausgabe), Schaltplan ADC-Messeingänge beigelegt.

Brauchst Du nochwas?

Thorsten
pvs-deck
PowerUser
Avatar
Gender:
Age: 53
Homepage: pvs-deck.de
Posts: 1340
Registered: 02 / 2009
Subject:

Re: ADC Treiber mit ATXMega 384C3

 · 
Posted: 09.07.2020 - 13:17  ·  #44
Quote by rh

Hallo Thorsten,

ist eigentlich nicht nötig. Das Init im AVRco Treiber erledigt das CAL.

rolf


Hallo rolf,

ich muss hier nochmal ansetzen, ich habe mit einer neuen Serie vom XMEGA384C3 etwas größere Abweichungen in den Messungen.

Kannst Du mir mal einen Auschnitt aufzeigen, wie Du mit dem AVRco, das mit dem ADC Kalibrierung machst? ("ProductionSignature" Werte )


Code
[ProductionSignature]
...
ADCACAL0=$20  // Diese beiden Werte
ADCACAL1=$21  // brauche ich ja...
TEMPSENSE0=$2E
TEMPSENSE1=$2F
...


Mit dieser Funktion erhalte ich immer "0", und warum wird hier in LOC ein Word verlangt?, der Adressbereich im "ProductionSignature" geht doch sowieso nur von 0x00 bis 0x2F

Code
 bCalLow:= ReadProductionRow(word(ADCACAL0));
  bCalHigh:= ReadProductionRow(word(ADCACAL1));

  DebugOut('low:  '+ByteToHex(bCalLow));
  DebugOut('High: '+ByteToHex(bCalHigh));


Evtl. kannst Du mir mal ein Beispiel für eine Kalibrierung zeigen. Ich kann mir nicht vorstellen, das in meinen XMEGAs immer $00 steht.

Thorsten
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: ADC Treiber mit ATXMega 384C3

 · 
Posted: 09.07.2020 - 22:44  ·  #45
Hallo Thorsten,
ich lese bei den XMegas diese CAL Werte nicht, da diese nach einem RESET
automatisch geladen werden.
rolf
pvs-deck
PowerUser
Avatar
Gender:
Age: 53
Homepage: pvs-deck.de
Posts: 1340
Registered: 02 / 2009
Subject:

Re: ADC Treiber mit ATXMega 384C3

 · 
Posted: 10.07.2020 - 11:52  ·  #46
Quote by rh

Hallo Thorsten,
ich lese bei den XMegas diese CAL Werte nicht, da diese nach einem RESET
automatisch geladen werden.
rolf


Hallo rolf,

muss ich diese trotzdem noch aktivieren wie von Atmel beschrieben?
Wenn nicht, wundern mich diese Abweichungen bei den XMEGAs

Wie kommst Du darauf, das diese Werte automatisch gelesen werden? Dazu habe ich keine Hinweise gefunden, im Gegenteil:
AVR1300 Using the ADC XMEGA

Hier steht eigentlich ganz klar drinnen:
Code
CalibrationThe ADC module has been calibrated during the production of the 
device. This calibration value is storedin the production signature row of the device. 
The calibration value compensates for the mismatchbetween the individual steps 
of the ADC pipeline and it improves the linearity of the ADC.The calibration 
value is not loaded automatically, and should always be loaded from the 
productionsignature row (ADC x CAL0/1) and written to the corresponding ADC 
calibration registers (CALL/CALH)before enabling the ADC. Flowcharts for 
loading stored calibration settings are shown in figure "UsingStored Calibration 
Settings".


Thorsten
  • 1
  • 2
  • 3
  • 5
  • 6
  • Page 6 of 6
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   111   125 · Page-Gen-Time: 0.031445s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI