very confused thing happened 328P

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thinking I frak'ed up royally,
maybe I'm just confused.
I programmed the optiboot bootloader using the arduinomega2560 I have. since I only had 20 and 12 mhz crystals I used the dincimilla or nano board and I edited boards txt to say it's 2000000 mhz. then I uploaded the a blink firmware to test it gave me an error but the thing started blinking. something is definetely wrong here

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
 */
 
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
#include
#include 
int led = 13;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

if I power up the 328p it blinks 3 times on pin 13 and then it turns off for the same amount of time and it blinks way too fast like 3x per a certain then like waits the same amount of time.
One of the problems is that I am on linux and I can't find true instructions on how to complile the bootloader in linux it gives me use avr-acc or something but there are no real step by step instructions on how to do this.
I need a little bit of help here.
terramir

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

but there are no real step by step instructions on how to do this.

Does it not have a "Makefile"? If it does it should really be as simple as typing the command "make" in that directory.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
it gave me an error

That's probably your first clue. What was the error?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AFIK, you will have to build a custom Optiboot for yourself. i.e. edit any Makefile for your 20MHz or 12MHz.

Arduinos tend to be 8MHz or 16MHz, and as such this is what you get on the pulldown menus.

Of course you can add a special to your Boards.txt and this will build all your sketches to operate with the correct timing.

Note that Bootloader and Application are two separate programs. This is why you need to build your custom bootloader.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

okies nice and good but how do I revive this chip I tried parallel port cable (btw I got the 16mhz crystals in so I could flash the uno bootloader if someone can tell me the fuses and stuff but how do I force it to program (hardware I got is a mega2560 that reprograms quite easily but everytime I reset this chip it just goes blink blink blink the pause and over and over again (not what the code was supposed to do I assume I somehow cut off the serial programming with a fuse (bricked the chip) how would I forcefeed it the uno bootloader or a precomplied version of the optiboot. (well actually I think the latest uni is an optiboot version).
I also have a 1284 (not the p version) chip which I'm having some serious programming issues with even parallel is giving me errors on programming the fuses. so I'm thinking my parallel programmer is toast (cable while it checks out with a multimeter) it doesn't seem to want to program the fuses error free like only suceeds like once in like 5 tries
some help would be appriciated
Also is there a way to use a 328P (chip only) as a programmer to forcefeed chips even when there actually pretty bricked cause I got a spare one of those and if that could serve as a dedicated programmer it would be cool.
terramir