View previous topic :: View next topic |
Author |
Message |
mototest2
Joined: 24 Dec 2006 Posts: 53
|
Posted: Sat Dec 05, 2015 11:45 am Post subject: xmega how redirect PWM to PortB |
|
|
Hi guys
Plese help me how I can redirect for example timer Tce1 (pwm) to portb.3 ?
or other suggestion for achieve pwm on portb.3 ?
Code: |
Config Tce1 = Pwm_topbot , Prescale = 256 , Comparea = Enabled , Compareb = Enabled , Comparec = Enabled , Compared = Enabled , Resolution = 8
|
Thanks
Bob
(BASCOM-AVR version : 2.0.7.8 ) |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Sat Dec 05, 2015 6:12 pm Post subject: Re: xmega how redirect PWM to PortB |
|
|
mototest2 wrote: | or other suggestion for achieve pwm on portb.3 ? |
A piece of wire and a soldering iron.
Or soft-PWM.
Quote: | xmega how redirect PWM to PortB |
Ahh, yes, THIS xmega. Sure, Atmel did create only one model... |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Tue Dec 08, 2015 10:20 pm Post subject: |
|
|
some new xmega have the REMAP register which can remap pins (on the same port)
but not from one pin to another port.
what about using the event system? you can have an event for the timer or the port pins and replicate the state. _________________ Mark |
|
Back to top |
|
|
mototest2
Joined: 24 Dec 2006 Posts: 53
|
Posted: Tue Dec 08, 2015 10:28 pm Post subject: |
|
|
I don't know how use event system to generating PWM on portB |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Wed Dec 09, 2015 11:18 am Post subject: |
|
|
the idea is to generate it on the normal pins, then use the even system to replicate the pin state on any other port pin.
maybe you know the pcint of the normal avr ? it can react on a pin change. like :
pcint_change:
'pin has changed so duplicate it on another pin
portb.0 = portE.2 ' just for example
return
check the data sheet and the even system samples. _________________ Mark |
|
Back to top |
|
|
Meister
Joined: 27 May 2010 Posts: 319
|
Posted: Wed Dec 09, 2015 8:20 pm Post subject: |
|
|
To be more specific ...., you might wish to have a look at this:
http://bascomforum.de/
Regards, Meister |
|
Back to top |
|
|
|