Show Posts
Pages: 1 2 [3] 4 5 ... 70
31  Using Arduino / Microcontrollers / Re: Uploading to Attiny with an Arduino on: February 22, 2014, 12:04:34 pm
Quote
Wrong microcontroller found.

This tells you that you have chosen the wrong board, the -F won't help.

I wonder if you are following the right steps, and all of them ?.


1. Upload the ArduinoISP to the Arduino dont't connect the capacitor yet.
2 Connect a 10 µF capacitor from reset to ground on the arduino (negative side to ground)
3. Open the blink sketch and change pin13 to pin3
4. select Tools -> board -> Attiny85@1MHZ (leave the serial port as it is)
5. Select Tools -> Programmer -> Arduino as ISP
6. Select File -> upload using programmer
7. Connect a LED with resitor to pin PB3

Now you should have a blinkining Led on your Attiny85
32  Using Arduino / Microcontrollers / Re: Uploading to Attiny with an Arduino on: February 22, 2014, 08:02:08 am
First you will have to install the specific files for the tiny, called a core.

I can recommend this one:

https://code.google.com/p/arduino-tiny/

As you see there is a version for either IDE version 1.0x or 1.5.x
Follow the read.me file when you install the files

Then you just follow these steps:

http://www.ernstc.dk/arduino/attiny85.html
33  Using Arduino / Microcontrollers / Re: SoftwareSerial with ATTiny84 using ATtiny library on: February 19, 2014, 09:17:37 am
I'm afraid that I am to blame for  the confusion.

I have corrected the pin names/numbers here

http://www.ernstc.dk/arduino/tinycom.html

You can use this reference sheet to see both digital and analog pinnumbers.

http://www.akafugu.jp/images/microcontroller-reference-sheet.png

For example physical pin 10 is digital 7 and analog 3
so:
digitalWrite(7,HIGH); will set physical pin 10 (or PA3) high
analogRead(3);  will read from physical pin 10 (or PA3)

BTW
PA3 is short for PortA pin3
34  Development / Other Hardware Development / Re: Can't upload to Iteaduino Lite on Linux/debian on: February 15, 2014, 07:03:46 am
My Iteaduino Lite worked out of the box.
I am on windows (Vista), if it can be of any help here is my verbose output:

Code:
avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "D:\arduino-1.0.4-windows\arduino-1.0.4\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM13
         Using Programmer              : arduino
         Overriding Baud Rate          : 19200
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
         AVR Part                      : ATMEGA88
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :
35  Using Arduino / Microcontrollers / Re: ATtiny85 communication with other MC - Help with deciding on: February 14, 2014, 11:27:23 am
Quote
I don't think I'll be able to use serial easily as I need to communicate with another MCU.

I don't understand what yoym mean. Serial communication between MCU's are quite normal.
I have a ATtiny85 communicating with my Raspberry Pi via serial
36  Using Arduino / Microcontrollers / Re: ATtiny85 communication with other MC - Help with deciding on: February 14, 2014, 07:45:53 am
BTW I once made a simple freqence counter with an ATtiny85, using PCINT
I don't rember the upper freqence limit

Code:
volatile unsigned long Count;
long previousMillis = 0;
long interval = 1000;

ISR(PCINT0_vect) {
  Count++;
}

void setup()
{
  Serial.begin(9600);
  Serial.println("Freq......");
  GIMSK = _BV(PCIE);    // Enable pin change interrupt Table 9.3.2
  PCMSK = _BV(PCINT4);  // Enable the interrupt for only pin 4,Table 9.3.4
}

void loop ()   {
unsigned long currentMillis = millis();
  if(currentMillis - previousMillis > interval) {
    previousMillis = currentMillis;   
    Serial.println("Count  ");
    Serial.println(Count);
    Count=0;
  }
} //loop

37  Using Arduino / Microcontrollers / Re: ATtiny85 communication with other MC - Help with deciding on: February 14, 2014, 05:03:03 am
For communication you could use TinyDebugSerial, it is part of the core you are using.
It works the same way as on the UNO and the syntax is the same:
So this would output Serial on pin PB3

Code:
void setup() {
Serial.begin(9600);
}

void loop() {
Serial.println("Testing..");
}


https://code.google.com/p/arduino-tiny/
38  Using Arduino / Microcontrollers / Re: attiny 2313 and servos on: February 12, 2014, 02:53:51 pm
tylernt has made a servo library for tinys:

http://forum.arduino.cc/index.php?topic=198337.msg1463365#msg1463365
39  International / Scandinavia / Re: Hjælp til water level sensor code on: February 11, 2014, 09:44:18 am
Hvis du har et ptentiometer, kan du bruge det til at teste med.
Det er sikkert også lettere og så ungår du vandpjaskeri:

http://arduino.cc/en/Tutorial/ReadAnalogVoltage

Har du et link til dine sensorer ?
40  Using Arduino / Microcontrollers / Re: Using a OneWire device with a ATtiny85 on: February 11, 2014, 09:17:34 am
That is strange !

I don't know if it matters but I run the ATtiny85 @ 8MHz.

This is how I define the pin connected to the sensor

Code:
OneWire  ds(3);  // on pin PB3 (a 4.7K resistor is necessary)
41  Development / Other Software Development / Re: An ATtiny core collection for IDE 1.5.3 (Aka. Nightly Build) on: February 11, 2014, 09:09:34 am



attiny84at16.upload.tool=arduino:arduinoisp
attiny84at16.upload.tool=avrispv2
attiny84at16.upload.tool=pololu
42  Using Arduino / Microcontrollers / Re: Using a OneWire device with a ATtiny85 on: February 10, 2014, 04:20:49 pm
Yes I am using an Arduino as programmer, with TinyISP

https://github.com/Coding-Badly/TinyISP

It makes debugging very easy

And I am using this core
https://code.google.com/p/arduino-tiny/
43  Using Arduino / Microcontrollers / Re: Using a OneWire device with a ATtiny85 on: February 10, 2014, 03:52:55 pm
I have used the latest version from the playground

http://playground.arduino.cc/Learning/OneWire

http://www.pjrc.com/teensy/td_libs_OneWire.html

I have the DS18B20 connected to pin 3 on the ATtiny85, and a 4.7kohm pullup resistor

This is the output

Code:
ROM = 28 B0 CE AF 2 0 0 E5
  Chip = DS18B20
  Data = 1 2E 1 4B 46 7F FF 2 10 38  CRC=38
  Temperature = 18.87 Celsius, 65.97 Fahrenheit
No more addresses.

Edit:
I used the DS18x20_Temperature sketch from the examples that comes width the library
44  Development / Other Software Development / Re: An ATtiny core collection for IDE 1.5.3 (Aka. Nightly Build) on: February 10, 2014, 02:52:02 pm
Did you rename Prospective Boards.txt to boards.txt  (and restart the IDE) ?
45  International / Scandinavia / Re: Hjælp til water level sensor code on: February 10, 2014, 01:14:19 pm
På din tegning har du skrevet at du bruger en Arduino Leonardo.
På den type bruges A2 og A3 som SDA/SCL til din RTC
Pages: 1 2 [3] 4 5 ... 70