View previous topic :: View next topic |
Author |
Message |
hobby
Joined: 12 Apr 2004 Posts: 109 Location: Brussels
|
Posted: Wed Jun 11, 2014 3:15 pm Post subject: 3 PWM on M324P |
|
|
Hi All,
I have problem to configure the 3 PWM on M324P:
Code: |
$regfile = "m324pdef.dat"
$crystal = 8000000
$hwstack = 40
$swstack = 30
$framesize = 40
Config Timer1 = Pwm , Pwm = 8 , Prescale = 1 , Compare A Pwm = Clear down
Config Timer2 = Pwm , Prescale = 8 , Compare_A_Pwm = Clear_Up , Pwm = On , Compare_A = Set , Async = Off
Start Timer1
Start Timer2
do
Pwm1a = 255
Pwm1b = 255
Pwm2a = 255
waitms 350
Pwm1a = 0
Pwm1b = 0
Pwm2a = 0
waitms 350
loop
end |
I have only OC2A (PORTD.7) works.
Any id for what.
Thanks
Olivier
(BASCOM-AVR version : 2.0.7.6 , Latest : 2.0.7.7 ) |
|
Back to top |
|
|
hobby
Joined: 12 Apr 2004 Posts: 109 Location: Brussels
|
Posted: Wed Jun 11, 2014 10:02 pm Post subject: |
|
|
Hi All,
In old time, i have writed this for M644P (and run):
Code: |
Config Timer1 = Pwm , Prescale = 1 , Pwm = 8 , Compare A Pwm = Clear Down , Compare B Pwm = Clear Down
Config Timer2 = Pwm , Prescale = 1 , Compare A Pwm = Clear Down , Compare B Pwm = Clear Down
|
But not works with M324P and Bascom 2.0.7.7
Why ? , any idea ?
Best regards
Olivier |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|