
Elementary Math Fractions, Percentages, Word Problems, Equations, Inequations, Factorization, Expansion 
 LinkBack  Thread Tools  Display Modes 
April 19th, 2019, 04:33 AM  #1 
Newbie Joined: Mar 2018 From: Yanbu Posts: 14 Thanks: 0  How to take this variable out of this equation?
I'm working to develop a function in my embedded code for i2c initialization. I came up to this equation which is to calculate the speed of the i2c clock. But if I want to develop a function that takes a user popular numbers for speed then I have to change the shape of the equation to get that variable in place to receive users values for adjusting the speed. This is the equation: I want to take out TWBR instead of SCL frequency. I tried to do it on a paper but I don't know how to take it out, from the multiple PrescalerValue and the addition of 16??! 
April 19th, 2019, 05:09 AM  #2 
Newbie Joined: Mar 2018 From: Yanbu Posts: 14 Thanks: 0 
OK, I solved it finally 
April 19th, 2019, 06:01 AM  #3 
Math Team Joined: Jul 2011 From: Texas Posts: 3,002 Thanks: 1587 
$TWBR = \dfrac{(\text{CPU clock freq}) 16(\text{SCL freq})}{2(\text{SCL freq})(\text{Prescaler})}$

April 19th, 2019, 07:45 AM  #4 
Global Moderator Joined: Dec 2006 Posts: 20,926 Thanks: 2205  
April 19th, 2019, 09:14 AM  #5 
Math Team Joined: Oct 2011 From: Ottawa Ontario, Canada Posts: 14,597 Thanks: 1038  Yikes! Sure hope you assigned 1 letter variables to those; like: a = SCL freq b = CPU clock freq c = TWBR d = Prescaler Value So you start with: a = b / (16 + 2cd) Then you can easily solve for b or c or d: a = b / (16 + 2cd) b = a(2cd + 16) a = b / (16 + 2cd) a(16 + 2cd) = b 16a + 2acd = b 2acd = b  16a **** c = (b  16a) / (2ad) 2acd = b  16a **** d = (b  16a) / (2ac) EDIT: your solution c = b / (2ad) is wrong.... Last edited by Denis; April 19th, 2019 at 09:31 AM. 

Tags 
equation, variable 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
two variable equation  mhhojati  Linear Algebra  3  January 20th, 2017 04:41 AM 
2 Variable Equation  dpwheelwright  Algebra  5  August 19th, 2012 12:48 AM 
Functional Equation with one variable  Phatossi  Algebra  2  March 19th, 2012 08:44 PM 
isolate a variable in this equation  superbigio  Complex Analysis  1  July 17th, 2007 03:44 PM 
Isolate variable from equation  doron  Abstract Algebra  0  December 31st, 1969 04:00 PM 