Lab_Seven_Part_One

Lab_Seven_Part_One - int FahrenheitTens = (C2FConvert / 10)...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
start I2C_Init() InitADC() ClearLCD() (;;) SetLcdCursor(0x00) voltage = ((ReadADC(0x00) * 5) / 1024) voltage1 = ((((ReadADC(0x00) * 5) % 1024) * 10) / 1024) voltage2 = ((((((ReadADC(0x00) * 5) % 1024) * 10) % 1024) * 10) / 1024) int millivoltage = (voltage * 1000) int millivoltage1 = (voltage1 * 100) int millivoltage2 = (voltage2 * 10) int CelciusTens = (((millivoltage + millivoltage1 + millivoltage2) - 400) / 195) int CelciusOnes = ((((((millivoltage + millivoltage1 + millivoltage2) - 400) % 195)) * 10) / 195) int CelciusDecimal = (((((((((millivoltage + millivoltage1 + millivoltage2) - 400) % 195)) * 10) % 195)) * 10) / 195) int C2FConvert = (((((millivoltage + millivoltage1 + millivoltage2) - 400) / 19.5) * 1.8) + 32)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: int FahrenheitTens = (C2FConvert / 10) int FahrenheitOnes = (((C2FConvert * 10) % 100) / 10) int FahrenheitDecimal = (((((millivoltage + millivoltage1 + millivoltage2) - 400) / 19.5) * 1.8) + 32) * 10 - ((FahrenheitTens * 100) + (FahrenheitOnes * 10)) unsigned char slendy[15] = {' ',FahrenheitTens+0x30,FahrenheitOnes+0x30,'.',FahrenheitDecimal+0x30,0xDF,'F',' ', ' ',CelciusTens+0x30, CelciusOnes+0x30,'.', C DataSize = sizeof (slendy) SendLcdData(slendy) yes Ones+0x30,'.', CelciusDecimal+0x30, 0xdf,'C'} end no...
View Full Document

Page1 / 2

Lab_Seven_Part_One - int FahrenheitTens = (C2FConvert / 10)...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online