I thought someone said in the thread that the bootloader is need to use the chip by itselfWho told you that it runs fine you set the fuses and away you go
I thought someone said in the thread that the bootloader is need to use the chip by itselfWho told you that it runs fine you set the fuses and away you go
Re post #236.
1 The main reason for disabling the divide by 8 is to clock the cpu at 8 Mhz (Rather than 1 Mhz) as this is the value required when you set up the Arduino to us the ATtiny 85.
2 I have used a USBasp programmer since I first started programming atmel 8 bit microcontrollers about 10 years ago. I have never had any problems using the USBasp programmers.
Here a screen capture of using the arduino isp programmer. I don't think it is comunicating with the ATtiny85 as it can't even read the signature byte.
View attachment 329677
3 I did not try to use avrduess in the same way as you did.
They probably did but thats not true bootloader is for loading code but the chip will run code that's loaded with a programmer without the boot loaderI thought someone said in the thread that the bootloader is need to use the chip by itself
hummm what you mean i didn't burn a bootloader? I edited the boot loader ino? well i thought that is what it was doing when i click on burn bootloader??They probably did but thats not true bootloader is for loading code but the chip will run code that's loaded with a programmer without the boot loader
plus you can have more code.
What you have posted you didn't burn a boot loader you set the fuses with the empty_all_hex
ohh ok well so then i don't need that to make the chip run by itself. good to know!! i thought it was need for the chip to runThe purpose of the boot loader in the Arduino ecosystem is so that Arduino boards be used without a programmer. With a programmer, it is not needed. I have never used a boot loader myself for dozens of PIC boards I have made.
Re post #242.
1 The cpu clock frequency has nothing to do with how many timers you can run. Running at a lower clock frequency reduces power consumption. It also means that you do not need tount as many instructions or timer/counter interrups for a given amount of time. A higher clock frequency gives higher resolution of a time interval 1 Mhz gives a resolution of 1 uS 8 Mhz gives a resolution of 125 nS.
2 Using stk500v1 as the programmer type gives a dilfferent error. avrdude can not even communicate with the programmer.
When using arduinoisp as the programer type avrdude can communicate with the programmer BUT the programmer can't communicate with the ATtiny85.
3 I am not going to try loading avrdudess again. I don't even know if we are both using the same operating system.
Les.
Well......... funny you ask.... LOL i "HAD" the chip programmed and working, but the chip been reprogrammed with other code that I find on forums and I have been tweaking it, and playing with code that has nothing to do with a "timer"..lol . I kinda got sided tracked, one of the side effects of ADHD..lolSo, how is your actual project going?
We’ve all done it. Hopefully you bought more than one. I usually buy three if I need one.ohh I forgot to add I let some "smoke" out too, due to wiring "errors"..lol
I did buy more than one BUT they're at a couple of my friends house they are starting to mess around programming with it too..lolWe’ve all done it. Hopefully you bought more than one. I usually buy three if I need one.
LOL for sure!!! Ohh I must be learning a lot then!! LolSmoke is good you learn alot from it
//----------------------------------------
//ATtiny85 Module Interfaced with I2C OLED
//----------------------------------------
#include <DigisparkOLED.h>
#include <Wire.h>
//#include <iostream>
//---------------------------------------------------
#define SW 1
#define SW1 4
unsigned int i = 0;
unsigned long tm = 0;
//===================================================
void setup()
{
pinMode(SW,INPUT);
pinMode(SW1,INPUT);
oled.begin();
oled.clear();
oled.setFont(FONT8X16);
oled.setCursor(30, 0);
oled.print("Timer");
}
//===================================================
void loop()
{
if(digitalRead(SW) == HIGH) {delay(100); i++;}
oled.setFont(FONT8X16);
oled.setCursor(0, 2);
oled.print("Counter: ");
oled.setCursor(70, 2);
oled.println(i);
delay(100);
tm = i;
if(digitalRead(SW1) == HIGH)
do {
oled.setFont(FONT8X16);
oled.setCursor(0, 4);
oled.print("timer: ");
oled.setCursor(70, 4);
oled.println(tm);
delay(60000);
tm--;
} while (tm < 1);
}
ok and what you mean h files from here? From the link you posted?? I see the link has good examplesThis work good you need the .h files from here lots good examples there too. https://github.com/digistump/DigistumpArduino/tree/master/digistump-avr/libraries
Code://---------------------------------------- //ATtiny85 Module Interfaced with I2C OLED //---------------------------------------- #include <DigisparkOLED.h> #include <Wire.h> //#include <iostream> //--------------------------------------------------- #define SW 1 #define SW1 4 unsigned int i = 0; unsigned long tm = 0; //=================================================== void setup() { pinMode(SW,INPUT); pinMode(SW1,INPUT); oled.begin(); oled.clear(); oled.setFont(FONT8X16); oled.setCursor(30, 0); oled.print("Timer"); } //=================================================== void loop() { if(digitalRead(SW) == HIGH) {delay(100); i++;} oled.setFont(FONT8X16); oled.setCursor(0, 2); oled.print("Counter: "); oled.setCursor(70, 2); oled.println(i); delay(100); tm = i; if(digitalRead(SW1) == HIGH) do { oled.setFont(FONT8X16); oled.setCursor(0, 4); oled.print("timer: "); oled.setCursor(70, 4); oled.println(tm); delay(60000); tm--; } while (tm < 1); }