.


:




:

































 

 

 

 





EasyAVR6, ..

J12 0 4. , .

.

, :

 

/*

ADC init

*/

void ADCInit(void)

{

ADMUX = 0; // 0, AREF,

/* , . = 64, , */

ADCSRA = _BV(ADEN) | _BV(ADIF) | _BV(ADIE) | _BV(ADPS2) | _BV(ADPS1);

}

 

:

 

ADCSRA |= _BV(ADSC); // start conversion

 

:

 

/*

*/

ISR (ADC_vect)

{

uint16_t result = ADC;

__ ;

}

 

.

  1. . .
  2. . , , . , , . !
  3. ( Proteus , ). . .
  4. .

, ( ). .

.

1 PORTA.0 PORTB, LCD 8
250 PORTA.1 PORTC, LCD 8
500 PORTA.2 PORTB, LCD 8
2 PORTA.3 PORTB, LCD 8
1 PORTA.4 PORTC, LCD 4
250 PORTA.4 PORTC, LCD 4
500 PORTA.3 PORTB, LCD 4
2 PORTA.2 PORTC, LCD 4
1 PORTA.1 PORTC, LCD 1
250 PORTA.0 PORTB, LCD 1
500 PORTA.0 PORTC, LCD 1
2 PORTA.1 PORTB, LCD 1

  1. AtMega16?
  2. ( )?
  3. AtMega16?
  4. 2 ?
  5. ?
  6. ?
  7. ?
  8. ?
  9. ?

.

http://www.gaw.ru/html.cgi/txt/doc/micros/avr/arh/start.htm

http://avr.ru/docs/books/avr





:


: 2016-09-03; !; : 517 |


:

:

, , .
==> ...

1547 - | 1449 -


© 2015-2024 lektsii.org - -

: 0.008 .