a timer that goes logic high or low every 15mins ( using tiny85 chip)

Thread Starter

timtim1234

Joined Nov 30, 2023
246
Also, when it comes to a programmable chip, what are the logic levels? Meaning, is a logic high 3.5 or higher? And a low is 3.5 and lower?
 

be80be

Joined Jul 5, 2008
2,395
Thats not what your thinking LOW is off HIGH is on.
Id go with the PRO mini its cheap small And dead simple to load code
You want make this work the arduino is the easy way to go
You can ask chatAI to write you code it find some that you could make work.
 

be80be

Joined Jul 5, 2008
2,395
like this
Code:
#include <TimerOne.h>

const unsigned long timerInterval = 900000; // 15 minutes in microseconds

void setup() {
  // Set up timer interrupt
  Timer1.initialize(timerInterval);
  Timer1.attachInterrupt(timerISR);
  // Other setup code
}

void loop() {
  // Main loop code
}

void timerISR() {
  // Do something every 15 minutes
  digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); // Toggle LED
}
Life has changed
 

Thread Starter

timtim1234

Joined Nov 30, 2023
246
Thats not what your thinking LOW is off HIGH is on.
Id go with the PRO mini its cheap small And dead simple to load code
You want make this work the arduino is the easy way to go
You can ask chatAI to write you code it find some that you could make work.

like this
Code:
#include <TimerOne.h>

const unsigned long timerInterval = 900000; // 15 minutes in microseconds

void setup() {
  // Set up timer interrupt
  Timer1.initialize(timerInterval);
  Timer1.attachInterrupt(timerISR);
  // Other setup code
}

void loop() {
  // Main loop code
}

void timerISR() {
  // Do something every 15 minutes
  digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); // Toggle LED
}

humm maybe i miss something? but you didn't assign any pins?

also the other post i was talking about logic voltage levels if recall in TTL a high (on) is 3.5 or higher.

and ohhh ya that is right the AI may have to try that
 

be80be

Joined Jul 5, 2008
2,395
Got do some thing yourself but this does it in one roll
Code:
 digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
builtin in led mostly pin 13
And the above code set pin 13 to output
and toggles the led
 
Last edited:

djsfantasi

Joined Apr 11, 2010
9,237
Many people state that to program an ATTiny, you can use an Arduino Uno. There is another option that works with the Arduino IDE, all versions. It is a 17.50 USD programmer by Sparkfun. It replaces the Arduino as a programmer. Load its drivers and board definitions into the IDE, plug it into a USB port and upload the Arduino code to the ATTiny.
 
Last edited:

Thread Starter

timtim1234

Joined Nov 30, 2023
246
Many people state that to program an ATTiny, you can use an Arduino Uno. There is another option that works with the Arduino IDE, all versions. It is a 17.50 USD programmer by Sparkfun. It replaces the Unitas a programmer. Load its drivers into the IDE, plug it into a USB port and upload the Arduino code.
He saids older version is need

I have just one more thing to say about the atinny one more time the 2.3.2 arduino ide don't like them. You have to use older ide like 1.6.2
The atinny you can trim the clock to get the error lower but then my programmer wouldn't work for reprogramming because of avedude couldn't find the chip.
This because of changes in the newer software. If you use a crystal osc there gos your two of ADC pins only leaves A1

Long story short you'll have a lot to learn with this.
 

be80be

Joined Jul 5, 2008
2,395
There lot more to programing a attiny now with arduino ide the programer I used doesn't work with it and the arduino as ISP if you forget to set clock to 8 mH
the ardiuno as isp will not program it the second time
 

be80be

Joined Jul 5, 2008
2,395
Many people state that to program an ATTiny, you can use an Arduino Uno.
True But many people even me leave parts out like oh I did this with ide 1.x.x years ago and now i got links on my website trying to still your money LOL
You have people trying to sale you USBasp with 12 year old firmware that to make work would take days to find the right bin file and more time getting window to use it.
 

MrChips

Joined Oct 2, 2009
34,824
Also, when it comes to a programmable chip, what are the logic levels? Meaning, is a logic high 3.5 or higher? And a low is 3.5 and lower?
What are logic LOW and logic HIGH voltages?

With CMOS gates, it is generally accepted that the threshold voltage separating LOW and HIGH is one-half the supply voltage.
For example, if Vcc is 5 V, then the switching threshold is 2.5 V.

But it is not that simple.

At the switching threshold there is a gray area that you want to avoid. For the proper answer, you need to check the manufacturer's device data sheet. For example, for CD4081 AND gate, powered at 5 V, the LOW level input is 1.5 V max and the HIGH level input is 3.5 V min. In other words, you need to stay away from voltage levels between 1.5 V and 3.5 V.

Why do we want to do this?

Because there is noise in every system. We define a noise margin and we stay clear from the noise region. That is just simply good engineering practice.

Example, hypothetical transfer function of an inverter:

1723173887601.png
 

Thread Starter

timtim1234

Joined Nov 30, 2023
246
What are logic LOW and logic HIGH voltages?

With CMOS gates, it is generally accepted that the threshold voltage separating LOW and HIGH is one-half the supply voltage.
For example, if Vcc is 5 V, then the switching threshold is 2.5 V.

But it is not that simple.

At the switching threshold there is a gray area that you want to avoid. For the proper answer, you need to check the manufacturer's device data sheet. For example, for CD4081 AND gate, powered at 5 V, the LOW level input is 1.5 V max and the HIGH level input is 3.5 V min. In other words, you need to stay away from voltage levels between 1.5 V and 3.5 V.

Why do we want to do this?

Because there is noise in every system. We define a noise margin and we stay clear from the noise region. That is just simply good engineering practice.

Example, hypothetical transfer function of an inverter:

View attachment 328874
thanks!! i forgot about checking the datasheet!! but you explain it well!
 

WBahn

Joined Mar 31, 2012
32,874
Example, hypothetical transfer function of an inverter:

View attachment 328874
It appears that V_IH is being defined as the point where the slope of the curve is -1.

Okay, but then why isn't the V_IL defined as the point where the slope is -1 at the beginning. And what IS it being defined as?

I've never seen a definition of the input voltage level thresholds that ties them to the slope of the transfer function before. Not saying that this isn't how it's done -- I've actually never seen anything that described why the specific values for the threshold voltages for the various logic families where chosen and I guess I assumed it was done by committee and handed to the world as a proclamation or fait accompli that everyone now had to design devices to. Do you have any reference that talks about tying the threshold voltages to the slops of the (presumably typical) transfer curve?
 

MrChips

Joined Oct 2, 2009
34,824
It appears that V_IH is being defined as the point where the slope of the curve is -1.

Okay, but then why isn't the V_IL defined as the point where the slope is -1 at the beginning. And what IS it being defined as?

I've never seen a definition of the input voltage level thresholds that ties them to the slope of the transfer function before. Not saying that this isn't how it's done -- I've actually never seen anything that described why the specific values for the threshold voltages for the various logic families where chosen and I guess I assumed it was done by committee and handed to the world as a proclamation or fait accompli that everyone now had to design devices to. Do you have any reference that talks about tying the threshold voltages to the slops of the (presumably typical) transfer curve?
VIL and VIH.jpg


Reference: http://web.mit.edu/6.012/www/SP07-L11.pdf
 

WBahn

Joined Mar 31, 2012
32,874
Thanks. That gives me a starting point to look further. I might reach out to the folks at MIT to see if they can provide some firmer clarification.
 
Top