Posted by rashid husain September 4, 2003
NO.Actually the PWM signal is supplied to motor driver
L6203 for my 24V DC motor.The isgnal is buffered in
74HC04 first...

Thanks Chad for the idea anyway...

rashid --- Chad Russel <> wrote:
> Maybe I do not understand, but if you are trying to
> drive a DC motor
> directly with the PIC output, you could be killing
> pin 2 input from
> switching spikes. I am surprised you have not killed
> the PWM.
>
> Chad
>
> --- rashid husain <> wrote:
> > thanks a lot chad for the support.
> > What I am doing is the PWM signal will drive a DC
> > motor in which the PWM duty cycle will determine
> the
> > speed of the motor. The Duty cycle is calculated
> by a
> > PID controller written in the PIC. Thus, to
> generate
> > the interrupt to calculate the PID algorithm, I
> took
> > PWM signal as the time based and supply to Timer2
> > which then generate the interrupt.
> > Might be the Timer 2 pin is 'dead' but I tried on
> 2
> > PICs and the output was the same. Might be both
> PICs'
> > Timer 2 pins dead. I now try to figure out how it
> > could happen because as far as I can remember
> Timer 2
> > did work before...
> > I just worry whether there are other reasons that
> > might cause the problem that I might not aware
> of...
> >
> > Thanks again
> >
> >
> >
> >
> >
> > --- Chad Russel <> wrote:
> > > Hummmmm,
> > >
> > > Well, as you probably already know, it will be
> > > something simple or
> > > something very obscure. If you are absolutely
> sure
> > > it works with Timer
> > > 2 input disconnected, but not with it connected,
> > > then it almost must be
> > > the Timer 2 input pin.
> > >
> > > However the PWM output is different than the
> > > standard output. What is
> > > the PWM signal diving?
> > >
> > > Maybe you can send me the complete code and the
> > > applicable part of the
> > > schematic. Can not promise anything, but I can
> have
> > > a look. Unless
> > > you want to send be the PWB, then I will have to
> > > charge. :-p
> > >
> > > Chad
> > >
> > > --- rashid husain <> wrote:
> > > > About the configuration, I am pretty sure it
> is
> > > > correct.Tim Ineed to generate interrupt from
> the
> > > er2
> > > > since I need to count base on PWM
> period.(multiple
> > > of
> ***** SNIP *****
>
> __________________________________


__________________________________



Posted by Chad Russel September 3, 2003
Maybe I do not understand, but if you are trying to drive a DC motor
directly with the PIC output, you could be killing pin 2 input from
switching spikes. I am surprised you have not killed the PWM.

Chad

--- rashid husain <> wrote:
> thanks a lot chad for the support.
> What I am doing is the PWM signal will drive a DC
> motor in which the PWM duty cycle will determine the
> speed of the motor. The Duty cycle is calculated by a
> PID controller written in the PIC. Thus, to generate
> the interrupt to calculate the PID algorithm, I took
> PWM signal as the time based and supply to Timer2
> which then generate the interrupt.
> Might be the Timer 2 pin is 'dead' but I tried on 2
> PICs and the output was the same. Might be both PICs'
> Timer 2 pins dead. I now try to figure out how it
> could happen because as far as I can remember Timer 2
> did work before...
> I just worry whether there are other reasons that
> might cause the problem that I might not aware of...
>
> Thanks again > --- Chad Russel <> wrote:
> > Hummmmm,
> >
> > Well, as you probably already know, it will be
> > something simple or
> > something very obscure. If you are absolutely sure
> > it works with Timer
> > 2 input disconnected, but not with it connected,
> > then it almost must be
> > the Timer 2 input pin.
> >
> > However the PWM output is different than the
> > standard output. What is
> > the PWM signal diving?
> >
> > Maybe you can send me the complete code and the
> > applicable part of the
> > schematic. Can not promise anything, but I can have
> > a look. Unless
> > you want to send be the PWB, then I will have to
> > charge. :-p
> >
> > Chad
> >
> > --- rashid husain <> wrote:
> > > About the configuration, I am pretty sure it is
> > > correct.Tim Ineed to generate interrupt from the
> > er2
> > > since I need to count base on PWM period.(multiple
> > of
***** SNIP *****

__________________________________




Posted by rashid husain September 3, 2003
thanks a lot chad for the support.
What I am doing is the PWM signal will drive a DC
motor in which the PWM duty cycle will determine the
speed of the motor. The Duty cycle is calculated by a
PID controller written in the PIC. Thus, to generate
the interrupt to calculate the PID algorithm, I took
PWM signal as the time based and supply to Timer2
which then generate the interrupt.
Might be the Timer 2 pin is 'dead' but I tried on 2
PICs and the output was the same. Might be both PICs'
Timer 2 pins dead. I now try to figure out how it
could happen because as far as I can remember Timer 2
did work before...
I just worry whether there are other reasons that
might cause the problem that I might not aware of...

Thanks again --- Chad Russel <> wrote:
> Hummmmm,
>
> Well, as you probably already know, it will be
> something simple or
> something very obscure. If you are absolutely sure
> it works with Timer
> 2 input disconnected, but not with it connected,
> then it almost must be
> the Timer 2 input pin.
>
> However the PWM output is different than the
> standard output. What is
> the PWM signal diving?
>
> Maybe you can send me the complete code and the
> applicable part of the
> schematic. Can not promise anything, but I can have
> a look. Unless
> you want to send be the PWB, then I will have to
> charge. :-p
>
> Chad
>
> --- rashid husain <> wrote:
> > About the configuration, I am pretty sure it is
> > correct.Tim Ineed to generate interrupt from the
> er2
> > since I need to count base on PWM period.(multiple
> of
> > PWM period). I am expecting a dead pin as well but
> > after changing to 3 PIC, problem remains. Firstly
> I
> > thought that might be the breadboard causes the
> > problem but after changing to my own PCB board I
> just
> > fabricated, problem is still there ...:(
> > Any Idea.....?
> >
> > tq
> >
> > rashid
> > --- Chad Russel <> wrote:
> > > Is it possible Timer 2 input is not configured
> > > correctly? Timer 2
> > > input pin may be dead, i.e. killed. Does not
> the
> > > PWM generate an
> > > interrupt already, or you want to count a number
> of
> > > cycles using Timer
> > > 2?
> > >
> > > Chad
> > >
> > > --- rashid husain <> wrote:
> > > > HI everyone,
> > > >
> > > > I have a problem with the PWM signal that I
> feed
> > > to my
> > > > Timer. I generate a PWM signal to control a
> motor
> > > and
> > > > I also take the PWM signal and feed to Timer 2
> of
> > > my
> > > > PIC 17C756A. When I made the conenction to the
> > > Timer,
> > > > The PWM voltage drops to 1.8V for 'mark' which
> > > then
> > > > does not able to drive the motor. When I
> > > disconenct
> > > > the conenction to Timer 2, the PWM signal goes
> > > normal
> > > > with 5V for 'mark'.
> > > > I connect the PWM to the TImer2 since I want
> to
> > > use
> > > > the period of the PWM to generate and
> interrupt.
> > > >
> > > > I really appreciate for any help.
> > > >
> > > > thanks
> > > >
> > > >
> > > > Rashid > __________________________________


__________________________________




Posted by Chad Russel September 2, 2003
Hummmmm,

Well, as you probably already know, it will be something simple or
something very obscure. If you are absolutely sure it works with Timer
2 input disconnected, but not with it connected, then it almost must be
the Timer 2 input pin.

However the PWM output is different than the standard output. What is
the PWM signal diving?

Maybe you can send me the complete code and the applicable part of the
schematic. Can not promise anything, but I can have a look. Unless
you want to send be the PWB, then I will have to charge. :-p

Chad

--- rashid husain <> wrote:
> About the configuration, I am pretty sure it is
> correct.Tim Ineed to generate interrupt from the er2
> since I need to count base on PWM period.(multiple of
> PWM period). I am expecting a dead pin as well but
> after changing to 3 PIC, problem remains. Firstly I
> thought that might be the breadboard causes the
> problem but after changing to my own PCB board I just
> fabricated, problem is still there ...:(
> Any Idea.....?
>
> tq
>
> rashid
> --- Chad Russel <> wrote:
> > Is it possible Timer 2 input is not configured
> > correctly? Timer 2
> > input pin may be dead, i.e. killed. Does not the
> > PWM generate an
> > interrupt already, or you want to count a number of
> > cycles using Timer
> > 2?
> >
> > Chad
> >
> > --- rashid husain <> wrote:
> > > HI everyone,
> > >
> > > I have a problem with the PWM signal that I feed
> > to my
> > > Timer. I generate a PWM signal to control a motor
> > and
> > > I also take the PWM signal and feed to Timer 2 of
> > my
> > > PIC 17C756A. When I made the conenction to the
> > Timer,
> > > The PWM voltage drops to 1.8V for 'mark' which
> > then
> > > does not able to drive the motor. When I
> > disconenct
> > > the conenction to Timer 2, the PWM signal goes
> > normal
> > > with 5V for 'mark'.
> > > I connect the PWM to the TImer2 since I want to
> > use
> > > the period of the PWM to generate and interrupt.
> > >
> > > I really appreciate for any help.
> > >
> > > thanks
> > >
> > >
> > > Rashid


__________________________________




Posted by rashid husain September 1, 2003
About the configuration, I am pretty sure it is
correct. Ineed to generate interrupt from the Timer2
since I need to count base on PWM period.(multiple of
PWM period). I am expecting a dead pin as well but
after changing to 3 PIC, problem remains. Firstly I
thought that might be the breadboard causes the
problem but after changing to my own PCB board I just
fabricated, problem is still there ...:(
Any Idea.....?

tq

rashid
--- Chad Russel <> wrote:
> Is it possible Timer 2 input is not configured
> correctly? Timer 2
> input pin may be dead, i.e. killed. Does not the
> PWM generate an
> interrupt already, or you want to count a number of
> cycles using Timer
> 2?
>
> Chad
>
> --- rashid husain <> wrote:
> > HI everyone,
> >
> > I have a problem with the PWM signal that I feed
> to my
> > Timer. I generate a PWM signal to control a motor
> and
> > I also take the PWM signal and feed to Timer 2 of
> my
> > PIC 17C756A. When I made the conenction to the
> Timer,
> > The PWM voltage drops to 1.8V for 'mark' which
> then
> > does not able to drive the motor. When I
> disconenct
> > the conenction to Timer 2, the PWM signal goes
> normal
> > with 5V for 'mark'.
> > I connect the PWM to the TImer2 since I want to
> use
> > the period of the PWM to generate and interrupt.
> >
> > I really appreciate for any help.
> >
> > thanks
> >
> >
> > Rashid
>
> __________________________________


__________________________________




Posted by Chad Russel August 31, 2003
Is it possible Timer 2 input is not configured correctly? Timer 2
input pin may be dead, i.e. killed. Does not the PWM generate an
interrupt already, or you want to count a number of cycles using Timer
2?

Chad

--- rashid husain <> wrote:
> HI everyone,
>
> I have a problem with the PWM signal that I feed to my
> Timer. I generate a PWM signal to control a motor and
> I also take the PWM signal and feed to Timer 2 of my
> PIC 17C756A. When I made the conenction to the Timer,
> The PWM voltage drops to 1.8V for 'mark' which then
> does not able to drive the motor. When I disconenct
> the conenction to Timer 2, the PWM signal goes normal
> with 5V for 'mark'.
> I connect the PWM to the TImer2 since I want to use
> the period of the PWM to generate and interrupt.
>
> I really appreciate for any help.
>
> thanks > Rashid

__________________________________




Posted by rashid husain August 31, 2003
HI everyone,

I have a problem with the PWM signal that I feed to my
Timer. I generate a PWM signal to control a motor and
I also take the PWM signal and feed to Timer 2 of my
PIC 17C756A. When I made the conenction to the Timer,
The PWM voltage drops to 1.8V for 'mark' which then
does not able to drive the motor. When I disconenct
the conenction to Timer 2, the PWM signal goes normal
with 5V for 'mark'.
I connect the PWM to the TImer2 since I want to use
the period of the PWM to generate and interrupt.

I really appreciate for any help.

thanks Rashid

__________________________________