Go Down

Topic: LumiNet (based on attiny84) (Read 66290 times) previous topic - next topic

bohne

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...
http://www.dorkbot.de
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236434254
http://www.luminet.cc

harry

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.

bohne

"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
http://www.dorkbot.de
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236434254
http://www.luminet.cc

Ro-Bot-X

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!

bohne

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...
http://www.dorkbot.de
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236434254
http://www.luminet.cc

Ro-Bot-X

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!

bohne

#51
Jun 05, 2009, 01:24 pm Last Edit: Jun 05, 2009, 01:28 pm by bohne Reason: 1
The tiny2313 port ist finished and works quite well on my board.

You can download the core file on the LumiNet homepage.

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.
http://www.dorkbot.de
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236434254
http://www.luminet.cc

bohne

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?
http://www.dorkbot.de
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236434254
http://www.luminet.cc

Ro-Bot-X

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!

bohne

#54
Jun 11, 2009, 04:33 pm Last Edit: Jun 11, 2009, 04:35 pm by bohne Reason: 1
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
http://www.dorkbot.de
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236434254
http://www.luminet.cc

NiechcialA

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

bohne

I will fix that in the next week. Are there other known bugs?
http://www.dorkbot.de
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236434254
http://www.luminet.cc

DH

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

bill2009

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?

bohne

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.
http://www.dorkbot.de
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236434254
http://www.luminet.cc

Go Up