Go Down

Topic: Mighty-1284P core updated for Arduino 1.0.6 (Read 24725 times) previous topic - next topic

JChristensen

Jack,

The Arduino 1.6.0 IDE is out. Out of my character, I'm trying it out. Any interest in updating the 1284P core? I made a custom core based on bobuino and it's working.
I've downloaded 1.6.0 but haven't tried it much yet.  I think that the 1.6.0 core code should support the 1284P directly, just as 1.0.6 does.  There may be some installation differences however.  Not sure when I'll get time to look into it.  Is there some burning need to use 1.6.0, something that can't be accomplished with 1.0.6?

Quote
Note: it seems that 1.0.5 uses its arduino core files even when I have the custom core folder inside mighty-1284P. Evidence is my analog pins are backwards A0 is actually A7. But if I compile with 1.0.6 it works.
Need more specifics.  What is selected in Tools > Boards?  Which version IDE?

I just made a couple updates, I was about to write an item about it when I saw your post.  One update corrected analog pin mapping for the avr-developers variant.

Last night I exhaustively tested digital and analog pin mapping for the mighty* boards and the avr-developers board and I'm pretty sure they're correct.  I'm not aware of any issues with the Bobuino variant, so no changes there.


liuzengqiang

Jack,

The only change that concerns the mod is now it should be in arduino sketchbook/hardware/avr/might-1284p. So the added layer of things to separate different MCU architectures, which will be useful to make libraries still compatible to the developers but could be written entirely differently for different architectures.

I made a mistake installing the mod when I didn't know how to install mods. I used 1.0.6 boards.txt so everything points to arduino core. THis only works if I also use 1.0.6 IDE.

Question for you: if you define a core called mighty, should you also define the same folder name such as mighty instead of mighty-1284p? Your installation instruction says to create mighty-1284p folder.

Tests: I tested 1.6.0 IDE with your 1.0.6 mod with the correct subfolder. RTClib (adafruit), sdfat (I believe it has your mod on DigitalPin.h on 10/29/2014), phi_prompt, phi_interfaces, I2CDev (Jeff Roweberg) and liquidcrystal. They all work.
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter

sakugava

#47
Feb 24, 2015, 04:56 am Last Edit: Feb 24, 2015, 04:57 am by sakugava
read this:
is a MOD by Leonardo Miliani, from Italy, adapted for  Arduino IDE 1.5.8, but works in 1.6.0 version

ish2k9c

hello, im planning on using the atmega1284p with arduino 1.0.6 IDE. I have no clue how to get the bootloader to work with this version of IDE. is it possible to do it? if so is there files i can download to do it ?

liuzengqiang

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

Instructions are on the page. Once you install, restart arduino and use arduino as isp sketch to burn bootloader to your chips. Have you burned bootloaders before?
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter

legonick22

#50
Feb 25, 2015, 03:05 pm Last Edit: Feb 25, 2015, 03:32 pm by legonick22
I have tried to use the Mighty-1284p core with Arduino 1.6, but for me, even with the filing system right:
/arduino-1.6.0/hardware/atmegaxxx4p/AVR/...
It always says:
Arduino: 1.6.0 (Windows 7), Board: "ATmega324P"

Selected board depends on 'arduino' core (not installed).

I'm obviously using a modified version of the bootloader, since I'm using the 324p, but it always says this, even when I copy the core files from the 'arduino' folder into the atmega folder.
What should I do?

EDIT: I notice at github your files do not include the cores folder! Should my boards.txt be changed, or is this an error?
My mother said I could be anything I wanted. But I don't want to be anything I wanted. I want to be an engineer!

liuzengqiang

You need to follow this:

https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification

Not only do you need more folders, you also need more entries in boards.txt

I didn't follow the entire spec and didn't do programmers.txt or platform.txt

It still works since avrdude is used and it already understands how to do atmega1284p

Example:

Code: [Select]

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

mighty_opt.name=Mighty 1284p 16MHz using Optiboot
mighty_opt.upload.tool=arduino:avrdude
mighty_opt.upload.protocol=arduino
mighty_opt.upload.maximum_size=130048
mighty_opt.upload.maximum_data_size=16384
mighty_opt.upload.speed=115200
mighty_opt.bootloader.tool=arduino:avrdude
mighty_opt.bootloader.low_fuses=0xff
mighty_opt.bootloader.high_fuses=0xde
mighty_opt.bootloader.extended_fuses=0xfd
mighty_opt.bootloader.file=optiboot/optiboot_atmega1284p.hex
mighty_opt.bootloader.unlock_bits=0x3F
mighty_opt.bootloader.lock_bits=0x0F
mighty_opt.build.mcu=atmega1284p
mighty_opt.build.f_cpu=16000000L
mighty_opt.build.core=arduino:arduino
mighty_opt.build.variant=standard
mighty_opt.build.board=mighty_opt


Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter

