#avr | Logs for 2012-04-22

Back
[00:11:05] <ryan-c> What's the difference in speed between using a table in ram and a table in progmem?
[00:12:02] <learningc> same I suppose
[00:12:18] <Casper> quite a bit
[00:12:40] <learningc> Casper: one is faster?
[00:12:44] <Casper> flash access time is, iirc, in a few ms time
[00:12:46] <ryan-c> ram is faster
[00:12:48] <Casper> ram is always faster
[00:13:00] <ryan-c> a few ms is way too slow
[00:13:14] <Casper> depend on the need
[00:13:22] <Casper> I might be wrong
[00:13:27] <learningc> does not it has prefetch cache?
[00:13:29] <ryan-c> for what I'm doing it's too slow
[00:13:32] <Casper> so check the flash timing
[00:14:07] <Casper> learningc: explosion on first floor in st-lambert
[00:14:28] <learningc> isn't the ms figure for flash write?
[00:14:43] <learningc> reading should be faster
[00:15:30] <learningc> Casper: when?
[00:15:36] <Casper> right now
[00:15:47] <Casper> firefighters got called
[00:15:54] <Casper> 2 trucks out of 5 are on site
[00:16:06] <Casper> third truck is there
[00:16:11] <ryan-c> wtf, the device section of avrfreaks is shut down?
[00:16:45] <Casper> 4th on site
[00:18:18] <Casper> learningc: service not required, firecracked launched from the balconey.... idiot...
[00:21:37] <learningc> Casper: lol
[00:22:43] <ryan-c> hm
[00:23:17] <ryan-c> why is it that when i compile for atmega168 it works but atmega328 it doesn't? (this is on the same chip which is a 328)
[00:25:16] <theBear> err, define 'it'
[00:25:20] <theBear> and define 'works' :)
[00:25:43] <ryan-c> the avr doesn't respond
[00:25:51] <ryan-c> doesn't seem to do anything
[00:25:57] <theBear> oh, same code, but compiling for the 'wrong' chip is the only way to 'make it work' ? where/when does it fail ? get any funny compiler warnings or a stupid sized bin ?
[00:26:15] <ryan-c> no compiler warnings
[00:26:29] <ryan-c> AFAICT there's only 3 bytes different in the compiled code
[00:26:50] <theBear> maybe quickly diff the chip-definitions and check you aren't doing something 'silly' like using a port or register name from one chip that is renamed/differently named on the other
[00:27:26] <ryan-c> I think the 328 is supposed to be a drop-in replacement for the 168
[00:28:37] <iR0b0t1> yeah
[00:28:47] <iR0b0t1> there is a 628, no?
[00:28:56] <iR0b0t1> same thing, just program memory size
[00:29:20] <ryan-c> donno about the 628
[00:29:22] <rue_house> when will we be seeing the 9512?
[00:29:45] <iR0b0t1> error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘font’
[00:29:54] <iR0b0t1> where font is const uint8_t font[] PROGMEM = {}
[00:30:45] <rue_house> no comma after font?
[00:30:55] <rue_house> never used the PROGMEM directive
[00:31:47] <iR0b0t1> the elements have commas
[00:31:53] <iR0b0t1> that one error is maddening
[00:31:59] <iR0b0t1> it never gives you the proper location...
[00:32:08] <iR0b0t1> and that is literally the only thing in the include.
[00:32:27] <rue_house> why are hockey nets like $100?
[00:32:27] <iR0b0t1> So, I mean, if I were to remove it, and there was an error elsewhere, the project should theoretically not compile
[00:32:30] <iR0b0t1> but it does compile
[00:33:16] <theBear> aww c'mon, it's easier AND more fun working with those errors than doing yer average newspaper 'cryptic crossword' these days, they run out of sensible cryptic question/answers, these days those things are OUT THERE, even if you read the answers page you can't workout htf they think that answer matches :)
[00:34:01] <Tom_itx> http://www.nongnu.org/avr-libc/user-manual/group__avr__pgmspace.html
[00:34:31] <rue_house> hahah fishing net goes for $10 for 5x16' unless you add the word hockey, in which case the price jumps up to $50
[00:35:02] <rue_house> iR0b0t1, could you show me an internet example of the use of PROGMEM
[00:35:09] <theBear> rue_house, hehehe
[00:35:20] <iR0b0t1> rue_house: that is an internet example
[00:35:46] <iR0b0t1> However, I tracked the error down to "uint8_t". If I used a builtin type, no error.
[00:35:52] <iR0b0t1> uint8_t and friends? error.
[00:36:33] <rue_house> unit8_t is part of types.h
[00:36:40] <iR0b0t1> yes.
[00:38:03] <iR0b0t1> but that is what causes the error
[00:38:09] <iR0b0t1> whenever I use uint8_t
[00:39:07] <rue_house> could you show me a webpage with a programmem example?
[00:41:07] <iR0b0t1> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=38003&start=all&postdays=0&postorder=asc
[00:41:11] <iR0b0t1> my usage of PROGMEM is fine
[00:41:36] <Guest27135> Hello there
[04:28:12] <amee2k> hmm
[04:28:44] <amee2k> duty cycle is usually defined as "on-time divided by period time" which is "on-time divided by (off-time plus on-time)" right??
[04:30:23] <OndraSter> yes
[04:30:58] <amee2k> for an astable 555 circuit, on time is "0.96*(R1+R2)*C" and period time is "0.69*(R1+2R2)*C". thats what it says in the datasheet and thats what i get as a result from my own calculations
[04:31:17] <amee2k> but why does it say that duty cycle is "R2 / (R1+2R2)" then?
[04:31:52] <amee2k> cancelling "0.69 * C" i get "(R1+R2) / (R1+2R2)" which clearly is not equivalent
[04:32:11] <amee2k> or is my math wrong somewhere?
[04:32:57] <OndraSter> I have _just_ closed my tablet
[04:34:00] <amee2k> lol
[07:59:12] <OndraSter> if you rebuild your car to run on electric motor, how the hell does it pass the tests so you can register it at DMV?
[08:00:33] <specing> You are not supposed to tamper with your car
[08:01:08] <specing> The law says that: "In order to be able to register a car, it must pass the required tests"
[08:01:16] <specing> and those tests cost a fortune
[08:01:57] <specing> that is why there are no custom cars in traffic in europe
[08:16:51] <mrfrenzy> OndraSter: in most countries there are an organization for custom build cars that handle tests and approvals
[08:17:22] <OndraSter> specing, appearantly in USA and in AUS you can do that easily right through DMV
[08:17:38] <OndraSter> mrfrenzy, in the case of Europe Union, every screw has to have its own atest :/
[08:17:41] <OndraSter> so not possible in the EU
[08:18:09] <jacekowski> OndraSter: that's BS
[08:18:21] <jacekowski> OndraSter: you take it to be tested and that's all
[08:18:45] <OndraSter> hell, here you have to have it signed even if you paint it (now I am ofc overacting, but to make a point)
[08:19:09] <jacekowski> that's BS
[08:19:16] <mrfrenzy> OndraSter: in Sweden, which is in EU it is very easy. you do your changes, then pay 250 euros for a safet inspection and then you can drive
[08:19:23] <OndraSter> hmm
[08:19:30] <jacekowski> all you do is take it through same test as you normally take it every year
[08:20:01] <jacekowski> if it passes, you send paperwork to DVLA and you get road legal car
[08:20:12] <mrfrenzy> they even supply an instruction book with all things you need to take into account for a legal electric conversion
[08:20:54] <jacekowski> for that all you have to do is take it for emission test or something like that
[08:21:01] <jacekowski> and that get's your road tax reduced to 0
[08:21:48] <jacekowski> then you send paperwork to dvla
[08:22:01] <OndraSter> it differs by country appearantly
[08:22:04] <OndraSter> by a lot
[08:22:09] <jacekowski> http://www.direct.gov.uk/en/Motoring/BuyingAndSellingAVehicle/ImportingAndExportingAVehicle/DG_10018282
[08:22:34] <jacekowski> OndraSter: not really
[08:23:02] <OndraSter> UK is not useful for me
[08:23:02] <OndraSter> http://portal.gov.cz/portal/podnikani/situace/260/263/6012.html
[08:23:05] <OndraSter> try this :P
[08:23:08] <OndraSter> (I know, czech...)
[08:24:55] <OndraSter> too much lawyer logic inside, not something I should be doing right now
[08:25:37] <jacekowski> i don't see a problem there
[08:25:41] <jacekowski> get paperwork sorted
[08:25:42] <jacekowski> have it tested
[08:25:47] <jacekowski> pay some fees
[09:50:37] <Tom_itx> OndraSter just tell them not to look under the hood
[09:50:55] <OndraSter> Tom_itx, and watch out for the stuff going from the exhaust :P
[09:51:01] <OndraSter> (aka none)
[09:51:29] <Tom_itx> you could put a little smoke device there
[09:51:32] <OndraSter> :D
[09:51:37] <OndraSter> reverse polarity elcap...
[09:51:39] <OndraSter> that could work lol
[09:52:21] <OndraSter> some older (90 - 95) car with burnt engine would do the job as a base
[09:52:27] <OndraSter> burnt engine, not transmission ofc
[09:54:47] <specing> Think about how many batteries you'd have to buy...
[09:55:27] <Tom_itx> AA or AAA?
[09:56:44] <OndraSter> haha AAA
[09:56:55] <OndraSter> specing, depends on how long do you want it to last :)
[09:57:18] <OndraSter> either 4 in series and then twice or four times in paralell...
[09:57:29] <OndraSter> really, depends on the engine itself and the batteries too
[09:58:40] <Tom_itx> finding that *one* bad AAA cell may be a taksk though
[09:59:20] <Tom_itx> think about it though... you could stuff those places you could never stuff a bigger battery
[09:59:27] <OndraSter> :D :D
[09:59:29] <OndraSter> yeah
[09:59:34] <OndraSter> and then finding the problematic one..
[09:59:36] <OndraSter> nope!
[09:59:40] <OndraSter> each one would have to be tested in before
[09:59:57] <OndraSter> and each 4 or 8 one would put some small micro to check it whether this set is okay or bad
[10:00:59] * OndraSter doesn't like shifting gears and playing with clutch
[10:01:05] <OndraSter> I'd be fine having EV
[10:33:44] <tosmo> i use a ctc timer for periodic adc measurements. every now and then (on average about every 10th time) the timer ISR will be fired twice / the timer resets faster. any ideas what can cause this?
[11:01:19] <tosmo> hm. found it, but don't understand it. i was toggling PB4 for debugging purposes and that from time to time interfered with the TIMER0_COMPA_vect interrupt. PB4 on my chip has nothing to do with timer0 though. and even if, would a pinchange trigger the COMPA interrupt in a ctc mode timer?
[11:26:20] <sjs205> Hello all, I'm having a problem with interrupts, specifically, it I include the NO_BLOCK attr, the resultant .lst file doesn't not show the 'cli()' command before the routine... have I got it wrong?
[11:28:43] <karlp> if i'm reading the manual right, no block means that it can keep coming back in, so there shouldn't be a cli
[11:28:53] <zii> Which adc register has the lsb? β€” ADCL, right?
[11:29:08] <Xata> hi. if i got 8-bit number, and i want to... um... "granulate" it (so 0-16 will be 0, 16-32 will be 16, etc.) why 32*(int)(8bit_var/32.0) will not work?
[11:30:52] <sjs205> karlp, apologies, I mean ISR_BLOCK... and I notice that the normal behaviour if defined without an attr should be to block, but it doesn't seem to be...
[11:51:54] <sjs205> AHHH, I think the hardware clears the interrupt naturally, hence no cli... grr!
[11:57:53] <zii> What does ADCH do?
[11:58:25] <OndraSter> MSB of the ADC result
[11:58:26] <vectory> save the high byte of the analogue digital conversion, basically?
[12:00:08] <zii> Cool.
[12:00:46] <zii> How to get an answer in #avr β€” ask the same question rephrased after 30 minutes.
[12:01:05] <Tom_itx> it's all in the asking
[12:01:42] <specing> zii: problem?
[12:02:46] <OndraSter> zii, basically, not all of us are here all the time :)
[12:04:31] <zii> specing, Did I say I have any?
[12:05:11] <specing> zii: You obviously have some, otherwise you wouldn't be asking
[12:05:52] <Tom_itx> OndraSter speak for yourself :)
[12:05:57] <OndraSter> :D
[12:06:04] <OndraSter> I said "not all of us"
[12:06:10] <OndraSter> not "everybody is not here all the time" :P
[12:06:16] <zii> specing, You're wrong, I don't have any.
[12:07:32] <zii> It should be L + (H << 8), right?
[12:08:41] <tosmo> Xata: i think all that you want is (val & (~15))
[12:09:10] <specing> zii: See? You have problems
[12:09:31] <tosmo> hm. close but no cigar ;)
[12:10:16] <OndraSter> zii, depends on if you have left align enabled or not
[12:10:49] <zii> specing, What do you want? I assumed you implied "problems with that".
[12:10:58] <OndraSter> GUYS
[12:11:00] <OndraSter> stop arguing
[12:11:13] <OndraSter> (unless you are lads. THEN YOU STOP ARGUING AS WELL!)
[12:11:23] <OndraSter> *-you
[12:14:29] <specing> Who is arguing?
[12:14:35] <specing> Noone is arguing...
[12:14:45] <Tom_itx> now you're arguing with OndraSter!
[12:14:51] <Tom_itx> :)
[12:14:59] <Tom_itx> women.
[12:15:00] <OndraSter> specing, I dare you :P
[12:15:12] <specing> See? You are the one arguing...
[12:15:34] <OndraSter> -.-
[12:22:54] <tosmo> ADC_vect gets triggered slightly too early sometimes. it is only reliable if i put a loop_until_bit_is_clear(ADCSRA, ADSC) before actually reading values in the ISR
[12:23:19] <tosmo> weird, isn't it?
[12:26:45] <zii> http://sprunge.us/Maff?c <-- The snd_sin is sometimes triggered, sometimes it's not. Changes on RESET. Am I doing something wrong?
[12:29:12] <tosmo> zii: you have to either enable continous measurements or set ADSC bit again after you read from ADCL/H
[12:30:15] <zii> So I should ADCSRA |= 1 << ADSC after each read?
[12:31:02] <tosmo> yes
[12:32:34] <tosmo> if you don't want to get that ~1ms delay between measurement and reading, you can configure continuous mode
[12:33:10] <zii> Does the ADSC get set to 0 after my read?
[12:33:15] <tosmo> yes
[12:33:47] <zii> Awesome.
[12:33:59] <tosmo> thats btw why i used loop_until_bit_is_clear(ADCSRA, ADSC)
[12:34:31] <tosmo> you won't need it, your 1ms delay is about 10 times more than the adc needs with your setup
[12:38:46] <zii> ADLAR is supposed to set the resolution to 8 bits, but looks like the ADCH is still used, how come?
[12:41:45] <tosmo> you always need to read ADCH. so when using 8bit resolution, its preferrable to have them in ADCH so that you don't need to read both ADCH and ADCL
[12:42:37] <tosmo> thats one of those caveats that result out of the 16bit-regsters-on-8bit-MCU handling
[12:44:12] * tosmo 's afk
[12:55:42] <specing> Yay I found a virus on my usb key :)!
[12:56:14] <specing> Anyone wants it? Its only 110 KB? :D
[12:56:37] <RikusW> want what?
[12:56:43] <specing> < specing> Yay I found a virus on my usb key :)!
[12:57:10] <specing> /mnt/usb0/8xcrbho6.exe: Exploit.PDF-9871
[12:57:47] <RikusW> and it was as run in autorun.fin right ?
[12:57:53] <RikusW> *inf
[12:58:12] * RikusW always disable autorun on win...
[12:59:00] <RikusW> Linux is nice, no autorun, and you can easily remove such viruses
[12:59:11] <specing> Idk
[12:59:20] <specing> I guess my dumb windows box has it too
[12:59:29] <RikusW> windows autorun for usbsticks is a really really stupid idea....
[12:59:37] <specing> Its not connected to the net so there shouldn't be any problem
[12:59:58] <RikusW> I use tweakui to disable autorun
[13:00:01] <specing> RikusW: windows autorun is a really, really stupid idea :)
[13:00:32] <specing> Now let us shorten that even more...
[13:00:35] <specing> RikusW: windows is a really, really stupid idea :)
[13:00:44] <RikusW> its an excellent idea to create work for antivirus companies...
[13:00:49] <RikusW> yeah :-P :-D
[13:00:50] <specing> Heh
[13:00:51] <specing> :D
[13:01:01] <specing> vx.netlux.org seems down too
[13:01:12] <specing> seized by the ukrainian police...
[13:01:19] <RikusW> why ?
[13:01:33] <specing> Luckily I have a whole archive or virii about 5GB in size
[13:01:38] <specing> of*
[13:01:57] <specing> http://vx.netlux.org/index.html
[13:02:57] <RikusW> I rarely use XP.... mostly Debian
[13:03:28] <RikusW> I still use AS4 on XP
[13:03:37] <RikusW> maybe I should just code my own ide ;)
[13:03:56] <RikusW> I already did the programming dialog
[13:04:13] <RikusW> and a large part of an avr assembler
[13:04:27] <RikusW> And atmels gcc works on linux
[13:13:55] <vectory> its not atmels gcc
[13:15:30] <RikusW> atmel compile the avr toolchain for linux
[13:15:46] <RikusW> the new one anyways
[13:17:03] <specing> I compile my avr toolchains
[13:17:06] <specing> not atmel
[13:17:19] <RikusW> where do you get the source ?
[13:22:12] <specing> gcc.gnu.org, obviously
[13:23:31] <abcminiuser> Tom_itx, you around?
[13:30:01] <Tom_itx> abcminiuser what's up?
[13:31:30] <abcminiuser> Got a guy trying my programmer code under Windows
[13:31:50] <abcminiuser> He says that after ever successful program, the programmer disconnects/reconnects
[13:31:53] <abcminiuser> Using AVRDude
[13:32:03] <abcminiuser> You've tried it in the past, does it do that for you?
[13:32:13] <Tom_itx> not with avrdude
[13:32:32] <Tom_itx> it works fine in studio though
[13:35:44] <abcminiuser> Yeah he says it works, but resets afterwards
[13:35:53] <abcminiuser> www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=949097#949097
[13:38:17] <abcminiuser_> !thislog
[13:38:27] <Tom_itx> zlog
[13:40:08] <abcminiuser_> Damn, when did that change?
[13:40:17] <Tom_itx> it's mine not rue's
[13:40:21] <Tom_itx> !thislog
[13:40:21] <tobbor> This one: http://rueshouse.dyndns.org:82/~ircjunk/irclogs/html/%23avr-2012-04-22.html
[13:41:05] <Tom_itx> i think it's easier to read :)
[13:42:07] <specing> http://imgur.com/r/gif/c79B
[13:43:58] <OndraSter> specing, 404
[13:45:58] <abcminiuser_> Tom_itx, that doesn't happen to you?
[13:48:23] <specing> wtf
[13:52:06] <Tom_itx> abcminiuser_ i haven't noticed it but i don't use avrdude very often
[13:52:22] <abcminiuser_> Indeed, and I need to rejigger everything to test
[13:52:26] <abcminiuser_> Ah well, I'll do it tomorrow
[13:52:59] <Tom_itx> i'm knee deep in a project atm or i'd test it right now
[13:53:20] <Tom_itx> program a chip and then dude disconnects?
[13:53:42] <Tom_itx> it's a command line utility though right?
[13:53:47] <Tom_itx> why wouldn't it?
[13:54:58] <Tom_itx> this is with avrdude under windows only right?
[13:55:39] <Tom_itx> well crap i can't test it anyway, my libusb is screwed up on my windows machine
[13:55:54] <Tom_itx> lemme see if it's on this one...
[13:56:16] <Tom_itx> zlog
[13:58:13] <Tom_itx> i don't have an updated working avrdude right now :(
[13:58:24] <Tom_itx> 5.8 is on this one
[14:49:17] <izua> oh man, i've been debugging like crazy for the past few hours. turns out, in the isis vsm simulator, on the mega16, the overflow and compare match flags for timer 2 are switched, when clocked from the main oscillator
[14:57:47] <ThersiT> I just tried out my new programmer from tom_itx and it's great!
[15:30:43] <Tom_itx> ThersiT, where are you located?
[15:30:54] <Tom_itx> glad you like it
[15:31:52] <ThersiT> I'm in austin. It came in yesterday. Really fast.
[15:32:03] <Tom_itx> ahh ok
[18:57:44] <johntramp> hi, there was an aussie i was talking to here who lived in shenzen and did pcb fab, is he still around?
[18:57:59] <Tom_itx> yup
[18:58:05] <Tom_itx> CapnKernel
[18:58:16] <johntramp> cheers
[18:58:19] <CapnKernel> Hi there
[18:58:30] <johntramp> :) hi
[18:58:45] <CapnKernel> How's things?
[18:59:01] <johntramp> good, ill pm
[18:59:04] <CapnKernel> Ok
[19:11:31] <inflex> morning folks.
[19:12:31] <Tom_L> hi inflex
[19:14:34] <CapnKernel> inflex: hi