Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

atmega1284p

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

Bascom Member



Joined: 07 Sep 2010
Posts: 35

PostPosted: Mon Jan 12, 2015 8:14 pm    Post subject: atmega1284p Reply with quote

I need a booloader for atmega1284p grateful for the help :D

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

Bascom Member



Joined: 28 Jul 2006
Posts: 1257
Location: SYDNEY

australia.gif
PostPosted: Mon Jan 12, 2015 10:29 pm    Post subject: Reply with quote

Hello maxneo

Have a look in bascom help and samples code for MCS bootloader

Regards Paul
Back to top
View user's profile
maxneo

Bascom Member



Joined: 07 Sep 2010
Posts: 35

PostPosted: Tue Jan 13, 2015 7:02 pm    Post subject: Reply with quote

I do not understand how to find the values of Atmega1284p can someone explain how to do it or is it the same as for ATMEGA128

below Atmega88

#if Downloader Chip = 88 'Mega88
$ loader = $ c00 "this address you can find in the datasheet
'The downloader address is the same as the boot vector address
Const Maxwordbit = 5
Config Com1 = Dummy, Synchron = 0, Parity = None, Stop bits = 1, Data bits = 8, Clockpol = 0
#endif

grateful for answers
Back to top
View user's profile
maxneo

Bascom Member



Joined: 07 Sep 2010
Posts: 35

PostPosted: Tue Jan 13, 2015 10:03 pm    Post subject: Reply with quote

Have tried to make a bootloader to atmega1284 but get error code


Error : 344 Line : 5 Program will overwrite bootloader [ 1640 too long] , in File : C:\PROGRAM FILES (X86)\MCS ELECTRONICS\BASCOM-AVR\LIB\FP_TRIG.LBX

$regfile = "m1284def.dat"
Const Loaderchip = 1284



if Loaderchip = 1284 ' Mega1284P
$loader = &H10000 ' 1024 words
Const Maxwordbit = 7 'Z7 is maximum bit '
Config Com1 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
#endif

Is there anyone who can help me
Thank you in advance
Back to top
View user's profile
bzijlstra

Bascom Ambassador



Joined: 30 Dec 2004
Posts: 1179
Location: Tilburg - Netherlands

netherlands.gif
PostPosted: Tue Jan 13, 2015 10:43 pm    Post subject: Reply with quote

There are a few things that can be done. First of all, could you show us the fusebit settings of your atmega1284p. Specially the reset-vector.

Do you have another atmega1284p with bootloader. I know this microcontroller is used on the Sanguinololu board. You could do a full copy and check the reset-vector settings. Reset-vector is pointing to 0000 or to the bootloader start location.

A bootloader will have all 'FF's till it is at the bootloader location, in your case 1024 words. This can be checked if you do a manual programming. You can check the buffer.

Don't worry, I am waiting for my Atmega1284p, and will put an Arduino bootloader in it.

Have fun
Ben Zijlstra
Back to top
View user's profile Visit poster's website
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5925
Location: Holland

blank.gif
PostPosted: Tue Jan 13, 2015 11:10 pm    Post subject: Reply with quote

it is the same as for m128.
So just add this :

Code:
#elseif Loaderchip = 1284
    $loader = &HFC00                                        ' 1024 words
    Const Maxwordbit = 7                                    'Z7 is maximum bit                                   '
    Config Com1 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
#endif


and define a const for loaderchip=1284
if you get errors you best post you code here (zipped)

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

Bascom Member



Joined: 07 Sep 2010
Posts: 35

PostPosted: Wed Jan 14, 2015 8:05 am    Post subject: Many Thanks Reply with quote

Many Thanks
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