Show Posts
Pages: [1] 2 3
1  Using Arduino / Microcontrollers / Re: Mega Junior,1284 on: July 03, 2013, 10:01:38 am
As you have an ISP programmer you don't need to use a bootloader, its another source of potential errors. I'd try uploading the blink sketch without a bootloader. That will help you to confirm the board functions as expected. If you find the blink is much slower than expected check the fuses are correct - maybe the divide by 8 bit is programmed. Then test the serial port. When that works as expected then try using a bootloader.
2  Using Arduino / Microcontrollers / Re: Mega1248 with Steve Marple' bootloader on: April 14, 2013, 04:11:40 pm
It's not my bootloader. The most recent changes were made by Ryan Sutton although others contributed too. I downloaded the code from here:
http://ryanmsutton.com/2011/06/arduino-bootloader-for-atmega-1284p/

My preferred bootloader these days is xboot. It doesn't seem to have been mentioned on the Arduino forum but it has some very useful features, such as support for the application to reflash itself which I use for over-the-air updates using the XRF and RFM12B radio modules. I wrote a review of xboot, http://blog.stevemarple.co.uk/2012/11/using-xboot-with-calunium.html
3  Using Arduino / Microcontrollers / Re: atmega1284 on: April 02, 2012, 02:13:29 am
Ok so this is where Im at.
I have installed the bootloader from calunium - the same one you stated, using avr studio and an isp  mkii programmer. All went well.

I've not tried burning bootladers using an Arduino. When I started with the stripboard version of Calunium I built my own parallel port programmer to get started. It worked but was slow. I invested in an AVR dragon and I've not had any hassles since. Either way, the first thing I do with a new MCU is to program the fuses using avrdude from the command line. Once it is programmed for an external crystal all later actions can be done at full speed.

If are mixing and matching bootloaders and pin mappings you might get problems later with digitalRead, digitalWrite and analogueRead. If your board is a Calunium you should be able to use all of the code from github repository. Inside your sketches create a directory called "hardware", then copy everything in https://github.com/stevemarple/Calunium/tree/master/software and put it in your hardware directory.

Maniacbug has done lots of good work getting everything to work. I'm in the process of rewriting the Calunium pins_arduino.h for mighty-1284p.
4  Using Arduino / Microcontrollers / Re: ATmega1284P: End to End using 1.0 IDE on: February 16, 2012, 02:45:59 am
These types of pin optimizations are specifically being done to eliminate the runtime overhead.
The only way to have the compiler perform the needed optimization is for it it know the information,
so the compiler must know the information at compile time.

It could be properly dealt with if there were defines so that the core and variant could
be known by the pin optimizing code being compiled.

Have you looked at how the the PinChangeInt library makes these sort of optimizations? The user #defines which ports will be used. That might be an approach you could use, especially where multiple pin mappings exist.

This could  be handled by updating the individual variant files for the cores to include
core and variant defines.
Especially for ones like mighty-1284p that define multiple pin mappings for the same processor.
I've done this for my Calunium board, with #define CALUNIUM and #define CALUNIUM_VARIANT pcb or #define CALUNIUM_VARIANT stripboard. I only did this because of the mess caused by the SD library having its own pin mapping which assumes a mapping based on processor type (sanguino in this case). Having specific mappings in library files goes completely against what the pins_arduino.h file is trying to do, and adds more barriers for people trying to create their own clones. For the ATmega1284P there isn't one obvious pin mapping which is why a number of different ones exist. My aim for Calunium was to maximise pin compatibility, keeping the same MCU pin functions on the same digital pin. The downside is that the port mapping isn't so clean.

Long term the answer is probably as you suggest, something similar is already done with a #define for digitalPinToPCMSK. Maybe this is already in the developers roadmap - they use underscores in the PROGMEM arrays and CamelCase in the #defines like digitalPinToPCMSK.
5  Using Arduino / Microcontrollers / Re: Looking for a bootloader for the 1284p at 16mhz, anyone know of one? on: February 14, 2012, 03:36:30 pm
Can you post the whole output, including the avrdude parameters?

Been busy and had stopped using a bootloader. Also found that my Sparkfun FTDI basic had been getting very flaky. Then I found out about this Ubuntu bug, which affects my installation. I followed the workaround and my FTDI basic gets recognised everytime now. So far I haven't had any problems with the Optiboot bootloader.
6  Development / Other Hardware Development / Re: Creating libraries for different Adruino's on: February 01, 2012, 09:01:05 am
What differences are you talking about? If it is to do with different pin mappings then see the macros and functions in pins_arduino.h. If it is for different microcontroller architectures you could test which MCU flags are defined (__AVR_ATmega2560__, __AVR_ATmega1284P__ etc). A better way might be to test for the existence of different #defines. For instance, HardwareSerial.cpp contains this code:
Code:
#if defined(UBRRH) || defined(UBRR0H)
  extern HardwareSerial Serial;
#elif defined(USBCON)
  #include "USBAPI.h"
//  extern HardwareSerial Serial_;
#endif
#if defined(UBRR1H)
  extern HardwareSerial Serial1;
#endif
#if defined(UBRR2H)
  extern HardwareSerial Serial2;
#endif
#if defined(UBRR3H)
  extern HardwareSerial Serial3;
#endif

It defines up to four serial devices, based on whether the appropriate hardware registers exist. If you can do it this way it is much better than for testing for  __AVR_ATmega2560__ etc since it is likely to work with Atmel microcontrollers that you weren't even aware of.
7  Using Arduino / Microcontrollers / Re: Looking for a bootloader for the 1284p at 16mhz, anyone know of one? on: January 29, 2012, 01:46:54 pm
Getting back to the original question:

