a timer that goes logic high or low every 15mins (hardware version)

Status
Not open for further replies.

ericgibbs

Joined Jan 29, 2010
21,452
Hi tim,
Buy a simple Arduino Nano with the loader installed, most Nano's have the loader program pre-installed.

Then use the Arduino IDE to write your program directly to the Nano.
E
 

panic mode

Joined Oct 10, 2011
5,008
but does that program the bootloader too? from what i read some programmers only program the code i need it to programmed bootloader and code.
no... the IC socket is there to easily insert/remove IC.... but to use this IC need to already have boot loader. to load bootloader, chip must be programmed elsewhere (usually some programmer or arduino and breadboard). if you get version where chip is soldered, it would already have bootloader - maybe not version you expect but at least it is a start and you can flash it to a different firmware without additional hardware programmer.
 

sghioto

Joined Dec 31, 2017
8,634
but does that program the bootloader too? from what i read some programmers only program the code i need it to programmed bootloader and code.
I think the bootloader is already installed on the ATtiny85, that's why it can be programed in basic
It is installed on the Picaxe.
 

be80be

Joined Jul 5, 2008
2,395
You are not getting it you can pull the chip and program a attiny leave the chip in and burn bootloader
the UNO as a programmer. there dirt cheap or get one of these
https://www.amazon.com/dp/B09921SC7...&s=pc&sp_csd=d2lkZ2V0TmFtZT1zcF9kZXRhaWw&th=1

20 dollar programmer
Or the UNO less then 10 dollars

Code:
#define ledPin 13  // Pin connected to the LED

unsigned long previousMillis = 0; // Variable to store the last time LED was updated
const long interval = 1000; // Interval at which to blink (milliseconds)
const long timerInterval = 1 * 60 * 1000; // 15 minutes in milliseconds 1 * 60 *

//bool ledState = LOW; // Initialize LED state

void setup() {
  pinMode(ledPin, OUTPUT); // Initialize the LED pin as an output
}

void loop() {
   digitalWrite(ledPin,LOW );
  unsigned long currentMillis = millis(); // Get the current time

  if (currentMillis - previousMillis >= timerInterval) {
    // It's time to toggle the LED
    previousMillis = currentMillis;
    digitalWrite(ledPin,HIGH);
    delay(interval); // Wait for 1 second
    digitalWrite(ledPin,LOW ); // Toggle the LED
    
  }
}

That code works I just tried it out
 

Thread Starter

timtim1234

Joined Nov 30, 2023
246
You are not getting it you can pull the chip and program a attiny leave the chip in and burn bootloader
the UNO as a programmer. there dirt cheap or get one of these
https://www.amazon.com/dp/B09921SC7...&s=pc&sp_csd=d2lkZ2V0TmFtZT1zcF9kZXRhaWw&th=1

20 dollar programmer
Or the UNO less then 10 dollars

Code:
#define ledPin 13  // Pin connected to the LED

unsigned long previousMillis = 0; // Variable to store the last time LED was updated
const long interval = 1000; // Interval at which to blink (milliseconds)
const long timerInterval = 1 * 60 * 1000; // 15 minutes in milliseconds 1 * 60 *

//bool ledState = LOW; // Initialize LED state

void setup() {
  pinMode(ledPin, OUTPUT); // Initialize the LED pin as an output
}

void loop() {
   digitalWrite(ledPin,LOW );
  unsigned long currentMillis = millis(); // Get the current time

  if (currentMillis - previousMillis >= timerInterval) {
    // It's time to toggle the LED
    previousMillis = currentMillis;
    digitalWrite(ledPin,HIGH);
    delay(interval); // Wait for 1 second
    digitalWrite(ledPin,LOW ); // Toggle the LED
   
  }
}

That code works I just tried it out

ohh ok i see what you mean thanks
 

MisterBill2

Joined Jan 23, 2018
27,607
Or you could do it with about $5 worth of CMOS IC devices and ZERO invested in programming devices, and if you needed to replace a damaged part in ten years it would still be available and you would not need to program it.
 

activerfid

Joined May 30, 2020
31
Hi

I have be playing around with 555 timers and I have on order cd4060. I am trying to make a timer that goes for one second a logic high or low ( selectable with switch) every 15 mins. I notice that 555 is not good for long time cycles. So I think a cd4060 would be better for this.

Sorry I don't want to mess around with MC, PIC, etc I don't want to learn programming.

Thanks
I'm sure someone has already mentioned that you can run a 555 as a 15 minute astable followed by another as a 1 second monostable and then something like a 74HC04 as an inverter (switched in or out depending on pulse. polarity required). You could also try the ALD7556 (if you can obtain these wherever you are), which provide better stability and longer time periods with smaller value components. Other than that C code is available for a precision delay timer for PIC, but yes you would have to mess with programming etc.
 
Status
Not open for further replies.
Top