Go Down

Topic: My simplest "Arduino" circuit (Read 12069 times) previous topic - next topic

Peter_I

It must depend on, what your pins are supposed to do when running.

I guess that the pins on the ISP you are connected to are "low" when not programming, and should that not equal a short to ground if a connected pin on the tiny is "high"?

(In my programming setup I have resistors on the pins, that should at least stop me from drawing too many mA by accident)
"Nothing is foolproof to a sufficiently talented fool"

JimboZA

#16
Jun 27, 2014, 06:21 am Last Edit: Jun 27, 2014, 06:32 am by JimboZA Reason: 1

(In my programming setup I have resistors on the pins, that should at least stop me from drawing too many mA by accident)


Good idea... so just series resistors in the wires from the Arduino pins to the target's? What size- couple of hundred Ohms?

I'm sure the whole process must be safe, but I'm just concerned that the instant the code is uploaded to the target it will start running. Should I fit the components on the target's pins before uploading the sketch?

I'm also going by this Instructable, whose steps imply that you connect the atTiny to the Arduino, attach the atTiny's LEDs or whatever for its sketch, then upload the sketch via the Arduino. The Instructable is silent on my concern of the atTiny still being connected to the Arduino when its (the atTiny's that is) sketch fires up.

I'm thinking I should post this question in another thread... this is the wrong place.

EDIT.... I re-posed this question in a new thread here which I think is better. Let's let this thread revert to its original purpose in the gallery. Sorry about that....
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

mixographer

This thread looks like it was made to be necro'd. So Nick, is it still blinking?

Jimmy

nickgammon

Yes, it still blinks away, faithfully. :)

I just measured the battery voltage: 2.994V. Considering it is a 3V battery, I can't complain.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

nickgammon

Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

mixographer


Isaac96

I'll bet leaving the multimeter connected would drain the battery faster.
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

nickgammon

Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

mahesh2000

change WDTCR to WDTCSR if you get the "'WDTCR' was not declared in this scope" error. see this post.


Code: [Select]

...
  // allow changes, disable reset, clear existing interrupt
  WDTCSR = bit (WDCE) | bit (WDE) | bit (WDIF);
  // set interrupt mode and an interval (WDE must be changed from 1 to 0 here)
  WDTCSR = bit (WDIE) | bit (WDP2) | bit (WDP1) | bit (WDP0);    // set WDIE, and 2 seconds delay
...



Isaac96

Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

nickgammon

Yes it is. I can't recall now if I changed the battery yet. I have a similar one with a light detector which flashes at night to show where a nearby torch is here.

I changed the battery on one of them. Next time I'll make a note of the date of the new battery installation.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

nickgammon

#26
Jul 19, 2016, 10:57 pm Last Edit: Jul 19, 2016, 10:57 pm by Nick Gammon
Yes, I compiled the code with the IDE. I think you need to add this link to the Additional Board Manager URLs in the Preferences:

Code: [Select]
https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json


Then under Tools -> Board -> Board Manager you find the entry for the Attiny group, select it, and click Install.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

larham

Hi,

I have really tried to mod the code so it will work with a digistump atiny85 small board and I have it to work great with out LDR (Have one on the torch beside the fusebox). But my problem is to get it to work with the LDR.
This is the board:
https://www.instructables.com/id/Digispark-Attiny-85-With-Arduino-IDE/

Do you have any ideas how to make it work, I have tried this the last time:

Pin 0 (PB0) <-- LDR (GL5539) --> Pin 7 (PB2) (Ain1) <----> 56 k <----> Gnd (Digispark Tiny85)
Pin 6 (PB1) <---- LED ---> 100 R <-----> Gnd (Internal LED Digispark Tiny85)

Best regards,
Lars Hammarström
Sweden

Go Up