Lab_Eight_Part_Three

Lab_Eight_Part_Three - i O OCR1A = 0x7C; TCCR1B = 0x1A yes...

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

View Full Document Right Arrow Icon
int volt1 = (((ReadADC(0x00) * 5) / 1024) * 1000) int volt2 = (((((ReadADC(0x00) * 5) % 1024) * 10) / 1024) * 100) int volt3 = (((((((ReadADC(0x00) * 5) % 1024) * 10) % 1024) * 10) / 1024) * 10) int CelsiusTens = (((volt1 + volt2 + volt3) - 400) / 195) int CelsiusOnes = ((((((volt1 + volt2 + volt3) - 400) % 195)) * 10) / 195) int CelsiusDecimal = ((((((((volt1 + volt2 + volt3) - 400) % 195)) * 10) % 195)) * 10 / 195) int C2FConvert = (((((volt1 + volt2 + volt3) - 400) / 19.5) * 1.8) + 32) int FahrenheitTens = (C2FConvert / 10) int FahrenheitOnes = (((C2FConvert * 10) % 100) / 10) int FahrenheitDecimal = (((((volt1 + volt2 + volt3) - 400) / 19.5) * 1.8) + 32) * 10 - ((FahrenheitTens * 10 0
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: i O OCR1A = 0x7C; TCCR1B = 0x1A yes OCR1A = 0x00 TCCR1B = 0x18 no unsigned char string[16] = {' ',' ','T','e','m','p',':',' ',FahrenheitTens+0x30,FahrenheitOnes+0x30 , SetLcdCursor(0x00) DataSize = sizeof(string) SendLcdData(string) unsigned char string2[16] = {'S','e','t','p','o','i','n','t',':',' ',F1+0x30,F2+0x30,'.',F3+0x30,0xdf,'F'} SetLcdCursor(0x40) DataSize = sizeof(string2) SendLcdData(string2) start DDRD = 0x20 PORTD = 0x00 InitADC() I2C_Init() ClearLCD() TCCR1A = 0b00010011 TCCR1B = 0b00011000 TIMSK1 = 0b00000001 sei() int F1 int F2 int F3 F1 = 8 F2 = 5 F3 = 5 (;;) enheitTens * 100) + (FahrenheitOnes * 10)) yes end no F1&&FahrenheitOnes>=F2)) eitOnes+0x30,'.',FahrenheitDecimal+0x30,0xdf,'F',' ',' '} 0x30,0xdf,'F'}...
View Full Document

Page1 / 2

Lab_Eight_Part_Three - i O OCR1A = 0x7C; TCCR1B = 0x1A yes...

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