Search found 5 matches

by Stefan3v
20 Mar 2020 15:21
Forum: PIC PRO Compilers
Topic: Cannot generate PWM with PIC16F1704
Replies: 1
Views: 1968

Re: Cannot generate PWM with PIC16F1704

I solved with MPLABX and XC8.

Please close this topic!
by Stefan3v
12 Mar 2020 09:56
Forum: PIC PRO Compilers
Topic: Cannot generate PWM with PIC16F1704
Replies: 1
Views: 1968

Cannot generate PWM with PIC16F1704

Someone can help me with an example? I try this code, worked in PROTEUS, but don't work on MCU. void wdt_reset() { asm CLRWDT; } void main() { OSCCON = 0b01011010; // OSC internal @1MHz ANSELA = 0b00000101; // Configure AN pins as digital - RA0=1 is ADC0 and RA2=1 is DAC1 for another use ANSELC = 0;...
by Stefan3v
25 May 2014 21:20
Forum: Timer Calculator
Topic: Support the Timer Calculator Project
Replies: 22
Views: 301031

Re: Support the Timer Calculator Project

dan07 Timer Calculator work fine for 12F675 and 629.
by Stefan3v
25 Sep 2012 11:28
Forum: mikroC PRO for AVR General
Topic: How do I set mega8 to use the internal Vref in mikroC AVR
Replies: 4
Views: 3727

Re: How do I set mega8 to use the internal Vref in mikroC AV

thanks filip! I did so: void Init_ADC() { ADCSRA=0x07; // set ADC prescaler to 128 REFS0_bit=1; // select Vref (int 2.56) REFS1_bit=1; ADLAR_bit=0; // use 8 bits results ADEN_bit=1; // enable ADC } int Read_ADC(ch_ADC) { ch_ADC=(ADMUX & 0xf0)|(ch_ADC & 0x0f); ADMUX=ch_ADC; //ADC channel (0-3) ADCSRA...
by Stefan3v
24 Sep 2012 10:59
Forum: mikroC PRO for AVR General
Topic: How do I set mega8 to use the internal Vref in mikroC AVR
Replies: 4
Views: 3727

How do I set mega8 to use the internal Vref in mikroC AVR

How do I set mega8 to use the internal Vref in mikroC AVR? this code is good for external Vref Voltage=ADC_read(0); // get ADC value from channel ADC0 u=(long)Tensiune*2500; u=u/1023; // 0..1023 -> 0-2500mV i tried to set ADMUX together ADC_read() but not work REFS0_bit=1; // select Vref (int 2.56) ...

Go to advanced search