Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

m64def.dat or m64m1.dat

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

Bascom Member



Joined: 30 Sep 2015
Posts: 32

brazil.gif
PostPosted: Sat Nov 14, 2015 1:20 pm    Post subject: m64def.dat or m64m1.dat Reply with quote

I'm developing a project using ATMEGA64L-8MU (QFN 64) and BASCOM I have to use '$regfile = "m64def.dat" to build the softare and not give error. If use "$regfile = "m64m1.dat" of the following error # 41. Would anyone can help me or explain me why this error? Or why can not I use the "m64m1.dat"? Here below file for analysis
Thank you.

(BASCOM-AVR version : 2.0.7.8 , Latest : 2.0.7.8 )
Back to top
View user's profile
_kaktus_

Bascom Member



Joined: 22 Mar 2014
Posts: 7

poland.gif
PostPosted: Sat Nov 14, 2015 1:42 pm    Post subject: Reply with quote

You tried on an earlier version of Bascom?
Back to top
View user's profile Visit poster's website
i.dobson

Bascom Expert



Joined: 05 Jan 2006
Posts: 1546
Location: Basel, Switzerland

switzerland.gif
PostPosted: Sun Nov 15, 2015 9:19 am    Post subject: Reply with quote

Hello,

Looks as if the m64m1.dat is missing the port definitions for porta/data direction Register A.

In the IO section of the dat file I see
Code:

PORTE   = $0E
DDRE    = $0D
PINE    = $0C
PORTD   = $0B
DDRD    = $0A
PIND    = $09
PORTC   = $08
DDRC    = $07           ; New
PINC    = $06           ; New
PORTB   = $05
DDRB    = $04
PINB    = $03
 


This is in Bascom Version 2.0.7.9

If you find the correct addresses for PortA, PinA and DDRA and add them to the data file the code should work.

Regards
Ian Dobson

_________________
Home of AVRTimer, the Bascom timer value calculator.
http://www.planet-ian.com

Walking on water and writing software to specification is easy if they're frozen.
Back to top
View user's profile Visit poster's website
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5284
Location: Holland

blank.gif
PostPosted: Mon Nov 16, 2015 10:50 am    Post subject: Reply with quote

you can not simply add them. they are not missing : this PORTA does not exist in the mega64M1.
Have a look in the datasheet and the pinout. you will not find any pin named with PA. At least, i did not find any.
That a chip has a similar name does not mean much. you can upgrade from 16M1 to 32M1 to 64M1 without problems, but you can not from a normal mega64 to an M.

_________________
Mark
Back to top
View user's profile Visit poster's website
i.dobson

Bascom Expert



Joined: 05 Jan 2006
Posts: 1546
Location: Basel, Switzerland

switzerland.gif
PostPosted: Mon Nov 16, 2015 6:25 pm    Post subject: Reply with quote

Hi,

Oh, OK I've learnt something new. I always thought that AVR's started with PortA.

Regards
Ian Dobson

_________________
Home of AVRTimer, the Bascom timer value calculator.
http://www.planet-ian.com

Walking on water and writing software to specification is easy if they're frozen.
Back to top
View user's profile Visit poster's website
gilson163

Bascom Member



Joined: 30 Sep 2015
Posts: 32

brazil.gif
PostPosted: Mon Nov 16, 2015 9:50 pm    Post subject: Reply with quote

I did not understand completely . How then do detail to cancel this error in BASCOM compiler ?
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5284
Location: Holland

blank.gif
PostPosted: Mon Nov 16, 2015 10:00 pm    Post subject: Reply with quote

it is not a problem of the compiler.
you try to access hardware (a PORTA) that does NOT exist for that chip !
- please check the PDF of the used processor
- lookup PORTA
- you will see it does not exist

_________________
Mark
Back to top
View user's profile Visit poster's website
gilson163

Bascom Member



Joined: 30 Sep 2015
Posts: 32

brazil.gif
PostPosted: Mon Nov 16, 2015 10:20 pm    Post subject: Reply with quote

so if I use $regfile(m64def.dat) for atmega64L-8mU (QFN64) will have no problem. I develop the software with this? All functions work normally?
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5284
Location: Holland

blank.gif
PostPosted: Mon Nov 16, 2015 10:28 pm    Post subject: Reply with quote

if your processor is atmega64L, then yes, that would be the proper thing to do.
but if your processor is atmega64M1, it will not work when using portA.

_________________
Mark
Back to top
View user's profile Visit poster's website
gilson163

Bascom Member



Joined: 30 Sep 2015
Posts: 32

brazil.gif
PostPosted: Mon Nov 16, 2015 11:23 pm    Post subject: Reply with quote

I understand, thank you for the explanation.
Back to top
View user's profile
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