Pages: [1]   Go Down
Author Topic: Welcher Takt bei I2C?  (Read 424 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!
Kann mir jemand sagen, mit welchem Takt ein Arduino Uno den I2C-Bus steuert? Hab mir die wire.h angekuckt und nicht entdeckt. Auch im Forum hab ich nix gefunden.

Schönen Dank schon mal

Klaus
Logged

Meran/BZ/IT
Offline Offline
Full Member
***
Karma: 0
Posts: 184
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hallo,
ich hab das gefunden:
http://playground.arduino.cc/Code/ATMELTWI#line7
Quote
So our clock (SCL) frequency will be SCL = CPU clock / (16 + 2(TWBR) ⋅ (PrescalerValue)). Our clock is 16 MHz, TWBR is 72, Prescaler Value is 1, so we have:

 
SCL = 16,000,000 / 16 + 144 * 1
SCL = 16,000,000 / 160
SCL = 100,000

This is a rather pedestrian I2C frequency of 100 Khz, which is what the TWI_FREQ was defined as.
Also rund 100KHz

Gruß Reinhard
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 96
Posts: 4755
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Die 100kHz sind der Standardwert, Du kannst aber auch die 400kHz der schnellen Variante einstellen, falls Du das benötigst.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Vielen Dank!!!!
Logged

Pages: [1]   Go Up
Jump to: