maximale Eingangsfrequenz Counter AVR

Hallo,

ich hab hier ein Bastelprojekt mit einem PIC16F628 auf dem Tisch. Das

Wie ist das beim ATmaga? Ich kenn mich mit AVR Prozessoren ganz gut aus, aber irgendwie finde ich nicht die passende Seite im Datenblatt.

Stefan

Reply to
Stefan
Loading thread data ...

Stefan schrieb:

Systemtakt gesamplet/synchronisiert, daher: "Since the edge detector uses sampling, the maximum frequency of an external clock it can detect is half the sampling frequency. However, [...] it is recommended that maximum frequency of an external clock source is less than fclk_IO/2.5."

Bleibt noch Timer2, der zwar asynchron getaktet werden kann, aber

external clock to the TOSC1 pin may result in incorrect Timer/Counter2 operation. The CPU main clock frequency must be more than four times the Oscillator frequency."

Christian

--
Christian Zietz  -  CHZ-Soft  -  czietz (at) gmx.net 
WWW: http://www.chzsoft.de/ 
 Click to see the full signature
Reply to
Christian Zietz

Am 24.03.2016 um 10:39 schrieb Christian Zietz:

Stefan

Reply to
Stefan

externen Takt clocken lassen will, dann darf der maximal halb so

des Signals jeweils mindestens eine Taktperiode lang sein. Das gilt

Praktisch haben mehrere Leute damit bis 66MHz gemessen.

XL

Reply to
Axel Schwenke

Datenblatt: | | 6.2.1 EXTERNAL CLOCK SYNCHRONIZATION | | When no prescaler is used, the external clock input is | the same as the prescaler output. The synchronization | of T0CKI with the internal phase clocks is | accomplished by sampling the prescaler output on the | Q2 and Q4 cycles of the internal phase clocks | (Figure 6-1). Therefore, it is necessary for T0CKI to be | high for at least 2TOSC (and a small RC delay of 20 ns) | and low for at least 2TOSC (and a small RC delay of | 20 ns). Refer to the electrical specification of the | desired device. | When a prescaler is used, the external clock input is | divided by the asynchronous ripple-counter type | prescaler so that the prescaler output is symmetrical. | For the external clock to meet the sampling | requirement, the ripple-counter must be taken into | account. Therefore, it is necessary for T0CKI to have a | period of at least 4TOSC (and a small RC delay of 40 ns) | divided by the prescaler value. The only requirement | on T0CKI high and low time is that they do not violate | the minimum pulse width requirement of 10 ns. Refer to | parameters 40, 41 and 42 in the electrical specification | of the desired device. See Table 17-7.

Wirklich asynchron kann also scheinbar nur der Prescaler laufen und

bei PIC16 ist ja 1 Core-Cycle == 4 * Tosc).

Reply to
Michael Baeuerle

Michael Baeuerle schrieb:

DoDi

Reply to
Hans-Peter Diettrich

Muss er ja nicht zwingend, wie man an dem Prescaler sieht.

Problem nicht haben. Synchronisiert werden muss hier nicht auf den

--
> It works.
Reply to
Michael Baeuerle

formatting link

einen konsistenten Zustand haben.

soll, durchaus Sinn.

cu Michael

Reply to
Michael Schwingen

synchronisiert wird. Wenn ein CPU-Zugriff erfolgt, wird das Register

(synchron mit dem Eingangssignal). Kommt drauf an, ob sich dieser Aufwand lohnt.

Ja, das ist mir beim Schreiben meiner Frage bereits eingefallen. Typischer Fall von "Nachdenken mit den Fingern" ;-)

DoDi

Reply to
Hans-Peter Diettrich

Dann musst Du das Einfrieren des Registers aber mit beiden Takten synchronisieren, damit die Daten garantiert konsistent sind. Dazu sind

cu Michael

Reply to
Michael Schwingen

Ablauf der voreingestellten Zeit als Ausgang und setzt ihn auf GND.

Stefan

Reply to
Stefan

Stefan schrieb:

Gute Idee :-) Hilft aber nur weiter, wenn der Eingangspin nicht zwangsweise synchronisiert wird, wie beim ATmega.

DoDi

Reply to
Hans-Peter Diettrich

Das ist bei der Anwendung OK - der CPU-Hersteller baut die Timer aber so,

cu Michael

Reply to
Michael Schwingen

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.