I2C-TWI/de

Aus MCS Wiki AVR
< I2C-TWI(Weitergeleitet von I2C-TWI)
Wechseln zu: Navigation, Suche
== (**COPIED FROM ENGLISH PAGE**) ==

By default BASCOM will use software routines when you use I2C statements. This because when the first AVR chips were introduced, there was no TWI yet. Atmel named it TWI because Philips is the inventor of I2C. But TWI is the same as I2C.

 

So BASCOM allows you to use I2C on every AVR chip. Most newer AVR chips have build in hardware support for I2C. With the I2C_TWI lib you can use the TWI which has advantages as it require less code.

 

Read more about I2C in the hardware section.

 

To force BASCOM to use the TWI, you need to insert the following statement into your code:

 

$LIB "I2C_TWI.LBX"

 

You also need to choose the correct SCL and SDA pins with the CONFIG SCL and CONFIG SDA statements.

The TWI will save code but the disadvantage is that you can only use the fixed SCL and SDA pins.


Languages   English Deutsch  
Meine Werkzeuge
Namensräume
Varianten
Aktionen
Navigation
In anderen Sprachen
Sprache