Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Atmega1284p - OCR3B

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
mariosm

Bascom Member



Joined: 12 Oct 2005
Posts: 40
Location: Thessaloniki

greece.gif
PostPosted: Tue May 05, 2020 11:35 am    Post subject: Atmega1284p - OCR3B Reply with quote

I want to use OCR3B but not supported on Atmega1284p compiler.
This is the code.
Code:

Config Timer3 = Pwm , Pwm = 8 , Compare A Pwm = Clear Down , Compare B Pwm = Clear Down , Prescale = 256 , Noise_cancel = 1
Config Timer1 = Pwm , Pwm = 8 , Compare A Pwm = Clear Down , Compare B Pwm = Clear Down , Prescale = 256 , Noise_cancel = 1
Config Timer2 = Pwm , Pwm = On , Compare A Pwm = Clear Down , Compare B Pwm = Clear Down , Prescale = 256       'we adjust timer
Enable Interrupts                                           'We Allow interruptions
Enable Timer0
Enable Timer1
Enable Timer2
Enable Timer3
Led1 Alias OCR1A                                        'PIN 14 PD5  red
Led2 Alias OCR1B                                          'PIN 13 PD4  green
Led3 Alias OCR2A                                           'PIN 16 PD7  blue
Led4 Alias OCR2B                                         'PIN 15 PD6  white
Led5 Alias OCR3A                                            'PIN  2 PB6
Led6 Alias Ocr3b                                            'PIN  3 PB7
 


Τhere is a solution on this problem?

(BASCOM-AVR version : 2.0.8.2 )

_________________
Bascom AVR ver 2.0.8.2 full version
Back to top
View user's profile
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 673

poland.gif
PostPosted: Tue May 05, 2020 12:32 pm    Post subject: Reply with quote

In the DAT file for m1284p youll find such [WIO] constans:

COMPARE3A=$98
PWM3A=$98
OCR3A=$98

Like you see they have the same addresses so Compare3a, Pwm3a or Ocr3a means the same.

One line above youll find only :

COMPARE3B=$9a
PWM3B=$9A

So OCR3B is missing but you still can use Compare3b or Pwm3b syntax without any problem Wink

If you want you can add missing OCR3B=$9A into the DAT file by editing it with some Text editor, and Bascom should recognize your syntax then.
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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