Posted: Fri Apr 28, 2017 5:40 pm Post subject: ATTiny45 with I2C on DAC6571
Hello together,
i'm trying to do with I2C and a ATTiny45 a voltage output on an DAC6571. This works only, if i use I2Cdelay.
Now i use I2Cdelay=10.
In the Bascom Helpfile is written, 10 is a Busfrequency at 100KHz "but it depends on the used crystal". I'm using the internal 8MHz oszillator.
If the 100KHz are defined for a 4MHz oszillator, is it then so, that I2Cdelay=10 with a 8MHz oszillator is automatically a Busfreuency of 200KHz?
I didn't found a direct context between oscillator frequency and I2Cdelay-value?
Thanks for a hint,
kind regards
Norbert
you can best use the USI. See samples\USI\
of course soft mode works too.
Delay is using waitus internally. So only the parameter value will make a difference.
Code in lib : @genus(___I2CDELAY)
In earlier versions there was a simple delay loop. Later the clock independent waitus was used.
But when having TWI or USI you can better use that. _________________ Mark
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum