Pages: [1]   Go Down
Author Topic: '1284P & 1.0.3  (Read 460 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 439
Posts: 23797
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Alrighty,
Just downloaded 1.0.3, copied over maniacbug's 1284 files with my Bobuino variant, compiled a simple sketch, I think I am in business ...
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16523
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Alrighty,
Just downloaded 1.0.3, copied over maniacbug's 1284 files with my Bobuino variant, compiled a simple sketch, I think I am in business ...

Welcome to the club. I've got it also working for a 644P chip also using your through hole 1284P board.

Lefty
Logged

Erlangen, Germany
Offline Offline
Jr. Member
**
Karma: 0
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there,
would any of you care to share the updated files? I'd like to upgrade my 644P clone board to be programmed with the 1.x IDE.
Thank you
Sebastian
Logged

Δεν ελπίζω τίποτα. Δε φοβούμαι τίποτα. Είμαι λέφτερος.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 439
Posts: 23797
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

https://github.com/maniacbug/mighty-1284p

I got them here, I think we all did. 
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Erlangen, Germany
Offline Offline
Jr. Member
**
Karma: 0
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Guys, it seems I got a little rusty. I cannot get my 644p going. I can't even get the board list right with the instructions from the aforementioned link. I made a mess with the IDE modifying the boards.txt and successful compilation depends highly on what 644p board I select.
I would be very grateful to get some help on how to place and include the information in the IDE files.
As soon as I find a little more time I would like to discuss a little the process of compilation, because that probably would help a lot: it would be nice to know, where the compiler looks up what in which file when it is compiling a sketch for a given board. That way it shall be easier to know what to modify and keep in mind to include a new processor. I learned already a lot from the post on the development of the bobuino, but that information is quite scattered throughout lots of pages.
Thanks for any advice, have a nice week!
Seb
Logged

Δεν ελπίζω τίποτα. Δε φοβούμαι τίποτα. Είμαι λέφτερος.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 439
Posts: 23797
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You pretty much want it looking like this when you put the Mighty1284 files in place.
Then make an addition to boards.txt that looks like this:
Code:
##############################################################

mega644.name=Mega644
mega644.upload.protocol=arduino
mega644.upload.maximum_size=64512
mega644.upload.speed=115200
mega644.bootloader.low_fuses=0xff
mega644.bootloader.high_fuses=0xde
mega644.bootloader.extended_fuses=0xfd
mega644.bootloader.path=optiboot
mega644.bootloader.file=optiboot_atmega1284p.hex
mega644.bootloader.unlock_bits=0x3F
mega644.bootloader.lock_bits=0x0F
mega644.build.mcu=atmega644
mega644.build.f_cpu=16000000L
#mega644.build.core=arduino:arduino
mega644.build.core=standard
mega644.build.variant=bobuino   <<< with whatever pinout variant you want to use put in here

##############################################################
I think avrdude.conf has support for both atmega644 & atmega644P already, so you shouldn't have to mess with signature bytes.

I found I also had to change two lines in pins_arduino.h for the Bobuino variant for correct compilation when using SPI, and to fix the analog pin assignments, see **** below.  I don't know if the variants have this problem.
Code:
// ATMEL ATMEGA1284P on Bobuino
//
//                       +---\/---+
//           (D 4) PB0 1 |        | 40 PA0 (D 21) AI 7
//           (D 5) PB1 2 |        | 39 PA1 (D 20) AI 6
//      INT2 (D 6) PB2 3 |        | 38 PA2 (D 19) AI 5
//       PWM (D 7) PB3 4 |        | 37 PA3 (D 18) AI 4
//   PWM/SS (D 10) PB4 5 |        | 36 PA4 (D 17) AI 3
//     MOSI (D 11) PB5 6 |        | 35 PA5 (D 16) AI 2
// PWM/MISO (D 12) PB6 7 |        | 34 PA6 (D 15) AI 1
//  PWM/SCK (D 13) PB7 8 |        | 33 PA7 (D 14) AI 0
//                 RST 9 |        | 32 AREF
//                VCC 10 |        | 31 GND
//                GND 11 |        | 30 AVCC
//              XTAL2 12 |        | 29 PC7 (D 29)
//              XTAL1 13 |        | 28 PC6 (D 28)
//      RX0 (D 0) PD0 14 |        | 27 PC5 (D 27) TDI
//      TX0 (D 1) PD1 15 |        | 26 PC4 (D 26) TDO
// INT0 RX1 (D 2) PD2 16 |        | 25 PC3 (D 25) TMS
// INT1 TX1 (D 3) PD3 17 |        | 24 PC2 (D 24) TCK
//     PWM (D 30) PD4 18 |        | 23 PC1 (D 23) SDA
//      PWM (D 8) PD5 19 |        | 22 PC0 (D 22) SCL
//      PWM (D 9) PD6 20 |        | 21 PD7 (D 31) PWM
//                       +--------+
//

#define NUM_DIGITAL_PINS            32
#define NUM_ANALOG_INPUTS           8
#define analogInputToDigitalPin(p)  ((p < NUM_ANALOG_INPUTS) ? 21 - (p) : -1)

