View previous topic :: View next topic |
Author |
Message |
gilson163
Joined: 30 Sep 2015 Posts: 35
|
Posted: Sat Nov 14, 2015 1:20 pm Post subject: m64def.dat or m64m1.dat |
|
|
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 |
|
|
_kaktus_
Joined: 22 Mar 2014 Posts: 7
|
Posted: Sat Nov 14, 2015 1:42 pm Post subject: |
|
|
You tried on an earlier version of Bascom? |
|
Back to top |
|
|
i.dobson
Joined: 05 Jan 2006 Posts: 1570 Location: Basel, Switzerland
|
Posted: Sun Nov 15, 2015 9:19 am Post subject: |
|
|
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 _________________ Walking on water and writing software to specification is easy if they're frozen. |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Mon Nov 16, 2015 10:50 am Post subject: |
|
|
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 |
|
|
i.dobson
Joined: 05 Jan 2006 Posts: 1570 Location: Basel, Switzerland
|
Posted: Mon Nov 16, 2015 6:25 pm Post subject: |
|
|
Hi,
Oh, OK I've learnt something new. I always thought that AVR's started with PortA.
Regards
Ian Dobson _________________ Walking on water and writing software to specification is easy if they're frozen. |
|
Back to top |
|
|
gilson163
Joined: 30 Sep 2015 Posts: 35
|
Posted: Mon Nov 16, 2015 9:50 pm Post subject: |
|
|
I did not understand completely . How then do detail to cancel this error in BASCOM compiler ? |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Mon Nov 16, 2015 10:00 pm Post subject: |
|
|
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 |
|
|
gilson163
Joined: 30 Sep 2015 Posts: 35
|
Posted: Mon Nov 16, 2015 10:20 pm Post subject: |
|
|
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 |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Mon Nov 16, 2015 10:28 pm Post subject: |
|
|
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 |
|
|
gilson163
Joined: 30 Sep 2015 Posts: 35
|
Posted: Mon Nov 16, 2015 11:23 pm Post subject: |
|
|
I understand, thank you for the explanation. |
|
Back to top |
|
|
|