i saw some ppl used the tccr1 and stuff thats avr code so can i write a completly avr code in ide and uploade it and stull write arduino code if wanted???
can i upload a avr app to the on board atmega328p and still turn it back? (not another the one on board)
and how can i upload a ARDUINO bootleader app to atmega on breadboard whit a arduino uno !? i tried arduino as isp for programmer and when done it uploaded on the onboard atmega!
Robin2:
When you mention that it is a register name I understand that bit.
But I still have no idea why you mentioned it in your original post.
...R
i saw people using these avr codes can i write avr code in my arduino ide and upload to my arduino?? also if i do or remove my on-boards bootleader can i flash again?!!!!!
It is a very vague question, but my guess is that the answer is yes.
For example changing the pwm frequnce on an Arduino Uno could be done like this by setting the bits in register TCCR0A
int led = 13; // the pin that the LED is attached to
int brightness = 0; // how bright the LED is
int fadeAmount = 5; // how many points to fade the LED by
void setup() {
// To use Fast PWM on Timer 0Write this line in the setup function
TCCR0A = _BV(COM0A1) | _BV(COM0B1) | _BV(WGM01) | _BV(WGM00);
TCCR0B = _BV(CS00);
pinMode(led,OUTPUT);
}
void loop() {
analogWrite(led, brightness);
brightness = brightness + fadeAmount;
if (brightness == 0 || brightness == 255) {
fadeAmount = -fadeAmount ;
}
delay(30);
}
It is a very vague question, but my guess is that the answer is yes.
For example changing the pwm frequnce on an Arduino Uno could be done like this by setting the bits in register TCCR0A
int led = 13; // the pin that the LED is attached to
int brightness = 0; // how bright the LED is
int fadeAmount = 5; // how many points to fade the LED by
void setup() {
// To use Fast PWM on Timer 0Write this line in the setup function
TCCR0A = _BV(COM0A1) | _BV(COM0B1) | _BV(WGM01) | _BV(WGM00);
TCCR0B = _BV(CS00);
pinMode(led,OUTPUT);
}
thanks! but wired thing happend i just found out about upload using progammer:D so i uploaded on breadboard atmgega 328p-pu whitout bootleader and ... it runed it perfectly !!! whitout bootleader but arduino code !!! 0_0 oh and i dont think so but can i programm the on-board which came whit uno havent touched atmega328p-pu whit avr remove bootleader and flash again and use as arduino???
I sorry but I can't understand your questions. You seem to be trying to cram a lot of question into too few words. Try to tell us all about what you are trying to do using several sentences rather than just one.
If english is not your first language maybe you would get a better response on one to the other language sections of the forum.
If you are using an ATmega328 on a breadboard, you are using either the "Arduino as ISP" or a purpose-built AVRISP device to program it via ISP. Doing it this way, when you load a sketch onto it, the sketch is written instead of the bootloader, possibly overwriting it but in any case setting fuses so that on reset, it immediately starts the sketch instead of the bootloader; the bootloader has to all intents and purposes, been removed.
Having done so, you would have to use the "burn bootloader" function to re-instate the bootloader if you needed it for future use.
You can address particular registers using C++, or you can use AVR assembler code in the IDE (though I have not done so and consequently, cannot explain exactly how).
Paul__B:
If you are using an ATmega328 on a breadboard, you are using either the "Arduino as ISP" or a purpose-built AVRISP device to program it via ISP. Doing it this way, when you load a sketch onto it, the sketch is written instead of the bootloader, possibly overwriting it but in any case setting fuses so that on reset, it immediately starts the sketch instead of the bootloader; the bootloader has to all intents and purposes, been removed.
Having done so, you would have to use the "burn bootloader" function to re-instate the bootloader if you needed it for future use.
You can address particular registers using C++, or you can use AVR assembler code in the IDE (though I have not done so and consequently, cannot explain exactly how).
well i ment one on the arduino it self not breadboard but just np ! thanks anyway:))
btw uploaded IDE code without burning bootleader 0_0 worked!!!