Author |
Message |
Topic: Timer1 frequency and pulse count |
petu65
Replies: 3
Views: 8171
|
Forum: General CCS C Discussion Posted: Thu Oct 08, 2015 4:05 am Subject: Timer1 frequency and pulse count |
My code is reading multiple adc ports and counter inputs, averaging adc readings and sending them to serial port at interval 500mS. Actually I need to know how many pulses is coming per minute to tim ... |
Topic: Timer1 frequency and pulse count |
petu65
Replies: 3
Views: 8171
|
Forum: General CCS C Discussion Posted: Thu Oct 08, 2015 2:32 am Subject: Timer1 frequency and pulse count |
PCWH4.112
Pic18F4523
Hi,
I am using Timer1 as counting external pulses.
setup_timer_1(T1_EXTERNAL|T1_DIV_BY_1);
Can I somehow measure frequency at same time in timer1 input using interr ... |
Topic: How to setup timers to get 3 PWM-channels with 18F452? |
petu65
Replies: 5
Views: 8677
|
Forum: General CCS C Discussion Posted: Tue May 28, 2013 2:02 am Subject: How to setup timers to get 3 PWM-channels with 18F452? |
I ordered few 16F737 chips. They have three hardware PWM outputs, I think it's easiest way to do it
Petu |
Topic: How to setup timers to get 3 PWM-channels with 18F452? |
petu65
Replies: 5
Views: 8677
|
Forum: General CCS C Discussion Posted: Fri May 24, 2013 4:11 am Subject: Re: How to setup timers to get 3 PWM-channels with 18F452? |
Now I need 3 PWM-channels with 1kHz duty and 10 i/o-channels. Any other chip?
Can we assume you mean 1kHz frequency?
Mike
PS Try microchip website for chips with more than 2 PWMs.
Sorry ... |
Topic: How to setup timers to get 3 PWM-channels with 18F452? |
petu65
Replies: 5
Views: 8677
|
Forum: General CCS C Discussion Posted: Fri May 24, 2013 3:32 am Subject: How to setup timers to get 3 PWM-channels with 18F452? |
I have used 2 PWM-channels earlier but cant figure how to use three PWM:s simultaneously?
This is what I have used:
setup_timer_0(T0_EXT_H_TO_L|T0_DIV_1);
setup_timer_1(T1_EXTERNAL|T1_DIV_BY_1) ... |
Topic: GLCD Problem. |
petu65
Replies: 2
Views: 5325
|
Forum: General CCS C Discussion Posted: Fri Feb 18, 2011 6:41 am Subject: GLCD Problem. |
Modify GLCD.C like this:
Look at "void glcd_text57(int x,....." section almost end of code.
if(bit_test(pixelData[j], k)) // Check if the pixel sh ... |
Topic: 18F4523 PEIE and ADIF registers |
petu65
Replies: 3
Views: 6322
|
Forum: General CCS C Discussion Posted: Fri Jan 07, 2011 8:08 am Subject: 18F4523 PEIE and ADIF registers |
Could you give me example how to do adc readings in sleep mode with 18F4523? I just don't understand what are correct adc clock values with 4Mhz oscillator if I use just read_adc()? Last two bits in ... |
Topic: 18F4523 PEIE and ADIF registers |
petu65
Replies: 3
Views: 6322
|
Forum: General CCS C Discussion Posted: Wed Jan 05, 2011 7:50 am Subject: 18F4523 PEIE and ADIF registers |
I have used following code for 18F452 to read adc in sleep mode:
#bit PEIE=0xFF2.6
#bit ADIF=0xF9E.6
#use delay(clock=4000000,RESTART_WDT)
long int true_adc (void)
{
lon ... |
|