[En-Nut-Discussion] TWI Initialisation

Peter Sodermanns peter.sodermanns at aixcon.de
Tue Feb 7 12:31:53 CET 2006


Dear Harald,

> As long as you don't call TwMasterTransact(), nothing will happen
> on the port.

I tried that, too. Result:

Nut/OS:       3.9.7.1
  TWBR = 0
  TWCR = 0
  TWDR = 255
  TWAR = 254
  TWSR = 248
TwInit called
TwInit finished
TwInit MasterError = 0, result = 0
  TWBR = 191
  TWCR = 5
  TWDR = 255
  TWAR = 1
  TWSR = 250
TwMasterTransact called
TwMasterTransact MasterError = 1, result = -1
  TWBR = 191
  TWCR = 37
  TWDR = 255
  TWAR = 1
  TWSR = 250


And in ATMEL's ATmega128 documentation is said that when in TWCR bits 
TWIE and TWEN are set, a start signal is sent on the bus. But there is 
no change of voltage level.

Ok, and I downloaded Version 4.02 to have a look at the sample code you 
mentioned.


Thanks for the quick response

                   Peter


More information about the En-Nut-Discussion mailing list