Searching \ for '[PIC]: Connecting PWM1 -> RC0' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=pwm
Search entire site for: 'Connecting PWM1 -> RC0'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Connecting PWM1 -> RC0'
2001\01\03@113408 by Dan Michaels

flavicon
face
Rodrigo Real wrote:

>       I am trying to connect CCP1 pin working in PWM mode to RC0 to read
the sinal generated. RC0 is  also connected to INT. I want to generate an
interrupt at every PWM pulse and redirect that sinal to any pin of PORTB.
What I got is a 20Khz PWM sinal and a +/- 300Hz at PORTB. The software to
control the PWM was writen in C (not by me), it seems to be working fine.


It is not clear what the problem is here. What does +/-300hz
signal mean?

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\01\03@120452 by ec4real

flavicon
face
Dan Michaels writes:
> Rodrigo Real wrote:
>
> It is not clear what the problem is here. What does +/-300hz
> signal mean?

It means the frequency is around 300Hz (it is not changing, if that's what you are thinking), I expect it were 20KHz, just like the PWM frequency.

[]s
Rodrigo

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\01\03@121742 by Dan Michaels

flavicon
face
Rodigo wrote:
>Dan Michaels writes:
> > Rodrigo Real wrote:
> >
> > It is not clear what the problem is here. What does +/-300hz
> > signal mean?
>
> It means the frequency is around 300Hz (it is not changing, if that's what
you are thinking), I expect it were 20KHz, just like the PWM frequency.
>

If you simply write a loop to poll RC1 [or RC0/RB0 when using
external connections - as you indicated you have already done],
then you should see the 20khz PWM signal on your portB pin.

1 - check that PWM is actually coming out of RC1. This is PWM
   channel **2**, BTW.

2 - maybe you programmed PWM ch#1 instead --> comes out RC2.

3 - simple loop should do it, without any external connections.

L1      btfss   portc,1         ; PWM ch#2 output bit
       bcf     portb,2         ; signal out
       btfsc   portc,1
       bsf     portb,2
       goto    L1

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\01\07@104412 by ec4real

flavicon
face
Dan Michaels writes:
>
> If you simply write a loop to poll RC1 [or RC0/RB0 when using
> external connections - as you indicated you have already done],
> then you should see the 20khz PWM signal on your portB pin.
>
> ....
>
> 3 - simple loop should do it, without any external connections.
>
> L1      btfss   portc,1         ; PWM ch#2 output bit
>         bcf     portb,2         ; signal out
>         btfsc   portc,1
>         bsf     portb,2
>         goto    L1
>
Thanks a lot Dan your third tip worked fine.

[]s
Rodrigo Real

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\01\07@122547 by Dan Michaels

flavicon
face
> Thanks a lot Dan your third tip worked fine.
>
> []s
> Rodrigo Real
>

de nada.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...