The code for optiboot to support m1284 was committed to the optiboot project repository (but not the arduino project repository.  yet.)   You can get a .hex file (for 16MHz) here: http://code.google.com/p/optiboot/downloads/detail?name=optiboot_atmega1284p.hex&can=2&q=
and get assorted access to the source at http://code.google.com/p/optiboot

 smiley-sad  I've had some successes uploading but I often still get:

Code:
avrdude.orig: stk500_paged_load(): (a) protocol error, expect=0x10, resp=0x00
avrdude.orig: Send: V [56]   [20] . [00] . [00] . [00]   [20]
avrdude.orig: Recv: . [00]
avrdude.orig: stk500_cmd(): programmer is out of sync

Sketch is 25814 bytes, uploading to my Calunium board running at 16MHz (crystal) at 5V.
8  Using Arduino / Microcontrollers / Re: Looking for a bootloader for the 1284p at 16mhz, anyone know of one? on: January 27, 2012, 05:57:08 pm
As I already said, I'm a total newbie, but I would presume that an 8mhz bootloader would not run on a 16mhz device.

Frankly there is no "bootloaders for dummies" info out there smiley

This might come close: http://blog.schicks.net/wp-content/uploads/2009/09/bootloader_faq.pdf
9  Using Arduino / Microcontrollers / Re: Looking for a bootloader for the 1284p at 16mhz, anyone know of one? on: January 21, 2012, 03:52:06 am
I found this thread: http://arduino.cc/forum/index.php/topic,64612.0.html but the files it uses are no longer available.

Anyone know of any other way to do this?
There lots of ways to use the ATmega644/ATmega1284, for hardware see:

For software there's a few active repositories where you can find bootloaders, code to use to make the board compatible with the Arduino IDE and also examples:
10  Using Arduino / General Electronics / Re: Accuracy of DS1307 Real Time Clock module on: January 20, 2012, 05:24:44 pm
The DS3231 is easier to solder than you think...most of the pins are connected to ground. So much good stuff comes in SOIC and smaller, that I think any serious electronics experimenter should have some SMT breakouts and be able to do drag soldering. I actually prefer SMT to through-hole for hand assembly.

I agree with you about being able to do SM soldering, and it isn't a worry for me - the last PCB I designed and built was almost entirely SM; SD card, 3 SOIC and various 1206 resistors and capacitors too. However, a vast proportion of the target audience for this project is likely to have very little soldering experience. To paraphrase Stephen Hawking's editor, "for every SM device the potential audience is halved".
11  Using Arduino / General Electronics / Re: Accuracy of DS1307 Real Time Clock module on: January 20, 2012, 05:13:31 pm
"I was planning to feed the 1Hz output from SQW to timer/counter2 in order to wake the Arduino from sleep mode every 20 or 30 seconds."

Won't that wake it every second? Or will you increment a counter every time, and when high enough, then do something?


The latter, it should wake it up whenever the counter reaches a pre-determined value (not overflow). I've not actually tested it waking from sleep but I have successfully tested it generating interrupts. I recently added some examples of how to do this on my Calunium board to the Calunium github repository: https://github.com/stevemarple/Calunium/tree/master/software/examples
The examples can probably be made to work on your Bobuino board with just a change on pin number.

Idea: if the Arduino environment had a mapping (in pins_arduino.h) from pin function to pin number then the same sketch would work unchanged on your Bobuino, my Calunium and maniacbug's Mighty-1284P. Something like

Code:
#define PIN_TC2 15
12  Using Arduino / General Electronics / Re: Accuracy of DS1307 Real Time Clock module on: January 20, 2012, 08:34:49 am
Thanks for the info. The DS1302 doesn't have the SQW output that the DS1307 has, otherwise it might have done. I was planning to feed the 1Hz output from SQW to timer/counter2 in order to wake the Arduino from sleep mode every 20 or 30 seconds.

Any other DIP options?
13  Using Arduino / General Electronics / Re: Accuracy of DS1307 Real Time Clock module on: January 20, 2012, 04:25:29 am
The DS3231 looks like a good alternative to the DS1307, especially as it can operate at 3.3V and 5V, but SOIC package only it seems. I have a project where I really want to avoid using SM devices as other people will be building them. Are there any alternatives to the DS1307 that operate at both 3.3V and 5V and are available in a through-hole package?
14  Using Arduino / Microcontrollers / Re: ATmega1284P: End to End using 1.0 IDE on: January 17, 2012, 09:45:46 am

Gotta go find a protoboard I have somewhere & confirm the headers are correctly placed. I copied the positions from the Duemilanove file and made everything else fit around them so shields should fit. Also added the new SCL/SDA and power header pins.

I'm not sure the ICSP header is in the correct place to work with the Ethernet/SD card.
15  Using Arduino / Microcontrollers / Re: Using the 1284p/664p (IDE, bread board and boot loaders) on: January 15, 2012, 05:48:04 pm
I am working on something that will be installed in a location with no computers, and where bringing one can sometimes be difficult. It's an enhanced data logger, so to speak. It collects data, logs it to an SD card, does some processing and returns processed data to another system. Users are not very technical. If they need to upgrade the application firmware, the easiest thing for them to do is to put the new hex file on to the SD card, insert the card and power up the unit. The device's boot loader could then search the SD card for a HEX file, and if it finds one, update the device.

I have an application that is not too dissimilar. Update by SD card would be fantastic, especially since I have the opportunity to download upgrades via wifi. At the moment I am hoping to configure a V-USB bootloader for Calunium. Then upgrades would be possible with just a plain USB connection without needing FTDI on-board or an FTDI adaptor. Is that a possibility for you?
Pages: [1] 2 3