Put together a full release of Sanguino that supports version 1.0.1. Actually ended up not being as difficult as I expected since most of the directory layout has stayed the same. I was hoping to use the new ‘variants’ to avoid making changes to the core files but ended up needing to do that to get some stuff working.Like I have said before the new method the Arduino team is using to guide the precompiler for different chips by using whether registers exist or not is much better and makes porting it to different hardware much easier. Unfortunately the few libraries I have has issues with did not follow this lead.
The SDcard lib which is included with the install now has pin assignments hard coded for different processors rather then referencing the core/variant. It is a quick workaround if you want to use Sanguino (with a atmega1284) with this libary. Simply change line 120 of ‘arduino-1.0.1/libraries/SD/utility/Sd2PinMap.h’ from
#elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__)
to this
#elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__) || defined(__AVR_ATmega1284P__)
I was able to get my DataLogger project up and running with a fresh bootloader burn and recompiled in 1.0.1. The project uses SPI, I2C, ADC, and both UARTS so I generally use it as a test case since it covers the most common features used. I did have to modify my GPX, and Producer/Consumer libraries to work with 1.0 which was fairly easy. Mostly just changing WProgram.h
to Arduino.h
in a few places as well as some string functions which changed. I’m going to clean those up and post them soon hopefully.
You can grab the new version over on Google Code: http://code.google.com/p/sanguino/downloads/detail?name=Sanguino-0101r1.zip
[…] UPDATED (details): Sanguino-0023r3.zip UPDATED (details):Sanguino-0023r4.zip UPDATED(details): Sanguino-0101r1.zip Wire-Sanguino-0023.zip 3 Comments. « […]
Hi,
I had problems compiling SoftwareSerial, I added these lines from mighty-1284p:
#define digitalPinToPCICR(p) (((p) >= 0 && (p) < NUM_DIGITAL_PINS) ? (&PCICR) : ((uint8_t *)0))
#define digitalPinToPCICRbit(p) (((p) <= 7) ? 1 : (((p) <= 15) ? 3 : (((p) <= 23) ? 2 : 0)))
#define digitalPinToPCMSK(p) (((p) <= 7) ? (&PCMSK2) : (((p) <= 13) ? (&PCMSK0) : (((p) <= 21) ? (&PCMSK1) : ((uint8_t *)0))))
#define digitalPinToPCMSKbit(p) ((p) % 8)
But I don't know, if they are correct.
I'm trying to compile http://timewitharduino.blogspot.de/2012/03/wise-clock-4-with-atmega1284.html
but it isn't working yet.
Here I got compiler warnings:
In file included from /Volumes/lokal/Users/skr/Google Drive/Arduino/hardware/sanguino/cores/arduino/Arduino.h:213,
from /Volumes/lokal/Users/skr/Google Drive/Arduino/hardware/sanguino/cores/arduino/IPAddress.cpp:2:
/Volumes/lokal/Users/skr/Google Drive/Arduino/hardware/sanguino/variants/standard/pins_arduino.h:53:1: warning: "TIMER5A" redefined
In file included from /Volumes/lokal/Users/skr/Google Drive/Arduino/hardware/sanguino/cores/arduino/IPAddress.cpp:2:
/Volumes/lokal/Users/skr/Google Drive/Arduino/hardware/sanguino/cores/arduino/Arduino.h:182:1: warning: this is the location of the previous definition
//#define TIMER5A 14
//#define TIMER5B 15
//#define TIMER5C 16
With regards
Konrad
Those macros are missing. I believe they should be in there but I need to look and see if they were deprecated in 1.0. The pin defs in the ones you have look to be for a different chip but it looks like I need to take a look at the whole PCINT stuff, whats in there today doesn’t look right.
As for compiling, I was able to get it to compile after defining thoes macros, TX works but RX doesn’t due to the PCINT stuff being broken.
Hi,
Installed the Arduino 1.0.1 IDE and Sanguino-0101r1 files but had to patch boards.txt before I was able to upload sketches:
Changed
atmega644.upload.protocol=stk500
to
atmega644.upload.protocol=arduino
atmega1284.upload.speed=57600
to
atmega644.upload.speed=38400
Have you tested int2 on this relaese?
Int0 and int1 work just fine, but I can’t get int2 to work.
Suggestions?
Cheers,
Mario
Looks like you are using a non standard crystal or have a clocking problem, I am pretty sure the baud rates are right since I verify that I can upload to the board before I post. However I did find a new way to handle the core and programmers in the future so that is all likely to change soon anyways.
Also you changing one line from one chip to another, that doesn’t make any sense.
My bad in copy/paste.
The upload speed lines should read:
atmega644.upload.speed=57600
to
atmega644.upload.speed=38400
My x-tal is 16MHz
In IDE 0023 I used the same settings.
Note: The bootloader on my chip was burned with IDE 0023.
perhaps that is the reason that I had to use modified settings for IDE 1.0.1.
Any info about int2 ?
Speeds were raised in 0023r4 see the description here http://code.google.com/p/sanguino/downloads/detail?name=Sanguino-0023r4.zip
I verified INT2 works a couple days ago, I happen to use INT2 on one of my boards and didn’t have an issue. Using the older bootloader shouldn’t effect INT usage though.
Thanks for clarifying the speed issue.
If my bootloader speed is at 38K that indicates my bootloader is pre 0023r4.
And since INT2 support was introduced in r4 this also explains why my INT2 isn’t working…
Will burn a new bootloader on the chip and try again.
Thanks for your time!