#avr | Logs for 2012-07-29

Back
[07:46:13] <molavy> hi
[07:46:43] <molavy> i need develop board using 1.3mp image sensor
[07:47:01] <kobsu> abcminiuser: i misinformed yesterday, it was -Os (the default optimization for LUFA lib) that didn't work... so -O0 and -O2 works
[07:47:53] <molavy> but i access only to toshiba tcm8240md .or mobile phone image sensors
[07:48:49] <molavy> what is best image sensor in mobile device that fit my needs
[07:49:04] <molavy> any idea?
[07:49:31] <OndraSter> is the toshiba one not enough?
[07:50:29] <Corwin> since only mentioned "need" is 1.3megapixel, the tcm8240md should be ok
[07:51:42] <molavy> no,it datasheet and documentation is poor
[07:51:58] <OndraSter> the datasheet looks good enoguh
[07:52:05] <OndraSter> enough*
[07:52:07] <molavy> i can;t find any tutorial how to use it.
[07:52:53] <OndraSter> simple
[07:52:56] <OndraSter> you connect all the proper wiring
[07:53:02] <OndraSter> on I2C you control the registers
[07:53:14] <OndraSter> on DOUT + DCLK you read the data
[07:53:40] <OndraSter> EXTCLK = input clock, there should be min & max values for it in the datasheet
[07:53:42] <abcminiuser> kobsu, to me that says the size optimized is either discarding something neccesary, or it's re-ordering something badly
[07:53:59] <abcminiuser> You said it doesn't fire interrupts at all, so it's got to be something simple
[07:54:06] <molavy> can you tell which micro is best for this sensor,
[07:54:14] <kobsu> abcminiuser: yes, no interrupts
[07:54:16] <specing> wtf is this
[07:54:22] <OndraSter> any that has got at least 9 GPIO + I2C
[07:54:32] <abcminiuser> But my first instinct would be that the EVBA isn't being set up correctly even though I'm using the built in function for it
[07:54:35] <specing> molavy: you need to develop it?
[07:54:38] <OndraSter> + some RAM to store the image
[07:54:41] <specing> *need* to?
[07:54:43] <kobsu> abcminiuser: however, i'll let it be with -O2 as that works, and debug it later further
[07:54:49] <abcminiuser> Knowing the state of the EVBA would be helpful
[07:54:51] <abcminiuser> Yeah okies
[07:55:04] * specing imagines someone is holding a gun to molavy's chin
[07:55:08] <kobsu> abcminiuser: yes, i checked the call for setting EVBA
[07:55:19] <OndraSter> specing, :D
[07:55:21] <abcminiuser> And it's set correctly even at -Os
[07:55:22] <molavy> give me a list that should i have for this board
[07:55:25] <Corwin> specing, gun called homework :)
[07:55:29] <specing> molavy: go troll somewhere else
[07:55:49] <specing> AND START THINKING
[07:55:49] <OndraSter> molavy, pick any bigger atxmega I'd say, they have a lot of RAM (8 - 32kB) and a lot of flash to fit all your code
[07:55:54] <OndraSter> plus a lot of GPIO
[07:55:55] <specing> mindless creatures >_>
[07:55:58] <OndraSter> and what specing said
[07:56:01] <kobsu> abcminiuser: the setter of it wasn't removed with -Os
[07:56:32] <kobsu> abcminiuser: (didn't check if it was set correctly, but definitely __built_in function was called)
[07:56:34] <abcminiuser> What's that gist again? I'll take another closer look at the disassembly for that function
[07:56:42] <abcminiuser> Ah well that should be fine then
[07:56:54] <abcminiuser> Whack some code in the int handler dispatch code to light a LED if it's called
[07:57:06] <kobsu> abcminiuser: https://gist.github.com/3194586
[07:57:27] <kobsu> abcminiuser: yep, i'll will check it later and report then
[07:58:34] <OndraSter> I was wrong, you need also more stuff
[07:58:38] <OndraSter> all the hsync/vsync as well
[07:58:49] <OndraSter> it is the opposite of driving a display :)
[07:59:01] <abcminiuser> kobsu, the address loaded into EVBA is all wrong by the looks of it
[07:59:07] <OndraSter> I thought you can do singleshot of the image and read it as you want, but nope
[07:59:24] <kobsu> abcminiuser: One thing, I thing you shouldn't be setting general clocks for USBB in USB_Init(). You have a power management functions to do that, so don't hide it.
[07:59:48] <kobsu> abcminiuser: ahaa, so -Os breaks the EVBA setting
[08:00:06] <abcminiuser> kobsu, it's supposed to store the address of EVBA_Table as EVBA
[08:00:21] <abcminiuser> In the gist, that's 80004c00
[08:00:40] <abcminiuser> But the instructions are loading 80003cf0
[08:01:25] <kobsu> hmm
[08:01:35] <kobsu> Could that be a toolchain problem?
[08:03:26] <w|zzy> hi abcminiuser
[08:03:28] <abcminiuser> I'm not sure, the code is pretty specific
[08:03:41] <abcminiuser> What version of the toolchain are you using?
[08:03:46] <abcminiuser> Hey w|zzy
[08:03:55] <w|zzy> Long time :D
[08:03:57] <kobsu> abcminiuser: the latest standalone version
[08:04:09] <abcminiuser> Me too
[08:04:18] <abcminiuser> Perhaps it's a relaxation issue
[08:04:52] <kobsu> abcminiuser: ahh... that would be easily tested... give me a minute
[08:06:27] <abcminiuser> w|zzy, yeah I know, our free wifi is super crappy
[08:06:46] <abcminiuser> When the router locks up (which I don't have physical access to) it can take many days to auto-reset
[08:07:06] <abcminiuser> In the meantime I have to use a local library one that's in range, but Freenode won't let me connect when I use that one
[08:08:24] <w|zzy> Wow! I thought europe was ahead of australia in all areas except economy
[08:08:38] <kobsu> abcminiuser: didn't make a change
[08:08:50] <abcminiuser> w|zzy, me too :(
[08:09:04] <abcminiuser> kobsu, have you got a working build LSS for comparison?
[08:09:30] <kobsu> sure
[08:10:49] <w|zzy> When do you return to being a uni student?
[08:12:07] <abcminiuser> w|zzy, never :)
[08:12:13] <abcminiuser> I'm a real employee
[08:12:21] <w|zzy> Mrs moving over?
[08:12:25] <w|zzy> and congrats!
[08:12:43] <w|zzy> Also if you are a real employee when are you getting real internet
[08:12:45] <w|zzy> :P
[08:13:50] <kobsu> abcminiuser: https://gist.github.com/3198588
[08:14:22] <abcminiuser> w|zzy, I've been contemplating it :P
[08:14:25] <kobsu> What does "mapped into the binary" means? o.O
[08:15:47] <abcminiuser> Hrm, the working one has a wierd address too, so I'm just missing something
[08:16:07] <abcminiuser> It means the section wasn't discarded as being useless
[08:16:27] <kobsu> ok
[08:25:10] <yashi> is it possible to program the device in atmel studio 6 with one single click? or do i always have to do it via the program device menu?
[08:29:46] <kobsu> what?:D
[08:30:38] <kobsu> my mistake, i understood program (do the programming) with on single click ;)
[08:32:07] <yashi> kobsu: atm i do it via tools -> device programming
[08:32:13] <yashi> which is a pain in the ass
[08:32:46] <kobsu> yashi: yeah, i think there's no other way to do it in Studio
[08:33:36] <yashi> kobsu: sigh...why would they do that ><"
[08:37:10] <kobsu> yashi: I don't know, that's why I don't use IDEs ;) However, the insystem debugger user interface in studio 6 pretty damn good...
[08:39:14] <Xark> yashi: It is annoying (probably a nudge to get your to get the expensive ICE). My workaround is to keep another copy of AS open just to program the device (then it is alt-tab and one click, after selecting the binary once). :)
[08:48:20] <yashi> Xark: gotta try that :P
[11:11:15] <IndianaRonaldo> Under SEH Team
[14:59:30] <cehteh> anyone of you knows a 1-wire serial library/protocol for tiny's, not necessary OneWire[tm] but using only one data pin for the bus?
[15:00:43] <specing> cehteh: half duplex async serial ;P
[15:01:13] <cehteh> yes kindof
[15:01:41] <cehteh> i think i could do my own, but if such already exists the better
[15:02:29] <Steffanx> Can't you make something fancy wit the USI?
[15:03:19] <cehteh> never used that yet, but iirc usi needs a clock
[15:04:38] <cehteh> anyways i know how i could do my own, but i would like not to waste that effort if such already exists
[15:05:10] <cehteh> its not *that* trivial to do in a afternoon
[18:11:02] <geckosenator> anyone gotten arduino stuff on dx?
[18:18:59] <OndraSter_> I found there today arduino mega2560 for $19
[18:19:05] <OndraSter_> that is REALLY cheap
[18:19:08] <geckosenator> no it isnt
[18:19:11] <OndraSter_> is it real mega 2560 lol
[18:19:22] <geckosenator> i got them for less 3 years aog
[18:19:26] <OndraSter_> duh
[18:19:34] <geckosenator> heh
[18:19:57] <OndraSter_> atmega2560 itself is over 8 EUR for 100 pcs
[18:20:11] <w|zzy> That is OndraSter_..
[18:20:20] <w|zzy> $19 on a board with supporting hardware!
[18:20:21] <w|zzy> damn
[18:20:53] <OndraSter_> what
[18:26:29] <w|zzy> <OndraSter_> I found there today arduino mega2560 for $19
[18:26:45] <OndraSter_> <w|zzy> $19 on a board with supporting hardware!
[18:26:50] <OndraSter_> I thoguht you ment it with sarcasm somehow
[18:26:52] <OndraSter_> sory lol
[18:26:52] <OndraSter_> sorry-
[18:26:59] <w|zzy> Oh.. $19 isnt bad.
[18:27:03] <OndraSter_> yeah
[18:27:08] <w|zzy> If you are paying much less id be worried about the quality
[18:27:10] <OndraSter_> but poor Italian dudes who came up with the arduino itself
[18:27:17] <OndraSter_> I'd be worried already with this
[18:27:21] <OndraSter_> the chip itself is expensive a lot
[18:27:43] <Xark> Probably a counterfeit. Do they spell "Made in Italy" correctly? :)
[18:28:21] <OndraSter_> there is no made in italy
[18:28:24] <OndraSter_> of course it is fake
[18:28:25] <w|zzy> It wouldnt be arduino bran
[18:28:27] <w|zzy> brand!
[18:28:34] <Xark> :)
[18:28:56] <w|zzy> Its open source..any one can manufacture the hardware
[18:29:13] <Xark> w|zzy: As long as they don't steal the trademark (as many of the crappy clones do).
[18:29:22] <w|zzy> i wouldnt want a counterfiet mega2560
[18:29:43] <OndraSter_> yeah lol
[18:30:00] <w|zzy> Im quite found of the DFR brand
[18:30:04] <OndraSter_> I bought copy of duemilanove with mega168 for $18 few years ago :(
[18:30:47] <OndraSter_> but hey, I can now make 100 boards with atxmega that fit into breadboard with USB and much more features than mega2560 has with less than 7EUR per board!
[18:30:52] <OndraSter_> aka selling point will be 20 EUR :)
[18:30:58] <OndraSter_> (that is without mounting and soldering)
[18:31:28] <OndraSter_> all parts original even, no chinese parts!
[18:31:36] <Xark> I have a few compatibles (including a Seeeduino Mega which I would recommend over the real Mega - optional sane pin spacing and brings ALL pins out), but no counterfeits (AFAICT).
[18:32:42] <w|zzy> Seeed is good.
[18:32:51] <w|zzy> OndraSter_: Interesting board.
[18:33:25] <OndraSter_> I am trying to snap xboard.net domain tomorrow when it should go back into registration availability
[18:33:31] <OndraSter_> it has been in pendingdeletion for the past 4 days :)
[18:34:22] * Xark just got a nice BreatMate Xmega board - woo-hoo 3.579454Mhz * 16PLL = 57.3Mhz and (the possibility of ) NTSC colors. :)
[18:34:30] <Xark> BreadMate even...
[18:34:30] <OndraSter_> :)
[18:34:35] <OndraSter_> how much?
[18:35:40] <Xark> Hmm. I got the XMega128A4 USB flavor for ~14.50 EU -> http://www.batsocks.co.uk/products/BreadMate/XMega%20PDI.htm
[18:36:49] <OndraSter_> hmm
[18:36:56] <OndraSter_> I see 19 GBP :)
[18:37:27] <Xark> Very please with the design so far. I put a crystal socket and caps on mine (so I can use custom crystals easily).
[18:37:38] <OndraSter_> ah
[18:38:00] <Xark> THat is the AV version (with B&W video or stereo audio). I have one of those too, but I didn't like the stock SMT crystal so got the USB version.
[18:38:00] <OndraSter_> guys, any tips how to do the "simplest" power supply for attiny running from single 1.5V cell? :/
[18:38:12] <OndraSter_> I want to keep the board as small as possible - five LEDs, one attiny and one cell battery :)
[18:39:03] <Tom_L> boost reg
[18:39:26] <OndraSter_> obviously
[18:40:18] <OndraSter_> although I could probably find those small 3v batteries and use those
[18:41:01] <Xark> Yeah, that is what I have done so far. Two AAA to avoid dealing with DC to DC (but they may have smaller form factor cells, not sure).
[18:41:22] <Tom_L> http://www.ladyada.net/make/mintyboost/
[18:41:35] <OndraSter_> that is huuge
[18:41:55] <Xark> Also, that is 5v, for a tiny you just need 1.9v IIRC...
[18:41:58] <Tom_L> the idea not the project
[18:42:35] <OndraSter_> oh
[18:42:46] <OndraSter_> yes, something like 2V to be able to power the LEDs
[18:42:49] <Xark> OndraSter_: Depending on power and lifespan requirements, you can use two coin cells too.
[18:43:06] <OndraSter_> I suppose that CR2016 could work out
[18:44:05] * w|zzy tries to poach xboard.net
[18:44:25] <OndraSter_> w|zzy, I dare yo
[18:44:25] <OndraSter_> u
[18:44:48] <w|zzy> Ill pass.
[18:45:02] <OndraSter_> thanks
[18:49:01] <w|zzy> Xark: Are there a lot of people doing AV projects with xmegas?
[18:49:21] <w|zzy> Its cool, yet unusual, for a micro to have av out!
[18:49:47] <OndraSter_> heh
[18:49:54] <OndraSter_> xmega is lovely because it has got real DAC
[18:49:55] <OndraSter_> 1MSPS
[18:50:01] <OndraSter_> not sure if that is enough for AV
[18:50:11] <Xark> w|zzy: I am not sure a lot. The batsocks guy is also the maker of the TellyMate so I think he is interested in video. :)
[18:50:22] <w|zzy> Ahh.
[18:51:33] <Xark> w|zzy: This is the cool rumblings about it -> http://www.youtube.com/watch?v=kkFCd7E_2ow See this forum thread for details (LucidScience guy) -> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=952696
[18:52:21] <w|zzy> Really wish i had a connection i could watch youtube on!
[18:52:43] <Xark> Since Xmega has the raw speed, it should be able to do some fun stuff. I have been having fun with 16Mhz parts -> http://imgur.com/a/JO4Cq (and working out how to do it on a ATtiny45/85 even).
[18:54:18] <Xark> w|zzy: Basically 256 color NTSC, all passive components with 9 resistors and 1 capacitor on an overclocked Xmega384 (3.579 * 16PLL). I believe he is just waiting for Xmega384 to be commonly available to release (32K SRAM means he doens't need external memory for frame buffer).
[18:55:35] <w|zzy> Which would in essence provide a speed boost
[18:55:36] <Xark> I am toying around with a similar idea, but with a lowly Xmega128 (and I will aim for character graphics and sprites - similar to Uzebox).
[18:56:29] <Xark> Yes. And 8K SRAM isn't enough for a 256 color bitmap (at NTSC res).
[18:58:44] <Xark> Not sure it is useful for color, but the Batsocks XTV supports using Xmega DMA to send the pixels to the display (so CPU overhead drops to like 20% - vs 70 or 80% if the CPU is stuck outputting pixels). However, even 20% of a ~60Mhz Xmega is plenty to do some fun stuff with,
[18:58:52] <OndraSter_> xmega256a3u has 16kB... too bad that xmega384c3 costs SO MUCH
[18:58:54] <OndraSter_> 8 EUR
[18:58:55] <OndraSter_> :/
[18:59:01] <OndraSter_> 256a3u is four
[18:59:10] <Xark> OndraSter_: Yeah, that is getting steep...
[18:59:24] <OndraSter_> yet atmega2560 is almost ten euros :D
[19:00:27] <Xark> OndraSter_: Hmm, 2560 is only 8K SRAM, right?
[19:00:34] <OndraSter_> yes
[19:00:43] <OndraSter_> the only use of mega is DIP
[19:00:47] <OndraSter_> otherwise xmega should replace them
[19:00:54] <Xark> Wonder why so expensive...chip prices never make too much sense to me. :)
[19:01:45] <OndraSter_> nope
[19:02:09] <Xark> OndraSter_: Yeah, I wouldn't miss ATmega if everybody switched to Xmega. :) I might miss DIPs a tiny bit, but breakout boards are fine. :)
[19:02:26] <OndraSter_> that's where my XBoard steps in :P
[19:04:02] <Xark> Cool. I like the pricing on yours from what I heard. :)
[19:04:17] <OndraSter_> yeah
[19:04:22] <OndraSter_> I have got broken out actually both JTAG and PDI
[19:04:39] <Xark> OndraSter_: Are you doing the USB parts also?
[19:04:44] <w|zzy> What are your plans with the aery32 Xark?
[19:04:49] <OndraSter_> Xark, this is usb part
[19:05:46] <Xark> w|zzy: Generate some video, of course. :) Much nicer CPU (I got sick of low+high bytes on 6502 and am fine with 32-bit registers). :)
[19:06:15] <Xark> OndraSter_: Excellent (supposedly you need the USB versions to reliably overclock to ~60Mhz).
[19:06:23] <OndraSter_> heh
[19:06:29] <w|zzy> :)
[19:06:35] <OndraSter_> I wish atmel would mark them as 64MHz parts
[19:06:39] <OndraSter_> that would be just k3wl
[19:06:40] <Xark> OndraSter_: Do you breakout all GPIO?
[19:06:41] <OndraSter_> and kick in the balls
[19:06:46] <OndraSter_> except USB pins
[19:07:01] <OndraSter_> and two have builtin LED, but those can be easily desoldered
[19:07:16] <Xark> OndraSter_: Fair enough (same as Batsocks - however you can short some jumpers if you want the USB data lines back).
[19:07:38] <OndraSter_> I did not break out USB ones because the board, when plugged into breadboard, can add some capacitance and what not
[19:07:39] <OndraSter_> one never knows
[19:07:45] <OndraSter_> USB is a tricky stuff
[19:07:48] <Xark> Only a blank place for LED on Batsocks (I wish it was populated - I hate not having power indicator).
[19:08:59] <Xark> OndraSter_: Do you have a site up yet for your design (or still working on it)?
[19:09:16] <OndraSter_> the design is finished and sent to fab house
[19:09:21] <OndraSter_> site is not yet up
[19:09:29] <OndraSter_> I want to make it more arduino-able
[19:09:39] <Xark> OndraSter_: You mean software side?
[19:09:46] <OndraSter_> yes
[19:09:48] <OndraSter_> aka USB bootloader with flashing support, some programming IDE to it as well
[19:09:55] <OndraSter_> I thought about using Atmel Studio
[19:09:59] <OndraSter_> and just providing libraries
[19:10:04] <OndraSter_> saves a lot of work
[19:10:10] <OndraSter_> plus Atmel Studio <3
[19:10:11] <OndraSter_> :D
[19:10:35] <Xark> OndraSter_: Cool. I saw a few projects, but I was a bit surprised there didn't seem to be an Xmega Arduino variant (that isn't a work in progress).
[19:10:55] <OndraSter_> xduino or xsomething
[19:10:55] <OndraSter_> there was
[19:10:59] <OndraSter_> including arduino port to xmega
[19:11:03] <OndraSter_> but maybe that got stopped?
[19:11:06] <OndraSter_> no idea
[19:11:19] <OndraSter_> I don't want to use directly arduino, I hate the "IDE" of it and the libs :/
[19:11:22] <Xark> Yeah, I think I saw that, but it seemed quite unfinished from my brief examination.
[19:12:00] <Xark> Yes, the IDE is torture. However, I want my video libs to be easy for the unwashed Arduinoids to use. :)
[19:12:19] <Xark> All I ever to in the IDE is ^U to build and upload. :)
[19:12:30] <OndraSter_> :D
[19:12:40] <Xark> (and when you code a library, you can use .S files and ignore Arduino f-ing with your source)
[19:12:55] <OndraSter_> I reported bug for Atmel Studio 56
[19:12:57] <OndraSter_> 6
[19:13:00] <OndraSter_> regarding .S files
[19:13:02] <OndraSter_> with asm code :P
[19:13:07] <OndraSter_> actually when mixing .S and .H files
[19:13:36] * Xark notices that #if 0 doesn't "grey out" lines in AS6...sucks
[19:14:10] <Xark> OndraSter_: I think it has pushed me into .asm files...
[19:14:40] <OndraSter_> when I write something that will run often and I want it to be as much optimized as possible I do it in asm
[19:14:47] <OndraSter_> like when I wrote external DRAM controller for atmega :)
[19:14:55] <OndraSter_> 10% CPU load when refreshing @ 8MHz
[19:16:16] <w|zzy> OndraSter_: Aery32 uses sublime(somewhat free to use).
[19:16:17] <w|zzy> It integrates very nicely.
[19:16:34] <OndraSter_> hmm avr32
[19:16:57] <OndraSter_> I'd love to use atmel studio 6 and just use external app/integrate plugin for one-click flashing :)
[19:17:21] <w|zzy> OndraSter_: Im not suggesting using the avr32 board.
[19:17:21] <w|zzy> Just saying that you can integrate a makefile based build systeminto sublime.
[19:17:21] <Xark> OndraSter_: Yeah. I kept fighting the compiler trying to get the code I wanted (using inline asm, but it would do "stupid stuff" around my block). I finally switched to .S and it is much cleaner (inline asm gets very messy when there is a lot of it).
[19:17:58] <w|zzy> Ive not used Atmel Studio 6 much.
[19:18:01] <Xark> OndraSter_: I had pretty good luck with an avrdude "post build step" to automatically run after a build.
[19:18:16] <OndraSter_> that would require me to use strictly avrdude compatible bootloader
[19:18:31] <Xark> OndraSter_: Ok, well, put any command like loader in the post-build. :)
[19:18:35] <Xark> line*
[19:18:36] <OndraSter_> hehe
[19:18:40] <OndraSter_> that's a good idea actually
[19:18:49] <OndraSter_> w|zzy, it is great stuff
[19:18:55] <OndraSter_> since AS5 they are using VS shell
[19:18:57] <OndraSter_> <3 it
[19:19:10] <OndraSter_> (I am MS fanboy and I love Visual Studio, there is no better IDE really)
[19:19:36] <w|zzy> I use linux a lot.
[19:19:36] <Xark> Only "hazard" is if you have multiple projects, AS6 seems to call post-build on all of them (even if they are up to date). Either just have one project per solution or use Configuration Manager to disable projects you aren't testing.
[19:19:41] <w|zzy> So it is holding me back
[19:19:47] <OndraSter_> Xark, report bug? :)
[19:19:49] <w|zzy> though avr32 studio was shocking!
[19:19:53] <OndraSter_> I reported few already
[19:20:05] <OndraSter_> w|zzy, now avr32 is using the same atmel studio finally
[19:20:08] <OndraSter_> just as arm cortex from atmel
[19:20:12] <w|zzy> Yup.
[19:20:23] <w|zzy> I have as6 installed and usedit once or twice.
[19:20:27] <Xark> OndraSter_: I am not sure it is a bug, per se. Just that post-build doesn't have the semantics I wanted for this use.
[19:20:32] <OndraSter_> ah
[19:20:36] <w|zzy> I love the debugging interface.. everything else is... ok....
[19:20:54] <OndraSter_> again, I am coming from Visual Studio so I loved the switch in AS5 :)
[19:21:02] <w|zzy> Ive gotta work out how best to import makefile based projects into as6 for debugging.
[19:21:26] <w|zzy> Yeah. VS is nice.. If you are on windows.
[19:22:54] <OndraSter_> guys, do you have got the same issue as me that when you think of some project you have to REALLY think about it?
[19:23:08] <Xark> Not sure AS5 -> AS6 was much of an upgrade (but it supports more parts, so I had to go for it).
[19:23:27] <OndraSter_> yeah, not much there
[19:23:34] <OndraSter_> at least for me
[19:24:12] <w|zzy> OndraSter_: What do you mean?
[19:24:43] <OndraSter_> like you think about some thing that would be "cool" or something to make and then you spend 2 hours searching for possible parts and planning what could you use etc :D
[19:26:02] <w|zzy> Oh.. All the time.
[19:26:12] <OndraSter_> :)
[19:26:15] <w|zzy> its the plausibility/costing study
[19:27:02] <Xark> I spend a lot of mental time "playing" with little projects or reading about parts that might be useful in them. I have too many projects "in progress" for my own good...
[19:27:10] <OndraSter_> yeah lol
[19:27:16] <OndraSter_> then I just scrap them later on
[19:28:01] <OndraSter_> hmm can I fit 4 LEDs (actually 7 but three are in parallel) + one button onto attiny4? in theory I can use 3 pins to multiplex the LEDs and the fourth pin to take care of the button
[19:28:39] <w|zzy> Im with Xark.... Though i tend to toss asside project ideas that dont grab me for more than a week..
[19:28:48] <w|zzy> though considering my income i have quite a bit of electronics sitting around :p
[19:29:09] <OndraSter_> :D
[19:29:13] <OndraSter_> I have got zero income
[19:29:16] <OndraSter_> but so many ideas!
[19:30:06] <w|zzy> lol
[19:30:16] <Xark> I have OK income, but no savings from ordering parts and MCUs to support my addict^H^H^H^H^Hhobby. :)
[19:30:36] <OndraSter_> AAAAAAAAa
[19:30:40] <OndraSter_> Dragon doesn't support TPI
[19:30:44] <OndraSter_> bloody hell
[19:30:58] <w|zzy> i work for "the man"... You'll come up with an idea and make millions while im still stuck on my modest income.
[19:30:59] <w|zzy> get a real mans jtag
[19:31:07] <OndraSter_> I am poor student
[19:31:12] <OndraSter_> I don't have 200 bucks for avrice3
[19:31:22] <OndraSter_> jtagice3
[19:31:25] <OndraSter_> which doesn't do TPI either
[19:31:30] <OndraSter_> and supports even less chips than dragon
[19:31:42] <OndraSter_> hell even jtagice mkii doesn't support TPI :P
[19:31:44] <OndraSter_> only AVRISP mkII
[19:32:46] <OndraSter_> why none of those JTAG/ISP/PDI debuggers support TPI :(
[19:33:22] <OndraSter_> I know I can get avrisp mkII for $30 from Tom_L
[19:33:24] <Xark> OndraSter_: Is that the flavor for Tinys?
[19:33:26] <OndraSter_> yes
[19:33:30] <OndraSter_> the smallest tinyest tiny
[19:33:32] <OndraSter_> tiniest*
[19:33:46] <Xark> 8 pin?
[19:33:50] <OndraSter_> 6pin
[19:34:02] <w|zzy> abcmini was saying that atmel are sending out testers :P
[19:34:06] <Xark> Ahh. Tinier than the ones I have (SOIC-8).
[19:34:17] <OndraSter_> Xark, I suppose you have 13 or 24 or something
[19:34:23] <OndraSter_> those are more expensive :P
[19:34:35] <Xark> Yeah. I needed at least a *drop* of SRAM. :)
[19:34:43] <w|zzy> Tom_itx makes a nice avrisp board.. does it do it?
[19:34:45] <OndraSter_> attiny4 is 0.553/0.311 EUR (1/100 pcs)
[19:34:57] <OndraSter_> attiny31a is 0.714/0,405 eur
[19:34:59] <OndraSter_> 13a*
[19:35:05] <OndraSter_> w|zzy, yes
[19:35:10] <OndraSter_> but that is $30 :)
[19:35:10] * Xark is not ready to compete with http://www.linusakesson.net/scene/bitbanger/index.php
[19:35:34] <OndraSter_> "In fact, those 32 bytes are the CPU registers."
[19:35:37] <OndraSter_> that is a lie..
[19:36:11] <Xark> What? So the "cheater" had 64 bytes or something? :)
[19:36:58] <OndraSter_> no, 32 registers and 32 B of RAM
[19:37:05] <OndraSter_> + few more registers for setting port/dir/..
[19:37:53] <Xark> Hmm, so just to be clear. Aren't the CPU regs (r0-r31) mapped into SRAM? But you are saying there is an additional 32 bytes of storage?
[19:38:01] <OndraSter_> yes they are
[19:38:05] <OndraSter_> 0 - 20h = registers
[19:38:13] <OndraSter_> then -something = registers for PORT, DIR, ..
[19:38:18] <OndraSter_> and then another 32B of real SRAM
[19:39:04] <Xark> Interesting. I am surprised Linus would have gotten a detail like that wrong (and he is doing crazy things like keeping his "frame buffer" in a few CPU registers as he as "no RAM")...
[19:39:19] <OndraSter_> oh
[19:39:20] <OndraSter_> I lied
[19:39:23] <OndraSter_> attiny15 has no SRAM
[19:39:26] <OndraSter_> attiny13a has 64B
[19:39:32] <Xark> OK. :)
[19:39:33] <OndraSter_> I thought that higher number = better specs :)
[19:39:57] <Xark> No...I have already been "burned" assuming the Atmel part numbers have a logical sequence. :)
[19:40:07] <OndraSter_> hehe
[19:40:09] <OndraSter_> hell no
[19:40:14] <OndraSter_> but with attinys..
[19:40:19] <OndraSter_> I thought they were all one sequence
[19:42:43] <OndraSter_> has anyone done really tinytiny 20x20mm big electronic dice? :))
[19:42:58] <OndraSter_> cr2032 battery on the bottom, attiny + seven LEDs on the top + few passives
[19:45:04] <OndraSter_> it has got 6 IO pins... I can keep the reset as a reset and let always the "search" happen via the RESET pin being pushed down by button; then I have got still 5 IOs... I can get away with 4 IOs for the LEDs
[19:45:23] <OndraSter_> and one IO for vcc/3 to measure battery voltage and adjust "software PWM" for brightness? :)
[19:46:58] <OndraSter_> this sounds like a really cool project IMHO :D
[19:47:05] <OndraSter_> I should have done that as my final project at school
[19:48:13] <OndraSter_> actually using button as a reset has got one issue - I can not use the button to "enter settings" or whatever :/
[19:48:17] <OndraSter_> and it would be really dumb dice
[19:48:43] <OndraSter_> on the other hand I can not use the pin for anything else unless I change its function from RESET
[19:49:59] <Xark> You can put a gyro/accelerometer in it and program it to be "loaded". :)
[19:50:18] <OndraSter_> OR I wouldn't have to care about that and force the attiny to HVSP mode when flashing... woot!
[19:50:29] <OndraSter_> hook up anything to the RESET that can withhold 12V
[19:50:33] <OndraSter_> heh
[19:50:37] <Xark> ..."three twists, then it will come up 6's"...muhaha
[19:50:43] <OndraSter_> :D
[19:50:48] <OndraSter_> 1wire gyro?
[19:51:41] <OndraSter_> anyway, 0240, I am off to sleep
[19:51:46] <OndraSter_> will have enough time to think about it tomorrow :D
[19:51:47] <OndraSter_> well, today
[19:51:48] <OndraSter_> gn
[19:51:55] <Xark> Nite.
[19:55:47] <w|zzy> nite
[20:09:53] <Hfuy> Hello.
[20:10:02] <Hfuy> Is there any carry output available in bit shift operations on the AVR?
[20:11:32] <timemage> Hfuy, http://www.atmel.com/Images/doc0856.pdf page 14
[20:13:02] <Hfuy> I'm pondering approaches to simulating a 16-bit shift reg, is all.
[20:13:34] <Hfuy> Okay, that's the assembly instruction; how would that be presented in C?
[20:15:07] <timemage> Hfuy, there isn't a single C operator for it. you can mask off the top (or bottom bit), save it, do your shift. if the compiler is clever it may figure out what you're doing and optimize it like you might do in assembly.
[20:16:23] <Hfuy> That was my initial approach, but someone said "isn't there rotate-with-carry on the AVR."
[20:17:09] <timemage> Hfuy, there is. but C doesn't have an operator for every cpu instruction. that would sort of defeat the point.
[20:18:04] <Hfuy> Quite so.
[20:18:26] <Hfuy> I guess I could drop into assembler and do it like that.
[20:19:26] <timemage> Hfuy, again, you may not need to. write your C. if you're using avr-gcc compile with --save-temps or -S. have a look at the resulting code.
[20:19:49] <Hfuy> It barely matters, anyway. It's a blinkenlight for a movie prop.
[20:20:20] <Hfuy> I've been asked to simulate a prop that almost certainly used real shift registers.
[20:20:44] <timemage> Hfuy, probably then. i'm sure you can shift plenty fast for a camera.
[20:21:21] <Hfuy> Spot the use of linear-feedback shift registers here: http://www.youtube.com/watch?v=QkcU0gwZUdg
[20:21:46] <Hfuy> Actually that's one issue - it needs to be camera-safe, so I need to be careful about port loading.
[20:21:59] <Hfuy> One LED per pin is 160mA, which is too much.
[20:22:13] <timemage> Hfuy, i know what scene that is just from the description.
[20:22:37] <Hfuy> Did you twig how the lightshow was done? :)
[20:23:00] <Hfuy> Cute 1980-vintage amber LEDs. Must have cost a small fortune.
[20:23:44] <w|zzy> ive got boards filled with amber LEDs here.
[20:25:47] <Hfuy> Ah! Tom_L, provider of AVR hardware.
[20:27:59] <Hfuy> Is there some straightforward approach I could take to driving a bunch of LEDs in a camera-safe, non-strobed manner, or would that end up being a job for real shift regs?
[20:28:56] <Tom_L> all at once? the avr pins won't hande that most likely
[20:29:03] <Tom_L> you would probably need some type of driver
[20:30:59] <Tom_L> you should talk to ondraster he did a whole display
[20:32:04] <Hfuy> Hmmm.
[20:32:24] <Hfuy> The data sheet for the ATMEGA168 suggests no more than 100mA per port, or they'll start violating their own voltage specs.
[20:32:41] <Hfuy> Given 16 LEDs, I could drive four per port and be within spec, although I haven't checked the overall dissipation.
[20:39:06] <Hfuy> Where does Atmel keep its data sheets, for crying out loud?
[20:45:07] <Tom_L> which one?
[20:45:31] <Hfuy> S'OK, I've got it.
[20:45:38] <Hfuy> Says the maximum DC current at the power pins is 200mA.
[20:46:07] <Hfuy> I assume anything I sink (it's a common-anode display) into a port eventually goes out of GND.
[20:47:22] <Tom_L> i'd say so
[20:47:34] <Hfuy> Then that's a problem.
[20:47:54] <Hfuy> Maximum current with 16 LEDs switched on is 320mA.
[20:49:26] <Hfuy> Perhaps I simply need buffers.
[20:49:48] <Hfuy> Or just some little FETs, perhaps?
[20:50:43] <timemage> Hfuy, or maybe something like a uln2003
[20:51:35] <Hfuy> I was rather hoping to do it with parts-on-hand.
[20:52:29] <Hfuy> Anyway, thanks for the assist. I'll hit the sack now I think.
[20:54:59] <Oldboy> someone should have told him 20mA per LED is ridiculously high.