Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PWM and RTCC on Pinguino micro the same time
13-10-2012, 12:09 AM,
#1
PWM and RTCC on Pinguino micro the same time
Hi All,
I have a problem and not be able to fix it out.
I need PWM and RTCC both at once. For me I wasn´t able to get it started. Only one of it works. I tried also the interrupt example, but there is timer 1 which is used for RTCC also? Doesn´t work together with it. AnalogWrite or the PWM Function causes all the same..
Connected a 32,768 khz crystal to con1-1 and con1-2. .so alone this works.
I´m not tough enogh to try timer 3 or 4 for example.. .And would it help really?
So does anyone maybe have a solution for this? Would be very glad if so.

Greetz
Reply
14-10-2012, 09:57 PM,
#2
RE: PWM and RTCC on Pinguino micro the same time
Well i found out, that it works with PWM function and RTC. I don´t know what´s the real reason for this. Maybe my fault or whatever.. I made a new file didn´t done big corrections and tried it again. *confusing*

Finally found it out myself :-)
had a int variable which got different datas depends on a if condition. After the if {} I set the PWM.setPercentDutyCycle(pin,int variable);
This caused that only 0 or 1 sent to the pin. That´s why I thought somethings wrong with the timer.
I had the same code in Arduino and it was working, that´s why I was that confused. Now the pwm function is directly in the if condition and it works fine.

Greetings
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)