View previous topic :: View next topic |
Author |
Message |
wielklem
Joined: 20 Nov 2008 Posts: 47 Location: the Netherlands
|
Posted: Wed Jun 23, 2021 11:08 am Post subject: PWM channel |
|
|
I've been out of Basom for several years but just started it again.
As it seems I have a small issue with a specific PWM channel (Pin B4) that I'm trying to use.
Code: | Config Timer1 = Pwm , Pwm = 8, Compare A Pwm = Clear Up , Compare B Pwm = Clear Up, Compare C Pwm = Clear Up , Prescale = 1
compare0 = 128 'B4
Compare1a = 255 'B5
Compare1b = 128 'B6
Compare1c = 16 'B7
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'from the .dat file
'Timer config: ATmega128
'[TIMER]
'COMPARE=9
'COMPARE1=COMPARE,PORTB.4
'COMPARE2=COMPARE0,PORTB.4
'COMPARE3=COMPARE1A,PORTB.5
'COMPARE4=COMPARE1B,PORTB.6
'COMPARE5=COMPARE1C,PORTB.7
'COMPARE6=COMPARE2,PORTB.7
'COMPARE7=COMPARE3A,PORTE.3
'COMPARE8=COMPARE3B,PORTE.4
'COMPARE9=COMPARE3C,PORTE.5
'
'''''''''''''''''' |
Any suggestions?
(BASCOM-AVR version : 2.0.8.3 ) |
|
Back to top |
|
|
wielklem
Joined: 20 Nov 2008 Posts: 47 Location: the Netherlands
|
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Wed Jun 23, 2021 2:33 pm Post subject: |
|
|
at least you read the datasheet and find it yourselves _________________ Mark |
|
Back to top |
|
|
enniom
Joined: 20 Oct 2009 Posts: 537
|
Posted: Wed Jun 23, 2021 5:49 pm Post subject: |
|
|
.
This is also easy to check .....
|
|
Back to top |
|
|
wielklem
Joined: 20 Nov 2008 Posts: 47 Location: the Netherlands
|
Posted: Wed Jun 23, 2021 10:09 pm Post subject: |
|
|
like I've wrote; I've been out of basom for some years..
and indeed, reading helps
thanks for the hint on the pinout, can help
best,
W |
|
Back to top |
|
|
|