Arduino Forum

Forum 2005-2010 (read only) => General => Exhibition => Topic started by: bohne on Mar 07, 2009, 02:57 pm

Title: LumiNet (based on attiny84)
Post by: bohne on Mar 07, 2009, 02:57 pm
I created a port of the Arduino software to the LumiNet hardware.

This hardware uses an attiny84 mcu and has an ultra bright rgb LED onboard.

We call this an organic, interactive illumination network. Because the main task is illumination (on clothes or on walls for example), it uses a network topology, it is bio-inspired (or organic) and should interact with humans and the environment.

For this project, I wrote a new Arduino core for the attiny84 chip.
And the Arduino IDE was extended in order to support attiny chips. The current implementation is based on Arduino0013.

For example, the jacket you see on our website has 80 luminet nodes attached and you can upload different sketches to it. The sketches are uploaded by a PC running the Arduino software or by using special nodes, the so called vector nodes. The sketch infects the network like a virus, we call this programming by infection. So the same sketch runs on each node and each node has it's own micorcontroller and rgb LED and communicates with four neighbors.

You can find details on our website: http://www.luminet.cc

Details will follow if you are interested.
Title: Re: LumiNet (based on attiny84)
Post by: jerrya.net on Mar 07, 2009, 06:11 pm
Interested in more info! Very cool.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Mar 09, 2009, 04:32 pm
I took a photo that compares the LilyPad Arduino and a LumiNet node.

(http://hci.rwth-aachen.de/tiki-download_wiki_attachment.php?attId=716&page=luminet)

As you can see, the attiny84 (the black square on the right device) is smaller than the atmega168 that is used by the LilyPad Arduino. The white box on the LumiNet node is the ultra bright rgb-LED. You can also see 4 pins in each direction. They are used to connect LumiNet nodes with each other. One of the four pins is Vcc and one pin is GND. The remaining two pins are used for communication.

The three (diagonal) pins on the lower left corner and the three pins on the upper right corner are used for ISP programming when needed. If the jumper is removed, the three pins on the lower left corner can also be used as I/O pins. So LumiNet has 8+3 = 11 I/O pins.

Title: Re: LumiNet (based on attiny84)
Post by: bohne on Mar 09, 2009, 04:48 pm
In order to get the attiny84 chip running with the Arduino IDE, some modifications must be made to the source code of the IDE. After this, the IDE has to be recompiled of course.

Based on revision 557 (from March 7th, 2009 - which is Arduino0014), I created a patch that contains the following changes:
* Compile .S assembler files in the target directory. Should also work with assembler files in the sketch directory, but this was not tested. Important: use a capital S as your file extension!(Changes in Complier.Java and Target.java)
* Burn bootloader using STRG+B shortcut. Select the ISP programmer in the Tools->Burn Bootloader menu and this programmer will be remembered until you change it. (Changes in Editor.java)
* Sketches for cores that are based on attiny chips will get uploaded (Changes in AvrdudeUploader.java)
* Programming by infection - the upload mechanism using the LumiNet bootloader - is supported (Changes in AvrdudeUplioader.java and new source: LuminetUploader.java)
* youboardname.upload.protocol=stk500v2 in boards.txt made some trouble here with an original stk500v2 board, fixed this issue (AvrdudeUploader.java)

The patch can be found here:
http://hci.rwth-aachen.de/tiki-download_wiki_attachment.php?attId=718&page=luminet
(sorry, wrong patch until 09.03.2009 19:03 MEZ)
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Mar 13, 2009, 09:42 pm
Is there any interest in more pictures or videos?

Or is the project not interesting because it does not use the official Arduino hardware?

I could show the "programming by infection" bootloader process or a connected network of nodes that to some rgb fading. Or maybe you have some idea what LumiNet should be able to do?

Just ask your questions or provide feedback, this will improve the LumiNet research project a lot.
Title: Re: LumiNet (based on attiny84)
Post by: darudude on Mar 14, 2009, 12:40 am
Couple questions:

1) Any plans on releasing a compiled IDE with all your changes? Save me the trouble of figuring out your instructions (haven't dwelled into the source code of the Arduino yet)

2) Are there any restrictions? Can all libraries be used? Would there have to be many changes to port the libraries over?

3) Is there a way to burn a bootloader through bit banging with the FT232?
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Mar 14, 2009, 12:53 am
darudude: thank you for your questions.

1) yes the IDE will be released soon. And I hope to get the LumiNet patches included into the official Arduino release, so you don't need to have two IDEs installed. I will explain all instructions to you, what do you need to know?

2) There are some restrictions I guess. The attiny84 has less pins and no hardware UART for example. But all simple examples can be used. All libraries will be available. At the moment some libraries use code that only compiles on the Arduino atmega chips. Some problems with the Ethernet, Wire and Stepper libraries are still open.

3) The LumiNet nodes have their own bootloader. So every node comes with a preprogrammed bootloader (that supports programming by infection). Burning the bootloader via BitBang was not tested, but if it is possible with the Arduino then I see no reason why it shouldn't work with LumiNet. All ISP pins are available and can be used by any ISP programmer.

Title: Re: LumiNet (based on attiny84)
Post by: darudude on Mar 16, 2009, 01:48 pm
thanks for the quick follow ups!

1) Well I guess I wasn't completely clear. I do understand most of the instructions and could probably edit the IDE on my own with a little trial and error and research (I've never had to recompile the Arduino IDE before but I assume this wouldn't be any more different than any other programming project I have worked on). However, most of what I do with the Arduino is teaching and kit development, and I'd want something I can give my students that they can then find later without much effort. I think learning how to recompile the IDE is out of the scope of what I am trying to do with them (mostly high school kids). Having the LumiNet patches merge the LumiNet and Arduino branches together is exactly what I need. I'll probably wait till this happens before I start actively working with this.

2) I am glad most of the libraries will be supported. I was aware there would be restrictions, but I am glad they aren't as drastic as I thought they would be.  

3) What is programming by infection? Also how can the LumiNet be bootloaded by bit-banging without a UART?

And a few more questions

1) Is the power saving drastically better than the Atmega? I seem to be losing power way too quickly for battery powered applications on my Atmega based solutions even on sleep mode.

2) I don't see I2C capabilites on teh Attiny85 data sheets. is it possible to work with I2C and OneWire?
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Mar 17, 2009, 12:13 am
1) Good to hear that someone actually needs my modifications :) I really hope that most of my patches qualify for a future release of the Arduino IDE. But there will be a release of my IDE within the next 6 weeks.

3) programming by infection is a multi-hop reprogramming method we created for LumiNet. The idea behind LumiNet is that you don't have a single controller (like in most Arduino projects) but many (hundreds) of nodes with their own microcontroller. You could disassemble the network and reprogram every node via isp or UART. But what we do is different: a special node (called vector node) gets programmed via (software) UART and it stores the program code. Then this (vector) node is connected to the network and the payload propagates from one node to all its neighbors... like a virus. In that way the network remains unchanged and new program code can be uploaded to all nodes in a single step. This is especially handy for mobile applications (e.g. wearable computing) when you don't have a PC around you but you have 10 preprogrammed nodes with different payload. So programmin by infection is a combination of a program code dissemination protocol and a bootloader.

I have to compare power consumption. I will provide information about that in the next days.

LumiNet uses the attiny84 chip. This chip has limited I2C capabilities (the same is true for the attiny85).
But if you look in the datasheet in 14.3.4 Two-wire Mode you can see, that the USI of the attiny can do I2C (TWI) in hardware.
How important is I2C to your projects? Do you need I2C master or a slave functionality?

I did not test OneWire yet because I have no such devices. But I downloaded the lib from here:
http://www.arduino.cc/playground/Learning/OneWire
and the example compiles without problems. A short look in the sources tells me: this should work without any problems with LumiNet.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Mar 17, 2009, 12:45 am
Oh I forgot the bit bang question... the attiny84 has no hardware UART. But for ISP you don't need a hardware UART. What you need is a ISP interface. And the six ISP pins are available (the diagonal pins you can see on the photo) so you can connect any ISP programmer to them, even a bit bang device that can be a FTDI chip like the one that is used on the Arduino. So you can use the Arduino as an ISP for LumiNet in theory. I have never tried this but it should work just as fine as with an Arduino. Just to make sure we are talking about the same thing, here is a link:

http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html

The picture (of the circuit) at the bottom of the page shows how to connect the 4 pins of the X3 connector of the Arduino in Order to convert the FTDI chip into a bit bang ISP programmer (that can be used with LumiNet nodes)

With this ISP programmer you can upload the bootloader to the LumiNet node. If requested I could modify the IDE so that the sketch can be uploaded via ISP (I use this for tests here but it will get removed with the official release because programming by infection is the way sketches should be uploaded)
Title: Re: LumiNet (based on attiny84)
Post by: darudude on Mar 17, 2009, 01:04 am
Doesn't the first node have to be bootloaded to enable software UART? Don't you have to program something like the software serial library first into the node? Wouldn't you have to use ICSP?

Also, the diagram you linked to is exactly what I am talking about. I would be very interested in programming the device this way. Also, by programming by infection, all the nodes have the same code right? Are the nodes self aware of each other?

Programming by infection is an interesting concept, but I don't think it will suit my kit development purposes (though I have an idea for halloween where this could be quite interesting).

I2C compatibility would be nice, however I understand the limitations. I was mostly looking for Master capability.

I'm glad this project is going so well. I've wanted to use the Attiny for some time with the Arduino IDE.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Mar 17, 2009, 03:26 am
Thanks again for the feedback.

All nodes once have to be programmed by ISP just like any Arduino because a bootloader has to be present on each device. The bootloader for the attiny84 will be published together with the IDE. We use AVR dragon and stk500 ISP programmers but I will test the FTDI bit bang in the next weeks as well.

I wrote a software UART based on an Atmel Application node that allows serial communication in all four directions. This software UART is also used by the programming by infection loader. Of course this assembler routines are wrapped to C and C++ and this is the reason why I added assembler support to the Arduino IDE.

Programming by infection uploads the same code to all nodes. There is one exception: Sensor nodes. These nodes have to be programmed by hand since they read sensor hardware and propagate the values into the network. Overwriting the program code of sensor nodes would destroy them :)

The nodes are not self aware of each other. They only know in which direction they have a direct neighbor. But it is possible to use dynamic addresses at the application layer. This is a task the application designer has to handle. I will add support if needed but the basic idea is to use bio-inspired algorithms. I am not sure if a cell in the arm of our body is aware of a cell in the finger of our body... one might think of LumiNet as a neural network but of course the hardware is not limited to that idea.

An I2C master is not a problem with LumiNet. The software UART is running great and this is the more demanding protocol. I guess I will write a I2C library that can be called from C and C++ when the project is finished. Or you can look out for exisiting software I2C libs, they should work on LumiNet or can be easily ported.

Can you explain what your main interest in my IDE patches is? Do you only need the attiny support or are there also other parts that you find interesting?
Title: Re: LumiNet (based on attiny84)
Post by: darudude on Mar 17, 2009, 04:16 pm
Yeah I thought that each cip would have to be bootloaded first, I just wanted to confirm that. Thx for taking a look at the bit bang technique for me, this is how I would like to program the chip

I'm glad you got the software serial working out fine , and that I2C will not be a problem.

In terms of my use for this project, the attiny support is the most attractive feature for me. I've wanted to use them to teach simple stuff to kids due to their smaller form factor and lower power consumption

A neural netowrk seems interesting and I would love to work with something lie that, but I don't think I can afford to! However, if I can successfully get working with the Attiny and get fairly comfortable with it I do have a plan to develop a halloween constume kit with it.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Mar 19, 2009, 12:52 am
Here is the measurement of the power consumption:

I tested three programs:
1. idle program
2. idle but pin 2,3,4,5,6,7 HIGH (OUTPUT)
3. sleep mode (SLEEP_MODE_PWR_DOWN)

Arduino Diecimila @5V; LillyPad@5V; LumiNet@8MHz, 5V; LumiNet@1MHz 3.6V:
1:26,5;8,15;6,14;0,99
2:25,8;7,94;6,39;1,02
3:8,69;0,30;0,30;0,30
(all values are mA)

I guess the FTDI chip of the Diecimila consumes about 8,5mA and I don't know how to set this chip to sleep mode...

LumiNet can't run at 16MHz so there are no 16MHz values for LumiNet and it is hard to compare the 16MHz Arduino values with the 8MHz LumiNet values. But what I can say is that operating at 3.6V at 1MHz is a good choice for battery powered applications :)

Title: Re: LumiNet (based on attiny84)
Post by: darudude on Mar 19, 2009, 08:11 pm
Wow didn't know the Arduino sucks so much juice on idle.

Is this using the internal oscillator?
Is 8M the max you can clock the internal oscilator? i.e can I add an external oscillator?
What is the default config of the bootloader? 1Mhz or 8Mhz?