extern const uint8_t digital_pin_to_pcint[NUM_DIGITAL_PINS];
extern const uint16_t __pcmsk[];

// ****************** //
// comment next line to solve SPI problem?
//extern const uint8_t digital_pin_to_timer_PGM[NUM_DIGITAL_PINS]; 

#define ifpin(p,what,ifnot)     (((p) >= 0 && (p) < NUM_DIGITAL_PINS) ? (what) : (ifnot))
#define digitalPinHasPWM(p)         ifpin(p,pgm_read_byte(digital_pin_to_timer_PGM + (p)) != NOT_ON_TIMER,1==0)

#define digitalPinToAnalogPin(p)    ( (p) >= 14 && (p) <= 21 ? (p) - 14 : -1 )

// **************** //
// #define analogPinToChannel(p)     ( (p) < NUM_ANALOG_INPUTS ? NUM_ANALOG_INPUTS - (p) : -1 )
#define analogPinToChannel(p)       ( (p) < NUM_ANALOG_INPUTS ? (NUM_ANALOG_INPUTS-1) - (p) : -1 ) // test to see if A0-A7 are off by 1


* Mighty1284 path.jpg (67.87 KB, 960x720 - viewed 7 times.)
« Last Edit: March 24, 2013, 03:40:12 pm by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16523
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is how I got it working with my 644P once the maniac hardward files are all setup.

1. Add this board entry to the boards.txt file in the maniac hardware folder C:\Documents and Settings\Primary Windows User\My Documents\Arduino\Arduino1\hardware\maniacbug-mighty-1284p

Code:
##############################################################


bobuino644.name=Bobuino 644P optiboot
bobuino644.upload.protocol=arduino
bobuino644.upload.maximum_size=63488
bobuino644.upload.speed=115200
bobuino644.bootloader.low_fuses=0xff
bobuino644.bootloader.high_fuses=0xdc
bobuino644.bootloader.extended_fuses=0xfd
bobuino644.bootloader.path=optiboot
bobuino644.bootloader.file=optiboot_atmega644p-4-5.hex
bobuino644.bootloader.unlock_bits=0x3F
bobuino644.bootloader.lock_bits=0x0F
bobuino644.build.mcu=atmega644p
bobuino644.build.f_cpu=16000000L
#bobuino644.build.core=arduino:arduino
bobuino644.build.core=standard
bobuino644.build.variant=bobuino

##############################################################

2. Then I added this optiboot bootloader hex file ( optiboot_atmega644p-4-5.hex ) into the C:\Documents and Settings\Primary Windows User\My Documents\Arduino\Arduino1\hardware\maniacbug-mighty-1284p\bootloaders\optiboot folder:

Code:
:020000000504F5
:10FC0000112484B714BE81FFF2D085E08093810077
:10FC100082E08093C00088E18093C10086E08093F9
:10FC2000C20080E18093C4008EE0CBD0209A86E0B1
:10FC300020E33CEF91E0309385002093840096BB55
:10FC4000B09BFECF189AA8958150A9F7CC24DD244B
:10FC500088248394B5E0AB2EA1E19A2EF3E0BF2E69
:10FC6000A4D0813471F4A1D0082FB1D0023811F49E
:10FC700085E005C0013811F484E001C083E08DD037
:10FC800089C0823411F484E103C0853419F485E01D
:10FC9000A6D080C0853579F488D0E82EFF2485D0A1
:10FCA000082F10E0102F00270E291F29000F111F09
:10FCB0008ED068016FC0863521F484E090D080E05A
:10FCC000DECF843609F040C070D06FD0082F6DD0E1
:10FCD00080E0C81680EED80618F4F601B7BEE895A5
:10FCE000C0E0D1E062D089930C17E1F7F0E0CF16C5
:10FCF000F0EEDF0618F0F601B7BEE89568D007B65B
:10FD000000FCFDCFA601A0E0B1E02C9130E01196FF
:10FD10008C91119790E0982F8827822B932B129625
:10FD2000FA010C0187BEE89511244E5F5F4FF2E0A7
:10FD3000A030BF0751F7F601A7BEE89507B600FC53
:10FD4000FDCF97BEE89526C08437B1F42ED02DD0D4
:10FD5000F82E2BD03CD0F601EF2C8F010F5F1F4FF8
:10FD600084911BD0EA94F801C1F70894C11CD11CFE
:10FD7000FA94CF0CD11C0EC0853739F428D08EE10F
:10FD80000CD086E90AD08AE07ACF813511F488E078
:10FD900018D01DD080E101D063CF982F8091C00092
:10FDA00085FFFCCF9093C60008958091C00087FF27
:10FDB000FCCF8091C00084FD01C0A8958091C60051
:10FDC0000895E0E6F0E098E1908380830895EDDF08
:10FDD000803219F088E0F5DFFFCF84E1DECF1F939A
:10FDE000182FE3DF1150E9F7F2DF1F91089580E04B
:08FDF000E8DFEE27FF2709946C
:040000030000FC00FD
:00000001FF

Lefty
« Last Edit: March 24, 2013, 05:55:21 pm by retrolefty » Logged

Pages: [1]   Go Up
Jump to: