Files

copied

There are no circuits or boards in this repository.

Last update 6 years 3 months by Petro Zhuk
Filessoftwareclock
..
Debug
I2C.c
I2c.h
Menu.h
brightness_senor.c
brightness_senor.h
clock.componentinfo.xml
clock.cproj
control.c
control.h
crc8.c
crc8.h
delay.c
delay.h
display.c
display.h
ds1307.c
ds1307.h
ds18x20.c
ds18x20.h
encoder.c
encoder.h
ledLight.c
ledLight.h
main.c
menu.c
onewire.c
onewire.h
wa2811.asm
ws2811.s
brightness_senor.c
#include "brightness_senor.h" #include <avr/io.h> #include <avr/interrupt.h> #define ADC_CHANEL 6 volatile uint8_t dataADC = 0; ISR(ADC_vect) { dataADC = ADCH; } void BrightnessInit() { ADMUX |= (1 << REFS0)|(1<<ADLAR)|(1<<MUX1)|(1<<MUX2); //6 chanel adc ADCSRA |= (1 << ADEN)|(1 << ADSC)|(1 << ADIE)|(1<<ADFR)|(1<<ADPS2)|(1<<ADPS1)|(1 << ADPS0); } uint8_t BrightnessGet() { return dataADC; }
Report a bug