Go Down

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

capt.tagon

#60
Jul 13, 2009, 12:17 am Last Edit: Jul 13, 2009, 12:22 am by Sean Reason: 1
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!

bohne

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

Ro-Bot-X

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!

bill2009

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.

Coding Badly

Check the TEMP directory (you can get to it quickly with %TEMP%).  Arduino 0015 puts intermediate files (except library ones) and target files there.

bill2009

#65
Jul 20, 2009, 01:42 am Last Edit: Jul 20, 2009, 01:44 am by bill2009 Reason: 1
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.

bohne

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

bohne

#67
Jul 21, 2009, 02:50 pm Last Edit: Jul 21, 2009, 11:43 pm by bohne Reason: 1
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.
http://www.dorkbot.de
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236434254
http://www.luminet.cc

bill2009

#68
Jul 21, 2009, 09:47 pm Last Edit: Jul 21, 2009, 10:58 pm by bill2009 Reason: 1
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.

bohne

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

bill2009

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://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)



bohne

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...


http://www.dorkbot.de
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236434254
http://www.luminet.cc

bill2009

#72
Jul 30, 2009, 02:57 am Last Edit: Jul 30, 2009, 03:40 am by bill2009 Reason: 1
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

bohne

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.


http://www.dorkbot.de
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236434254
http://www.luminet.cc

SuperCow

#74
Aug 06, 2009, 05:07 pm Last Edit: Aug 06, 2009, 05:08 pm by SuperCow Reason: 1
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

Go Up