Post Created date
Does anyone know on how to initialize ADC on ATMEGA128 ?
I tried : uint8_t read_adc() { ADMUX=(1<<REFS0) | (1<<ADLAR) | ADC_0; // Conversion on channel 0, AVCC reference, 10 bit mode ADCSRA |= (1...
Friday, 24 May 2013 - 12:26
Does anyone know on how to initialize ADC on ATMEGA128 ?
js wrote:adc_result is a 10 bit value so it needs to be defined as uint16_t not char. To print it on the LCD you need to covert it to printable characters. how to convert...
Friday, 24 May 2013 - 07:49
Does anyone know on how to initialize ADC on ATMEGA128 ?
If I do like this : void read_adc(void) { ADMUX=(1<<REFS0 | ADC_0); // Conversion on channel 0, AVCC reference, 10 bit mode ADCSRA |= (1<<ADSC...
Friday, 24 May 2013 - 07:26
Does anyone know on how to initialize ADC on ATMEGA128 ?
I see I changed to : uint16_t read_adc() { ADMUX=(1<<REFS0 | ADC_0); // Conversion on channel 0, AVCC reference, 10 bit mode ADCSRA |= (1<<ADSC...
Friday, 24 May 2013 - 07:22
How to port arduino library ?
Kartman wrote:You really haven't done any research have you? The standard Arduino UNO has a mega328 - the mega128 has more ram, flash and peripherals. I Googled arduino library...
Friday, 24 May 2013 - 07:18
Does anyone know on how to initialize ADC on ATMEGA128 ?
char adc_result;
Friday, 24 May 2013 - 07:12
Does anyone know on how to initialize ADC on ATMEGA128 ?
I put 4K7 to VCC and PF0 pin as test and the code : adc_result=read_adc(); // Read Analog value lcd_string(adc_result); but got error : Error 38 void value not...
Friday, 24 May 2013 - 07:10
Does anyone know on how to initialize ADC on ATMEGA128 ?
So I'll define like this : void adc_init(void); void read_adc(); void adc_init() { // enable ADC, select ADC clock = F_CPU / 128 (i.e. 125 kHz) ADCSRA = (1<<ADEN | 1...
Friday, 24 May 2013 - 06:24
Why can't I use the delay on AVR studio 6 ?
joeymorin wrote:bianchi77 wrote:as you guys see on the video it's more than 1000ms...?Yeah. It's 10,000 mS. Ten times too much. Like your definition of F_CPU. JJ yup it's my...
Friday, 24 May 2013 - 05:38
Why can't I use the delay on AVR studio 6 ?
js wrote:Quote:so I'm sure it's 8Mhz Like Joe keeps on pointing out you have 80 MHz and NOT 8 MHz in the definition.Quote:#define F_CPU 80000000UL // AVR clock frequency in Hz...
Friday, 24 May 2013 - 05:37
Why can't I use the delay on AVR studio 6 ?
All good..... 1s delay accomplished..... Thank you very very ( 6 times ) much....(80 Mhz bug) hiiiihihihii
Friday, 24 May 2013 - 05:36
Why can't I use the delay on AVR studio 6 ?
my mistake guys, #define F_CPU 8000000UL // AVR clock frequency in Hz, used by util/delay.h Now it has 6 zeros isn't it ?? It's time to test, thanks a lot..
Friday, 24 May 2013 - 05:34

Pages