#avr | Logs for 2013-02-24

Back
[00:25:24] <flop> Casper: you're still awake?
[00:25:31] <Casper> am I?
[00:26:22] <flop> seems like I got a reply from my polling :P
[00:27:23] <Casper> be quick, the bed is close
[00:28:52] <flop> well then tomorrow
[00:31:54] <Casper> I'm still here for a little bit
[00:33:20] <flop> Did you get your battery charger working?
[00:33:29] <Casper> which one?
[00:33:45] <flop> the 10A sla charger
[00:33:55] <Casper> didn't finished it actually :D
[00:34:14] <Casper> I got efficiency issue in weird place
[00:34:37] <flop> Are you using a uC?
[00:34:38] <Casper> so I'm debating about a change in topology
[00:34:39] <Casper> no
[00:34:43] <Casper> old smps IC
[00:34:50] <Casper> (tl431)
[00:35:51] <flop> There are chips already available for that
[00:37:46] <Casper> yup
[00:38:04] <Casper> I have my eyes on the LT3789 or something like that
[00:38:25] <Casper> and it's little brother that do buck only
[00:38:49] <Casper> that will require that I make a board to be fabbed
[00:38:57] <Casper> since it's too small for what I can do at home
[00:41:11] <flop> why not use chips that have charge algorithm already implemented in them?
[00:41:32] <Casper> the charge algo is simple: 13.6V current limited at the input
[00:41:42] <Casper> that's it :D
[00:42:45] <flop> what about the beginning/end of charge?
[00:43:23] <Casper> SLA don't need an end of charge, 13.6 is float charge, and can be left on indefinitelly
[00:43:32] <Casper> the current limiting is the only issue
[00:44:15] <flop> usually you don't get maximum capacity if you don't overcharge it a bit
[00:44:27] <Casper> I'm actually more concerned about the psu than the batt
[00:44:34] <Casper> SLA don't need the equalisation charge
[00:44:50] <Casper> but I'm also considering to just use flooded batts
[00:45:01] <Casper> so all I need is a fet on the divider
[00:45:18] <Casper> or I 1 bit DAC to make a variable reference
[00:46:16] <Casper> I'm considering to use flooded too, and flooded... need the 14.4V
[00:46:24] <Casper> and higher charge current
[00:46:40] <Casper> the end of charge is C/50
[00:47:02] <Casper> I'm considering to get like a 110AH, so it mean the end of charge is at 2.2A
[00:49:02] <flop> How fast will you charge it?
[00:49:19] <Casper> the psu I was planning to use is a 90W one
[00:49:25] <Casper> that will also power stuff
[00:49:42] <Casper> I estimate that I'ld have about... 40-50W left to charge
[00:49:57] <Casper> so 3-4 amps
[00:50:13] <Casper> I might have to go with a 120W psu
[00:52:03] <flop> so C/25
[00:52:59] <Casper> yeah, which is a bit slow
[00:53:09] <vsync_> that's... a lot slow, lol
[00:53:24] <Casper> however, that's standby stuff
[00:53:41] <vsync_> is this like for some sort of back up power or what
[00:53:54] <Casper> network/phone gear ups
[00:54:24] <vsync_> what's the catch, why not use a charger off the shelf, could be even cheaper
[00:55:00] <Casper> off the shelf charger ain't designed to power a load all the time, most ain't good at maintaining a batt full
[00:55:18] <Casper> or initiating a new charge after a while
[00:55:23] * Casper wonders...
[00:55:27] <Casper> you gave me an idea
[00:55:39] <vsync_> mmm that's true
[00:55:55] <flop> That sounds like a lot of trouble for occasional power outage
[00:56:38] <Casper> 200$ for the charger.... yuck...
[00:56:40] <Casper> yes it is
[00:56:42] <Casper> however
[00:56:50] <Casper> it will be the sole phone here soon
[00:57:00] <Casper> so will need to be as reliable as possible for 911
[00:57:51] <flop> why not keep an emergency cell phone?
[00:58:29] <Casper> that's actually plan b
[00:59:06] <Casper> I actually have several plans... might simply get a 40A charger...
[00:59:15] <Casper> and 200A batt bank
[00:59:25] <Casper> and get some 12V atx psu
[00:59:35] <Casper> and build a nas/server
[01:00:30] <Casper> too bad that none are well designed...
[01:00:43] <Casper> with a shunt at the batt to know the charge rate, and true batt voltage
[01:00:51] <Casper> so it can end the charge at the real time
[01:02:09] <Casper> if only battery were more perfect...
[01:02:23] <Casper> and wouln't take less charge as it charge up...
[01:02:36] <Casper> i.e. increasing the current wouln't increase the voltage
[01:02:51] <Casper> I could have done a simple uC based smps
[01:03:14] <Casper> very crude one... "if voltage is too high, lower pwm, else increase" loop...
[01:03:22] <flop> you could just trickle charge the battery at constant 13.6
[01:03:26] <flop> you could just trickle charge the battery at constant 13.6
[01:04:53] <Casper> yes, but not great for flooded batts, which, due to the cheaper price and higher capacity, might be what I'll use....
[01:05:06] <Casper> I saw a 38AH AGM batt... at 110...
[01:05:09] <flop> you mean "if only batteries were digital"?
[01:05:31] <Casper> a marine batt, which would be fine for what I'ld do, a 110AH is about 100$...
[01:09:23] <Casper> currently however
[01:09:28] <Casper> I'm toying with this!
[01:09:50] <Casper> http://casper.is-great.org/IMG_0677.JPG
[01:10:04] <Casper> flop: sorry, the image is slightly bluried :D
[01:20:22] <vsync_> do you live in the bush then
[01:21:07] <Casper> nope
[01:23:13] <vsync_> alright. seems like killing a fly with a shotgun going 110 Ah emergency power supply for a phone, especially if you live in a city... and usually outages are less frequent in the city than in the countryside
[01:23:29] <vsync_> if i understood you correctly
[01:26:44] <Casper> which is why the project is put aside for now
[01:27:01] <Casper> I'm currently more toying with my new camera than in electronics
[01:27:07] <Casper> you saw the pic?
[01:30:40] <vsync_> checked it now :)
[01:36:52] <Casper> nice closeup isn't it? :D
[02:00:28] <Casper> nite
[06:13:37] <Grievar> are there any registers that get implicitly changed?
[06:13:45] <Grievar> (general purpose registers, that is)
[06:20:01] <OndraSter> implicitly changed?
[06:20:26] <Grievar> like are there any instructions that change a register that aren't an instruction to modify that register
[06:20:34] <OndraSter> oh
[06:20:37] <OndraSter> multiply instructions
[06:20:41] <OndraSter> they use R0 R1
[06:20:49] <Grievar> oh interesting
[06:20:54] <OndraSter> can't think of anything else from top of my head
[06:21:41] <Grievar> well I have this issue where I'm taking rather simple assembly that GCC generated, and moving instructions around in a way that shouldn't NOT work, but it still breaks the code.
[06:21:56] <Grievar> although some of the meta-tags that GCC's adding might be breaking
[06:21:58] <OndraSter> ?
[06:23:12] <Grievar> OndraSter: basically when you declare an interrupt routine like ISR(TWI_vect) {}, it seems like GCC always pushes all of the registers at the beginning of the function
[06:23:24] <Grievar> even if some of the execution paths don't call other functions and don't use those registers
[06:23:38] <OndraSter> yes it does
[06:23:43] <OndraSter> is it on -O3?
[06:23:46] <OndraSter> or -Os?
[06:24:33] <Grievar> -O2
[06:30:00] <OndraSter> try -O3
[06:32:21] <Grievar> OndraSter: nope, identical
[06:32:30] <OndraSter> hmm
[06:32:34] <OndraSter> yeah, gcc is funky
[06:38:38] <specing> -O666 ;D
[06:40:13] <OndraSter> heh
[06:40:20] <OndraSter> I thought it went all down to -O9
[06:40:23] <Grievar> OndraSter: also for some reason avr-gcc loves to put the 'ret' instruction somewhere in the middle of the code
[06:40:32] <OndraSter> eh
[06:41:02] <specing> Grievar: what version?
[06:41:13] <Grievar> 4.7.2
[06:42:48] <Grievar> oh okay by putting the ret in the middle of the code it avoids an extra jmp
[06:51:49] <Grievar> specing, OndraSter: what does .L__stack_usage do?
[06:52:14] <OndraSter> no idea
[06:58:38] <Grievar> hm
[06:58:54] <Grievar> I wonder if there's actually a minimum number of cycles after the TWI interrupt handler is invoked before you can read TWDR
[06:59:01] <Grievar> they wouldn't do that and not document it would they?
[08:51:33] <iSaleK> I've bought a new ATTiny2313 and the device still keeps resting after 1s :)
[08:52:07] <iSaleK> Wierd thing is I have a new tiny running on internal 8MHz clock and USBasp won't programm it unless I select SLOW SCK (with jumper on USBasp)
[08:52:13] <iSaleK> Any ideas what to do?
[08:52:57] <OndraSter_> default /8 prescaler in fuses?
[08:54:20] <Grievar> so I've noticed that avr-gcc rarely uses jump tables
[08:54:27] <OndraSter_> yeah
[08:54:33] <OndraSter_> maybe only on big switches?
[08:54:37] <Grievar> are jump tables not worth it in avr?
[08:54:58] <OndraSter_> depends on the size it would be
[08:55:01] <OndraSter_> small ones - not worth it
[08:57:32] <iSaleK> OndraSter_ The fuses are 64 DF (LOW/HIGH)
[08:58:04] <iSaleK> As far as I recall the old tinys that I've programmed could be read/write without having to select slow ck on usbasp :\
[09:02:02] <iSaleK> How come if I select slow SCK it works?
[09:03:06] <OndraSter_> because it has got CKDIV8 fuse set
[09:03:28] <OndraSter_> and the clock speed of the ISP needs to be <clk/4
[09:03:46] <OndraSter_> no idea what is the sck speed of the usbtinyasp
[09:03:55] <OndraSter_> or usbasp
[09:03:56] <OndraSter_> or whatever
[09:04:03] <iSaleK> USBasp has 12mhz clock
[09:04:24] <OndraSter_> that's not what I asked about
[09:19:49] <iSaleK> Is it possible that Atmel Studio turns on WDT even if I'm not using it?
[09:19:57] <iSaleK> Because device keeps resetting :\
[09:20:30] <OndraSter_> no
[09:21:38] <iSaleK> Then how come the device is reseting itself ? Same code (with just 10-15 lines to initialize the device and beep the buzzer) acts the same on PCB and protoboard...
[09:21:55] <iSaleK> *on PCB and solderless board
[09:22:13] <OndraSter_> bug in your code?
[09:22:16] <OndraSter_> how do you detect the reset?
[09:23:57] <iSaleK> Buzzer should beep every 1.5s but it keeps beeping every few ms or so...
[09:24:20] <iSaleK> On another chip I was using 128Khz oscillator with 1024 prescaler and the chip was resetting every 1s
[09:24:44] <iSaleK> numbers on 7segment display were going from 0-4 instead of 0-9 and they change every 500ms
[09:24:47] <iSaleK> *250ms
[09:25:03] <iSaleK> and they were going to 0-3, so just 4 digits
[09:25:24] <OndraSter_> bad code then
[09:25:28] <iSaleK> Now on solderlessboard buzzer keeps beeping whatever I do in code and it has only one line in initialization to make a beep
[09:55:49] <pepsi> sup losers
[09:56:00] <creep> sup lamer
[09:56:05] <pepsi> stuff
[09:56:24] <OndraSter_> 'sup 'sup
[09:56:26] <OndraSter_> where is coke?
[09:56:44] <creep> pepsi is some poisonous chemical
[09:57:54] <OndraSter_> yeah
[09:57:55] <creep> i think i will use a j-fet in series with a shunt regulator :(
[09:57:55] <pepsi> i had some maids clean my apartment
[09:57:58] <OndraSter_> and some people drink it
[09:57:59] <pepsi> its so supser clean
[09:59:24] <pepsi> atmel's Cortex M3 stuff was like 30 cents more than everyone else's offerings :(
[09:59:35] <Horologium> oh nooo!
[09:59:42] <pepsi> yeah
[10:00:12] <pepsi> ST Micro is really cheap
[10:00:36] <pepsi> but Silicon Labs won, even though they were more than ST
[10:01:02] <pepsi> cause they have a builtin regulator, and <1% accurate internal oscillator, and high drive io
[10:01:17] * pepsi slaps tobbor
[10:14:08] <RikusW> :-P
[10:15:07] <RikusW> lets start a soda war... ;)
[10:15:18] <iSaleK> Is there a calculator for CTC mode?
[10:17:06] <RikusW> how about excel ?
[10:17:52] <specing> gnumeric ;P
[10:19:04] <RikusW> openoffice ?
[10:19:13] <specing> oo is crap
[10:19:24] <RikusW> I noticed its slow
[10:19:40] <RikusW> how about Kingsoft office ?
[10:19:50] <specing> now wtf is that?
[10:20:02] <RikusW> it comes with Foxit Reader
[10:28:40] <pepsi> now wtf is that?
[10:28:50] <RikusW> and only a 51MB install file
[10:28:55] <RikusW> FoxitOfficeSuite531.606_enu_Setup.exe
[10:29:16] <RikusW> Foxit Reader is a very nice PDF reader
[10:29:16] <pepsi> 606? why not 666?
[10:29:36] <RikusW> to annoy you :-P
[10:29:49] <Tom_itx> question everything
[10:29:58] <pepsi> TOMMY
[10:30:03] <RikusW> seems the eary checkpoint scanner was an IBM 3666 ;)
[10:30:19] <RikusW> *checkout
[10:31:03] <Horologium> libreoffice...
[10:44:23] <Tom_itx> ?
[10:45:45] <Horologium> just my entry into the calc/spreadsheet wars earlier.
[12:48:37] <Posterdati> hi
[12:48:38] <tobbor> Hello Posterdati
[12:48:52] <Posterdati> is anyone using virtual functions with avr-gcc?
[13:06:55] <specing> wat
[13:28:30] <Posterdati> ok solved
[13:33:09] <Grievar> If I'm going to turn a bit off and then later turn it back on without touching anything else in that register, is it faster to do load, or, and, store store
[13:33:14] <Grievar> or is it faster to just use sbi/cbi?
[13:38:58] <JyZyXEL> whats the notation for saying when something is dividable by something else?
[13:40:00] <JyZyXEL> for example 2^(3n)+6 is dividable by 7 with every n in N
[14:06:40] <OndraSter_> <Grievar> or is it faster to just use sbi/cbi?
[14:06:46] <OndraSter_> SBI/CBI work only on the bottom 0x3F registers
[14:06:50] <OndraSter_> or some similar number
[14:23:18] <vsync_> hmm
[14:23:34] <vsync_> i figured out a bullshit-o-meter for myself, when watching anything from the internet
[14:24:55] <vsync_> the level of bullshittery, is directry proportional to the amount of "um", "uh" and "err" used by the speaker
[14:25:00] <vsync_> directly
[14:26:39] <vsync_> "the umm thing uhhh is umm that errr uhhh"
[15:58:17] <Grievar> So TWINT is one of those weird things where you set it to clear it. If you do that again, does it get re-set or does nothing happen?
[16:07:54] <Xark> Grievar: Hmm, that is fairly complicated, however from my read, the CPU can only clear the bit (by writing a one) and the hardware is the one that sets the bit. So if you write a 1 again it will "clear it again" from what I can tell. They do have a nice "flowchart" that is probably good to follow...
[16:12:28] <Grievar> Xark: *nod*
[16:39:41] <Grievar> Well I got my project into presentable form: https://github.com/rfmerrill/krackrainbow
[16:50:13] <creep> do you use optical isolation for usb ?
[16:51:16] <creep> nice :) http://opticisolator.com/optical-usb-cables.html
[17:04:02] <wakko> is it possible to have a view on assembly code in atmel studio ?
[17:05:12] <OndraSter> just open the Output folder => the .lss file
[17:05:18] <wakko> k
[17:06:06] <wakko> too bad it's not in atmel studio, but thanks
[17:06:13] <OndraSter> huh?
[17:06:14] <OndraSter> it is there
[17:12:09] <creep> yeah i found a real hack article http://www.jameco.com/Jameco/workshop/diy/recipe9.html?sp_rid=MjAzMzA2MjAwNDMS1&sp_mid=3490803 How to Make a Two-Way Optoisolator in 60 Seconds or Less
[17:17:32] <wakko> OndraSter: not in the ide..
[17:28:42] <OndraSter> don't lie to me wakko :P
[17:29:16] <OndraSter> wakko, http://clip2net.com/s/2Sbp7
[17:30:10] <wakko> ahh
[17:30:22] <wakko> haha
[17:30:45] <wakko> i was more thinking about something like "right click -> asm"
[17:30:51] <OndraSter> oh
[17:30:56] <wakko> but yes i can open the .lss in atmel studio
[17:31:49] <wakko> but what difference if i open it in notepad ?
[17:34:44] <creep> ah, better than oled? http://en.wikipedia.org/wiki/Quantum_dot
[17:35:14] <creep> Quantum dots (QD) are semiconductor nanocrystals that possess unique optical properties.[85] Their emission color can be tuned from the visible throughout the infrared spectrum. This allows quantum dot LEDs to create almost any color on the CIE diagram.
[17:35:48] <creep> at last photorealistic monitor :)
[20:05:57] <Grievar> this C code: http://pastebin.com/Mwx92miD results in this assembly: http://pastebin.com/Xvjdc6iN
[20:05:59] <Grievar> REALLY annoying
[20:06:12] <Grievar> it happens on every optimization level, even if you declare the variable as volatile register
[20:48:59] <rue_house> who is around for atleast another hour, has an avr set up with leds on porta, and runs linux?
[20:52:14] <krphop> rue_house: sorry, on osx
[20:52:44] <rue_house> osx may work
[20:52:55] <rue_house> do you have wget and make and avr-gcc?
[20:53:16] <krphop> no make, but avr-gcc
[20:55:37] <krphop> well, the cross pack alternative, but i think straight avr-gcc is available in that
[20:59:49] <pepsi> rue! my arch enemy!
[20:59:53] <pepsi> whats up
[21:27:10] * pepsi stabs rue_house repeatedly
[22:42:54] <TechIsCool> so what is everyone favorite cheap micro controller?
[22:59:09] <rue_house> hey pepsi
[22:59:38] <rue_house> pepsi, your no arch enemy, your just some smart guy who went really, odd
[22:59:44] <rue_house> TechIsCool, atmega32
[23:33:26] <pepsi> SiM32U144
[23:33:50] <TechIsCool> pepsi: That does not even resolve on google
[23:34:57] <pepsi> oh
[23:35:04] <pepsi> SiM3U144
[23:37:16] <pepsi> i dunno, i'm getting it for <$2,
[23:37:34] <pepsi> but its >$5 on digikey
[23:38:19] <pepsi> 100k qtys changes the whole game, i guess
[23:39:40] <pepsi> how much is an atmega32?
[23:41:01] <pepsi> meh, all micro controllers are the same crap.. <$2 for the actual silicon, plus markup
[23:41:40] <pepsi> why can't we be arch enemies, rue?
[23:41:46] <TechIsCool> thats what it seems to be
[23:42:27] <pepsi> anyhow, i like the silicon labs stuff cause it reduces the cost of the rest of the system
[23:42:49] <pepsi> has an onboard regulator, <1% accurate internal oscillator, and high drive IO
[23:43:00] <TechIsCool> nice