Re: Wieviele Bits netto aus ATMega PWM DAC?



Klaus Bahner wrote:
Hallo Joerg,

Im derzeitigen Projekt wird ein ATMega sitzen. War nicht meine Wahl, moechte der Kunde so. Leider hat der keine Mehrfach-DACs, brauche zwei, der nun vorgesehene externe DAC7612 kann SPI und ist auch ok. Aber natuerlich wurmen mich die gut $3 die der kostet. Selbst wenn's bei diesem Design so bleibt, nur mal so aus Interesse und falls mal wieder ein ATMega rein muss:

Wieviel Bits bekommt Ihr netto so raus wenn der 16-Bit Timer in etwas gestutzter Form als PWM-DAC benutzt wird? Sagen wir mal 12-Bit Kappung und Timer-Takt auf voller Kamelle. Vorausgesetzt eine Meister Proper blitzsaubere Versorgung an den Pins, nur innen roedelt's da drin weiter. Quiet Mode wie beim ADC geht meist nicht.


Hab' ich ehrlich gesagt nie probiert, ich finde die Programmierung des PWM ziemlich unerfreulich und wenn du gute DC Performance brauchst erscheint mir ein externer DAC immer besser geeignet.


Ich finde es einfacher. Man schreibt einfach nach dem CCR-Interrupt einen neuen Wert ins Register und feddich. Beim externen DAC muss man einen String von 14 oder mehr Bits rausroedeln. Ok, wenn SPI schon drin ist (ist bei ATMega der Fall) geht das ohne viel Bit-Banging Aufwand, aber beim PWM ist nur ein Register zu beschreiben. Oft gibt es diese ganzen Routinen vorgekocht aus Libraries.


Moechte dich aber darauf hinweisen, dass die neuen ATXmega mit 12 bit DAC kommen (ob einzel oder dual weiss ich jetzt aus dem Kopf nicht).


Danke, damit ginge es. Allerdings haben Distis die kleineren Varianten 44QFP und so immer noch nicht auf Lager.

--
Gruesse, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
.



Relevant Pages

  • Sending SPI-style serial data to DAC on register change
    ... I've designed a custom circuit board with a Cyclone II FPGA, and I am now writing Verilog code to send a control word to a 16-bit DAC. ... The DAC is a Texas Instruments/Burr-Brown part which communicates via an SPI-style interface with the chip-select line active high. ... The idea is for the user to use the I2C bus to load the msb_data register and the lsb_data register with the MSB and LSB of the control word. ...
    (comp.lang.verilog)
  • Re: Generating sound at microcontroller pin using pwm
    ... I do not want to use a DAC. ... you mean i must also vary duty cycle of the pulses. ... You seem confused on what PWM is - you claimed to be using it, ... need an external means of Amplitude control. ...
    (comp.arch.embedded)
  • Re: can anyone recommend me a microcontroller
    ... and PWM also but not much of anything else.... ... low power would be great but ADC and DAC are the main things I'm looking ... instruction set that is small but is a very good fit with C -- it also ... Need to learn how to apply control theory in your embedded system? ...
    (comp.arch.embedded)
  • Re: can anyone recommend me a microcontroller
    ... I'm in need of a small microcontroller that has ADC and DAC capabilities ... and PWM also but not much of anything else.... ... instruction set that is small but is a very good fit with C -- it also ...
    (comp.arch.embedded)
  • Re: LFSR flat frequency
    ... > the DAC output for your signal, ... You need to use a longer register. ... Add maybe 3 or 4 more bits, and you don't hear the periodicity. ... and just stick a R/C filter on the output. ...
    (sci.electronics.design)

Loading