I cracked the magic TWI (Two Wire Interface) (I²C) formula for calculating
the clock frequency
Given in the data sheets as
SCL frequency=CPU Clock Frequency/16+2*(TWBR).4^(TWPS)
I have wonder why is there a dot between the (TWBR) and the 4
why make thing easy when you can make them hard?
For a moment I thought the dot was a Boolean AND
the truth is the dot should be replaced with a * (or multiple)
after trying backets in differant places like
SCL frequency=CPU Clock Frequency/16+(2*(TWBR))*4^(TWPS)
and a few other combinations
this is the correct formula below
SCL frequency=CPU Clock Frequency/(16+(2*(TWBR))*4^(TWPS))
you can even get your spreedsheet to work it out
A quick tutorial from http://www.mathsnet.net/a2zofssheets.html
and what more could you ask for?
>From Eric
------------------------------------
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )