Post Created date
Simple digital filter
Quote:You have a 10 bit ADC, do the hysteresis thing on 10 bits, before dividing it down to 7 bits. Doing this with ADCH _before_ shifting the result would also be ok. int...
Sunday, 19 August 2007 - 15:06
Simple digital filter
Quote: Isnt possible to achieve perfect readings without adding hysteresis? As Bob already said, averaging will help. But if the pot position is exactly in the middle between two...
Sunday, 19 August 2007 - 14:40
Simple digital filter
Quote:The result is not new. I have rock solid results when steady, and smooth when turned. Perfect! Quote:But the bigger problem is still here. The very little small variations...
Sunday, 19 August 2007 - 12:04
Simple digital filter
Quote:the 10k/100nF RC give a time constant of 1ms. to settle to 1 LSB at 10bit ADC you need 7 x RC. That means you need a delay of 7ms after you change the MUX channel and before...
Saturday, 18 August 2007 - 20:19
Simple digital filter
Quote:Then i tried the JBecker suggestion, inserting a 10k resistor between the adc input and the mux out, as well as a 100nF cap between adc input and gnd. If this modification...
Saturday, 18 August 2007 - 12:28
Simple digital filter
Ok then. I have to come back to one of my previous mails. The USB voltage simply is not stable due to the abovementioned reasons. This would not be a problem, if there would not...
Friday, 17 August 2007 - 14:47
Simple digital filter
Quote:All previous tests are meaningless because there were no decoupling caps on the mux boards. I would second that. The same goes for the schematic. A schematic, where vital...
Thursday, 16 August 2007 - 15:53
Simple digital filter
Quote:This is my initialization code for the ADC: Code: void ADC_Init() { DDRA = 0; ADMUX = _BV(ADLAR) | _BV(REFS0); ADCSRA = _BV(ADEN) | _BV(ADPS2) | _BV(ADPS1) | _BV(...
Thursday, 16 August 2007 - 13:22
Simple digital filter
I do not see any capacitors on the adc input, or did I miss that? I would always use 100nF and a resistor of perhaps 10k coming from the output of the mux. But after all the...
Wednesday, 15 August 2007 - 21:16
do atmega8's have the switch case statement?
Like Klaus said, something like this would be more compact: const unsigned char table[0x00,0x01,0x03,0x07,0x0F, 0x1F,0x3F,0x7F,0xFF]; if(rev
Friday, 18 May 2007 - 16:49
How to use ASM in IAR compiler
RTFM, this is very nicely described in the documentation. 1. Using inline should be possible like this: asm("in r30, smcr \n cbr r30,__sm_mask \n .... .......
Friday, 18 May 2007 - 16:29
can avr be used to control switcher?
Quote:Are there any micros out there designed for this? This is exactly what most of the smaller DSPs are made for (this and motor control). These chips are now down to ~$3.50 @...
Tuesday, 1 May 2007 - 19:37

Pages