Just trying to figure out what changes I would have to make (if any at all).
Title: Re: LumiNet (based on attiny84)
Post by: macegr on Mar 19, 2009, 08:29 pm
I have to wonder why the power consumption is less with the outputs high. And each LED segment active will probably add 20mA to the total...
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Mar 19, 2009, 08:51 pm
Yes, that was also something I did not expect. But it was the same effect with the LilyPad Arduino and the Diecimila and I measured everything three times.
No LEDs are connected to pins 2,3,4,5,6,7 (that's why I have choosen them).
Please notice that I did measure the overall system power and not the power that goes only through the atmel chips.

Maybe someone else can do a measurement and verify my values? - I connected the power supply to the 5V and GND pins and disconnected everything else.

The question about the clock speed: The internal clock can be 1-8 MHz. Of course you can add external clock sources. Then 16MHz are no problem.  
The bootloader runs at 1MHz but I tested it with 8MHz at 115000baud and it works with a good selection of boards.


Title: Re: LumiNet (based on attiny84)
Post by: darudude on Mar 19, 2009, 09:30 pm
I'll try and test the duminalove on Saturday. I am heading to my University (I am at the University of Waterloo) then (a bunch of us forum members are holding our first Arduino meeting there). Hopefully I can get into an open lab and use one of their regulated lab power supplies to power the Arduino and monitor the power consumption.
Title: Re: LumiNet (based on attiny84)
Post by: aenigma on Mar 20, 2009, 07:15 pm
Hi, I am very interested in your project using the ATTiny microcontrollers and the Arduino IDE.  I have a project that might take advantage of the ATTiny85/84.  I know your LumiNet project uses the ATTiny84 - would the same bootloader/IDE mods work with the 85 as well?  They are very similar in their features, except the 85 can come in an 8-pin package (PDIP/SOIC, which is easier to prototype with).  I haven't really decided which would be better for my application, and both come in the same MLF package, but I know I need the low voltage and low power consumption of the Tiny's (need to operate on one lithium cell down to <2.0V). My initial application would use just one chip, but I have other ideas for using small, cheap, low-power devices embedded in a wireless sensor network.  Hopefully your work make it into the official release.  These Tiny's are really perfect for battery-operated projects and being able to use the Arduino/Wiring language would make development that much quicker. Thanks and I look forward to your release of the bootloader and IDE!
Title: Re: LumiNet (based on attiny84)
Post by: ericski on Mar 21, 2009, 01:04 am
I'm interested in this.  I have a couple of projects in mind that could benefit from smaller parts.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Mar 21, 2009, 01:09 am
Great, can you please specify your interest? Are you only interested in the attiny support or is the idea of a neural network something that you can use?
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Mar 21, 2009, 02:07 am
the attiny85 is supported as well. I took some pictures, but you will have to wait until Monday I guess. I think the attiny84 is the better choice, I have one here in DIL14... the attiny85 has too few pins.
But if this is sufficient for your application then my modified IDE can handle this chip, yes.


And now some great news for all windows users (mac and linux support will be added later):

I managed to add the FTDI BitBang bootloader upload process into my IDE.

So from now on it is possible to use the X3 pin header of the FTDI chip of the Arduino Diecimila as an ISP programmer (as descibed in the link above).

(http://hci.rwth-aachen.de/tiki-download_wiki_attachment.php?attId=725&page=luminet)

Of course this enables you to burn a bootloader to the Diecimila itself, but I burn the bootloader to my attiny84 powered LumiNet nodes with this hack.

@darudude: thanks for motivating me, the bit bang bootloader is really working well and you can select it like any other ISP programmer in my IDE.
Title: Re: LumiNet (based on attiny84)
Post by: darudude on Mar 22, 2009, 07:06 pm
Awesome!! Can't wait for the schematics and IDE to release. I'm gonna order some Attinys in anticipation

Also regarding the power usage. I seem to have some problems with by arduino (I think I blew the FTDI chip). So i couldn't program it to set pins high. I did put an empty chip in (IDLE program) and got about the same power usage as you did: ~30 mA.

I am going back to the university in a couple weeks. I plan on just doing power testing an Atmega 168 bootloaded with Arduino on beadboard. This should give a better comparison between power usage on Attiny84 and Atmega168
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Mar 24, 2009, 07:47 pm
Schematics and software will be released soon, end of April I guess.

I think the numbers of the LilyPad Arduino and an atmega168 on a breadboard will be the same.

I made a video of the BitBang upload process but I am too busy to upload it at the moment. Videos will be released soon.

Any more questions or feedback?
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Mar 28, 2009, 09:50 pm
Update: FTDI BitBang tested with Mac OS X. It now works out of my IDE.

But I don't understand how to use the VCP driver and the D2XX driver at the same time on Mac OS. So right now the user must decide if her wants to upload sketches (using the VCP driver) or if he wants to burn the bootloader (using the D2XX driver).

But it is possible to use the FTDI BitBang hack for the Diecimila out of the  IDE under Mac OS and Windows now and I used it to flash LumiNet nodes with it.
(http://hci.rwth-aachen.de/tiki-download_wiki_attachment.php?attId=727&page=luminet)

Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Apr 09, 2009, 08:56 pm
I'm very interested for the bitbang en attiny support in the arduino ide.

Good work!
Title: Re: LumiNet (based on attiny84)
Post by: truth_hz on Apr 11, 2009, 12:16 am
Wow, I've been looking for something like this for awhile now. Can't wait for the board files, bootloader and IDE. I could use about a dozen of these little things!!

-m
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Apr 11, 2009, 12:30 pm
Thankx for the feedback.
I am currently fine tuning the last parts and hope to release the files until the end of April.
If there are any other features that you miss in the official Arduino IDE then please let me know, maybe I can include it in the LumiNet version.

Title: Re: LumiNet (based on attiny84)
Post by: jgueydan on Apr 14, 2009, 03:16 am
How much would it take to get the TWI/I2C to work?  I was looking at going with the ATTiny 25/45, but guess I could try 84/85.  Or would it work for any in the ATtiny series? I'm just getting started with this whole arduino thing, so of course, the easier, the better.

Thanks
Title: Re: LumiNet (based on attiny84)
Post by: harrod159 on Apr 15, 2009, 08:42 pm
Has there been any more work done on this? i'm very interested to see the modified files. this could be very useful for me!
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Apr 20, 2009, 10:33 am
@harry: sure, I am working on it day and night. Fixing the last problems and hope to get the release online in two weeks.

It will be a standalone release and not part of an official Arduino release.

I test everything under Windows and Mac OSX. And of course the sources are released too, so anyone who has Linux can give it a try as well. So if there are any requests for changes in the (original) IDE please post them here soon.

Also have a look at the project page (http://www.luminet.cc) for changes. The package will be release there.
Title: Re: LumiNet (based on attiny84)
Post by: aenigma on May 15, 2009, 05:18 pm
Any news about the ATTiny Arduino IDE release?  I can't wait to test it out - I already have an Arduino-like board assembled for it and I'd love to program it up using your IDE.  Thanks!  :)
Title: Re: LumiNet (based on attiny84)
Post by: bohne on May 15, 2009, 08:17 pm
Everything finished. But I have to wait until Tuesday to upload it, because my upload speed at home is too slow.
So come back Tuesday or Wednesday, then you can download it.

And one new feature was added: If you create a new sketch, then setup() and loop() are automatically inserted, you only need to fill these functions with your code.
Title: Re: LumiNet (based on attiny84)
Post by: darudude on May 18, 2009, 04:23 am
I'm super excited! is the modified IDE going to be on top of Arduino 15? Also any updates on getting in branched into the next arduino release?
Title: Re: LumiNet (based on attiny84)
Post by: bohne on May 18, 2009, 06:34 pm
I will upload the binaries for Windows and for Mac OS X tomorrow (Tuesday) afternoon. Everything is running very nice now.

Oh, it is based on 0014, because I liked it better than 0015. But I will update the sources and binaries to new versions in the future. But of course this edition is neither 0014 nor 0015... it is something different :)


Title: Re: LumiNet (based on attiny84)
Post by: bohne on May 19, 2009, 03:53 pm
Here is the modified IDE for Windows (binaries only, sources come in an extra zip file):
Download Windows Version (http://hci.rwth-aachen.de/tiki-download_wiki_attachment.php?attId=759&page=luminet)

And here are the binaries for Mac OS X:
Download Mac OS X Version (http://hci.rwth-aachen.de/tiki-download_wiki_attachment.php?attId=760&page=luminet)

Please give some feedback :)
Title: Re: LumiNet (based on attiny84)
Post by: harrod159 on May 20, 2009, 12:56 pm
Good to see its been released. I'm very much looking forward to using this in an upcoming project. I haven't had a chance to look at the new IDE yet, but any chance we could have some info such as what additions you've used and what the pin allocations are?

Thanks for you work!

Dave
Title: Re: LumiNet (based on attiny84)
Post by: bohne on May 20, 2009, 12:59 pm
What pin allocations do you mean? For the ATtiny chip? Or for the BitBang?
Title: Re: LumiNet (based on attiny84)
Post by: harrod159 on May 20, 2009, 05:16 pm
Sorry, i meant for which pin in the ide relates to the pin on the chip, for instance if i do a digitalwrite(1, HIGH) which physical pin will go high? Also which pins are which ADC, and does i2c work?

Also do you have any hardware designed as a prototype board? i'm halfway through designing one to use in a breadboard, as with the arduino nano, but i would like to see your take on the hardware.

Thanks
Title: Re: LumiNet (based on attiny84)
Post by: aenigma on May 20, 2009, 05:20 pm
Thanks for the IDE - looks like it will be helpful to many of us.  For just general purpose ATTinyx5 work, which LumiNet board should be selected as a target?  I have a board with an ATTiny85V on it and I wanted to test out the IDE but I wasn't sure what device to target.

Thanks again!
Title: Re: LumiNet (based on attiny84)
Post by: bohne on May 20, 2009, 05:41 pm
Select the SENSOR board, then you can burn the sketch (and the bootloader) via ISP programmer (e.g. stk500 or FTDI BitBang) to your chip when you hit the Upload Button

I will support other mcus soon. If you have an ATtiny-based project then I will support you to use the modified IDE, just ask whatever you need to know.
Title: Re: LumiNet (based on attiny84)
Post by: george_graves on May 25, 2009, 09:15 am
Really looking forward to some ATtiny support with the IDE!!!  Purdy please!
Title: Re: LumiNet (based on attiny84)
Post by: bohne on May 25, 2009, 12:27 pm
Quote

Really looking forward to some ATtiny support with the IDE!!!  Purdy please!

Didn't you see the download links above?

You must download the modified IDE and then you got ATtiny support. Select the "LumiNet Sensor Node" Board if you have an ATtiny-powered Arduino board and want to upload sketches to it via ISP (select the corresponding ISP Programmer in the Burn Bootloader Menu)


Title: Re: LumiNet (based on attiny84)
Post by: george_graves on May 26, 2009, 02:58 am
Awesome! Thanks bohne!  I'll check it out this week.
Title: Re: LumiNet (based on attiny84)
Post by: harrod159 on May 26, 2009, 10:46 am
Is there any more documentation available? Is I2C working? Thanks
Title: Re: LumiNet (based on attiny84)
Post by: bohne on May 26, 2009, 01:38 pm
I will upload some documentation soon. What do you need to know? You can ask here.
Almost any thing that you can do with an Arduino can be done with ATtiny based boards. You can use the same sketches and libraries.

The I2C library can be used and is working, I tested it some months ago but did not include it in the release. You must download it from the Arduino Playground...
Title: Re: LumiNet (based on attiny84)
Post by: harrod159 on May 26, 2009, 01:45 pm
Brilliant, I think i've got the pinouts from the source code but had to convert it to PDIP/SOIC.

Which pins are used as UART for the bootloader?

Thanks.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on May 26, 2009, 03:50 pm
"Normal Nodes" can use any pair of pins for serial communication (e.g. pin 6 and pin7 or pin 0 and 1)...

"Vector nodes" receive new payload from the PC using pins 6 and 7, and they send the payload to the normal nodes via pins 2 and 3.

Have a look at pins_arduino.c for the pin mapping...

Just a reminder: the attiny84 does not have a U(S)ART. Serial Communication is implemented in software (assembler) and I testet it up to 115000baud at 8 MHz (internal RC clock), but the default is 9600 baud. In order to change the baud rate, you must change the variable "b" in COMasm.S
just search for this line:
Code: [Select]

b      =14      ;9600 bps @ 1 MHz crystal
Title: Re: LumiNet (based on attiny84)
Post by: Ro-Bot-X on May 28, 2009, 03:32 am
Thanks for the good work! It was almost what I was looking for a few modules that I need to build.

Looks like tiny84 is not going to meet my needs since it has 2 functions on the same pin and I need them both active... I am looking to use 16 bit PWM and I2C or serial communications. So I have to work with tiny861. What do I have to change to get it working with your release? Also, how do I use the serial comm? Just like a regular hardware serial or like the softwareserial?

Thanks again!
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Jun 02, 2009, 03:04 am
You must change the pins_arduino.c file and maybe some other files to get it working with the tiny861.

I am working on a port to the attiny2313 right now. This will be released very soon. If you can use this mcu, then you should wait and take my files when I release them later this week...
Title: Re: LumiNet (based on attiny84)
Post by: Ro-Bot-X on Jun 05, 2009, 05:30 am
I have changed the microcontroller to tiny2313. I have to wait like 3 weeks until the PCB is fabbed, so there is plenty of time until I'll need to code it. Thinking of it, I will be working on the code on a regular Arduino until the board will be ready.

Thanks!
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Jun 05, 2009, 01:24 pm
The tiny2313 port ist finished and works quite well on my board.

You can download the core file on the LumiNet homepage (http://www.luminet.cc).

The tiny2313 has no ADC. So analogRead() ist not implemented at the moment. You must use external ADC or a software delta sigma if you have to use ADC in your project. I always use something like the Atmel Application Note AVR 400 for ADC on the tiny2313.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Jun 11, 2009, 02:06 am
Some more details about the new attiny2313 port:

* supports all pins of the attiny2313
* supports PWM on 4 pins (via analogWrite)
* supports internal clock and external clocks
* supports hardware USART for serial communication (tested up to 115000baud)

I really like the attiny2313, I have 20 of them here and they are all working as if they were real Arduinos.

What should be the next ATtiny mcu that I should port?
Title: Re: LumiNet (based on attiny84)
Post by: Ro-Bot-X on Jun 11, 2009, 02:49 am
What about interrupts on tiny2313? Are they working? At least the external interrupts and a timer interrupt would be nice... Also, I need to work with I2C, is that also available?

Thanks for the great work!
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Jun 11, 2009, 04:33 pm
Interrupts have not been supported by my first release. I created a new release today:

* added Interrupt support for INT0 and INT1.

So you can use
http://www.arduino.cc/en/Reference/AttachInterrupt
just like on the official Arduino.

The Wire Library compiles without problems. So I2C is available. But the example sketch is too big for the small memory of the attiny2313. So I think that I2C can be used, but you must modify the Wire lib... I can do that for you if you don't know how to do it. The Wire lib can be split into two parts: master and slave... so if you want the tiny2313 to be a I2C slave, then you don't need all the master routines in the memory (because they won't be used in this case)...


I also included this fix to Print.h and Print.cpp:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1244128096/0#0
Title: Re: LumiNet (based on attiny84)
Post by: NiechcialA on Jun 12, 2009, 09:06 pm
Hello

You have asked about feedback to your software (Arduino LumiNet Edition).
I have found some bug - when I was trying to use OneWire library. Some errors occurs  during compilation. (I'm useing Duemilanove)
The same code works properly on Arduino 0015.

Best regards
NiechcialA
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Jun 13, 2009, 01:05 am
I will fix that in the next week. Are there other known bugs?
Title: Re: LumiNet (based on attiny84)
Post by: bbeagle on Jun 20, 2009, 08:21 am
Has anyone released a pc board with an ATTiny84 thaat they are willing to share. Not necessarily the Luminet form factor itself. I am thinking of doing a board design, but do not want to reinvent the wheel so to speak.

/me
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Jul 02, 2009, 01:32 pm
Can I buy a luminet board?  Is the schematic posted anywhere?

If I want to set up my own attiny circuit and use the arduino environment what do I have to do?
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Jul 03, 2009, 02:24 am
Sorry for the late answer.

I will try to publish the schematics soon.

But all you have to do is to add an attiny84 mcu to a breadboard, connect power and use a pull-up resistor (10k) on the /RESET pin. (Or you change the fuses and disable external reset)

You can upload sketches to the chip via ISP (in this case you need a hardware ISP programmer or a modified Arduino) if you select "LumiNet Sensor Node" in the "Board" menu.

You can also use an attiny2313, I uploaded the sources for this mcu to the luminet.cc homepage.

You can also use any other attiny mcu, but then you need to write a new core (or let me write it if you tell me which mcu you want to use).

You can send me a private message if you want to buy LumiNet boards. We did not sell any board yet, but send me a pm.
Title: Re: LumiNet (based on attiny84)
Post by: Sean on Jul 13, 2009, 12:17 am
Waiting for my Evil Mad Scientist Labs attiny2313 board to arrive for a project I'm working on.
http://www.evilmadscientist.com/article.php/card2313

This is fortuitous, will be seeing what I can do with the TinyDuino capabilities you've enabled. We can call it the EvilDuino 2313.  ;)

Thanks for the work on the port!
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Jul 13, 2009, 12:32 pm
the board looks very nice. It should work with my code out of the box. The attiny2313 port uses an external 8MHz crystal, so you might want to add one to your evil board. Or you change the fuses if you want to run it on another clock.

Please tell us how if you have any problems.
Title: Re: LumiNet (based on attiny84)
Post by: Ro-Bot-X on Jul 18, 2009, 06:02 am
Quote
Waiting for my Evil Mad Scientist Labs attiny2313 board to arrive for a project I'm working on.
http://www.evilmadscientist.com/article.php/card2313


I looked at your board and it's beautifull, but for me it's worthless. I mean from a robotics oriented guy's point of view. The most important thing your board lacks is power busses near each pin. And you have that space! Why waste it and lose the robotics oriented customers? just add 2 more pins close to each usable pin of the tiny2313 with Vcc closer to the pin and GND to the outside. This way we can connect servos and sensors directly without splitting the cables!

Thanks!
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Jul 19, 2009, 11:00 pm
ok, I have an ATtiny84 on a breadboard hooked up to a homebrew avrisp arduino setup.  The basic setup works - e.g. I can get avrduded to read and write fuses on the ATtiny84.
as evidence:
Code: [Select]
c:\WinAVR-20090313\bin>avrdude -pt84 -cSTK500 -P\\.\COM1 -e -Uefuse:w:0xFE:m -Uh
fuse:w:0xDF:m -Ulfuse:w:0x62:m error=2 -b19200
avrdude: successfully opened stk500v1 device -- please use -c stk500v1

avrdude: please define PAGEL and BS2 signals in the configuration file for part
ATtiny84
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.12s

avrdude: Device signature = 0x1e930c
avrdude: erasing chip
avrdude: please define PAGEL and BS2 signals in the configuration file for part
ATtiny84
avrdude: reading input file "0xFE"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xFE:
avrdude: load data efuse data from input file 0xFE:
avrdude: input file 0xFE contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.06s

avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0xDF"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.06s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xDF:
avrdude: load data hfuse data from input file 0xDF:
avrdude: input file 0xDF contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.02s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0x62"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.05s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0x62:
avrdude: load data lfuse data from input file 0x62:
avrdude: input file 0x62 contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.03s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.


I've downloaded the original luminet setup and selected the luminet sensor board.  I selected the burn bootloader w/AVR ISP and issued the file->burn bootloader to I/O board.  I get a windows message saying avrdude has stopped working and the arduino ide says "programming fuses failed".

I thought: ok, I'll compile "Blink" and stuff the .hex file into the attiny with avrdude.  On compiling Blink I get some unfamiliar lines, a bunch of red messages, and the familiar sketch size message.
Code: [Select]
2>>>COMasm.S

2>>>digitalWriteASM.S

Cross Reference Table

Symbol                                            File

COM_getc                                          C:\Users\Bill\AppData\Local\Temp\build38633.tmp\COM.c.o

<SNIPPING OUT A BUNCH>

total_in                                          C:\Users\Bill\AppData\Local\Temp\build38633.tmp\bynase.c.o

vtable for HardwareSerial                         C:\Users\Bill\AppData\Local\Temp\build38633.tmp\HardwareSerial.cpp.o


Binary sketch size: 2018 bytes (of a 5720 byte maximum)


poking around in my sketchbook I don't see the applet directory or the .hex file I would expect to find after a successful compilation.

A couple of things I hope aren't the problem:
1)I am still using arduino 0013 as my mainstay and I did not replace that with the luminet directory.
2)I replaced the avrdude.exe and avrdude.conf files in the luminet directory with the ones from a winavr download - that seemed to be needed to get my homebrew programmer working but it didn't make any difference in this case.


any suggestions gratefully accepted and thanks for the luminet work to date.
Title: Re: LumiNet (based on attiny84)
Post by: Coding Badly on Jul 19, 2009, 11:34 pm
Check the TEMP directory (you can get to it quickly with %TEMP%).  Arduino 0015 puts intermediate files (except library ones) and target files there.
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Jul 20, 2009, 01:42 am
Quote
Check the TEMP directory (you can get to it quickly with %TEMP%).  Arduino 0015 puts intermediate files (except library ones) and target files there.


Hey, that was it - thank you very much.

So, it's a bit of a kluge at the moment but I can write code in the arduino IDE and run it on the ATtiny84.  I'm guessing it's still to do with avrdude and my cobbled up programmer.

Works though, and I'm hopeful it won't be too hard to tidy up what with my mad avrdude skillz and all.  Thanks to bohne for the ide integration and to drug123 for the four-jumper programmer idea.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Jul 20, 2009, 03:27 pm
Great to hear that it works! You seem to have the only tiny-based Arduino-clone beside the LumiNet. Fantastic!

Some guys from Sketching in Hardware 2009 (I just returned from London at this very moment) took some LumiNet nodes and I hope to get feedback soon. So stay tuned for upcoming LumiNet improvements. We also updated the www.luminet.cc homepage with more information.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Jul 21, 2009, 02:50 pm
LumiNet and the LumiNet Jacket will be presented tomorrow in Aachen (6 pm) at the second dorkbot meeting in Aachen (www.dorkbot.de).

You are all invited to visit us.
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Jul 21, 2009, 09:47 pm
Quote
LumiNet and the LumiNet Jacket will be presented tomorrow at Aachen (6 pm) at the second dorkbot meeting in Aachen (www.dorkbot.de).

You are all invited to visit us.


I'm excited for you.  Good luck academically and with the presentations.  sadly I won't be able to visit in person!  I've printed your thesis by the way and I'm reading it.  I bet it gets way more distribution than the average academic effort.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Jul 22, 2009, 04:13 am
Thank you very much! If you have any feedback to my diploma thesis, then please send me a private message.

My main concern is to get people involved with Arduino and physical computing. My academic work is not that important to me, but a wide distribution sounds nice.

What are you going to do with my IDE / tiny core?
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Jul 22, 2009, 01:38 pm
Quote
My main concern is to get people involved with Arduino and physical computing. My academic work is not that important to me, but a wide distribution sounds nice.
Don't be too modest.  Getting a masters degree is no small effort and having the letters after your name lends weight to your efforts in any endeavour - So I'm REALLY glad you're into arduino!

Quote
What are you going to do with my IDE / tiny core?

I'm interested in the Tiny support so I can make a physically small, low power, version of a project I'm working on. (http://i591.photobucket.com/albums/ss355/bill2009_photos/th_BoBsmall.jpg) (http://s591.photobucket.com/albums/ss355/bill2009_photos/?action=view&current=BoBsmall.jpg)http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1244069576
Even this beast could run with the 14 pin t84 and my next target will be maybe an 8 pin t85.

As I posted earlier though, the modified IDE compiles and produces valid .HEX files but I'm not able to get the bootloader onto the t84 using my homebrew programmer which emulates the avrisp.  The problem I have seems to be avrdude locking up or blowing up.  This is the same issue I had with the avrdude packaged with arduino and which I cured by using the avrdude from winavr.  I tried replacing avrdude.exe and avrdude.conf in the luminet ide package with those from winavr but no improvement.  

Could you explain which of the steps below are needed for attiny support(as opposed to luminet) and are there other changes? For example I see new entries in boards.txt.  

Also, if I'm going to manually upload the sensor node boot loader, can I then do serial to it?
Quote
In order to get the attiny84 chip running with the Arduino IDE, some modifications must be made to the source code of the IDE. After this, the IDE has to be recompiled of course.

Based on revision 557 (from March 7th, 2009 - which is Arduino0014), I created a patch that contains the following changes:
*1* Compile .S assembler files in the target directory. Should also work with assembler files in the sketch directory, but this was not tested. Important: use a capital S as your file extension!(Changes in Complier.Java and Target.java)
*2* Burn bootloader using STRG+B shortcut. Select the ISP programmer in the Tools->Burn Bootloader menu and this programmer will be remembered until you change it. (Changes in Editor.java)
*3* Sketches for cores that are based on attiny chips will get uploaded (Changes in AvrdudeUploader.java)
*4* Programming by infection - the upload mechanism using the LumiNet bootloader - is supported (Changes in AvrdudeUplioader.java and new source: LuminetUploader.java)
*5* youboardname.upload.protocol=stk500v2 in boards.txt made some trouble here with an original stk500v2 board, fixed this issue (AvrdudeUploader.java)


Title: Re: LumiNet (based on attiny84)
Post by: bohne on Jul 30, 2009, 01:20 am
The problem seems to be your homebrew programmer.
Where can I find more information about this device? Then I will have a look at it.

comments on the 5 changes:
*1* is important for LumiNet because the communication is implemented in assembler (it was too slow in C)
*2* this is just nice to have if you have to put the bootloader to more than 5 nodes...
*3* is important for LumiNet and for any other attiny-based board
*4* is only important for LumiNet, no other board will use programming by infection
*5* the baudrate was a problem with my original Atmel stk500v2, so I omitted the baudrate parameter

A sensor node does not have a booloader. Sensor nodes have to be programmed using an ISP hardware programmer. A sketch on a sensor node can use the Serial commands like Serial.begin() and Serial.write(), but it is limited to the baudrate that is specified in the assembler file... it uses 9600baud by default and Serial.begin(12345) will still result in a 9600baud serial connection. So use 9600baud for serial communication please.

I will try to uplioad an attiny85 version if you are interested. I used attiny85 mcus for prototyping LumiNet in the past, so attiny85 support should be easy...


Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Jul 30, 2009, 02:57 am
thanks a lot.  I THINK i understand where i am based on this and your pm's.

maybe one more question: does the ide drive the sketch uploading using the isp programmer or do i have to do it separately?


The homebrew programmer, by the way, is just a few jumpers and an arduino sketch (see below).  It works fine as a standalone loader.
Code: [Select]
// this sketch turns the Arduino into a AVRISP
// using the following pins:
// 10: slave reset
// 11: MOSI
// 12: MISO
// 13: SCK

// Put an LED (with resistor) on the following pins:
// 9: Heartbeat - shows the programmer is running
// 8: Error - Lights up if something goes wrong (use red if that makes sense)
// 7: Programming - In communication with the slave
//
// February 2009 by Randall Bohn
// - Added support for writing to EEPROM (what took so long?)
// Windows users should consider WinAVR's avrdude instead of the
// avrdude included with Arduino software.
//
// January 2008 by Randall Bohn
// - Thanks to Amplificar for helping me with the STK500 protocol
// - The AVRISP/STK500 (mk I) protocol is used in the arduino bootloader
// - The SPI functions herein were developed for the AVR910_ARD programmer
// - More information at http://code.google.com/p/mega-isp
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Jul 30, 2009, 12:26 pm
You can upload sketches using an ISP programmer with the IDE.

What you have to do:
edit the file boards.txt and replace the upload protocol (stk500 is the default) by the protocol that your programmer uses, e.g. the stk500v2 protocol:
Code: [Select]

luminet3.upload.protocol=stk500v2


Then the IDE uses this ISP protocol to upload sketches via ISP. The ISP programmer that you select in the "Burn Bootloader" menu is only for uploading the bootloader via ISP, not for sketches, I guess.

So if you want to upload a sketch to a LumiNet vector node, you can try to use the stk500v1 protocol in the boards.txt file for the luminet3 entry:
Code: [Select]

luminet3.upload.protocol=stk500


The stk500 protocol is the stk500v1 protocol and this is the protocol used by the bootloader of original Arduino boards... I never tested ISP with the stk500v1 protocol.


Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Aug 06, 2009, 05:07 pm
Hello again,

I have thought up a new project for myself.
And size is the key.
So instead of using a atmega8 @ 8mhz with almost always use.
I want to use a attiny84 @ 8mhz (internal)

I want to receive a IR signal
And with that input i want to drive 2 servos motors

I have successfully done this with a at168 @ 16 mhz
When i changed it to 8mhz internally the servo library didn't work any more.

Sadly my knowledge is to low it see what the problem is, but ive solved it using a softwareservo library.

As i want to make it as small as possible i was thinking to use the tiny84
Needs:
* 2 servo's
* 5 inputs (1 for IR, 4 for reading out switches)
* 1 serial 9600 baud ( to config the settings)

So it this possible to do?
using the standard library (servo, serial)

Thanks in advanced
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Aug 06, 2009, 06:01 pm
sounds easy. I can have a look at the servo lib. The servo signals need a special timing. The routines must be adjusted to different system clocks I guess. No big problem.

Do you want to develop a need board that has servo drivers and IR onboard?
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Aug 06, 2009, 06:39 pm
That would be great a working servo libary for the attiny :)

As for development, i'm going to use the breadboard first ofcouse.
(ive already done it with a normal arduino)

Then im going to solder it on a experimenters board.
Im trying to make within 4.5 by 3 cm or smaller.
The servos and ir-receiver are connected with wire.

This is the code i use for the IR http://www.rjw.speedxs.nl/arduino/lego_reciver.pde
With the ladyada motor schild to drive motor's


Instead of lego motor's im going to drive servo motor's on the same protocol.
Thats why size matters, it has to fit in a lego block  ;D
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Aug 07, 2009, 09:13 pm
I have placed a order for the attinys and rest of the components
I am exited to test it.

To get it running on 8mhz, i have to remove the "Divide clock by 8 internally; [CKDIV8=0]" in the fuses?

Also i noticed you have disabled the brown-out detection.
All arduino fuses have it enabled. Is there a reason for it?
Title: Re: LumiNet (based on attiny84)
Post by: Abfahrt on Aug 09, 2009, 01:13 am
Yeah, you should remove that.. Took me some days to realize that this option made my Single Chip Arduino's timings go crazy!!! ;D

Of course you must select the 8mhz clock setting, which is selected by default! :P
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Aug 11, 2009, 11:19 pm
Yes, LumiNet nodes run at 8MHz.
You can also change the clockspeed at runtime in the setup() function. In order to run the attiny84 at 8MHz you can use this piece of code:
Code: [Select]

cli();
CLKPR = (1 << CLKPCE);//INITIALIZE CLOCK CHANGE
CLKPR = 0x00;//NO PRESCALER

You can find more information in my diplom thesis (on the LumiNet homepage) at page 66.

I don't use brown-out detection on LumiNet nodes... I don't need it, but of course you can activate it if you wish to... should make no difference for most applications.

I will have a look at the servo lib soon.
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Aug 15, 2009, 12:32 am
ok, I'm finally ready to build something with the attiny84 support.  A couple of questions:
1) I understand the arduino pin assignments as follows:
ATTINY pin 2 is arduino digital 3
ATTINY pin 3 is arduino digital 2
ATTINY pin 4 is arduino digital 11 (also the attiny's reset)
ATTINY pin 5 is arduino digital 1
ATTINY pin 6 is arduino digital 0
ATTINY pin 7 is arduino digital 10
ATTINY pin 8 is arduino digital 9
ATTINY pin 9 is arduino digital 8
ATTINY pin 10 is arduino digital 7
ATTINY pin 11 is arduino digital 6
ATTINY pin 12 is arduino digital 5
ATTINY pin 13 is arduino digital 4
2) I need two external interrupts
- Pin 5 of the attiny84 is labeled INT0, does that correspond to arduino interrupt 0?
- Can I use the pin change interrupt support for my other interrupt - say on the attiny84's pin 13?
3) I need one analogRead - does this work and which pin is Analog 0?  I looked in wiring_analog.c but it's not obvious.

Thanks for the help
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Aug 18, 2009, 02:22 am
You can see the pin mapping in the hardware/cores/luminet folder - in the file pins_arduino.c

Code: [Select]

// Luminet board
//                *   *
//                D0  D1
//            VCC PA7 PB2 GND
//             |   |   |   |
//             |   |   |   |
//    VCC---                   ---VCC
//D7  PA3---                   ---PB1  D2
//D6  PA2---                   ---PB0  D3
//    GND---                   ---GND
//             |   |   |   |
//             |   |   |   |
//            VCC PA1 PA0 GND
//                D5  D4
//
// red   led:   PA4 (d8) -- pin available if jumper is not connected
// green led: * PA5 (d9)  -- pin available if jumper is not connected
// blue  led: * PA6 (d10)  -- pin available if jumper is not connected
// reset:       PB3 (d11)


The attiny pin depends on your ic size. The following table might make the mapping more clear:














Arduino Pin #tiny84 pin name
0PA7
1PB2
2PB1
3PB0
4PA0
5PA1
6PA2
7PA3
8PA4 -- red led
9PA5 -- green led
10PA6 -- blue led
(11)(PB3) -- reset

Title: Re: LumiNet (based on attiny84)
Post by: bohne on Aug 18, 2009, 02:27 am
Analog Pin 0 is PA0 (this is Arduino Pin # 4 corresponding to the table above).
So analogRead(0) reads the analog value from PA0.


pin change interrupts are not supported at the moment (only for attiny2313), but I can add this within minutes if you really need it. You can find the code  for the interrupt handling in the file WInterrupts.c in your hardware/cores/luminet folder.

Using pins other than INT0 or INT1 for pin change interrupts is not supported by any Arduino hardware at the moment, I guess. But I can add this if you are sure whar you are doing. INT0 and INT1 are far better than the interrupts on the other pins.
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Aug 18, 2009, 04:22 am
Quote
The following table might make the mapping more clear:Arduino Pin #  tiny84 pin name  
0  PA7  
1  PB2  
2  PB1  
3  PB0  
4  PA0  
5  PA1  
6  PA2  
7  PA3  
8  PA4 -- red led  
9  PA5 -- green led  
10  PA6 -- blue led  
(11)  (PB3) -- reset  

Ok that helps a lot.

Quote
Analog Pin 0 is PA0 (this is Arduino Pin # 4 corresponding to the table above).
So analogRead(0) reads the analog value from PA0.
OK that's great.

Quote
pin change interrupts are not supported at the moment (only for attiny2313), but I can add this within minutes if you really need it. You can find the code  for the interrupt handling in the file WInterrupts.c in your hardware/cores/luminet folder.

Using pins other than INT0 or INT1 for pin change interrupts is not supported by any Arduino hardware at the moment, I guess. But I can add this if you are sure whar you are doing. INT0 and INT1 are far better than the interrupts on the other pins.

I'd like to use int0 and int1 but i only see int0 on the pinouts - am I missing something?  I just need to be able to respond to pulses from two different sources.
(http://i591.photobucket.com/albums/ss355/bill2009_photos/ATTINY84.jpg)
Title: Re: LumiNet (based on attiny84)
Post by: Ro-Bot-X on Aug 19, 2009, 02:57 am
Quote
I'd like to use int0 and int1 but i only see int0 on the pinouts - am I missing something?  I just need to be able to respond to pulses from two different sources


Yeah, I had the same problem. I need to count pulses from encoders so I need at least 2 interrupts. I decided to go for a tiny2313, but it looks it was a big mistake, since the code doesn't fit in the tiny 2k flash... Now I redesigned the board and I'll go for tiny861 that has 2 interrupts, TWI and enough space for the code. All I need now is to figure out how to change the tiny84 and tiny2313 files for tiny861. I could ask bohne nicely, but I'd like to try it out myself first. But I think this tiny might work for your project too.
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Aug 19, 2009, 04:05 am
Quote
Yeah, I had the same problem. I need to count pulses from encoders so I need at least 2 interrupts.

Did you think about using the pin change interrupts?  It doesn't look THAT hard.

the attiny861 does look like it would do everything I need but now we're up to 20 pins and another new, non-standard chip(which I don't have one of anyway!).  For the moment I'm going to keep plugging at the 84 and if I can't make that work I'll just have to squeeze in a 168/328.  I don't think I could fit in the 2313 either.

I must say, as I go through this process, I'm impressed with the design of the 8/168/328 chips and their selection for the arduino.  It really does seem to be a sweet-spot for small-ish size with lots of function built in.
Title: Re: LumiNet (based on attiny84)
Post by: triag on Aug 20, 2009, 05:06 pm
Hi,

This is very interesting topic and I'm trying to study this.

I got my small program working fine with arduino. Now I would like to put it ti attiny 2313. I have downloaded all the software from luminet.

I still don't understand how do I put my 'blink' program to attiny 2313. Is is possible if somebody can explain step by step how to do it and make the LED blink.

I have

- modified arduino diecimila which can program bootloader to itself using bitbang.
- attiny 2313 chip
- all the basic electonic components

Is is possible to put the 'blink' to attiny with this available HW?
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Aug 21, 2009, 12:51 pm
ive got my attinys, only i dont get it to work.
I have successfully uploaded the sensor bootloader.
Only i can not upload sketches on pin 6&7

Im using a usb to ttl cable. Hooking the tx/rx to the tiny and using the auto reset with a 100n cap.

There 3 bootloaders, there the confusion start (maybe a idea to release a standalone version)

What bootloader do i need? i want to use the bootloader to upload sketches. I and i have to recompile it for 8mhz?

Looking to the pins_arduino, there is nothing on the digital_pin_to_timer ? thats for pwm?

When i get blink to work im very happy, then i can look to interrup for my ir-sensor :D
And if that is done, its the servo-motor haha

Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Aug 21, 2009, 02:03 pm
Ive tried to upload the blink with the icsp.
Uploading going fine, but no blink

ive tried pin 0 and 4.
I have put a multimeter on all pins of the tiny, nothing is high

Also i changed the arduino_pins there only 11 usable pins, your have much more, so i changed it to 11 and put it in a nice order, but still does not work
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Aug 22, 2009, 06:45 pm
i have successfully compiled a "blink" for the attiny84 then loaded it with avrdude and an icsp type programmer.

the attiny had only power, ground, the programming pins and a led hooked up.

there is no bootloader used, just the bare ivr.  i was not able to get the ide to do the upload but that may have been my homebrew programmer.  i get the impression that the ide will happily drive a programmer - the bootloader emulates one of the protocols that's used by the programmers.

I also believe there are bootloaders for the attiny's but i don't have one.
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Aug 23, 2009, 02:04 am
Ive got blink working now. Seemskeeping the icsp cable on it didnt work.
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Aug 24, 2009, 12:48 am
Well, ive got my next problem, the external interrupt (INT0)
Seems it doesn't work.
Looking in the corefile (Winterrupts) its disabled.
With the help of the data-sheet I tried to get it back, with no luck.

So i have a request, Seems i only do that  ;D

Can you make like the tiny2313 a clean core file for the tiny84?
With interrupt enabled, and maybe pwm.

Thanks!
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Aug 24, 2009, 01:53 pm
Hi,

sorry for the delay - a lot of work here...

I am working on an integration of the attiny family into the latest Arduino IDE. In the same step I will offer a new Arduino core - a pure attiny84 core with interrupts and pwm instead of bynase for analofWrite()...

Please be patient, this core will be release early in Sept. 09 ( I guess 06.Sep.2009 will be the release date). So stay tuned for updates on www.luminet.cc





Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Aug 24, 2009, 11:06 pm
hey that would be great - thanks for the update.

and, and, a BOOTLOADER!  Can we have a BOOTLOADER?
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Aug 28, 2009, 12:10 am
Well I couldn't wait for you till you released a clean core file...so I have made one  ;D
It was more for the leaning experience, setting timers, interrupts, pwm etc. Much fun.

I have tested most that I could, no guarantee its bug-free in the first time. :D
Its for IDE 0017.
I have the atttiny running @ 8mhz internal xtal.
fuses:
low=0xe2
high=0xdd
extended=0xff

Core file: http://85.12.32.240/~superkoe/arduino/attiny84/attiny84-0.1.zip

extract it in arduino/hardware/cores/
Code: [Select]
##############################################################

attiny84.name=ATtiny84

attiny84.upload.protocol=stk500
attiny84.upload.maximum_size=8192

attiny84.bootloader.low_fuses=0xe2
attiny84.bootloader.high_fuses=0xdd
attiny84.bootloader.extended_fuses=0xff
attiny84.bootloader.path=attiny84

attiny84.build.mcu=attiny84
attiny84.build.f_cpu=8000000L
attiny84.build.core=attiny84

Add this at the end in programmers.txt in hardware.

The pins: (dip14)
Code: [Select]
                    +-\/-+
              VCC  1|    |14  GND
         (D0) PB0  2|    |13  AREF
         (D1) PB1  3|    |12  PA1 (D9)
            RESET  4|    |11  PA2 (D8)
INT0  PWM (D2) PB2  5|    |10  PA3 (D7)
     PWM (D3) PA7  6|    |9   PA4 (D6)
     PWM (D4) PA6  7|    |8   PA5 (D5) PWM
                    +----+

The PA ports are also analog inputs. so PA0 = 0 and PA7 = 7
The INT0 is the Interrupt port.(there is only 1)
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Aug 28, 2009, 12:40 am
could you post the core file in zip or plaintext and could you explain it or explain how to understand it?  That's a lot to ask i'm sure but people would appreciate it I bet.
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Aug 28, 2009, 01:23 am
I also added a zipfile.

How do you mean how it works?
The software changes is a bit difficulty to tell, its not very much, but then again it is. The datasheet is large, and allot of registers are named else or work different, or don't even exist.

And the rest,  mine does not have a bootloader, so you have to upload your sketch with a ICSP device.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Aug 28, 2009, 03:32 am
Great work, thank you very much.
I did not test it yet, but sounds great.

So the attiny works with 0017 out of the box? No modifications to the IDE??
Title: Re: LumiNet (based on attiny84)
Post by: Ro-Bot-X on Aug 28, 2009, 05:01 am
Wow, I'm impressed! I am trying to do the same for tiny861. I got the pins, the interrupts, but got stuck at timers, they are completely different and I don't understand how to set them. And I still haven't checked the analog. Can you let me know what should I look for and where to make the changes?

Thanks.

Here are the pins:
Code: [Select]
// ATMEL ATTINY861
//
//                +-\/-+
// SDA  (D 0) PB0  1|    |20  PA0 (D14)  A0
// OC1A (D 1) PB1  2|    |19  PA1 (D13)  A1
// SCL  (D 2) PB2  3|    |18  PA2 (D12)  A2  Int1
// OC1B (D 3) PB3  4|    |17  PA3 (D11)      Aref
//            VCC  5|    |16  AGND
//            GND  6|    |15  AVCC
// Xtal (D 4) PB4  7|    |14  PA4 (D10)  A3
// Xtal (D 5) PB5  8|    |13  PA5 (D 9)  A4
// Int0 (D 6) PB6  9|    |12  PA6 (D 8)  A5
// Reset      PB7 10|    |11  PA7 (D 7)  A6
//                +----+
//

Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Aug 28, 2009, 12:01 pm
Quote
Great work, thank you very much.
I did not test it yet, but sounds great.

So the attiny works with 0017 out of the box? No modifications to the IDE??


Yes, default 0017. Of course there is no bitbang in it, its just a core file.
Some library wont work, but that no issue i guess. Also I couldn't get softserial to work. So I think ill take your serial COMasm.s to implement a Serial. I guess yours does work. Do you have a formula to calculate the uart_delay? Or a nice table, so I can implement some more speeds @ 8Mhz

Also I noticed I shouldn't use the AREF pin as a digital pin, my led connected to it is gone in the smoke  ::) seems D10 always have 5v to it, with no 20ma current limit, deadly for a led.

So i hope today ill put a new core out.

Quote
Wow, I'm impressed! I am trying to do the same for tiny861. I got the pins, the interrupts, but got stuck at timers, they are completely different and I don't understand how to set them. And I still haven't checked the analog. Can you let me know what should I look for and where to make the changes?

Thanks.

Here are the pins:


Well, looking at the datasheet, the timers have more options, with a TCCRxC D and E. I would suggest to get a the timer in a same setting as the atmega168, How? i don't know, I'm a rookie as well ;).
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Aug 28, 2009, 02:18 pm
Oke There will be no serial in it, I don't get it to work, I've got like 1000 compiler errors. Maybe bohne can find some time to add serial support.
(I think it has to do that the default IDE not compiling ASM files?)

The core file is updated, removing the AREF pin
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Aug 29, 2009, 12:01 am
Yes, the IDE does not compile the .S file...
I will have a look at this soon. The "old" modified IDE of course supports .S files, so maybe try your new core with the modified 0014 IDE from the luminet homepage...
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Aug 30, 2009, 10:58 pm
I modified Arduino0017. Everything seems to work, including:
- timers
- pwm
- interrupts (INT0)
- pin change interrupts (PCINT0..PCINT11)
- software serial

I will test the code for one more day and will release the binaries on Tuesday.
What do you use: Windows or Mac OS X?
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Aug 30, 2009, 11:42 pm
More details about the pin change interrupts:
You can use any pin of the attiny84 to generate a pin change interrupt!
The new functions are called attachPCInterrupt(..) and detachPCInterrupt(..) and the behave the same as the original attachInterrupt(..) and detacthInterrupt(..) functions. Beware of the parameters (see below in wiring.h)!!!

I did not test the functions in detail and I recommend to only use one PCINT pin at a time, but the code should enpower you to use all pins of the attiny for pin change interrupts...

Here is a basic sketch:
Code: [Select]

int pin = 13;
volatile int state = LOW;

void setup()
{
 pinMode(pin, OUTPUT);
 attachPCInterrupt(0, blink);
}

void loop()
{
 digitalWrite(pin, state);
}

void blink()
{
 state = !state;
}


And here is what I did:

in wiring.h I added these two lines:
Code: [Select]

void attachPCInterrupt(uint8_t, void (*)(void));
void detachPCInterrupt(uint8_t);


and the of course the modified WInterrupts.c:

Code: [Select]

/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */

/*
 Part of the Wiring project - http://wiring.uniandes.edu.co

 Copyright (c) 2004-05 Hernando Barragan

 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
 version 2.1 of the License, or (at your option) any later version.

 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General
 Public License along with this library; if not, write to the
 Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 Boston, MA  02111-1307  USA
 
 Modified 24 November 2006 by David A. Mellis
 
 modified for Atmel ATTiny84 mcu by RenÈ Bohne
*/

#include <inttypes.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include <stdio.h>

#include "WConstants.h"
#include "wiring_private.h"

volatile static voidFuncPtr intFunc[EXTERNAL_NUM_INTERRUPTS];
// volatile static voidFuncPtr twiIntFunc;
volatile static voidFuncPtr intPCFunc[12];

#define EICRA MCUCR
#define EIMSK GIMSK

volatile uint8_t last_a = 0;
volatile uint8_t last_b = 0;


void attachInterrupt(uint8_t interruptNum, void (*userFunc)(void), int mode)
{
     if(interruptNum < EXTERNAL_NUM_INTERRUPTS)
     {
   intFunc[interruptNum] = userFunc;
   
   if (interruptNum == 0)
     {
     // Configure the interrupt mode (trigger on low input, any change, rising
     // edge, or falling edge).  The mode constants were chosen to correspond
     // to the configuration bits in the hardware register, so we simply shift
     // the mode into place.
     EICRA = (EICRA & ~((1 << ISC00) | (1 << ISC01))) | (mode << ISC00);
     
     // Enable the interrupt.
     EIMSK |= (1 << INT0);
   }
   
 }
}

void detachInterrupt(uint8_t interruptNum)
{
     if(interruptNum < EXTERNAL_NUM_INTERRUPTS) {
   if (interruptNum == 0)
     {
     // Disable the interrupt.
     EIMSK &= ~(1 << INT0);
     intFunc[interruptNum] = 0;
     }
 }
}


void attachPCInterrupt(uint8_t interruptNum, void (*userFunc)(void))
{
           intPCFunc[interruptNum] = userFunc;
           
           if (interruptNum < 8)
           {
                 GIMSK |= (1 << PCIE0);
                 PCMSK0 |= (1 << interruptNum);
           }
           else
           {
                 GIMSK |= (1 << PCIE1);
                 PCMSK1 |= (1 << (interruptNum-8));
           }
}

void detachPCInterrupt(uint8_t interruptNum)
{
     intPCFunc[interruptNum] = 0;

     if (interruptNum < 8)
     {
           PCMSK0 &= ~(1 << interruptNum);
     }
     else
     {
           PCMSK1 &= ~(1 << (interruptNum-8));
     }
}



/*
void attachInterruptTwi(void (*userFunc)(void) ) {
 twiIntFunc = userFunc;
}
*/

SIGNAL(INT0_vect)
{
 if(intFunc[EXTERNAL_INT_0])
 {
       intFunc[EXTERNAL_INT_0]();
 }
}



SIGNAL(PCINT0_vect)
{
     uint8_t z;
     uint8_t a = PINA;
     for(z=0;z<8;z++)
     {
           if( (a & (1<<z)) != (last_a & (1<<z)))
           {
              if(intPCFunc[z])
              {
                  intPCFunc[z]();
              }
           }
     }
     last_a = a;
}
             
             
SIGNAL(PCINT1_vect)
{
     uint8_t z;
     uint8_t b = PINB;
     for(z=0;z<4;z++)
     {
           if( (b & (1<<z)) != (last_b & (1<<z)))
           {
                 if(intPCFunc[z+8])
                 {
                       intPCFunc[z+8]();
                 }
           }
     }
     last_b = b;
}

/*
SIGNAL(SIG_2WIRE_SERIAL) {
 if(twiIntFunc)
   twiIntFunc();
}
*/
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Aug 31, 2009, 01:36 am
That's great - thank you very much.
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Aug 31, 2009, 03:29 pm
Where you able to use some of my core, or did you redo everything?
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Aug 31, 2009, 03:41 pm
I used my luminet core, the attiny2313 core and the latest arduino core and created a new one from those three. I did this because I wanted to use the same pin mapping as I did before.

Before I upload the release tomorrow, I will check if there is something in your core that I might have missed.
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Sep 04, 2009, 03:34 pm
I noticed that my 16 bit timers are not working. Even tho they are configured the same as a at168. So im excitingly waiting for your release.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Sep 04, 2009, 06:58 pm
sorry for the delay, some problems with the assembler support... hope to have it stable next week
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Sep 11, 2009, 04:38 am
ok, no new release this month. But I am working on including the patches into the official IDE right now. So I hope that you don't need a modified IDE anymore to run your attiny boards.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Sep 14, 2009, 06:59 pm
I created the patches for Arduino0017. Please download them and patch your Arduino0017 IDE (you must apply the patches to the source files and then recompile your IDE) and give me feedback if everything works... what should work:
- attiny support in Arduin0017
- assembly language .S file support

Download (http://hci.rwth-aachen.de/tiki-download_wiki_attachment.php?attId=794&page=luminet)
Title: Re: LumiNet (based on attiny84)
Post by: Ro-Bot-X on Sep 21, 2009, 02:19 am
Ok, I give up. I don't understand how to make the changes to the timers. And to make it worse, I have tried to compile a simple sketch to test the TWI for tiny2313. It does not work, it gives me an error: "D:\Arduino-0017\hardware\libraries\Wire\utility\twi.c:339: error: 'TWDR' undeclared (first use in this function)". I looked at the twi.c file and compare it to the datasheet for tiny2313 and mega168. They have different registers. And to make it worse, tiny2313 has less registers and the contents are different. I don't know enough to make it work. Same thing with the timers for tiny861. And also tiny861 and tiny84/85 have the same USI registers as tiny2313 instead of TWI registers.

Bohne, please, can you take a look if TWI can be made to work with the tiny family? And if it's not so difficult for you, can you please take a look at the timers setup for 861? I will be eternally grateful!!!

Thank you very much for your efforts!

P.S. I must be stupid or something, I don't know how to patch up those files (I have win xp)...
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Sep 23, 2009, 02:10 am
Sorry for answering this late, but I have a lot to do at the moment. I will have a look at TWI for attiny2313 next week (when I return from atoms&bits, Berlin). Sorry for the delay...
Title: Re: LumiNet (based on attiny84)
Post by: Ro-Bot-X on Oct 01, 2009, 06:33 am
Bohne, thank you for your efforts, I've got a library and I've mod it to work. Thake a look at this post: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1254371365/0#0
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Oct 01, 2009, 12:17 pm
great, thank you very much for keeping care of this. So I don't have to look at TWI right now?
Title: Re: LumiNet (based on attiny84)
Post by: Ro-Bot-X on Oct 03, 2009, 10:16 pm
Quote
I created the patches for Arduino0017. Please download them and patch your Arduino0017 IDE (you must apply the patches to the source files and then recompile your IDE) and give me feedback if everything works... what should work:
- attiny support in Arduin0017
- assembly language .S file support


Can you let me know how to do this? I can't compile for tiny861, it gives me an error: can't find part m861... I guess it should be t861, but I have no idea where to find the code that does the substitution and correct it.

Thank you very much!
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Oct 05, 2009, 12:01 am
you have to download the patches that I offer for download in reply #110 of this thread.
then you have to build the arduino ide from your command line. If you don't know how to do it then maybe you should wait for Arduino0018 or have a look at this document:
http://code.google.com/p/arduino/source/browse/trunk/build/howto.txt

Title: Re: LumiNet (based on attiny84)
Post by: salahaddam on Oct 06, 2009, 03:39 am
What a great thing, Arduino on a tiny chip is just what I've been looking for!
I've been using  picaxe 14Ms on my tiny robots instead of Arduino to save physical space, but programming in basic is no fun and I'm always out of memory just when things get interesting. The 18X is way too expensive ($8.50). Futurelec has attiny2313s just over $1.

I don't mean to sound clueless, but I am wanting to use an attiny2313 with the modified arduino IDE and have a few questions.

Don't I need a bootloader for the attiny2313? If so, is this available somewhere?

I downloaded the latest modified A. IDE and the attiny2313 is not listed in the boards menu. I did get the core files and placed the files in the core folder. Do these need compiling?

I've built my own simple parallel programmer for the A. will this work for my attiny2313?
I am using the Freeduino to program my Arduino, will this work fine with the attiny2313, assuming pins rearranged?

Is there anything I am missing?

Thanks,
Adam
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Oct 06, 2009, 04:28 am
You can't use a bootloader on the attiny2313 because noone wrote one that is Arduino compatible yet.

Download the modified Arduino IDE from www.luminet.cc
Download the file attiny2313_core.zip (http://hci.rwth-aachen.de/tiki-download_wiki_attachment.php?attId=769&page=luminet)
and extract it to a subfolder of the hardware/cores directory. The subdirectory must be called "attiny2313".

Then add these lines to the board.txt in the hardware directory:
Code: [Select]

##############################################################
tiny2313.name= tiny2313 based board (8MHz ext. crystal)


tiny2313.upload.protocol=stk500v2
###tiny2313.upload.protocol=siprog
tiny2313.upload.maximum_size=2048
###tiny2313.upload.speed=9600
tiny2313.upload.verbose = 1;

tiny2313.bootloader.low_fuses=0xEE
tiny2313.bootloader.high_fuses=0xDF
tiny2313.bootloader.extended_fuses=0xFE

tiny2313.build.mcu=attiny2313
tiny2313.build.f_cpu=8000000L
tiny2313.build.core=attiny2313


The core uses 8MHz, so please use an external 8MHz clock source.

You can use your parallel programmer; just change the line
Code: [Select]

tiny2313.upload.protocol=stk500v2

to the programmer of you choice.
you could try stk200 instead of stk500v2

to get a list with other valid values: type
Code: [Select]

avrdude -c ?

on the command shell of your computer.






Title: Re: LumiNet (based on attiny84)
Post by: salahaddam on Oct 08, 2009, 04:18 am
Wow, great advice and quickly. I am looking forward to getting my attiny chips in the mail and want to be up to speed before they arrive.

I think the attiny2313 has an internal 8MHz oscillator, can I use this? I think this is the default fuse setting.

Thanks,
Adam
Title: Re: LumiNet (based on attiny84)
Post by: trialex on Oct 08, 2009, 04:26 am
Hey guys.

i've been working on a 2313 devlopment board. Details are here: http://forums.adafruit.com/viewtopic.php?f=24&t=12912

Anyone interested in sharing the cost of a PCB run? It'd be like $5 each PCB plus postage from australia to wherever you are.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Oct 09, 2009, 02:02 am
you can use the internal 8MHz clock (default: 1MHz I guess, because CLKDIV is set...) but for any timing function like serial communication or even delay() you should be sure that your clock runs at the right speed...
Title: Re: LumiNet (based on attiny84)
Post by: salahaddam on Oct 09, 2009, 02:53 am
Thanks,

I am using a homemade parallel programmer.
Do I need different hardware to set fuse bits.

I want to use this board config: Fuse bits set 8MHz internal with no Divide by 8.

##############################################################
ADAMtiny2313.name= ADAM tiny2313 based board (8MHz ext. crystal) PARALLEL PROGRAMMER

### ADAM - moded upload protocol to use parallel programmer
ADAMtiny2313.upload.protocol=dapa
###ADAMtiny2313.upload.protocol=siprog
ADAMtiny2313.upload.maximum_size=2048
###ADAMtiny2313.upload.speed=9600
ADAMtiny2313.upload.verbose = 1;

### ADAM - Moded fuses
ADAMtiny2313.bootloader.low_fuses=0xE4
ADAMtiny2313.bootloader.high_fuses=0xDF
ADAMtiny2313.bootloader.extended_fuses=0xFF

ADAMtiny2313.build.mcu=attiny2313
ADAMtiny2313.build.f_cpu=8000000L
ADAMtiny2313.build.core=attiny2313

Does this look like it makes sense?
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Oct 09, 2009, 09:07 am
Add you programmer to the programmers.txt file in the hardware directory. I am not sure how to select the parallel port in this file, but it is possible I guess... otherwise it would be a good idea to upgrade to any of the programmers listed in programmers.txt

I did not verify your fuse settings, but if they are correct you can start the modified Arduino IDE and select your programmer in the tools menu (burn bootloader submenu). You an then hit CTRL+b to burn the bootloader to the chip. This step also sets the fuse bits that you specified in the board.txt so you don't need different hardware to set the fuse bits.

If you can't use the parallel programmer with the IDE we will find a solution to set the fuse bits with avrdude by hand.
Title: Re: LumiNet (based on attiny84)
Post by: Ro-Bot-X on Oct 10, 2009, 01:23 pm
I have played with tiny2313 in Arduino, it has too small flash size to fit a more serious program. Especially if you need to debug or use serial. I would suggest test out your code on a regular board and then try to fit it in the tiny2313. No space for bootloader I'm afraid. If you need a bootloader, try one of the tiny84, 85 or 861 chips. I also had trouble uploading the hex file to my tiny from Arduino, so I had to use the command line to do it.

I have set the fuses on my tiny from AVR Studio before I started to upload code to it.
Title: Re: LumiNet (based on attiny84)
Post by: salahaddam on Oct 11, 2009, 03:40 am
Danke Bohne & Ro-Bot-X,

I have been starting to realise the limitations of the 2313.
When I have compiled a couple of small programs, the hex files go over 2k quick. Looks like the 84 is a better choice for my robots.

I have been building hardwired/BEAM bots for a while and recently have built a walking robot (with 5 servos, IR object detection, Sound sensor, Piezo sound and Light sensors) with the Arduino and a couple with the Picaxe 14M. Looking for something which falls in between for size, memory and cost.

All of my robots so far fit in the palm of your hand and can be built for less than $25 and I want to keep them that way for now, but make them more and more complicated.

http://robots.stonepile.org

I've found this forum to be a great source of info.

Thanksagain,
Adam
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Oct 11, 2009, 05:02 am
I reccomend the attiny84, but check prices... you might get an atmega168 at the same price...

The LumiNet nodes use attiny84 mcus. It has a small footprint and might be a good platform for robots.
Title: Re: LumiNet (based on attiny84)
Post by: borref on Oct 12, 2009, 02:24 pm
I briefly tested the prebuilt Windows IDE to see if it would allow me to develop for the ATtiny85. For test purposes - I modified the Blink sketch (to bring led pin into range) and added a new board definition. The core functions used are "pinMode, digitalWrite and delay". Verify however failed when compiling "COMAsm.S". I sort of concluded that the core is Luminet specific to the extent that a rewrite is needed for ATtiny85 support. Is this to be expected and if so - is there any work in progress to add support also for the ATtiny85?

I also noticed in the board definitions that baudrare is set to 115000 rather than the more standard 115200. Is this intentional (e.g. to get a better baudrate match between board and programmer)?
Title: Re: LumiNet (based on attiny84)
Post by: tournedos on Oct 13, 2009, 11:03 am
If we are allowed to vote, I would also like to see tiny85 supported  :)
It's ummhh... tiny, cheap and still has a useful amount of flash...
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Oct 13, 2009, 02:48 pm
you can remove all COM files like e.g. COMasm.S etc if you don't want to port them to your attiny85 platform.

These files are only used for my software UART implementation. If you don't need software UART then you can skip the COM files.

If you need UART support then you must change the pins in the COM files I guess, because the attiny85 has less pins than the attiny84. There is no attiny85 core with UART support yet. I will try to create some attiny cores soon but I am still working on the source code for the official release...  

I guess we will have support for attiny2313, attinz84 and attiny85 by the end of this year.
Title: Re: LumiNet (based on attiny84)
Post by: tournedos on Oct 13, 2009, 06:56 pm
Sorry, I may be daft, but did you have precompiled 0017 binaries with tiny84 support somewhere?

I tried www.luminet.cc, but the only binary package I can see is from May and contains Arduino-0014...
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Oct 13, 2009, 08:19 pm
I have a local copy of 0017 with attiny support. But I can't release it. What feature of 0017 are you missing? 0014 is a great release for attiny projects... So please wait for 0018 or 0019.

If I release a new version I will post a message here in this thread.
Title: Re: LumiNet (based on attiny84)
Post by: tournedos on Oct 13, 2009, 09:06 pm
I'm sure it would be OK, I used 0012 myself for everything "normal" until just recently. The problem with the 0014 version is that it won't work on my computer - when I select the target board (Luminet Sensor Node), it apparently tries to recompile the libraries and that dies in errors:

utility\w5100.c: In function 'IINCHIP_WRITE':
utility\w5100.c:112: error: 'SPCR' undeclared (first use in this function)

....and so on. I tried to remove the Ethernet library source, but that didn't get much further.

Oh well, I guess I can wait for a later release if it will be built in then. Thanks  :)
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Nov 05, 2009, 04:59 pm
assembler support and attiny support are included in Arduino 0018. Just wait for the release if you don't need programming by infection.

So it will be possible to use attiny-based Arduino clones with the next official release!

If you want to use the programming by infection bootloader or if you need to use the FTDI BitBang hack then you will still need to download my modified IDE based on Arduino 0014.
Title: Re: LumiNet (based on attiny84)
Post by: Ro-Bot-X on Nov 06, 2009, 01:55 am
OK, and when will version 18 be released?

On the other hand, because I had so much trouble using the tinys, I have designed a multipurpose configurable board based on mega168/328 that I can use for any kind of modules I need to build, instead of designing a special board based on different tinys for each module. I'm not sure if my project evolved on the proper direction because of this, but hey, it didn't stop.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Nov 06, 2009, 02:24 am
there is nothing wrong with using atmegas :)

I am not sure when 0018 will be released. I hope it will be released by the end of this year or even sooner...
Title: Re: LumiNet (based on attiny84)
Post by: Ro-Bot-X on Nov 06, 2009, 12:59 pm
Quote
there is nothing wrong with using atmegas


I use DIP chips so a 28 pin part is way too big for some modules, especially that I use less than half of the pins.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Nov 15, 2009, 02:59 am
so which chip would be perfect for your project?
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Dec 21, 2009, 03:25 am
Hi Rene: I hope you're still reading this thread.

I'm back to playing with my attiny84s and i got the pc interrupt stuff working i think.

I have a question about initialization: Is there anything getting included that would tun before my sketch does for 5 or 10 seconds?  It seems like IC pin 3 (digital pin 2) gets held high for 5 seconds or so and IC pin 2 seems to freeze the thing entirely if i have a led on it in the first few seconds.

still eagerly awaiting 0018.
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Dec 21, 2009, 03:44 am
ok found it.  In main.cxxx there's a call to topology_scan() that seemed to be doing the odd behaviours.  presumably made for the luminet configuration.  I had foolishly thought the sensor node boards were pretty much standalone.

Looking at google code it seems that 0018 will make it EASIER to include new hardware but mayb not directly support for the tiny's - is that right?

If we're going to have add-on attiny support we should talk about pin assignments etc.
Title: Re: LumiNet (based on attiny84)
Post by: axiomshift on Feb 02, 2010, 01:02 pm
Hi, I've just downloaded version 018 and would like to program a attiny2313 with it. But I'm also very new to this whole programming thing. I've some projects I'd like to use on the smaller 2313 but I get an error message when compiling;


Quote
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr25/crttn2313.o:(.init9+0x0): undefined reference to `main'


I've copied the attiny2313 folder into hardware/cores and that's as far as I've gotten. Every program I try to upload gives me the same error can someone help me?
Thanks
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Feb 02, 2010, 03:51 pm
did you make a new entry in boards.txt?

here's mine for an attiny84 setup:
Code: [Select]
##############################################################

attiny84.name=ATtiny84

attiny84.upload.protocol=stk500
attiny84.upload.maximum_size=8192

attiny84.bootloader.low_fuses=0xe2
attiny84.bootloader.high_fuses=0xdd
attiny84.bootloader.extended_fuses=0xff
attiny84.bootloader.path=attiny84

attiny84.build.mcu=attiny84
attiny84.build.f_cpu=1000000L
attiny84.build.core=attiny84


the 0018 doc talks about mirroring the hardware folders in the sketchbook but doesn't give any details.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Feb 02, 2010, 04:14 pm
I did not try 0018 yet... but I will have a look at it soon
Title: Re: LumiNet (based on attiny84)
Post by: axiomshift on Feb 04, 2010, 03:58 pm
Thanks Bill, I did make the new entry and I've gotten a step further! I found that "main.cxx" should be "main.cpp". I can now compile while attiny2313 is selected. But now I can't burn the bootloader (I'm using the arduino as an ISP programmer). I get an error that says something about cannot write to "null" (should've copied it but I forgot   ) I remember reading that the 2313's are a bit limited in regards to a bootloader but also don't remember exactly....

Bohne,I've read your diplomarbeit on Luminet and i know you got this all to work using your modified IDE, but I get a java error when I try to run it. I'd really like to use this as a basis for another project but first I have to get this up and running
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Feb 04, 2010, 05:05 pm
You can't run my modified (Arduino0014) IDE?
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Feb 04, 2010, 06:09 pm
glad you got it working.  There ARE bootloaders for the 2313 - poke around on avrfreaks and you'll find some.  I don't know whether you could get the ide to burn one or to load a sketch with it. obviously the small sioze of the 213's flash is a bit of an issue.

My greatest success with the attiny's has been compiling with the ide (either bohne's or the standard) then burning the sketch with a programmer rather than a bootloader.  I have used attiny84's which don't have hardware serial so this is probably the only practical approach for me.
Title: Re: LumiNet (based on attiny84)
Post by: axiomshift on Feb 05, 2010, 12:29 pm
Bohne, I get a Java error that says "uncaught exception in main method: java.langUnsatisfiedLinkError:...."

and now back to 0018: this is my current error message when I try to burn the bootloader:
[/quote]avrdude: invalid byte value (null) specified for immediate mode
avrdude: write to file 'null' failed[/quote]
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Feb 05, 2010, 03:51 pm
Quote
avrdude: invalid byte value (null) specified for immediate mode
avrdude: write to file 'null' failed


I don't believe the IDE has access to a bootloader that will run on the 2313.  jf you loook at one of the mainstream boards.txt entries it gives the path and file name for the bootloader.  You would have to find such a loader, put it somewhere in the bootloader directory, and point to it with your boards.txt.

Can I ask why you want the bootloader?  If you have a programmer why not use that to load the sketch?  It works fine and saves space in the flash.
Title: Re: LumiNet (based on attiny84)
Post by: axiomshift on Feb 05, 2010, 04:54 pm
I'm trying to do that with the arduino as a programmer and there I get this and it never finishes uploading:
Quote
java.lang.NumberFormatException: null
     at java.lang.Integer.parseInt(Integer.java:415)
     at java.lang.Integer.parseInt(Integer.java:497)
     at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:76)
     at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:55)
     at processing.app.Sketch.upload(Sketch.java:1498)
     at processing.app.Sketch.exportApplet(Sketch.java:1465)
     at processing.app.Sketch.exportApplet(Sketch.java:1420)
     at processing.app.Editor$46.run(Editor.java:2219)
     at java.lang.Thread.run(Thread.java:613)

and I am a total newbie, so I don't quite understand what I'm doing.. it may be some silly little mistake.
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Feb 05, 2010, 05:47 pm
could you post your boards.txt entry and a picture, diagram, or good description of your hardware and connections please.
Title: Re: LumiNet (based on attiny84)
Post by: Sean on Feb 08, 2010, 12:21 am
Aruino-0018 has just been released... ;)
Title: Re: LumiNet (based on attiny84)
Post by: axiomshift on Feb 08, 2010, 01:45 pm
Ok, Bohne, I'm running your IDE in 32 bit mode now so the "unsigned long" error is gone but now I'm getting this:
Quote
uncaught exception in main method: java.lang.NumberFormatException: null


Bill, here's my setup:
MacBook osx10.5.8
Arduino 0018
Arduino Duemilanove as ISP
using the program provided in 0018

here's my boards entry for the 2313, I've tried it with and without the bootloader and still get the same error.

Code: [Select]
tiny2313.name= tiny2313 based board (8MHz ext. crystal)


tiny2313.upload.protocol=stk500v2
###tiny2313.upload.protocol=siprog
tiny2313.upload.maximum_size=2048
###tiny2313.upload.speed=9600


tiny2313.bootloader.low_fuses=0xEE
tiny2313.bootloader.high_fuses=0xDF
atmega8.bootloader.path=tn2313bl
atmega8.bootloader.file= tn2313bl.hex
tiny2313.bootloader.extended_fuses=0xFE


tiny2313.build.mcu=attiny2313
tiny2313.build.f_cpu=8000000L
tiny2313.build.core=attiny2313



Thanks for all the help!
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Feb 08, 2010, 01:50 pm
Quote

Arduino Duemilanove as ISP


can you explain, how you use the Arduino as ISP?
Title: Re: LumiNet (based on attiny84)
Post by: axiomshift on Feb 08, 2010, 02:01 pm
Mega isp that comes in the 0018 IDE.
Title: Re: LumiNet (based on attiny84)
Post by: Arnonh on Feb 08, 2010, 02:04 pm
its in the Tutorial pages and the sketch is included in version 18
http://arduino.cc/en/Tutorial/ArduinoISP
Title: Re: LumiNet (based on attiny84)
Post by: axiomshift on Feb 08, 2010, 02:14 pm
Yo, That's what I've been trying but with a breadboarded 2313 complete with crystal and everything. From what I'm seeing, I can only us this to burn the bootloader onto an arduino? which is where you're ide comes in =) but I can't get that to work...
Title: Re: LumiNet (based on attiny84)
Post by: Arnonh on Feb 08, 2010, 02:31 pm
From reading the code it should work with Attiny on a breadboard
and an Arduino as a programmer
But i didn't try it my self because i don't have any Attiny at hand
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Feb 08, 2010, 03:28 pm
Quote

tiny2313.upload.protocol=stk500v2

does the mega ISP support stk500v2?

maybe change it to stk500, so:
Quote

tiny2313.upload.protocol=stk500

Title: Re: LumiNet (based on attiny84)
Post by: axiomshift on Feb 09, 2010, 03:01 pm
Ok, took off the v2 and I'm stil getting the same error
Here is the bootloader error
Quote

avrdude: invalid byte value (null) specified for immediate mode
avrdude: write to file 'null' failed

and here's what happens when I try to upload "Blink"
Quote
java.lang.NumberFormatException: null
    at java.lang.Integer.parseInt(Integer.java:415)
    at java.lang.Integer.parseInt(Integer.java:497)
    at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:76
)
    at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java
:55)
    at processing.app.Sketch.upload(Sketch.java:1498)
    at processing.app.Sketch.exportApplet(Sketch.java:1465)
    at processing.app.Sketch.exportApplet(Sketch.java:1420)
    at processing.app.Editor$46.run(Editor.java:2219)
    at java.lang.Thread.run(Thread.java:613)


... I might try bootloading a atmega to see if that works....
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Feb 09, 2010, 03:58 pm
still not clear to me how this is all connected.  
Title: Re: LumiNet (based on attiny84)
Post by: axiomshift on Feb 09, 2010, 04:11 pm
ok, maybe it's time to get a real programmer...
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Feb 09, 2010, 05:32 pm
my best results programming the tiny's has been using avrdude from the command line and an arduino with avrisp as the programmer.  I couldn't get that combination to work thru the ide but avrdude direct worked fine.
Title: Re: LumiNet (based on attiny84)
Post by: axiomshift on Feb 09, 2010, 06:10 pm
cool, do you know of any tutorials I could read?
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Feb 09, 2010, 06:16 pm
tiny2313.upload.speed=9600
should be set to the right value and not commented out... I don't know the mega ISP from Arduino0018, but the IDE needs the upload.speed information.

and the bootloader is not specified... you write atmega8 instead of tiny2313...

So to sum it up: use this boards.txt entry:
Code: [Select]

tiny2313.name= tiny2313 based board (8MHz ext. crystal)


tiny2313.upload.protocol=stk500
tiny2313.upload.maximum_size=2048
tiny2313.upload.speed=9600
tiny2313.bootloader.low_fuses=0xEE
tiny2313.bootloader.high_fuses=0xDF
tiny2313.bootloader.path=tn2313bl
tiny2313.bootloader.file= tn2313bl.hex
tiny2313.bootloader.extended_fuses=0xFE
tiny2313.build.mcu=attiny2313
tiny2313.build.f_cpu=8000000L
tiny2313.build.core=attiny2313

and of course: make sure you have the files in the right directories (e.g. tn2313bl)
Title: Re: LumiNet (based on attiny84)
Post by: axiomshift on Feb 09, 2010, 06:25 pm
Wicked! I'll give it a go asap. Vielen Dank Bohne=)
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Feb 09, 2010, 06:31 pm
I will release a new attiny2313 core soon, nobody told me that main.cxx changed to main.cpp and that you have to  #include <WProgram.h>...
but I will keep my Arduino0014 IDE available online as well :)
Title: Re: LumiNet (based on attiny84)
Post by: axiomshift on Feb 09, 2010, 06:37 pm
Also great! do you have any insights to the java errors I've been getting with your IDE?
Quote
uncaught exception in main method: java.lang.NumberFormatException: null

Title: Re: LumiNet (based on attiny84)
Post by: bohne on Feb 09, 2010, 06:41 pm
I thing that the upload.speed was the problem with my IDE as well... the error from 0018 was clear to me because the .java file was specified and the line number of the exception...
Title: Re: LumiNet (based on attiny84)
Post by: Arnonh on Feb 09, 2010, 10:08 pm
I think the speed should be 19200
and the protocol stk500v1

Title: Re: LumiNet (based on attiny84)
Post by: axiomshift on Feb 11, 2010, 11:37 am
IT works! Speed does need to be 19200, but protocol stays stk500. I took out the bootloader because of space issues, the 2313 is really small. I am having issued with everything running slow. The millis are definetly way off. I'll try a new crystal or resonator and see if that helps (the one I'm using now is recycled from a burnt out MIDI controller =) ) I would also like to try using the internal oscilator. Can anyone help me with that?
Title: Re: LumiNet (based on attiny84)
Post by: bdodds on Feb 14, 2010, 12:53 am
Ok, I have been reading over this tread for the last hour+ becase I'm interested in programing an ATiniy85 with the Arduino IDE.  
I'm still VERY NEW to programing and don't understand how to program AVRs outside Arduino yet (if ever it so complicated).

I built a breadboard Arduino equivalent with an ATMega168 and loaded the Arduino Boot-loader.  
I have created a simple program that fades an RGB Led though all the rainbow colors working on my breadboard Arduino,
but have tryed in vain for the past week to get the same results working on an ATtiny85...  

:(

Then I found this thread and my hopes have been revived that it may still be possible.
I upgraded to Arduino 018 (Mac Version), but I can't find any info in 018 on support for any of the ATtiny chips talked about in this thread...   Help?

I'm trying to build a very small night light for my wife for Valentines day and the ATmega168 is too large.  The 8pin ATtiny85 is the perfect size.

I have a USBtinyISP programer and an FT232RL USB to Serial breakout board that I got From SparkFun.

Thanks in advance for any help.  :)
Title: Re: LumiNet (based on attiny84)
Post by: ArchiCroc on Feb 18, 2010, 12:50 am
Where can I find the example sketches for the Luminet? I searched through the luminet site and downloaded the Luminet GUI but I don't see them. Thanks!
Title: Re: LumiNet (based on attiny84)
Post by: bdodds on Feb 26, 2010, 03:27 am
Is there info posted someplace that I can't seam to find on how to get ATtiny85 support in the Arduino 018 IDE?   PLEASE!!!  
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Feb 26, 2010, 07:12 am
I googled for you guys... try this if you need to use a mac and want to use my IDE: http://arduino.cc/en/Guide/Troubleshooting#macupdate

Arduino0018 is working ok with the tiny2313 core, did not try LumiNet with it... I will continue to use my modified Arduino0014 IDE with LumiNet, because it includes a special "programming by infection" bootloader that is not supported by the official Arduino IDEs.

attiny85 support: use my modified IDE and create (copy LumiNet core) a new core. Then edit the pins_arduino.c file and maybe some others and it should run. Some more details on how to create a new Arduino core are described in my thesis on luminet.cc

I will add the luminet examples there soon... please ask again next week.

Title: Re: LumiNet (based on attiny84)
Post by: bdodds on Feb 26, 2010, 10:17 am
Thanks for the reply, I found and tried the "Open in 32 Bit Mode checkbox" Java fix with your modified Arduino0014 IDE before I posted the first time here, and it did not solve the error for me... That is why when I read that 018 may have support, I start looking at 0018 as an option since it runs without error...

I will have a look at you thesis.  I'm hoping the process of making the needed changes is not way over my head since I have only been playing with programing for about 2 months...

Thanks for your time.

P.S.  The error I get when in 32 bid mode is "Uncaught exception in main method: java.lang.NumberFormatException: null"
Title: Re: LumiNet (based on attiny84)
Post by: ghostbuster on Mar 04, 2010, 06:23 pm
nice project,  how i can put it in power down mode?  can work on 3v?
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Mar 04, 2010, 07:13 pm
Quote
Arduino0018 is working ok with the tiny2313 core, did not try LumiNet with it...


have you figured out how to put the core in the sketchbook folder?
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Mar 05, 2010, 01:03 am
did not try 0018 yet...

3V is ok...

I explained the sleep function in my diploma thesis... please look it up. I also compare power consumption of LumiNet and Arduino boards there (page 66+67)... here is an example sketch:
Code: [Select]

#include <avr/sleep.h>
void setup()
{
 set_sleep_mode(SLEEP_MODE_PWR_DOWN);
 sleep_enable();
 sleep_mode();
}



and please check your boards.txt if you get the Java exception. I had no problems with my modified IDE on any of our macs in 32bit mode.

Title: Re: LumiNet (based on attiny84)
Post by: bohne on Mar 13, 2010, 02:26 am
For those of you who live in New York or plan to visit NYC in march:
http://www.nycresistor.com/2010/03/10/save-the-date/

you can have a look at the luminet jackets there! I will not be there but save the date!
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Mar 25, 2010, 04:05 pm
modified Arduino0014 (LumiNet edition) throws the following exceptions... I will have a look at it...:

java.lang.UnsatisfiedLinkError: /Applications/Luminet/Arduino.app/Contents/Resources/Java/librxtxSerial.jnilib:  no suitable image found.  Did find:  /Applications/Luminet/Arduino.app/Contents/Resources/Java/librxtxSerial.jnilib: no matching architecture in universal wrapper thrown while loading gnu.io.RXTXCommDriver
[LaunchRunner Error] processing.app.Base.main(String[]) threw an exception:
java.lang.UnsatisfiedLinkError: /Applications/Luminet/Arduino.app/Contents/Resources/Java/librxtxSerial.jnilib:  no suitable image found.  Did find:  /Applications/Luminet/Arduino.app/Contents/Resources/Java/librxtxSerial.jnilib: no matching architecture in universal wrapper
     at java.lang.ClassLoader$NativeLibrary.load(Native Method)
     at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1861)
     at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1778)
     at java.lang.Runtime.loadLibrary0(Runtime.java:823)
     at java.lang.System.loadLibrary(System.java:1045)
     at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
     at processing.app.Editor.populateSerialMenu(Editor.java:928)
     at processing.app.Editor.buildToolsMenu(Editor.java:812)
     at processing.app.Editor.<init>(Editor.java:193)
     at processing.app.Base.<init>(Base.java:149)
     at processing.app.Base.main(Base.java:104)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at apple.launcher.LaunchRunner.run(LaunchRunner.java:115)
     at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
     at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
     at processing.app.Editor.message(Editor.java:2350)
     at processing.app.Editor.doStop(Editor.java:1545)
     at processing.app.Editor.doClose(Editor.java:1575)
     at processing.app.Editor.handleQuitInternal(Editor.java:2155)
     at processing.app.Editor$43.run(Editor.java:2171)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
     at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
     at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Mar 25, 2010, 04:36 pm
so there is no java 5 on my snow leopard installation... and 32bit mode of java6 won't work...

I tried this:
http://xandeuniz.wordpress.com/2009/08/30/believe-or-not-java-32-bits-on-snow-leopard/
but it did not help.

also have a look at this post:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1239162176
Title: Re: LumiNet (based on attiny84)
Post by: brettn on Apr 09, 2010, 11:46 pm
Is there a core available for the ATTiny85 that will work with Arduino 18?  I didn't see one on the Luminet website.  

Brett
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Apr 10, 2010, 12:42 am
not yet. 0018 support is the next point on my list... check again at April 22nd :)
Title: Re: LumiNet (based on attiny84)
Post by: brettn on Apr 10, 2010, 02:47 am
Most excellent...looking forward to it!
Title: Re: LumiNet (based on attiny84)
Post by: bdodds on Apr 10, 2010, 02:53 am
I'm also looking forward to ATiny85 cores.  All attempts at building them my self have failed. I'm just to green at this stuff.
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Apr 10, 2010, 04:07 am
I know it's another toolset to learn but it's fairly easy to program an attiny85 in C code using AVR Studio.  There's an excellent tutorial on avrfreaks.com that introduces avr programming using an attiny85.

you end up needing to use direct port addressing but the tutorial walks you through it and the 85 is so limited that there's really not that much to it.

I think this is what got me started: http://imakeprojects.com/Projects/avr-tutorial/
Title: Re: LumiNet (based on attiny84)
Post by: bdodds on Apr 10, 2010, 04:17 am
Thanks, I will take a look at that link as I wait...   :)
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Apr 10, 2010, 04:28 am
which functions do you need? What kind of project do you want to build? If you only need digitalRead() and digitalWrite() then I can provide a pre-release very soon.
Title: Re: LumiNet (based on attiny84)
Post by: brettn on Apr 10, 2010, 05:48 am
For my first application for the ATtiny85 I'm building a connected set of pushbutton boxes with buzzers and leds for quiz show setup to be used in classrooms at my son's school.  The only functions I really need are digital read/write and delay.  I wouldn't mind following Bill2009's suggestion except that I'm running linux & don't want to mess with trying to get avrstudio to cooperate with wine; tried that a couple of years ago without much success.  I'm using a homebrewed parallel port icsp, which enjoys some support with Arduino 18.

Brett
Title: Re: LumiNet (based on attiny84)
Post by: bdodds on Apr 10, 2010, 07:43 am
I'm looking to make a Simple SMALL servo controller that will use analogRead(), delay() and the Servo.h library.
Title: Re: LumiNet (based on attiny84)
Post by: lars.engel on May 05, 2010, 08:55 am
Is it possible to burn the standard arduino bootloader onto a atmega328 using the modified ide and ftdi bitbang?  Any changes to your ide necessary?
Title: Re: LumiNet (based on attiny84)
Post by: Arnonh on May 05, 2010, 10:02 am
its really of topic but yes you can burn an bootloader from the ide but you need a one pre-burned arduino or isp
if you look back in this thread you can find a guide
Title: Re: LumiNet (based on attiny84)
Post by: bdodds on May 05, 2010, 07:14 pm
Quote
0018 support is the next point on my list... check again at April 22nd

Have you made progress on the attiny85 cores for 0018?  
Title: Re: LumiNet (based on attiny84)
Post by: bohne on May 06, 2010, 02:25 am
sorry, had no time yet...
I am redesigning LumiNet. I think that a new bootloader might solve all our problems. It should be compatible to the original Arduino bootloader, because it does not make sense to distribute a modified Arduino IDE.

@lundnul:  yes, you can use the mofified Arduino0014 IDE to burn the bootloader via FTDI BitBang. Works great with Windows, but is tricky with Mac OS X... never tried this with Linux.
Title: Re: LumiNet (based on attiny84)
Post by: macsimski on May 25, 2010, 10:42 pm
i made a start with the port here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1274820597. please use that thread to keep the forum neat.
Title: Re: LumiNet (based on attiny84)
Post by: BillGeo on Jun 01, 2010, 06:39 am
It's nice to see that the Attiny84 gets attention.
It's a mCU that is suitable in many projects, and quite full-futured too.

I am currently having problems with mine.

For starters, I downloaded the Bohne-moded Arduino IDE... and it does not run!
Yea, double-clicking on "arduino.exe" yields a hourglass cursor for 3-4 secs, and then nothing.
Any ideas???

The idea is to use the modified IDE to "port" my 00018 standard-IDE sketch.
I intend to take the compiled .hex file outputted by the modified IDE and use avrdude
to flash it directly yo the attiny84 chip as shown here: http://jimsmindtank.com/using-the-arduinoisp-sketch-part-2/

By the way, I am using an arduino with the ISP sketch in it.
It's supposed to function as an avrisp programmer.

Hardware-wise, only the MOSI, MISO, SCK, RESET and Vcc/GND pins are connected to the Attiny84, is that OK?
I'd like to use the internal 8MHz clock.

Will that work? What fuses will need changing? And how do I do it???

Also it would be nice to also burn an Arduino compatible bootloader to the 84
so all future sketch uploads can be done via USB (and FTDI chip or cable).
Is such a bootloader available? I only see LumiNet bootloaders for the 84
in the modified IDE subdirectories.


I guess the first thing to be addressed is the modified-IDE-not-running issue.
:-/

Sorry for the long an newbie post, and thank you in advance for your help.
:D

Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Jun 01, 2010, 01:12 pm
try running the attiny84 core files in the regular ide.
Title: Re: LumiNet (based on attiny84)
Post by: BillGeo on Jun 02, 2010, 05:51 pm
Will do that and report back.

Meanwhile I tried just reading the fuses from a "factory new" ATtiny84,
using an Arduino (with the ISP sketch), and avrdude (that was in the WINavr package),
but to no avail. No luck.

Other details include:
+VCC = 5V from the Arduino board
MOSI, MISO, RESET, SCK to pins 7, 8, 4, 9 of the t84 (DIP14 package), through 10K resistors.
12Mhz Crystal at pins 2 and 3, an then two 22pF capacitors to ground.

avrdude command is as follows:
avrdude -c arduino -p t84 -P COM9 -U hfuse:r:high.txt -U lfuse:r:low.txt

(also tried using other programmers for the -c option, like avrisp, STK500 etc.)

What is wrong with the above setup?!
WTF?!?! :o

Anyway, I am at a dead end with the avrdude approach,
so I'm going to try using the t84 core with the original 000018 IDE.
Title: Re: LumiNet (based on attiny84)
Post by: BillGeo on Jun 02, 2010, 08:20 pm
No luck either.

I followed the instructions found HERE (http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236434254/94#94) but NO-GO!!!

But even if I can compile a valid attiny84 .hex file, how am I supposed to
upload it to the mCU if I cant get the Arduino-ISP to work with it?
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Jun 02, 2010, 10:53 pm
Billgeo, im am updating my attiny84 core to the 0018 version.

I will have it soon ready, the old one will not work in 0018
Title: Re: LumiNet (based on attiny84)
Post by: BillGeo on Jun 02, 2010, 11:02 pm
Thank you SuperCow, I'll be waiting for that.
But, nonetheless, this new 0018 core will just produce valid attiny84 .hex files.
How will i get them in the chip after that?

Will I have to get an AVR programmer (USBtinyISP looks good) and dish the Arduino-ISP (a waste), or am I missing something here?

:-/
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Jun 03, 2010, 12:54 am
Well i got it fast ready here is the updated attiny84 core file
Attiny84 (http://85.12.32.240/~superkoe/arduino/attiny84/attiny84-03.zip)

The attiny84 does not have a uart/serial port, so making a bootloader is much harder, But i will try this.

I also tested with the arduinoISP for you, and i got it working.
So you dont need a bootloader, and you can upload with the arduino IDE

But there are some step's you need to do (copy/past from the readme)

If you dont have a ISP programmer you can use the arduino Examples ArduinoISP
Upload that sketch to a normal arduino, see http://arduino.cc/en/Tutorial/ArduinoISP
And Connect arduinopin 13 to CLK, 12 to MISO, 11 to MOSI and 10 to RESET
Also hook up the 5V+ and GND. For those line on a attiny, check the datasheet @ atmel.com
for the 14pdip it's:
pin 1 5V
pin 4 RESET (Needs a 10K resistor in parrallel with 5V+)
pin 7 MOSI
pin 8 MISO
pin 9 CLK
pin 14 GND

Code: [Select]
                    +-\/-+
              VCC  1|    |14  GND
         (D0) PB0  2|    |13  AREF
         (D1) PB1  3|    |12  PA1 (D9)
            RESET  4|    |11  PA2 (D8)
INT0  PWM (D2) PB2  5|    |10  PA3 (D7)
     PWM (D3) PA7  6|    |9   PA4 (D6)
     PWM (D4) PA6  7|    |8   PA5 (D5) PWM
                    +----+


I just found out that you can set this parameter in boards.txt, so when you selected the attiny84, it will use automatic the arduinoIsp
So you don't have to change your preference file.
This is updated in the latest 03 version

Next you have to edit your preference file, and change the upload.using=bootloader to upload.using=arduinoisp
see http://arduino.cc/en/Hacking/Programmer for more info


Now you can upload to the atting84 without bootloader :)
remember when you want to upload to a normal arduino, you have to change the preference file again to bootloader


Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Jun 03, 2010, 01:20 am
S.C. - wow, thanks - I'll be trying this too.
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Jun 03, 2010, 01:50 am
I just found out, the fuses has to be set too.
I found a workaround for this as well.
Burn the bootloader first, this will set the fuses correct.
There is no bootloader, but its uploading a fake bootloader.
blink sketch on pin 2 (arduino pin 0)
For this you have to download the core again, a update in it
new attiny84-03 core (http://85.12.32.240/~superkoe/arduino/attiny84/attiny84-03.zip)

Title: Re: LumiNet (based on attiny84)
Post by: Osgeld on Jun 03, 2010, 02:00 am
sweet, thank you!
Title: Re: LumiNet (based on attiny84)
Post by: BillGeo on Jun 03, 2010, 10:45 pm
SuperCow, you are awesome!
Your mod for the 0018 worked just fine!

Uploading sketches on the tiny84 on the breadboard via the ArduinoISP... is just a click away!

THANK YOU VERY MUCH for your time and effort!



Just a small question though, what if we want to use pins 2,3 as the XTAL inputs for the attiny84 clock?
Will it be possible for you to come with another "fake" bootloader that
sets the fuses for the tiny84 to work with an external crystal?
An maybe, as a confirmation, it will flash a LED at pin4 instead.

Will making this "fakeXTAL.hex" be easy?  ::)
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Jun 03, 2010, 11:08 pm
That is not problem at all.
But for this to work you need 8 MHz or 16MHz.
Arduino doesn't support other MHZ.
It will work, but your timing will be off for the delay functions etc.

For an external crystal between 8-16mhz use these fuses:
Edit the boards.txt in the attiny84 folder
attiny84.bootloader.low_fuses=0xff
attiny84.bootloader.high_fuses=0xdd
attiny84.bootloader.extended_fuses=0xff

Then just burn the bootloader again.
Your right about the blink led, its on port 3 (d1)
But you lose the 2 ports for digitalwrite, so arduino pin 0 and 1 you cant use then.

But in most cases 8mhz if fast enough, so i designed it around 8mhz to save 2 pins.
Title: Re: LumiNet (based on attiny84)
Post by: Osgeld on Jun 03, 2010, 11:39 pm
by the time you hook up the isp, tiptoe around the 1 int and aref yea there is not a whole bunch left
Title: Re: LumiNet (based on attiny84)
Post by: BillGeo on Jun 03, 2010, 11:55 pm
Osgeld, you can use the MOSI, MISO, SCK pins for I/O as well as programming.


SuperCow, you are right, 8MHz is fast enough for most projects.


But, I run into my first problem with the ATtiny84.
My analogRead commands don't seem to work at all!
I am defining pinMode on pin9 (actual pin12 on the chip) to be INPUT.
Then I use the analogRead command to quantify a voltage range.
But nothing seems to work. I have tried other pins as well.

I see that both the ATtiny84 and the ATmega328 (used in the Arduino) use 10bit ADCs, so my quantification should be the same.
(I used the arduino to test-drive my sketch-code first)

Any ideas on that? :-/
Title: Re: LumiNet (based on attiny84)
Post by: Osgeld on Jun 04, 2010, 12:35 am
Quote
Osgeld, you can use the MOSI, MISO, SCK pins for I/O as well as programming.


I know you can but I would imagine it would be a major PITA during development to hook up the progammer, program, unhook and reconnect the circuit, OH crap my timing is wrong let me fix that real quick ...

;D

maybe I just need to get better at programming lol
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Jun 04, 2010, 12:41 am
You dont have to set the pinmode for analogread.
To read pin 12 (pa1) you have to use analogRead(1);
PA1 = 1
PA7 = 7

PA0 pin 13 is the aref, don't use this pin, it doesn't have internal pull-up enabled, and can destroy stuff. And i know, i have killed 4-5 leds on this pin when i was making the core, trail and error  ;D
Title: Re: LumiNet (based on attiny84)
Post by: Osgeld on Jun 04, 2010, 12:58 am
I havent had the chance to sit down and play with your new revision, is there anything different aside from 18 compatibility?

asking cause I have it all setup and working great from your last version, and wondering if I would benefit by upgrading (in mid project, been using your older version for a few weeks now)
Title: Re: LumiNet (based on attiny84)
Post by: BillGeo on Jun 04, 2010, 06:52 am
SuperCow (like the new avatar btw),

I did as you said, removed the pinMode line and used analogRead(1)
for PA1 (also tried 2, for PA2) and fed the voltage at pin12 (and pin11 also).

Damn code doesn't seem to care! Stil NO-GO for the analogRead command!
The code itself is quite simple as far as analogReading goes.

Could it be a bug elsewhere?
Could it be I am so stupid I am overlooking something trivial?
:-/
Title: Re: LumiNet (based on attiny84)
Post by: BillGeo on Jun 04, 2010, 02:05 pm
Also, how does the AVG discriminate between pin1 as digital pin (physical chip pin3, PB1)
 and pin1 as an analog pin1 (physical pin12, PA1)?
:question
Title: Re: LumiNet (based on attiny84)
Post by: BillGeo on Jun 04, 2010, 03:28 pm
My bad!
I was leaving the AREF pin unconected. Thought there was an internal 5V supply (wasn't there?).

But my last question stands...
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Jun 04, 2010, 09:52 pm
S.C.  Thanks again for a greatly needed attiny core.  Not quite working for me yet though.

I did a fresh arduino-018 install and downloaded the attiny84-03 core.  did not make any other changes - correct?

when I try to do a sketch download (or burn the "bootloader") I get a message saying the device signature is incorrect(shows as 0's).  

Code: [Select]
Binary sketch size: 818 bytes (of a 8192 byte maximum)

avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny84
avrdude: Yikes!  Invalid device signature.
        Double check connections and try again, or use -F to override
        this check.



Looking at the verbose output below it seems to me that the arduinoisp code is responding but the attiny84 is not.  I've double checked all the connections and they look right.  disconnecting sck, miso, or mosi all give the same error.  disconnecting reset gives a different error. Any thoughts?


Code: [Select]
Binary sketch size: 818 bytes (of a 8192 byte maximum)
C:\Users\Bill\Desktop\parents 2009 taxes\arduino-0018\arduino-0018\hardware/tools/avr/bin/avrdude -CC:\Users\Bill\Desktop\parents 2009 taxes\arduino-0018\arduino-0018\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pattiny84 -cstk500v1 -P\\.\COM1 -b19200 -Uflash:w:C:\Users\Bill\AppData\Local\Temp\build5363555325787943731.tmp\tiny84mule.cpp.hex:i


avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
        Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

        System wide configuration file is "C:\Users\Bill\Desktop\parents 2009 taxes\arduino-0018\arduino-0018\hardware/tools/avr/etc/avrdude.conf"

        Using Port            : \\.\COM1
        Using Programmer      : stk500v1
        Overriding Baud Rate  : 19200
avrdude: ser_open(): setting dtr
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv:
avrdude: Recv:
        AVR Part              : ATtiny84
        Chip Erase delay      : 4500 us
        PAGEL                 : P00
        BS2                   : P00
        RESET disposition     : possible i/o
        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         :

                                 Block Poll               Page                       Polled
          Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          eeprom        65     6     4    0 no        512    4      0  4000  4500 0xff 0xff
                                 Block Poll               Page                       Polled
          Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          flash         65     6    32    0 yes      8192   64    128  4500  4500 0xff 0xff
                                 Block Poll               Page                       Polled
          Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
                                 Block Poll               Page                       Polled
          Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                 Block Poll               Page                       Polled
          Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                 Block Poll               Page                       Polled
          Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                 Block Poll               Page                       Polled
          Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                 Block Poll               Page                       Polled
          Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

        Programmer Type : STK500
        Description     : Atmel STK500 Version 1.x firmware
avrdude: Send: A [41] . [80]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: A [41] . [81]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: A [41] . [82]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: A [41] . [98]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
        Hardware Version: 2
        Firmware Version: 1.18
        Topcard         : Unknown
avrdude: Send: A [41] . [84]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: A [41] . [85]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: A [41] . [86]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: A [41] . [87]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: A [41] . [89]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
        Vtarget         : 0.0 V
        Varef           : 0.0 V
        Oscillator      : Off
        SCK period      : 0.1 us

avrdude: Send: A [41] . [81]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: A [41] . [82]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: B [42] . [14] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [00] @ [40] . [02] . [00] . [00] . [00]   [20] . [00]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny84
avrdude: Send: P [50]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: AVR device initialized and ready to accept instructions

Reading | avrdude: Send: u [75]   [20]
avrdude: Recv:
################################################## | 100% 0.05s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
        Double check connections and try again, or use -F to override
        this check.

avrdude: Send: Q [51]   [20]
avrdude: Recv:
avrdude: Recv:

avrdude done.  Thank you.
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Jun 04, 2010, 11:02 pm
BillGeo On the analog is a small error that will be fixed on the next release.
You can do this: analogReference(0); in setup.
This will use the internal aref. Now its indeed on external.

bill2009, do you use a 10K resistor parallel on the reset?
(http://arduino.cc/en/uploads/Tutorial/arduinoispbb.png)

As you can see on the breadbord, the reset line (pin 1 on a atmega168) is hook on a resistor and the other side of the resistor has 5V. The green line is the reset to the arduinoISP.
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Jun 04, 2010, 11:13 pm
Quote
bill2009, do you use a 10K resistor parallel on the reset?


yes sir, brown-black-ORANGE from pin 4 of the attiny84 to ground and pin 4 goes to 10 of the driver.  i'll see if i have another chip i can try to program.
Title: Re: LumiNet (based on attiny84)
Post by: BillGeo on Jun 05, 2010, 12:41 am
Damn!
I seem to be geting the same error as Bill2009 does.

Code: [Select]
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny84
avrdude: Yikes!  Invalid device signature.
        Double check connections and try again, or use -F to override
        this check.


BTW, pin4 (RESETpin) on the ATtiny84, is supposed to be kept high (via the 10k resistor).
OK, so if it's set low the program should reset... right?
I manually tie it to ground... and there is no reset of the program!

What't going on...

I'm going to delve into this! :D
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Jun 05, 2010, 01:10 am
Quote
BTW, pin4 (RESETpin) on the ATtiny84, is supposed to be kept high (via the 10k resistor).
OK, so if it's set low the program should reset... right?
I manually tie it to ground... and there is no reset of the program!

that would reset the program running in the attiny84 - but there isn't one is there?
Title: Re: LumiNet (based on attiny84)
Post by: BillGeo on Jun 05, 2010, 01:41 am
Quote
that would reset the program running in the attiny84 - but there isn't one is there?


No, there IS.
Thats the strange thing. I actually uploaded my sketch-code just fine using my Arduino-ISP and the core modification of the 0018 IDE.
And more than once for that matter.
After that... I can't remember what change I made and I get this error message.
I changed breadbords, for the bigger circuit, but other that that it seems the same to me.
(note that I get the same error using a USBtinyISP and avrdude, trying to just read the fuses.)

Could the reset pin be damaged (fuse set incorrectly.)
I just say that based on the fact that grounding the reset pin doesn't reset the code!
Title: Re: LumiNet (based on attiny84)
Post by: Osgeld on Jun 05, 2010, 01:42 am
Quote
yes sir, brown-black-red


not to nitpick but that is 1k, maybe it is too weak

on my 84 setup I dont have a pull up resistor, works fine (keeping in mind its being powered by the arduino also, when powered externally and still connected to a ardiuno for programming yea its needed if the arduino is turned off)
Title: Re: LumiNet (based on attiny84)
Post by: Osgeld on Jun 05, 2010, 01:45 am
Quote
I manually tie it to ground... and there is no reset of the program!


reset does not happen until it goes high again, holding the reset down enables self programing through the isp port (avrisp for example)
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Jun 05, 2010, 02:03 am
Quote
Quote:
yes sir, brown-black-red

not to nitpick but that is 1k, maybe it is too weak

on my 84 setup I dont have a pull up resistor, works fine (keeping in mind its being powered by the arduino also, when powered externally and still connected to a ardiuno for programming yea its needed if the arduino is turned off)


It's a brown-black-orange - I just typed it wrong.  what a goof, thanks for noticing i'll fix the post.
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Jun 05, 2010, 10:19 am
Code: [Select]
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny84

I get this error as well, I don't know what it is, but never the less, it programs the chip, so it can be ignored. I also get the error using avr-dude, with a other ISP programmer, so its a fault in that.

I dont get the "cant find signature", i have reprogrammed it many times now with arduinoisp, with different sketches.
But maybe it is the lockbit, when buring the bootloader, it locks the chip for programming. Of course with a normal bootloader the chip is programmed from within, not for the attiny. So set de unlock and lockbit to 0xfc in boards.txt in de attiny84 folder.
Then reburn the bootloader. It keeps the chip unlockt now.


The RESET pin is not to reset the program inside, but it resets the whole chip. If the reset is HIGH(5v) the chip is running normal. Pulling the RESET LOW(gnd), the chip stays in RESET until the pin is HIGH again.

That why there is a 10K resistor between in, Because the ISP programmer sets the port LOW, but the reset is tied to 5v, that would cause a short circuit. Now with the 10K resister there wont be.
Title: Re: LumiNet (based on attiny84)
Post by: BillGeo on Jun 05, 2010, 10:54 am
Do you use a resistor in series with your RESET line from the ISP to pin4?
If you do, remove it (or maybe use a lower value). I did and everything seems to work again.
(I still use 10K resistors in line with the MOSI, MISO, CSK pins)
Title: Re: LumiNet (based on attiny84)
Post by: Jacksw on Jun 06, 2010, 05:53 am
wah, seem very cool
Title: Re: LumiNet (based on attiny84)
Post by: Ro-Bot-X on Jun 09, 2010, 01:35 pm
Hi Bohne, did you manage to use the Optiboot on Luminet micros? If so, can you post it please?

Thanks.
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Jun 11, 2010, 11:56 pm
Ive got a first version of a bootloader working.
Using Bohne's asm serial and aziemer 256 word asm bootloader.

But when i have uploaded a sketch the bootloader is gone.
The attiny84 doesnt have a bootloader section in the fuses to protect it.
So the bootloader has to fix that. But my asm skill are none existing.
Im already happy to incorporate the asm serial.
Looks like the bootloader is still 256 words (512 bytes) as the arduino bootloader is 2048 bytes :P

I have mailed the author of the 256 word bootloader if he can help me out.
Or maybe Bohne can help with this.
Title: Re: LumiNet (based on attiny84)
Post by: Arnonh on Jun 12, 2010, 12:16 pm
in the original bootloader makefile there is this line
Code: [Select]
LDSECTION  = --section-start=.text=0x3800


by my understanding it means where in the memory to put the sketch
if you add it to the sketch makefile and adjust it to the end of your bootloader i think it should work
Title: Re: LumiNet (based on attiny84)
Post by: CBX on Jun 26, 2010, 05:45 pm
Hi

Since the attiny84 doesn't have UART is it possible to use V-USB like some Arduino compatible boards?

Best regards
Title: Re: LumiNet (based on attiny84)
Post by: aenigma on Jul 19, 2010, 06:06 pm
I see that there is now an attiny84 core for the arduino-0018 IDE.  Has anyone created a core for the attinyx5 devices (specifically the attiny85)?  That comes in a nice 8-pin DIP/SOIC and would be great for simple designs.  Thanks!
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Aug 29, 2010, 02:04 pm
Yes, I am successfully using a core originally developed for the attiny45 - it works very well on the 85.  I'll update on my progreass here but have a look at this thread

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1274820597/44
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Aug 30, 2010, 12:16 pm
short: update Arduino0019 with LumiNet support is available (only for Max OS X) at the luminet.cc homepage.

I did not have time for optiboot, but hope to test it soon...
Title: Re: LumiNet (based on attiny84)
Post by: Osgeld on Sep 10, 2010, 03:04 am
does anyone have the 18 version from supercow, links are dead

PS: pro tip, if your webhost uses an IP address as its point of entry,  dont bother
Title: Re: LumiNet (based on attiny84)
Post by: Coding Badly on Sep 10, 2010, 08:48 am

By "18 version" do you mean the "attiny84-0.1.zip" file?  

If so then I have a copy.  Send me a PM with your email address and I'll get it to you tonight.
Title: Re: LumiNet (based on attiny84)
Post by: Osgeld on Sep 10, 2010, 03:06 pm
well the links point to attiny84-03.zip but at this point I would take any of them
Title: Re: LumiNet (based on attiny84)
Post by: Osgeld on Sep 10, 2010, 08:44 pm
OK

Coding Badly emailed me the v1 core for arduino 18, and Bill2009 emailed me what appears to be the v3 of the same thing

you can find them both @

http://www.cheesefactory.us/arduinocores/

thanks guys!
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Sep 11, 2010, 02:37 pm
so, I wonder if we could set up something in the playground with the cores, board files, schematics and examples.  Can we host things there or just point to them - I don't have a hosting service anywhere or i would offer.
Title: Re: LumiNet (based on attiny84)
Post by: Coding Badly on Sep 11, 2010, 08:09 pm

For the core files, I'd REALLY prefer they were hosted in the same way the Arduino core is hosted: Google Code.  The Arduino download is even hosted there: http://arduino.[glow]googlecode[/glow].com/files/arduino-0019.zip .

I have a small window of time available right now.  My (overambitious) plan is to...

I am willing to share any or all of my work (using Google Code  ;)) if anyone is interested.
Title: Re: LumiNet (based on attiny84)
Post by: Osgeld on Sep 11, 2010, 10:22 pm
I think google code would be the best place and I would be interested in your mods to the core, though I dont know how good I would be as I am really not all that familiar with the whole core process nor AVRGCC though I am slowly learning
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Sep 11, 2010, 11:40 pm
version 003 is up again, I removed the file by accident.
http://85.12.32.240/~superkoe/arduino/attiny84-03.zip
I haven't worked on it any more, but I do almost have a working bootloader based on asm serial, and its still very small, 512 bytes

So far the bootloader works, but there is an extra pin needed to enable the bootloader.
Title: Re: LumiNet (based on attiny84)
Post by: Osgeld on Sep 12, 2010, 12:31 am
thanks supercow, sorry if I sounded pissy, but I have been working on something that has eaten a lot of effort based on the 84 and to find it not there was devastating at the time
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Sep 12, 2010, 03:18 pm
Coding Badly is right.
Let's open a new googlecode project for all attiny cores. We did the same for the xmega core (http://code.google.com/p/xmegaduino/)

But I also want to make sure that the modified LumiNet IDEs can be found there, because attiny support and LumiNet belong together.

I somehow lost track of what you guys are doing with attiny and optiboot. Is there a working optiboot bootloader for attiny84 out at the moment or are you having problems?
I would love to use optiboot with LumiNet, for programming by infection (the distributed bootloader) but never had the time to really get started.
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Sep 12, 2010, 04:24 pm
mine atiny84 bootloader is not based on optiboot, but on a other bootloader that is written in asm

I included the asmserial from your infection to it.

It works, but it has no bootloader section, so i have to include a few lines in my sketch, when a certain pin changes state, then i jump to the bootloader section, and wait for serial. or jump back when a timeout occurs, or the upload was successful.

but a c coded bootloader of the same size would be better, i dont like asm :)
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Sep 12, 2010, 06:46 pm
SuperCow, I checked your .zip file.
the source code of the bootloader is not included. Where can I find it? Is it a stk500-compatible bootloader for attiny84?
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Sep 12, 2010, 10:06 pm
yes, its not included, because its not finished, but i can upload my current work.
its stk500 compatible
Title: Re: LumiNet (based on attiny84)
Post by: Osgeld on Sep 12, 2010, 10:12 pm
since your using a soft serial in this, is it safe to assume that there might be serial functions in future releases ?
Title: Re: LumiNet (based on attiny84)
Post by: Coding Badly on Sep 12, 2010, 10:42 pm

Very good question, Osgeld.  I have a few ideas on how to address Serial on tinies that don't have hardware support.  I'm hoping there's some dicussion around the ideas.  Would you mind if we move to a more appropriate section like Hardware / Development?
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Sep 12, 2010, 11:18 pm
Here is the alpha bootloader
http://85.12.32.240/~superkoe/arduino/attiny84loader.rar

The bootloader works on the first upload with the IDE
Second time upload the chip goes to the bootloader, but fails halfway uploading.

Everything is in ASM so its very hard to debug, this project is on a dead end for me.

I will look to the optiboot, and see if I am more successful.

About serial support, its not very hard to implement. There already some nice soft serials library around, it just has to be changed for the attiny84.

The serial used for the bootloader works aswell, but it doesn't have buffers etc, so you can miss incoming characters.

**edit**
I just see optiboot already is made support for the attiny84
Lets see if it works 2 :)
Title: Re: LumiNet (based on attiny84)
Post by: Coding Badly on Sep 13, 2010, 09:54 am
Quote
Let's open a new googlecode project for all attiny cores

Done...
http://code.google.com/p/arduino-tiny

I'll try to get the '84 core source files uploaded this week.

Quote
But I also want to make sure that the modified LumiNet IDEs can be found there, because attiny support and LumiNet belong together.

Is this the latest modified Windows IDE...
http://hci.rwth-aachen.de/tiki-download_wiki_attachment.php?attId=759&page=luminet

Which version of the IDE is it based on?

Does the ZIP file contain a complete IDE or just the things that you modified?
Title: Re: LumiNet (based on attiny84)
Post by: moustic on Sep 15, 2010, 02:44 pm
should it be possible to have the core given in this link :
http://hlt.media.mit.edu/wiki/pmwiki.php?n=Main.ArduinoATtiny4585
added on the google project ??
Title: Re: LumiNet (based on attiny84)
Post by: Coding Badly on Sep 15, 2010, 11:14 pm
Quote
should it be possible to have the core given in this link :
http://hlt.media.mit.edu/wiki/pmwiki.php?n=Main.ArduinoATtiny4585
added on the google project ??

Yes.

My goals are...

1. Get the Google Code site started (done)

2. Make SuperCow's ATtiny84 Core as similar as possible to the Arduino 0019 Core (minus Serial).  This should provide a Tiny Core that has almost identical performance and functionality as the 0019 core.

3. Integrate the ATtiny85 Core (from the link you posted) with the ATtiny84 Core.  The end result will be a single Tiny Core that supports 84 and 85 processors.

4. Integrate René Bohne's ATtiny2313 Core with the Tiny Core.  The end result will be a single Tiny Core that supports 2313, 84, and 85 processors.

5. Branch the Tiny Core so performance and memory optimizations (like digital*Fast and tone-to-pin output) can be applied.

Any participation (including testing) is welcome!
Title: Re: LumiNet (based on attiny84)
Post by: SuperCow on Sep 19, 2010, 01:22 am
My tinyport was based on Bohne's luminet, but with clean core files from 0017. Later i ported it to 0018.
Now we have 0019, and I would have ported it to 0019.

Few month ago i put in a alot of time making a bootloader for it.
I have started again with the bootloader, using optiboot, or using mine with some tricks from optiboot.
Title: Re: LumiNet (based on attiny84)
Post by: Coding Badly on Sep 19, 2010, 05:59 am
Quote
Few month ago i put in a alot of time making a bootloader for it.
I have started again with the bootloader, using optiboot, or using mine with some tricks from optiboot.

I'm curious.  Obviously, René Bohne needs a bootloader for his work.  Does anyone else?  Are there people who want to program a Tiny who don't already have an Arduino or an ICSP?
Title: Re: LumiNet (based on attiny84)
Post by: Osgeld on Sep 19, 2010, 07:25 am
I have always used my arduino to program the tiny, but! if I were to sit down and make an arduino like board that would sit on my desk and be used for more for daily experments I would like to use one, less clutter and fragile connections

but on the other hand that is why I have an arduino, and most of my stuff is hashed out on it first, and then brought over to the tiny when my application calls for such a thing

or in other words 50/50

I do appreciate everyone's hard work on these chips, the tiny 84 is great for many applications where the 168/328 is overkill and physically too large, it fills a nice space
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Sep 26, 2010, 08:32 pm
re the bootloader:
I have and use ICSP programmers for the tinies I develop but, especially when breadboarding , I include a 6 pin straight header for hooking up a USB-ttl serial cable.  This is great for debugging.

Presumably, to be arduino-like, a boot loader could be automatically grafted on to the sketch(like init) and get a shot at the serial before the application started.

I think that would be convenient.  I also imagine it would be trouble-prone but I guess that would depend on the implementation.
Title: Re: LumiNet (based on attiny84)
Post by: Coding Badly on Sep 26, 2010, 10:05 pm
Quote
I have and use ICSP programmers for the tinies I develop but, especially when breadboarding , I include a 6 pin straight header for hooking up a USB-ttl serial cable.  This is great for debugging.

Which software do you use on the 84?  NewSoftSerial?  SoftwareSerial?  Something else?

Quote
Presumably, to be arduino-like, a boot loader could be automatically grafted on to the sketch(like init) and get a shot at the serial before the application started.

That would be nice.  The biggest issue is the bootloader code overwriting itself.  There are two potential solutions...

1. Always place the bootloader code at a fixed location in the executable image.  This may not be possible.

2. Make the bootloader so it moves itself to one end of the Flash while the other end is programmed.  This would double the wear on parts of the Flash and would be a bit complicated but would very likely work.
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Sep 26, 2010, 11:18 pm
Quote
Which software do you use on the 84?  NewSoftSerial?  SoftwareSerial?  Something else?

I've been using the basic SoftwareSerial but since this fine new core supports NewSoftSerial I'm going to try that as soon as I get the hardware working.

Quote
That would be nice.  The biggest issue is the bootloader code overwriting itself.  There are two potential solutions...

1. Always place the bootloader code at a fixed location in the executable image.  This may not be possible.

2. Make the bootloader so it moves itself to one end of the Flash while the other end is programmed.  This would double the wear on parts of the Flash and would be a bit complicated but would very likely work.


I naively thought we could just tell the compiler the bootloader code was to be loaded at the end of the flash- there's usually an assembly construct for that kind of thing isn't there?
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Sep 27, 2010, 01:34 am
By the way, the core seems fine.  Running my pololu programmer from the ide is giving me a content mismatch but i bet that's my fingers.  

crossloading it thru avr studio and my dragon works fine.

see, the bootloader would be a blessing today!

There's actually something worth thinking about there: with our own bootloader we know exactly who's doing what.  with an arbitrary icsp programming set up there's more variation at the user end and maybe more bits to get wrong.
Title: Re: LumiNet (based on attiny84)
Post by: Coding Badly on Sep 27, 2010, 09:55 am
Quote
I've been using the basic SoftwareSerial but since this fine new core supports NewSoftSerial I'm going to try that as soon as I get the hardware working.

I could not get SoftwareSerial to work.  Even at 2400 baud it still sent a considerable amount of garbage.  I suspect it's more sensitive to the clock frequency.

Quote
I naively thought we could just tell the compiler the bootloader code was to be loaded at the end of the flash- there's usually an assembly construct for that kind of thing isn't there?

Huh.  I hadn't thought of that.  I suspect you're right.

Quote
By the way, the core seems fine

Glad to hear!

Quote
Running my pololu programmer from the ide is giving me a content mismatch but i bet that's my fingers

I sometimes get a similar error when there's too much load on a pin (a piezo is my source of pain).  Programming works.  Verifying doesn't.  I have no idea why one would work but not the other.  If there's nothing else connected to the processor, my Pololu has been very reliable.

Quote
crossloading it thru avr studio and my dragon works fine

That might get tedious!

Quote
see, the bootloader would be a blessing today!

You're preaching to the choir!  Unfortunately, it will be a considerable amount of time before I can get to it.  I believe René Bohne and Peter Knight are trying to get Optiboot to work with the ATtiny84.  They are far better equipped to build the bootloader than I am.

Quote
There's actually something worth thinking about there: with our own bootloader we know exactly who's doing what.  with an arbitrary icsp programming set up there's more variation at the user end and maybe more bits to get wrong.

That definately seems to be true!
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Sep 28, 2010, 01:39 am
Quote

Quote

Running my pololu programmer from the ide is giving me a content mismatch but i bet that's my fingers


I sometimes get a similar error when there's too much load on a pin (a piezo is my source of pain).  Programming works.  Verifying doesn't.  I have no idea why one would work but not the other.  If there's nothing else connected to the processor, my Pololu has been very reliable.


My problem was simpler - the programmer ground wasn't connected!  

The pololu is great except that it's not set up to power the target.  I think for the most arduino-like experience you'd want a programmer that would at least optionally provide target power without a lot of fuss.
Title: Re: LumiNet (based on attiny84)
Post by: Coding Badly on Sep 28, 2010, 03:58 am
Quote
My problem was simpler - the programmer ground wasn't connected!  

AWOL and Grumpy Mike would scold you for that!   ;)

Quote
The pololu is great except that it's not set up to power the target.  I think for the most arduino-like experience you'd want a programmer that would at least optionally provide target power without a lot of fuss.

The one I have carries USB power out on the VBUS pin.  I think there's a 350ma limit (probably the Pololu's power requirement from 500ma).  Your's doesn't have that?
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Sep 28, 2010, 01:42 pm
Quote
The one I have carries USB power out on the VBUS pin.  I think there's a 350ma limit (probably the Pololu's power requirement from 500ma).  Your's doesn't have that?


sure, so i had an initial hour of failure while I figured that out and now I have an extra clip-on lead carrying the power.  I may jumper it at the programmer so the icsp does the whole job.  It's moot for the smallest chps because you pretty well have to remove the icsp clip before running your program.  
Title: Re: LumiNet (based on attiny84)
Post by: mellis on Oct 08, 2010, 03:20 pm
We're also trying to apply patches to the Arduino core that would make it portable across processors.  Mark Sproul has written a bunch of them that Christian Maglie is helping me integrate.  See: http://github.com/cmaglie/Arduino/.  If anyone can try these on the ATtiny45 and 84, that would be great.  Eventually, we'd like to make it so you only have to write a single file (e.g. pins_arduino.c) to port the core to another processor.
Title: Re: LumiNet (based on attiny84)
Post by: bill2009 on Oct 08, 2010, 06:57 pm
i'd be happy to try it but it's not obvious how.
Title: Re: LumiNet (based on attiny84)
Post by: bohne on Nov 21, 2010, 04:32 pm
David, that sounds interesting! It is very hard to keep up with your changes.

I wanted to have support for LumiNet and attiny from the first day on. My changes never made it into the core and this thread was the only support for people who wanted to get their attiny running with the Arduino.

I did not have a look at the git (because I still use svn), but I want to find time for that soon.
Title: Re: LumiNet (based on attiny84)
Post by: macsimski on Nov 22, 2010, 09:40 pm
nice one mellis! do you by chance know the ide searches for includes? i am still stuck with the attiny85 port regarding adapting libraries. i can adapt a library, but i have no idea if it its possible to have the ide search in the hardware dir of the specific processor. i can see a dir layout like

boards.txt
bootloaders/
cores/
programmers.txt
libraries/
Title: Re: LumiNet (based on attiny84)
Post by: BroHogan on Jan 18, 2011, 06:52 pm
I couldn't tell from this thread if I2C was supported or not. However, since the ATtiny uses USI (Universal Serial Interface) for I2C and SPI, I didn't think so.

So I dug around and found some code for a USI I2C Master and adapted it for the Arduino IDE.

You can download it here . . .
http://dl.dropbox.com/u/3572198/USI_TWI_Master.zip

Put it in Libraries folder under your Sketchbook.
It relies on the the ATtiny core files from here (http://hlt.media.mit.edu/wiki/pmwiki.php?n=Main.ArduinoATtiny4585).

I have included an example in the "examples" folder with an ATtiny85 reading the temperature from a DS1621. It's working fine for me. There is also setup info in the example header.

I'm sure improvements can be made, however you may want to wait a bit. Soon I will post USI I2C Slave code, and it would be nice if the two libs were combined.
Title: Re: LumiNet (based on attiny84)
Post by: moustic on Jan 23, 2011, 12:21 pm
your link doesn't work anymore. can you post it again ?
Title: Re: LumiNet (based on attiny84)
Post by: BroHogan on Jan 23, 2011, 05:18 pm
Quote
your link doesn't work anymore. can you post it again ?


I didn't think anyone would notice!

Actually, I took it down because I'm almost finished with a much improved version - a lib that mimics the Wire lib for the ATtiny. A slave lib is also coming.

If you want something before that, send me a PM.