Post Created date
[TUT] [C] Newbie's Guide to the AVR ADC
clawson wrote:Quote: Maybe this is easier will make it easier. Try: ADCSRB = (1<<GSEL) | (1<<MUX5); //choose 32x gain ADCSRA |= (1<<ADATE); //Free-...
Friday, 7 May 2010 - 13:49
[TUT] [C] Newbie's Guide to the AVR ADC
ATTiny861 ADCSRB = (1<<GSEL) | (1<<MUX5); //choose 32x gain ADCSRA |= (1 << ADATE); //Free-runningmode ADCSRA |= (1 << ADEN); // Enable ADC ADCSRA |= (...
Friday, 7 May 2010 - 11:21
[TUT] [C] Newbie's Guide to the AVR ADC
Strange.. Thought I've answered it, guess not. :? But here goes: "ADCSRB = 0x48" should be "ADCSRB |= 0x48" This will set the MUX5 which gives us 20x/32x gain. It also sets GSEL...
Friday, 7 May 2010 - 11:09
[TUT] [C] Newbie's Guide to the AVR ADC
Koshchi wrote:This does nothing: ADCSRA &= (0 << ADEN); Neither does this: ADCSRB|=(0<<ADTS2)|(0<<ADTS1)|(0<<ADTS0);//Free running-mode What does...
Friday, 7 May 2010 - 09:02
[TUT] [C] Newbie's Guide to the AVR ADC
Cause this was easier? :) I just wanted a to sample x-times and get the mean value. The time between the samples dosent have to be exact so I figured this was the easiest way to...
Thursday, 6 May 2010 - 14:40

"checking odd/even" would be super! Thank you. :)
Thursday, 6 May 2010 - 14:36

lol, sorry... uint8_t temp = 15; better? Did just pick a number for the example, thought it would help but I did a really stupid choice by picking a number that cant be stored in...
Thursday, 6 May 2010 - 14:26
[TUT] [C] Newbie's Guide to the AVR ADC
Quote:ADCSRB = 0x48 uint32_t measurement = 0x0000; ADCSRA |= (1 << ADEN); // Enable ADC ADCSRB|=(0<<ADTS2)|(0<<ADTS1)|(0<<ADTS0);//Free running-mode...
Thursday, 6 May 2010 - 14:06

sternst wrote:Blipp-Blopp-Bob wrote:Whats the easiet way to check if a variable is even or odd?Check whether the LSB is 0 (even) or 1 (odd). But what does that have to do with "...
Thursday, 6 May 2010 - 14:02
Watchdog question
clawson wrote:Quote: Is there any function like reset() or reboot() that one could call upon to reset the µController? Well that's where the watchdog DOES come in useful - just...
Tuesday, 20 April 2010 - 09:28
Watchdog question
Is there any function like reset() or reboot() that one could call upon to reset the µController?
Tuesday, 20 April 2010 - 07:19
Watchdog question
I wanted to use the watchdog because after the XXseconds the µController should reset. This because I want the varibles to be rebooted and I've made a "sleep state" which the...
Tuesday, 20 April 2010 - 06:26

Pages