JChristensen

I notice at github your files do not include the cores folder! Should my boards.txt be changed, or is this an error?
As of 1.0.6, all changes to support the 1284P were incorporated into the Arduino core as distributed, so there is no longer a need for the cores folder.

AlxDroidDev

Can I work with the 1284 just like the 1284P (given that I change/add the proper chip signatures in avrdude.conf) ?
Some of my projects:
Shield for DS1337+, DS1624 and AT24C1024B (RTC, temp & mem): http://forum.arduino.cc/index.php/topic,126197.0.html
CHDK Camera remote shutter (BT, IR, USB): http://forum.arduino.cc/index.php?topic=295377.0

JChristensen

Can I work with the 1284 just like the 1284P (given that I change/add the proper chip signatures in avrdude.conf) ?
As far as I know. I believe that the only other differences between the two are the electrical specifications (and they're not that much different IIRC).

CrossRoads

There are differences. Search the datasheet for "Atmega1284P" and  you will some entries that are noted as "Applies only to Atmel ATmega1284P." The biggest is the extra timer in the 1284P

Table 12-1. Reset and Interrupt Vectors. Has Extra interrupts:
32 $003E TIMER3_CAPT(3) Timer/Counter3 Capture Event
33 $0040 TIMER3_COMPA(3) Timer/Counter3 Compare Match A
34 $0042 TIMER3_COMPB(3) Timer/Counter3 Compare Match B
35 $0044 TIMER3_OVF(3) Timer/Counter3 Overflow

Note (3) Applies only to Atmel ATmega1284P.

28.1.7 Atmel ATmega1284 DC characteristics
vs
28.1.8 Atmel ATmega1284P DC characteristics  - Picopower, so current draw is a little less in some areas
and
29.7 ATmega1284 typical characteristics
vs
29.8 ATmega1284P typical characteristics

and ordering codes
32.7 Atmel ATmega1284
32.8 Atmel ATmega1284P


Signature bytes, so a new entry in avddude.conf  will need to be added.
ATmega1284 0x1E 0x97 0x06
ATmega1284P 0x1E 0x97 0x05

Copy this whole section (excerpted here) and modify for '1284:
Code: [Select]

#------------------------------------------------------------
# ATmega1284P
#------------------------------------------------------------

# similar to ATmega164p

part
    id               = "m1284p";
    desc             = "ATMEGA1284P";
    has_jtag         = yes;
    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
    avr910_devcode   = 0x74;
    signature        = 0x1e 0x97 0x05;
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

legonick22

@liudr It still tells me:
Selected board depends on 'arduino' core (not installed).
My mother said I could be anything I wanted. But I don't want to be anything I wanted. I want to be an engineer!

oric_dan

Quote
Signature bytes, so a new entry in avddude.conf  will need to be added.
ATmega1284 0x1E 0x97 0x06
ATmega1284P 0x1E 0x97 0x05

Copy this whole section (excerpted here) and modify for '1284:

#------------------------------------------------------------
# ATmega1284P
#------------------------------------------------------------

# similar to ATmega164p

part
    id               = "m1284p";
    desc             = "ATMEGA1284P";
    has_jtag         = yes;
    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
    avr910_devcode   = 0x74;
    signature        = 0x1e 0x97 0x05;
-------------------
Bob, I think if you do as you indicate, then you have to make an entirely new variant in boards.txt and pins_arduino.h, and cannot use say the regular Bobuino variant with the 1284 chip.

What I did with the 1284 chips I had was to: (a) "temporarily" change the 1284P section of avrdude.conf to the 1284 signature just long enough to burn the bootloaders, and then changed it back to the original. Then I could afterwards plug either the 1284 or 1284P bootloader chip into my boards, and: (b) always use the Bobuino variant to compile and upload.

Don't ask me why (b) works with the 1284 bootloader chip when the avrdude.conf has the 1284P signature, but it does. ?? ??

liuzengqiang

@liudr It still tells me:
Selected board depends on 'arduino' core (not installed).
Is your folder hardware/mighty-1284p/avr/ or do you still have the /arduino-1.6.0/hardware/atmegaxxx4p/AVR/... as your earlier post?
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter

CrossRoads

Quote
you have to make an entirely new variant in boards.txt and pins_arduino.h,
That'd be okay.
The boards.txt entry would then call out "atmega1284" or "mega1284" vs the P variant.
pins_arduino.h would also need the "if defined Atmega1284" type additions with the 1284P statements.

Folks do the same signature byte temp change for 328s also. It seems the serial downloader doesn't look at the signature, only the bootload installer does.
I guess the temp change is easier overall as the files that check for 328P don't need to also check for 328. Guess same would also be true for 1284P and 1284.

I only use 328P and 1284P, so I haven't had to deal with this.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up