Get the Flash Player to see this player.
 
How To Scale Your TCPmaker Dedicated Web Server Data With No Code PDF Print E-mail

Here's a trick that can save you time, and will also save program memory on your PIC dedicated web server.

 

The value stored in a numeric variables gets transformed from the integer value that the PIC sees to a floating point value that is used and displayed on the PC web browser. This transformed is defined by 4 properties of the particular numeric variable:

 

  • The parameters mx and mn are the maximum and minimum values that this Numeric variable is expected to have on the micro side.
  • The parameters px and pn are the maximum and minimum of the range of corresponding values that will be displayed on the PC browser.

 

These define a linear transformation, that looks like this:

 

[image popup of the linear transformation graph]

 

You can use these parameters to scale your data without having to write a single line of code. For instance, if your hardware has one of those temperature sensors that output a voltage that is a linear function of temperature, just define a numeric variable called Temperature, set up its scaling properties mn, mx, pn, & px appropriately, and send the raw value from the ADC to the PC.  What will be displayed on the PC browser will be the scaled temperature values.

 

 

Meet Dr. Bob at His Class at Microchip Masters 2011!

SponsorAd-728x90

Click here to visit the Microchip Masters 2011 Web Site

 

Questions? See our FAQ, contact us by email, or call us at 1-888-474-1041 (toll free in US)
We GUARANTEE our generated code to work correctly, PERFECTLY, every time, or we will make it right!

Home | About Us | Contact Us | USB Tools | TCPmaker Tools | Consulting | Site Map