Burn BootLoader.........

Hi to all that read this.......

Is there anyway that I can burn an Atmega328 (UNO) chip , so instead of the traditional pin13.
(Change it to pin9). I want to use SPI, and that involves using pin13.

(deleted)

BenBenBen:
Hi to all that read this.......

Is there anyway that I can burn an Atmega328 (UNO) chip , so instead of the traditional pin13.
(Change it to pin9). I want to use SPI, and that involves using pin13.

You mean pin 13 SCK? Change SCK from pin 13 to 9? I'm afraid that is hardware design but not sure. If someone here knows if there is a register on AVR that may change it would be helpful.

Hi

The SPI functionality is baked in to the ATmega328 design. It sits on pin 5 of port B, and PB5 is addressed in Arduino-speak as Digital Pin 13. It will be far easier I expect to move whatever alternative functionality you have in mind for D13. What is it that's causing you this issue ?

If you're up for more reading, check out the ATmega328P datasheet, and these functions are summarised in 13.3.1 Alternate Functions of Port B, table 13-3 on page 82. For a handy reference to these, I keep this reference page from adkafugu within arms reach.

Cheers!
Geoff

When I burn the bootloader onto the Atmega328 (UNO) chip, I want the Pin13 to be stitched
with pin9. So when the arduino sketch gets upload to arduino,
pin9 will have A led and resistor on it. It will blink when sketch gets uploaded to it.
Custom Optiboot I am trying to make A Moteino. I am adding rfm12b
transceiver chip. This rfm12b transceiver chip is using spi. 11,12,13 pins on arduino chip.

Here is the link, what I am trying to do. I just want to know if there Is some way that I can change the
Bootloader program in Arduino bootloader.hex file.......

http://lowpowerlab.com/blog/2013/02/04/custom-optiboot-for-moteino/

You can, however, build a version of the bootloader that does the initial "LED Flash" on some pin other than D13, or omits it entirely.
See Google Code Archive - Long-term storage for Google Code Project Hosting.
You would download the repository into somewhere like .../hardware/arduino/bootloaders/optibootnew, and run a "make" there something like:
 make ENV=arduino LED_START_FLASHES=0 atmega328or  make ENV=arduino LED=PB1 atmega328
(Note that pin names for the optiboot build are Port/Bit based rather than Arduino pinnumber based.)
(The modifications to the optiboot source that allow this to be done from the build line, instead of requiring source modifications, are relatively "new", and not in the version of optiboot currently distributed with the arduino IDE.)

Thank you for your help, but the part I am having A hard time with, I don't now where to put the
(make ENV=arduino LED=PB1 atmega328) and how to burn the bootloader. The only way I know to
burn A chip is, using isp with A usb Tiny ISP programmer. Then click on Burn BootLoader. I am NEW.
Might be over my head....

BenBenBen:
Hi to all that read this.......

Is there anyway that I can burn an Atmega328 (UNO) chip , so instead of the traditional pin13.
(Change it to pin9). I want to use SPI, and that involves using pin13.

SPI can work fine even with the on-board pin13 led, why do you think it must be moved? It's only active in code when the bootloader code is running and once a user's sketch is working the led will not limit pin 13 use as part of the SPI bus, it just will blink with SPI data transfers.

spycatcher2k:
Sorry - I don't follow?

I'm guessing he wants to use the LED for something useful.

If so, the answer is "no". It can't be moved.

I found this sketch, it is A BootLoader sketch, on github. The link is below.
I am going to change (pinMode(13,OUTPUT); /* Blink the pin13 LED a few times /
(pinMode(9,OUTPUT);/
Blink the pin13 LED a few times */).

What I don't know is when I go onto the arduino sketch program. When I go to Tools, and click on
Burn BootLoader. How do I use the new program that I altered.
Or how do I change the file path?

void setup () {
  Serial.begin(19200); 			/* Initialize serial for status msgs */
  pinMode(13, OUTPUT); 			/* Blink the pin13 LED a few times */
  pulse(13,20);
}

I found this sketch [optiLoader], it is A BootLoader sketch, on github.

OptiLoader is not a Bootloader sketch. It's a Bootloader LOADER sketch. It will run on an Arduino, and let you program bootloaders (which are stored internally to OptiLoader) onto OTHER Arduinos, given a suitable cable. Reread the documentation, and perhaps this video will help: OptiLoader - YouTube

Adafruit and Nick Gammon both have improved versions that do similar things.