Search found 28 matches
- 18 Jun 2013 07:56
- Forum: mikroC PRO for PIC General
- Topic: Create frequency 50Hz Sine ware
- Replies: 13
- Views: 6442
Re: Create frequency 50Hz Sine ware
Hi android I write code PWM for PIC16F887 (My PIC16F886 a die, I change PIC16F887). I using PWM frequency 20Khz. Crystal 16Mhz. I create 50Hz. But, Module PWM not run. Can you help me? Sorry, my english is not good My code unsigned long int counter; void Interrupt(){ counter++; if (TMR2IF_bit == 1){...
- 17 Jun 2013 10:06
- Forum: mikroC PRO for PIC General
- Topic: Create frequency 50Hz Sine ware
- Replies: 13
- Views: 6442
Re: Create frequency 50Hz Sine ware
Hi android
#define SET_IF_CARRY(port,bit).
I changed command line : SET_IF_CARRY(LATC,1) by SET_IF_CARRY(LATC,2). But It not run, I don't understand. Why not?
hocavr
#define SET_IF_CARRY(port,bit).
I changed command line : SET_IF_CARRY(LATC,1) by SET_IF_CARRY(LATC,2). But It not run, I don't understand. Why not?
hocavr
- 17 Jun 2013 08:34
- Forum: mikroC PRO for PIC General
- Topic: Create frequency 50Hz Sine ware
- Replies: 13
- Views: 6442
Re: Create frequency 50Hz Sine ware
Hi android
Why is CCP2?. if, Can you signal output CCP1 (RC2)? How do it?
Please help me
Regards
hocavr
Why is CCP2?. if, Can you signal output CCP1 (RC2)? How do it?
Please help me
Regards
hocavr
- 14 Jun 2013 09:59
- Forum: mikroC PRO for PIC General
- Topic: Create frequency 50Hz Sine ware
- Replies: 13
- Views: 6442
Re: Create frequency 50Hz Sine ware
I want booting PWM1 and PWM2 module. But, not using PWMx_init ()? Help me?
thanks
thanks
- 12 Jun 2013 03:45
- Forum: mikroC PRO for PIC General
- Topic: Create frequency 50Hz Sine ware
- Replies: 13
- Views: 6442
Create frequency 50Hz Sine ware
Hi I wrote the program for the PIC16F886, using quartz 8M. Create frequency 50Hz (or 60Hz) with PWM 20KHz. My program has problems. Please help me. Thanhks hocavr Email : hocavr@yahoo.com unsigned char sin_table[64]={0, 25, 49, 73, 96, 118, 139, 159, 177, 193, 208, 220, 231, 239, 245, 249, 250, 249,...
- 28 Nov 2012 17:01
- Forum: mikroC PRO for PIC General
- Topic: Set Timer1, help me?
- Replies: 18
- Views: 6326
Re: Set Timer1, help me?
Thanks MARIO
I'm reading your code changes. Hopefully I will understand.
You can give me your email?.
Email : hocavr@yahoo.com
I'm reading your code changes. Hopefully I will understand.
You can give me your email?.
Email : hocavr@yahoo.com
- 28 Nov 2012 09:23
- Forum: mikroC PRO for PIC General
- Topic: Set Timer1, help me?
- Replies: 18
- Views: 6326
Re: Set Timer1, help me?
@MARIO
I put the external oscillator 20Mhz. and used Timer0. The machine cycle will = 0.05us. Have I to determine how the number of times the overflow flag? Can you help me?
Thanks
I put the external oscillator 20Mhz. and used Timer0. The machine cycle will = 0.05us. Have I to determine how the number of times the overflow flag? Can you help me?
Thanks
- 27 Nov 2012 05:12
- Forum: mikroC PRO for PIC General
- Topic: Set Timer1, help me?
- Replies: 18
- Views: 6326
Re: Set Timer1, help me?
Dear MARIO
I revised circuit, using Timer0. I have simulate on Protues, it runs fine, But it only measured to 255Hz. Can you help me to measure up to 1MHz or 2MHz ?. I think, it is possible to use the overflow flag.
I send you file on protues and my code.
I revised circuit, using Timer0. I have simulate on Protues, it runs fine, But it only measured to 255Hz. Can you help me to measure up to 1MHz or 2MHz ?. I think, it is possible to use the overflow flag.
I send you file on protues and my code.
- 25 Nov 2012 18:23
- Forum: mikroC PRO for PIC General
- Topic: Set Timer1, help me?
- Replies: 18
- Views: 6326
Re: Set Timer1, help me?
Thanks MARIO
I will follow your advice.I think it will have to use the hardware.
I will follow your advice.I think it will have to use the hardware.
- 24 Nov 2012 19:28
- Forum: mikroC PRO for PIC General
- Topic: Set Timer1, help me?
- Replies: 18
- Views: 6326
Re: Set Timer1, help me?
original code (100ms) run OK, I am tried test. This is schematic for Protues
- 24 Nov 2012 18:49
- Forum: mikroC PRO for PIC General
- Topic: Set Timer1, help me?
- Replies: 18
- Views: 6326
Re: Set Timer1, help me?
Dir MARIO I followed the instructions in one example : 1. Initialize Timer1 registers with appropriate values for creating 100 ms delay. 2. Enable Timer0 as counter with prescaler 1:64. 3. Count the pulses for 100 ms. 4. Frequency = 10 x No. of Pulses 5. If frequency < 99990, change prescaler to 1:1...
- 23 Nov 2012 18:51
- Forum: mikroC PRO for PIC General
- Topic: Set Timer1, help me?
- Replies: 18
- Views: 6326
Re: Set Timer1, help me?
Thank MARIO I did like you, but not. This is the code in the example, I have to fix how? //PIC16F886 20MHz // Define LCD module connections. sbit LCD_RS at RB2_bit; sbit LCD_EN at RB3_bit; sbit LCD_D4 at RB4_bit; sbit LCD_D5 at RB5_bit; sbit LCD_D6 at RB6_bit; sbit LCD_D7 at RB7_bit; sbit LCD_RS_Dir...
- 23 Nov 2012 17:30
- Forum: mikroC PRO for PIC General
- Topic: Set Timer1, help me?
- Replies: 18
- Views: 6326
Set Timer1, help me?
I use PIC 16F886 frequency count (1Mhz) and Crystal = 20Mhz. I want to have a resolution of 1Hz then must set Timer1 in 10ms. But How much value of TMR1L and TMR1H?. I see an example : long count_pulse(){ long ff = 0; Gate_Enable = 0; CountDone = 0; Num = 0; TMR1L = 0xDC; //TMR1 start time = 3036 fo...
- 08 Oct 2012 12:56
- Forum: mikroC PRO for PIC General
- Topic: used at the same time all three counters PIC16F887
- Replies: 3
- Views: 1403
Re: used at the same time all three counters PIC16F887
Thank Sparky1039
I trying.
I trying.
- 07 Oct 2012 17:19
- Forum: mikroC PRO for PIC General
- Topic: used at the same time all three counters PIC16F887
- Replies: 3
- Views: 1403
used at the same time all three counters PIC16F887
I want use PIC16F887 to measure the three frequency (same time all), frequency used for comparison purposes. How write code?.
Help me
Many thanks
Help me
Many thanks