Pages: 1 ... 33 34 [35] 36 37 ... 40   Go Down
Author Topic: ATmega1284P: End to End using 1.0 IDE  (Read 72041 times)
0 Members and 1 Guest are viewing this topic.
SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 135
Posts: 6782
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
1284_16.build.variant=1284p
I don't think the default install has a 1284p variant; so part of the reason that it's working might be that you already have the maniacbug version installed as well.

Try doing a verbose compile to see where all the sources are actually coming from.

The arduino core WAS recently (1.0) extended to support more peripherals (extra uarts, etc) "automatically" without having to have separate core files, but it's not clear to me how far that support will go.
Logged

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 333
Posts: 22938
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I removed the Maniacbug's core.
BTW, the files come from Arduino core.

I tried to use interrupts and/or timers and everything seems to work.
Logged


Canada
Offline Offline
Jr. Member
**
Karma: 1
Posts: 81
Frequently Befuddled
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using the Arduino 1.0.1 core with a 1284p and it works quite successfully. I did define my own variant for the pins_arduino.h header, and I'm using a variation of the Sanguino bootloader (recompiled for 1284p, 8MHz clock, 57600 baud) but the bootloader is the only compiled non-core thing I'm using.

Both UARTs work fine for me, as does SPI and I2C. I haven't checked all the built-in libraries but I believe the ethernet library might have an issue as it has some pin selections 'hardcoded' based on AVR / board (eg. uno / mega or 328 / 2560) but of course there's no entry for the 1284p.

The only other caveat is how the analog pins are assigned if you use the "A0, A1, ... A7" syntax. There's some lines in wiring_analog that translate things differently so it was easier to not use the A0 A1 etc. names.

Cheers!
Logged

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 333
Posts: 22938
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@Steph:
thanks for your reply.
The Ax enumeration isn't a problem, in the past I've already encountered this issue.
Can I ask you more about:
1) pin_arduino.h file: which variant did you use? I used the one from Maniaccbug's core;
2) when you recompiled the bootloader, did you only modify the make file to create the new entry for 1284p or did you modify the bootloader code too?
Logged


Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 333
Posts: 22938
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
1284_16.build.variant=1284p
I don't think the default install has a 1284p variant;
Sorry, I didn't put all the steps I did.
I forgot to say that I created a folder named /1284p under /hardware/arduino/variants and that I put inside it the file pin_arduino.h coming from Maniacbug's core.
Logged


Canada
Offline Offline
Jr. Member
**
Karma: 1
Posts: 81
Frequently Befuddled
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@Steph:
thanks for your reply.
The Ax enumeration isn't a problem, in the past I've already encountered this issue.
Can I ask you more about:
1) pin_arduino.h file: which variant did you use? I used the one from Maniaccbug's core;
2) when you recompiled the bootloader, did you only modify the make file to create the new entry for 1284p or did you modify the bootloader code too?

I created my own pins definition. Initially I was working with the Sanguino one but I could never remember which port/pin was which arduino pin so I re-did it with a pin mapping that I could remember.

For the bootloader, I initially managed with just a change to the make file - my project is running at 8MHz with a resonator - but I found the 19200 baud upload to be too slow. To get it working reliably at 57600 baud I had to modify the source file to enable the UART speed doubling function. (My next revision is going back to a crystal and hopefully that will be stable enough for 115200 baud so I will modify the bootloader again to test it.)

Finally, I put everything including my own 'boards.txt' file into my arduino data folder under /hardware. So it's using the custom pins file and bootloader but pointing back to the core files for the actual sketches.

I can zip it all up and post it if you like? When my project is finally completed I'll be posting everything to GitHub but I'm waiting on the next PCB revision and don't want to put it all out there till I know the hardware and software are all working correctly.

Cheers!
Logged

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 333
Posts: 22938
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm having some problems with the bootloader that comes with Mighty-1284 core.
I flashed it "out of the box" and it didn't work. The LED on PB1 won't flash. So I recompiled and flashed it again and then the led flashed correctly. But when I try to upload a sketch via serial I see that the LED flashes 3 times and then, after a couple of seconds, the IDE reports that the programmer is not responding.

Logged


Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 333
Posts: 22938
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It appears that the DIP version of the 1284p has a communications issue on UART0 (Atmel issue).  I assume that you are using CrossRoads SMD 1284p board, so it will not affect your setup.  We did get it to work properly using the 16MHz external resonator but not the crystal (don't ask...).  So, while not perfect, everything is somewhat workable.
Can I ask more info about this issue?
I'm trying to upload a sketch to a DIP 1284p using the Optiboot from Mighty-1284 core with no luck. I get "programmer is not responding". I can only flash the chip using ISP programming.

EDIT:
I found a cer. res. at 12 MHz, so I recompiled the bootloader for 12 MHz and changed the speed in the entry in the file boards.txt and now it works! I flashed a sketch without problems.
Can someone tell me more about this issue?  smiley-sweat
« Last Edit: October 15, 2012, 12:09:30 pm by leo72 » Logged


Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1330
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


  I have both the CrossRoads SMD 1284p and the Bobuino using Maniacbugs files and setting the board to Bobuino. I have not had any problems.
Logged


SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 135
Posts: 6782
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Can someone tell me more about this issue?
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=107115
Logged

California
Offline Offline
God Member
*****
Karma: 14
Posts: 629
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What really is ridiculous my date codes are 1021 and it is still an issue.

@leo72:  You can use the 16MHz crystals with westfw's UART1 variant of Optiboot for the 1284p.  It just means you have to upload your sketches through UART1 and change the Serial to Serial1 in the sketches.
Logged


Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 333
Posts: 22938
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@leo72:  You can use the 16MHz crystals with westfw's UART1 variant of Optiboot for the 1284p.  It just means you have to upload your sketches through UART1 and change the Serial to Serial1 in the sketches.
Where can I find this variant?
Logged


Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 333
Posts: 22938
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Uhm.. I read that thread but it seemed to me that those guys had problems using the 1284p at 20 MHz. But I'm using it at 16 MHz, and they said that at this speed the issue shouldn't appear.

Another strange thing is.... why was I able to upload a sketch using a 12 MHz external resonator and I wasn't using a 16 MHz crystal?
who was the problem: the speed or  the kind of the clock?
Logged


California
Offline Offline
God Member
*****
Karma: 14
Posts: 629
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

optiboot_atmega1284p-u1.hex

http://code.google.com/p/optiboot/downloads/list
Logged


Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 333
Posts: 22938
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, I'll try that but I'll try to find a solution for UART0 issue too..
Logged


Pages: 1 ... 33 34 [35] 36 37 ... 40   Go Up
Jump to: