Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

got an error with PWM configuration at ATTiny 85 but works w

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Unsupported versions
View previous topic :: View next topic  
Author Message
ulfbc

Bascom Member



Joined: 12 Mar 2019
Posts: 14

germany.gif
PostPosted: Wed May 11, 2022 8:49 pm    Post subject: got an error with PWM configuration at ATTiny 85 but works w Reply with quote

Hi
I get an error with PWM configuration at ATTiny 85 but is accepted and works well with ATTiny45.
Bascom Version 2.0.8.4


Error:
Error : 46 Line : 322 Assignment error, unknown variable (DIM) [COMPARE1A: 0 AUSGABE: 6] , in File : D:\OneDrive\AVR\eigene_Progs\sbus-switch-mini-V0.1.0.bas
Error : 46 Line : 326 Assignment error, unknown variable (DIM) [COMPARE1B: 0 AUSGABE: 6] , in File : D:\OneDrive\AVR\eigene_Progs\sbus-switch-mini-V0.1.0.bas
Error : 124 Line : 326 LOOP expected , in File : D:\OneDrive\AVR\eigene_Progs\sbus-switch-mini-V0.1.0.bas


snip of my Code
Code:


kanal = kanal1
call magic_code()
Compare1A = ausgabe      'PWM-Ausgang setzen

kanal = kanal2
call magic_code()
Compare1B = ausgabe     'PWM-Ausgang setzen
 


accected lines starts with "Compare...."
For my understanding my 45'er Code shout work with ATTiny as well.

Only change at the beginning of my code is:
Code:

'$regfile="attiny45.dat"

$regfile="attiny85.dat"
 


(BASCOM-AVR version : 2.0.8.4 , Latest : 2.0.8.5 )
Back to top
View user's profile
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 971

poland.gif
PostPosted: Thu May 12, 2022 8:42 am    Post subject: Reply with quote

There is lack of information about alias for COMPARE1A in the DAT file for Tiny85 but you can use OCR1A instead.
You also can add definition for COMPARE1A in the Tiny85.DAT file.

Back to top
View user's profile Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Unsupported versions 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