, CVAVR, ?
8
, 99,99.
, , . ? , , . .
PC1 (24 ) , , volt, PC2 ( 25) - (), volt1. , Swr_izm(){} , volt<volt1, = 99.99. . PC2, PC1 1. PC1 PC2 , . RC 8![]()
. ( ), . CKSEL3..CKSEL0 0001, , ( ), . , 8 MHz int osc, .. 1 0 , , , - , .
swr_out(void) :
:void swr_out(void) // { lcd_gotoxy(7,0); lcd_putsf("Volt "); if (volt/1000) {lcd_putchar (volt/1000+0x30);} // >1, else {lcd_putsf(" ");}; // <1, lcd_putchar ((volt/100)%10+0x30); // lcd_putsf (","); // lcd_putchar ((volt/10)%10+0x30); // lcd_putchar (volt%10+0x30); // } // .. swr volt . , volt volt1. 5 , PC1 , , . , . , , - . . , . , , while (!(ADCSRA & (1 << 4))); // wait until ADC is ready ADCSRA &=0xfb; ADCSRA |= 0x80 | 0x40 | 0x02 | 0x05;// ADCSRA:-; F=125 void swr_izm (void) ( ). ,
24 1,73 , 25 1,74, SWR=3
1,07 0,99 SWR=2
1,13 1,02 SWR=1
0,72 1,06 SWR=9
,
: 2 (: 0 , : 2)