Hi Juergen,
see Bascom-Help under CONFIG TWISLAVE
http://avrhelp.mcselec.com/index.html?configtwislave.htm
[b:2c0a9df68f]USERACK[/b:2c0a9df68f]
[i:2c0a9df68f]Default is OFF. When you use ON, an alternative library will be used.
This library will create a variable named TWI_ACK.
Each time your code is called this variable is filled with the value 255. If you do not alter the value, the slave will send an ACK as it is supposed to. If you reset the value to 0, the slave will send a NACK. [color=red:2c0a9df68f]You can use this to send data with variable length to the slave[/color:2c0a9df68f]. In this case, BTR only serves as an index. You must make sure to reset TWI_ACK when you have send the last byte to the master.[/i:2c0a9df68f]
MAK3
↧