Go Down

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

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.

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?

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

Go Up