Blame | Last modification | View Log | Download | RSS feed
ifndef __twiminc__twiminc equ 1savelisting off ; no listing over this file;****************************************************************************;* *;* AS 1.42 - File REGTWIM.INC *;* *;* Contains Bit & Register Definitions for older ATmega TWI Interface *;* *;****************************************************************************TWBR port 0x00 ; Bit Rate RegisterTWCR port 0x36 ; Control RegisterTWINT avrbit TWCR,7 ; Interrupt FlagTWEA avrbit TWCR,6 ; Enable acknowledge bitTWSTA avrbit TWCR,5 ; Start ConditionTWSTO avrbit TWCR,4 ; Stop ConditionTWWC avrbit TWCR,3 ; Write Collision FlagTWEN avrbit TWCR,2 ; Enable bitTWIE avrbit TWCR,0 ; Interrupt EnableTWSR port 0x01 ; Status RegisterTWS7 avrbit TWSR,7 ; StatusTWS6 avrbit TWSR,6TWS5 avrbit TWSR,5TWS4 avrbit TWSR,4TWS3 avrbit TWSR,3TWPS1 avrbit TWSR,1 ; PrescalerTWPS0 avrbit TWSR,0TWDR port 0x03 ; Data RegisterTWAR port 0x02 ; (Slave) Address RegisterTWGCE avrbit TWAR,0 ; General Call Recognition BitTWA0 avrbit TWAR,1 ; Slave AddressTWA1 avrbit TWAR,2TWA2 avrbit TWAR,3TWA3 avrbit TWAR,4TWA4 avrbit TWAR,5TWA5 avrbit TWAR,6TWA6 avrbit TWAR,7restore ; re-enable listingendif ; __twiminc