#avr | Logs for 2016-02-14

Back
[00:41:43] <Eddie888_> ?
[00:42:59] <Casper> !
[00:50:29] <Thrashbarg>
[02:02:32] <cehteh> morning
[02:03:40] <Casper> o/
[06:05:33] <antto> what the hell is the avr-man executable?
[06:08:49] <cehteh> avr-man - a man(1) replacement to access the avr-libc manual pages
[06:10:28] <antto> it's not an abbreviation for the actual compiler, right?
[06:10:51] <cehteh> thats the manpages frontend
[06:11:02] <cehteh> avr-gcc is the compiler
[06:11:53] <cehteh> type avr-<tab><tab> to see all possible completions for avr util programs
[06:25:45] <antto> isn't there a newer avrgcc than 4.3.3 for windows?
[06:26:38] <antto> ISR(USART1_RXC_vect) doesn't compile, ISR(USART1_RX_vect) does, but if i understand correctly, the first one is the "proper" one
[06:30:29] <antto> or is it
[06:38:02] <cehteh> antto: the names differe for some chips
[06:39:37] <antto> figured, now, i get undefined reference to __muluhisi3 and such
[06:39:39] <antto> x_x
[06:39:50] <antto> that's with a newer avrgcc
[06:42:00] <cehteh> avr-gcc --version
[06:42:00] <cehteh> avr-gcc (GCC) 4.8.1
[06:42:03] <cehteh> ... oops :)
[06:42:09] <cehteh> linux here
[06:42:45] <antto> it's a 4.9.1
[06:43:04] <antto> ah no, 4.9.3 even
[06:43:07] <antto> x_x
[06:43:08] <cehteh> ok
[06:43:17] <cehteh> i was wondering because i am using debian stable
[06:43:25] <cehteh> should be not the newest
[06:44:18] <cehteh> but the undefined reference looks strange, what operation is that exactly? what types?
[06:45:24] <antto> no idea, it complains about it in main.c
[06:45:32] <cehteh> are there cases in avr-libc where one needs -lm? i never used that
[06:45:37] <antto> i do have some uint64_t divisions there
[06:45:47] <cehteh> that could be it
[06:45:56] <antto> i think i have -lm too
[06:46:22] <cehteh> iirc there where also some defines to tune this stuff
[06:46:22] <antto> yup, i don't know why, but i've added it
[06:46:56] <antto> should the -lm be changed for newer avrgcc?
[06:47:32] <cehteh> no idea .. for buildin math one should not need -lm
[06:47:59] <cehteh> but rtfm esp about 64bit math, there where some restrictions and tuning knobs
[06:48:37] <cehteh> i try to avoid division .. esp on big types
[06:50:17] <antto> it's unavoidable ;]
[06:51:01] <antto> i was either gonna use floats, or integer division
[06:51:37] <cehteh> if you say so
[06:53:39] <cehteh> floats shouldnt be much more worse than 64 bit then, give it a try
[06:54:22] <antto> too late now, the nasty algo is already written and works
[06:54:34] <antto> ..with avrgcc 4.3.3
[06:54:36] <cehteh> i'd prefer integers because of exactness, then check the docs
[06:55:01] <antto> floats would have been more exact in fact ;]
[06:55:07] <Caesium> is division particularly nastily slow on a tiny?
[06:55:22] <cehteh> how can floats be more exact?
[06:55:28] <antto> no idea, this is on an atmega2561
[06:55:47] <cehteh> proper integer calculation (without over or underflows) is exact
[06:56:02] <antto> cehteh because you get finer resolution as you get closer to zero
[06:56:24] <cehteh> thats what i meant with underflow
[06:56:51] <cehteh> fixed point math
[06:57:07] <antto> yes, that's why i spent days trying out how to do it with less error with integers
[06:57:23] <antto> otherwise i just write 3 lines of float math and it would work ;]
[06:57:32] <cehteh> mhm
[06:57:37] <cehteh> whats it?
[06:58:06] <antto> adjustable clock shuffle for a bassline sequencer ;P`
[06:58:41] <cehteh> of course integers have an exact range, if you leave that range then you loose data
[06:59:16] <cehteh> why does that need so much precision? and have you thought about storing the values in rationals?
[06:59:44] <Caesium> think its time to break out the scope as an expensive stopwatch :D I have a simple mod/div loop that breaks out an int into its component digits but maybe there's a faster way to do it
[07:00:05] <antto> think of a clock generating a square wave, this square wave has a frequency (tempo actually) parameter, but there is also a shuffle amount parameter
[07:00:46] <antto> when the shuffle is non-zero, the frequency begins to split into two sections which alternate, one of them is slower than the desired freq, the other one is faster
[07:01:05] <Lambda_Aurigae> Caesium, yes, division is slow on an attiny...at least compared to an atmega....and floating point is very slow and massive on all avr
[07:01:05] <cehteh> yes
[07:01:09] <antto> the overal frequency is maintained thanks to the nasty math underneat
[07:01:20] <antto> the amount of "split" is controlled by the shuffle amount
[07:01:33] <cehteh> this split accumulates?
[07:01:58] <antto> no, it alternates between the two frequencies
[07:02:05] <Caesium> Lambda_Aurigae: ok. so my mod/div is probably horrifically slow, I'd never thought to time it. I'll do so and see what replacing it with a comparison loop does instead
[07:02:20] <cehteh> so its more like a duty cycle on pwm?
[07:02:25] <antto> yes
[07:02:40] <cehteh> i dont understand why that needs 64 bit math :D
[07:02:57] <antto> because it's not duty cycle ;]
[07:03:28] <cehteh> i mean 8bit pwm is really to low ... but how exact are your clock devitations? you certainly dont need nanoseconds there
[07:03:29] <antto> the square wave is generated in software, on a 4.8kHz sampling rate
[07:03:48] <Lambda_Aurigae> multiplication is faster on atmega than attiny too, due to the hardware multiplier
[07:04:52] <mohsen_> Could AVRs be programmed by C++?
[07:04:57] <Lambda_Aurigae> mohsen_, yes
[07:05:15] <cehteh> .. which doesnt mean you should do it :D
[07:05:23] <Lambda_Aurigae> but, remember, instantiating classes will likely overload it fast...very limited ram.
[07:05:26] <mohsen_> Lambda_Aurigae: So OOP could be used in building their programs?
[07:05:27] <antto> C++ is fun fun fun
[07:05:34] <Lambda_Aurigae> I don't see any reason for oop in general
[07:05:42] <cehteh> you can use OOP in C as well
[07:05:46] <Lambda_Aurigae> and can see no reason to use C++ over C for me.
[07:05:49] <cehteh> where it makes sense
[07:06:09] <cehteh> lots more manual work, but also more control
[07:06:10] <Lambda_Aurigae> arduino is actually using C++ in a lot of its stuff.
[07:06:14] <cehteh> and less ram
[07:06:34] <mohsen_> What is(are) some C++ compilers for Atmegas?
[07:06:40] * Lambda_Aurigae dislikes arduino as much as it dislikes microsoft
[07:06:42] <antto> avrgcc
[07:06:42] <cehteh> gcc
[07:06:44] <Lambda_Aurigae> mohsen_, avr-gcc
[07:06:52] <Lambda_Aurigae> it does both.
[07:07:05] <antto> gcc ftw \o/
[07:07:19] <cehteh> but C++ bloats!
[07:07:19] <Lambda_Aurigae> heck, I've even seen Ada extensions compiled into avr-gcc...and avr programmed in Ada
[07:07:33] <cehteh> ada may work better than gcc
[07:07:33] <RikusW> Lambda_Aurigae: I agree on the dislikes :)
[07:07:35] <cehteh> err C
[07:07:37] <Lambda_Aurigae> and have done FORTRAN extensions myself, just for the nostalgia.
[07:08:14] <cehteh> ada puts a lot load on the compiler, but should produce reasonable code or?
[07:08:25] <Lambda_Aurigae> cehteh, no clue...
[07:08:31] <Lambda_Aurigae> I didn't do that one...just saw it done.
[07:08:34] <Lambda_Aurigae> I hate Ada.
[07:08:50] <Lambda_Aurigae> was forced to convert C and FORTRAN to Ada in the military.
[07:09:01] <Lambda_Aurigae> then a year later they let us go back to the better language for the job.
[07:09:03] <cehteh> from what i know, ADA does a lot bondage and discipline .. you have to specify everything to the point and the compiler enforces every last bit
[07:09:15] <cehteh> but has also good opportunities to optimize things out
[07:09:23] <Lambda_Aurigae> Ada was pushed as the ultimate programming language for the US DoD and they were forcing us to rewrite EVERYTHING in Ada.
[07:09:31] <cehteh> i know
[07:09:34] <antto> wut
[07:09:41] <Lambda_Aurigae> that lasted almost a year
[07:09:43] <cehteh> that sux
[07:09:54] <Caesium> Lambda_Aurigae: wow holy shit. my old mod-10 then div-10 loop was 0.6ms, bodged in a quick base comparison loop instead and get the same result in 21us. yeah that'll be the last time I use divide on an attiny when I can help it
[07:10:00] <Lambda_Aurigae> then someone said POP and got their collective heads out of their asses and reversed it.
[07:10:04] <cehteh> hey if Eiffel would have started as free software, then it could have lifted really nice
[07:10:05] * Caesium has learnt something today \o/
[07:10:19] <cehteh> but years of this strange licensing made it unappealing
[07:10:24] <Lambda_Aurigae> Caesium, I'm betting division uses the hardware multiplier where possible.
[07:10:55] <cehteh> you can always implement division by successive approximation over multiplication
[07:11:05] <cehteh> not always the best way .. but possible
[07:11:06] <Lambda_Aurigae> look at the assembly from it and see if there are any MUL or FMUL entries in there.
[07:11:23] <Lambda_Aurigae> cehteh, isn't that what the first pentium did?
[07:11:33] <cehteh> could be
[07:11:33] <Lambda_Aurigae> approximation on division.
[07:11:47] <Lambda_Aurigae> at 13 decimal places it started rounding and screwing up anyhow.
[07:11:50] <cehteh> doing that for log() works well too
[07:12:02] <Lambda_Aurigae> which caused some serious math problems on orbital mechanics calculations amongst other things.
[07:12:18] <cehteh> there it makes sense too, because other log() implementaitons take more memory
[07:12:39] <Lambda_Aurigae> that made me thousands of dollars.
[07:12:45] <cehteh> lol
[07:13:02] <cehteh> imagine there would be no bugs
[07:13:06] <Lambda_Aurigae> I got paid by dell, hp, and compaq to open boxes and replace processors in unsold machines in walmart and other big chain stores.
[07:13:07] <cehteh> sadsad
[07:13:38] <Lambda_Aurigae> those contracts were fun.
[07:14:08] <Lambda_Aurigae> once I had to repair 800+ machines because someone fucked up the audio cable.
[07:14:39] <Lambda_Aurigae> open box, open computer, replace cable, seal it all back up, get paid $25.00 per machine.
[07:15:00] <Lambda_Aurigae> under 10 minutes per unit.
[07:15:30] <Lambda_Aurigae> an entire run from Packard Bell had bad audio cables.
[07:16:03] <Caesium> Lambda_Aurigae: I'm not too shit-hot at reading the disassembly but adding my /10 seems to add a call to __udivmodsi4
[07:16:21] <Lambda_Aurigae> we took the old cables back to the shop and swapped two pins on them and had good cables.
[07:16:49] <cehteh> in many cases one can remove divisions
[07:17:09] <Lambda_Aurigae> Caesium, the reason I mentioned that is MUL, FMUL, and versions of those commands are for the hardware multiplier on the atmega.
[07:17:27] <Caesium> oh, well I wouldn't see that on the tiny then I guess
[07:17:44] <Lambda_Aurigae> you can compile for two different chips and watch the size and stuff between the two
[07:18:08] <Lambda_Aurigae> I'm guessing multiplication and division are larger on attiny than on atmega as well as slower.
[07:18:24] <cehteh> like averaging: if (x < (y+z)/2) is better written as if (x+x < y+z)
[07:19:03] <Lambda_Aurigae> cehteh, yup...always tricks one can do if one knows math...
[07:19:26] <Lambda_Aurigae> I find my highschool algebra coming in handy all the time.
[07:19:37] <cehteh> i am pretty bad at math :D
[07:19:55] <cehteh> but the simple things are often enough to improve the stuff
[07:20:17] <cehteh> (while /2 could be pretty good optimized by the compiler)
[07:20:35] <cehteh> was just an example about how to eleminate division
[07:20:52] <Caesium> any power of 2 will just end up being a shift right?
[07:22:23] <cehteh> or circular buffer wrap around (x+1)%buffer_size becomes ++x; if (x > buffer_size) x-=buffer_size; that gives bonus points because it works also with buffer sizes which are not exponents of 2
[07:22:47] <cehteh> Caesium: depends .. avr's have ugly shifts only i recently learned
[07:23:15] <cehteh> can only shift one position per instruction, means you have to call the shift multiple times for more posiitons
[07:25:53] <nikomo> If there an application note on how you're supposed to actually use the ADC? looking at using the full 10bit, and my brain keeps jumping to ADLAR = 1, grab high byte, << 2, + ADCL, but afaik most people seem to use ADLAR = 0
[07:27:30] <antto> i can't seem to find a solution for this undefined reference to __muluhisi3
[07:27:36] <antto> any ideas?
[07:32:31] <Lambda_Aurigae> antto, no clue.
[07:32:34] <Lambda_Aurigae> nikomo, let me look.
[07:33:23] <Lambda_Aurigae> nikomo, avr126, avr120, avr127, avr125, avr121
[07:33:32] <nikomo> antto: seems to be a function shipped in libgcc
[07:34:20] <Lambda_Aurigae> lots of avr appnotes on different aspects of the ADC on AVR
[07:34:24] <antto> yeah, the code compiles (and works) with avrgcc 4.3.3, it doesn't compile with avrgcc 4.9.3
[07:44:36] <nikomo> result = lowbyte + (highbyte << 8) seems to be the way to go, that's the popular opinion on the interwebs. or doing some stupid multiplication crap
[07:47:18] <antto> i have "stupid multiplication crap" ;P~
[07:47:30] <antto> and division, with big integers
[07:48:15] <antto> i'm trying to install the newer avrgcc setup on an ubuntu here so i can try fixing it myself
[08:16:49] <cehteh> nikomo: avr-libc has a single 16bit ADC macro which does the reading in the right way, otherwise you have to read the datasheets and docs about how to access the ADCL / ADCH registers in the right order (iirc first high then low) for atomic access
[08:17:14] <cehteh> and result = lowbyte + (highbyte << 8) wont define order in C
[08:18:42] <cehteh> err other way around, first ADCL
[08:19:52] <LeoNerd> Don't forget to cast though
[08:20:05] <LeoNerd> If lowbyte and highbyte are both uint8_t that won't give a useful result
[08:20:12] <cehteh> yes
[08:20:21] <cehteh> value += ADCL;
[08:20:21] <cehteh> value += (uint16_t)ADCH*256;
[08:20:25] <cehteh> ... from my code
[08:20:33] <cehteh> (+= because of some integration)
[08:21:07] <cehteh> i wonder if accessing it with some poiner tricks is even more efficient, but the compiler should optimize it properly i hope
[08:22:09] <cehteh> (uint8_t*)&value[0] = ADCL;
[08:22:17] <cehteh> (uint8_t*)&value[1] = ADCH;
[08:22:27] <cehteh> (or other way around? endianess)
[08:29:05] <LeoNerd> Don't do that
[08:30:01] <cehteh> i do that for serializing some other stuff, but not for the adc
[08:30:23] <cehteh> should generate decent asm
[08:30:31] <cehteh> havent checked, just works
[08:32:40] <cehteh> the other thing which is a bit complicated now: i have my own itoa implementation because it feeds directly onto the TX queue... thats simple but when there is not enouh space in the tx queue to complete one conversation, restarting it later seems a bit tricky, needs some bits of state saved i'd rather avoid
[08:33:28] <cehteh> have to think about it
[08:36:38] <mohsen_> Why C is prefered over C++ for programming AVRs?
[08:36:50] <cehteh> less bloat
[08:37:16] <cehteh> and generally less complex language
[08:38:06] <nikomo> centeh: I just went through the library reference, didn't see no ADC macro
[08:38:36] <cehteh> nikomo: yes its a bit hidden
[08:38:45] <LeoNerd> It's there, honest. I use it all the time
[08:38:47] <cehteh> try uint16_t r = ADC;
[08:39:04] <mohsen_> cehteh: And why do they prefer procedural programming over OO?
[08:39:18] <cehteh> did i say that?
[08:39:25] <LeoNerd> mohsen_: because generally on a microcontroller that's quite sufficient.
[08:39:42] <LeoNerd> And also more efficient - none of those annoying vtable lookups just to call functions
[08:39:51] <cehteh> usually yes, but nothing hinders you to implement some object system in C when you really need it
[08:39:54] <mohsen_> cehteh: You use OO for building a program for an avr?
[08:40:31] <cehteh> not really .. but on normal computers i do OO in C .. just a bit as long it doesnt stay in the way
[08:40:35] <nikomo> Just so we're clear, we're talking about the non-Atmel avr-libc, right? Just making sure we're on the same page, before I get out of bed and torture the compiler
[08:40:46] <nikomo> It's so warm in bed, mmmmm
[08:40:58] <cehteh> nikomo: just try
[08:41:15] <cehteh> the compiler will tell you if its not defined
[08:41:58] <nikomo> ooh, left my laptop next to bed. sec I'll try
[08:42:25] <nikomo> yup it compiled
[08:42:26] <nikomo> neat
[08:43:04] <nikomo> why would they not document that lmao
[08:43:09] * Caesium adds that to his notes, simpler than faffing with ADCH and ADCL :)
[08:43:26] <cehteh> it is somewhere documented, but hard to fund
[08:43:28] <cehteh> find
[08:43:58] <cehteh> the documentation of avr libc isnt really the best, i'd agree
[08:44:44] <Lambda_Aurigae> mohsen_, we were doing "OO" programming in C in the 80s.
[08:45:13] <cehteh> C++ was originally only a preprocessor for C
[08:45:42] <nikomo> I thought C++ started as a satanic ritual, with the sole purpose of inflicting pain upon people?
[08:45:56] <Lambda_Aurigae> OO is not necessarily limited to OO programming languages...ones like Java and C++ just tend to enforce it, if you use the full class thingies.
[08:46:06] <Lambda_Aurigae> nikomo, no, that's Ada
[08:46:11] <nikomo> ah
[08:46:57] <cehteh> avr-cobol )
[08:47:30] <Lambda_Aurigae> cobol wasn't a satanic ritual....that came straight from satan himself,,,none of this human interaction crap to create it.
[08:47:49] <Lambda_Aurigae> also known as the COmmon Baboon Oriented Language
[08:49:33] <Lambda_Aurigae> overall I much prefer C though.
[08:49:40] <Lambda_Aurigae> specially as I've actually met Ritchie
[08:49:55] <Lambda_Aurigae> and have a signed copy of the K&R C book.
[08:50:20] <mohsen_> Isn't C++ created by Ritchie?
[08:50:27] <Lambda_Aurigae> no.
[08:50:29] <cehteh> nop
[08:50:48] <Lambda_Aurigae> Bjarne Stroustrup
[08:50:54] <mohsen_> damn, I always thought he designed C++ too
[08:50:57] <Lambda_Aurigae> he did it as an extension to C
[08:51:53] <Lambda_Aurigae> originally called "C with Classes" apparently.
[08:52:13] <mohsen_> Do you have any idea why did he(Bjarne) decided to create a programming language that enforces programmers to build OO programs?
[08:52:48] <mohsen_> Or why Sun built Java for this purpose?
[08:52:53] <cehteh> that was hip in the mid/late eighties
[08:53:12] <Lambda_Aurigae> OO was the next big thing.
[08:53:28] <cehteh> people thought they could solve everything with OO
[08:53:32] <cehteh> .. and failed
[08:53:47] <Lambda_Aurigae> but, really, it's more a programming paradigm/mindset...you can do OO with any programming language.
[08:53:58] <cehteh> imo C++ is one if the biggiest failures
[08:53:59] <Lambda_Aurigae> including BASIC and ASM if you really want to.
[08:54:15] <Lambda_Aurigae> cehteh, C# enough said
[08:54:20] <cehteh> it adds a shitload of features and complexity no one can really grasp
[08:54:47] <cehteh> and its benefits are not that much, there are a few but they are outweights by the complexity of the language
[08:55:17] <cehteh> Lambda_Aurigae: C# and java fall into the same category, with some things maybe made better (lessons learned from C++)
[08:55:21] <mohsen_> cehteh: Do you mean the underlying layer?
[08:55:32] <Lambda_Aurigae> java is something made better?
[08:55:45] <cehteh> no i mean the top layer, syntax, class libs
[08:56:17] <cehteh> Lambda_Aurigae: i never used java, but at least it has not *that* much special syntax like C++ has nowadays
[08:56:18] <antto> okay, is there something wrong with multiplying big integers on atmega?
[08:56:27] <cehteh> but there the implementation blows
[08:56:51] <cehteh> antto: yes :) it needs a lot code, ram, flash and will be very slow
[08:57:04] <Lambda_Aurigae> antto, guessing you have not read the datasheets....on the attiny there is no hardware multiplier...there is one on atmega....but real big integers require multiple passes through the multiplier even.
[08:57:07] <cehteh> but it should work somehow
[08:57:17] <mohsen_> cehteh: But it simplifies the end code, doesn't it? at the end, in the main method you only have to work with objects and everything is readable
[08:57:26] <Lambda_Aurigae> doing multiplication on an attiny requires lots of passes of additions.
[08:57:26] <cehteh> mohsen_: nop
[08:57:48] <antto> Lambda_Aurigae i can't even compile it
[08:57:59] <antto> i could, with older avgcc
[08:58:08] <Lambda_Aurigae> yeah, dunno what's up with that...sorry.
[08:58:09] <cehteh> it abstracts code so far away from the actual working throgh patterns and classes that no one who sees it knows what it is intended to do
[08:58:33] <antto> the same code doesn't compile on avrgcc 4.8.2
[08:58:36] <cehteh> antto: i bet you have to set some #defines for including 64bit multiplication stuff and so on
[08:58:56] <cehteh> i read somewhere there are some tuning knobs but cant remember where and what exactly
[08:59:06] <antto> hm?
[08:59:25] <cehteh> i still dont get why you need 64bits
[09:00:35] <antto> if i understand correctly, it even has trouble with the uint16 * uint16 parts
[09:01:27] <cehteh> thats odd
[09:01:41] <Lambda_Aurigae> antto, what is the error thingie you are getting?
[09:02:03] <antto> undefined reference to __muluhisi3
[09:02:35] <antto> and __usmulhisi3
[09:02:46] * cehteh reads 'undefined reference to __bullshit3' :)
[09:03:10] <antto> __muhuluhuhuehue3 ;]
[09:04:16] <Lambda_Aurigae> antto, you doing this on attiny or atmega?
[09:04:30] <antto> atmega2561
[09:05:19] <antto> and the code not only compiled, but also worked when building it on my windows machine with the kinda ancient avrgcc 4.3.3
[09:05:31] <Lambda_Aurigae> antto, your avr-libc, what version is it compiled for?
[09:05:43] <antto> no idea
[09:05:48] <antto> how do i tell?
[09:05:49] <Lambda_Aurigae> could be your issue.
[09:06:01] <Lambda_Aurigae> no clue how to tell...I would recompile it to the new version.
[09:06:02] <antto> i just obtained it now, on ubuntu14
[09:06:09] <Lambda_Aurigae> http://www.mikrocontroller.net/topic/311226
[09:06:46] <Lambda_Aurigae> about 1/3 the way down is an english entry that talks about a change in the multilib structure and things needing to be compiled to the right version.
[09:07:49] <mohsen_> How should I use module HMC5883L if I want to code in C?
[09:07:57] <mohsen_> Is there any library?
[09:07:59] <Lambda_Aurigae> the change seems to have happened in 4.7
[09:08:02] <antto> so i need to recompile avr-libc with.. what?
[09:08:18] <antto> with avrgcc 4.7 or newer?
[09:08:31] <Lambda_Aurigae> antto, preferably with the version you are using...
[09:08:36] <antto> okay
[09:08:41] <antto> hmzzz
[09:09:05] <Lambda_Aurigae> mohsen_, have you even looked for a lib before asking for it?
[09:09:17] <Lambda_Aurigae> I found it as a first link on a google search.
[09:09:28] <Lambda_Aurigae> http://davidegironi.blogspot.com/2013/01/avr-atmega-hmc5883l-magnetometer-lib-01.html#.VsCSdUJH8_s
[09:10:55] <antto> i think mine is avrlibc 1.8.0
[09:11:11] <Lambda_Aurigae> https://gcc.gnu.org/gcc-4.7/changes.html
[09:11:15] <Lambda_Aurigae> for antto
[09:11:37] <antto> yeah i saw that, but i haven't read it all
[09:11:40] <Lambda_Aurigae> The AVR port's libgcc has been improved and its multilib structure has been enhanced. As a result, all objects contributing to an application must either be compiled with GCC versions up to 4.6.x or with GCC versions 4.7.1 or later. If the compiler is used with AVR Libc, you need a version that supports the new layout, i.e. implements #35407.
[09:11:58] <Lambda_Aurigae> that's the one line that says you need to have your avr-libc compiled to your current version.
[09:12:19] <mohsen_> Lambda_Aurigae: Thanks so much, I searched really, thought there is no library for it because most of the results were arduino stuff.
[09:13:14] <antto> so, i download this: http://download.savannah.gnu.org/releases/avr-libc/avr-libc-2.0.0.tar.bz2 ... and recompile it?
[09:13:16] <Lambda_Aurigae> mohsen_, I searched for HMC5883L avr library
[09:13:20] <Lambda_Aurigae> and that was the first link.
[09:13:42] <Lambda_Aurigae> although, google has learned that I hate ardweeny and removes most arduino links from the top hits for me.
[09:15:38] <mohsen_> LoL, and will you tell me what C compiler could I use?
[09:15:52] <Lambda_Aurigae> unfortunately, if you add -arduino to the search it makes a lot of valid links go away because someone mentioned arduino in a comment.
[09:15:55] <Lambda_Aurigae> mohsen_, for what?
[09:16:03] <Lambda_Aurigae> you use the C compiler for your platform.
[09:16:11] <Lambda_Aurigae> avr-gcc for avr
[09:17:07] <mohsen_> Isn't avr-gcc a C++ compiler?
[09:17:07] <Lambda_Aurigae> gcc or any of a couple of dozen c compilers for linux, windows, macosX, solaris, *bsd, etc.
[09:17:16] <Lambda_Aurigae> C18 for 8bit pic.
[09:17:38] <Lambda_Aurigae> avr-gcc is a generic compiler that handles C, C++, Ada, FORTRAN, PASCAL, COBOL, etc
[09:17:48] <Lambda_Aurigae> just depends on which modules you ave compiled into it.
[09:18:08] <Lambda_Aurigae> basic avr-gcc comes preset with C and C++ normally.
[09:18:42] <mohsen_> Is it an IDE or just a compiler?
[09:18:51] <Lambda_Aurigae> compiler.
[09:19:10] <Lambda_Aurigae> IDE is for connecting harddrives to computers, now generally deprecated and replaced with SATA
[09:19:24] <Lambda_Aurigae> :}
[09:19:29] <antto> u liar
[09:19:38] <antto> i still have IDE
[09:19:40] <Caesium> which in itself is now generally deprecated and replaced ;)
[09:19:42] <Lambda_Aurigae> I don't use IDE (Integrated Development Environments)
[09:19:53] <mohsen_> Neither do I
[09:19:53] <Lambda_Aurigae> antto, me too....I did say generally.
[09:20:06] <mohsen_> But some people out there call IDEs compilers
[09:20:16] <Lambda_Aurigae> heck, I have an AVR connected to an 80GB IDE harddrive.
[09:20:46] <Thrashbarg> mohsen_: we call those people "scripters" not "programmers"
[09:20:47] <Lambda_Aurigae> mohsen_, in some arenas the IDE and compiler are very integrated and you can't use them separately....but very few such...
[09:21:03] <Lambda_Aurigae> such as,,,,oh, I dunno, C#, visual basic, etc.
[09:21:31] <antto> where do i get avr libc sources, so i can recompile it?
[09:21:46] <mohsen_> Lambda_Aurigae: like Turbu C?
[09:21:54] <Lambda_Aurigae> antto, ummm...google is your friend?
[09:21:55] <antto> http://download.savannah.gnu.org/releases/avr-libc/ <- here? or is that binaries
[09:22:06] <Lambda_Aurigae> I'm betting you can get both there.
[09:22:09] <antto> all results look very linuxy to me
[09:22:20] <Lambda_Aurigae> yeah, so?
[09:23:13] <Lambda_Aurigae> http://www.nongnu.org/avr-libc/user-manual/install_tools.html
[09:23:22] <Lambda_Aurigae> there is a section there about compiling under windows.
[09:23:36] <Lambda_Aurigae> about halfway down the page.
[09:23:49] <Lambda_Aurigae> you will need cygwin or mingw.
[09:24:01] <antto> i need to compile it under linux (and osx) actually
[09:24:07] <Lambda_Aurigae> oh..
[09:24:12] <Lambda_Aurigae> well, instructions are there.
[09:24:24] <Lambda_Aurigae> also, I've seen scripts that will download the latest and compile it all for you.
[09:25:19] <Lambda_Aurigae> http://maxembedded.com/2015/06/setting-up-avr-gcc-toolchain-on-linux-and-mac-os-x/
[09:26:03] <Lambda_Aurigae> oh...wait.
[09:26:08] <Lambda_Aurigae> that's just installing,,,not compiling
[09:27:40] <Lambda_Aurigae> http://www.mbeckler.org/microcontrollers/avrgcc_build/
[09:27:58] <Lambda_Aurigae> that is old and would need updating to current versions but should work.
[09:28:12] <mohsen_> Lambda_Aurigae: Is the library you gave me a C library or a C++ library?
[09:28:28] <Lambda_Aurigae> mohsen_, how should I know? download, unzip, look.
[09:30:44] <Lambda_Aurigae> from a quick look, the files are .c and .h so I would say C
[09:31:01] <Lambda_Aurigae> and I see no class stuff in the files so, C
[09:31:44] <Lambda_Aurigae> it appears to be a plain avr C library taken from someone else's arduino library.
[09:32:18] <mohsen_> Aha, thanks.
[09:32:51] <Lambda_Aurigae> again, download, unzip, look...that's all I did...it's right there.
[09:34:04] <Lambda_Aurigae> it appears to use floating point math too.
[09:34:19] <Lambda_Aurigae> so,,,it's gonna be slow as frozen bear snot.
[09:34:31] <Lambda_Aurigae> but, taken from arduino libs, that is to be expected.
[09:35:57] <mohsen_> How are the libs for these modules are usually distributed, does their company provide one?
[09:36:25] <Lambda_Aurigae> not usually.
[09:36:39] <Lambda_Aurigae> the company provides a datasheet and someone(or multiple someones) write libs for it.
[09:41:11] <mohsen_> So by searching, am I able to find a fast library specifically written in C(not taken from arduino) ?
[09:44:23] <Caesium> you tell us. are you?
[09:45:40] <mohsen_> written for*
[09:45:45] <mohsen_> Caesium: I may?
[09:46:36] <mohsen_> Caesium: I mean I may find?
[09:47:01] <Caesium> its quite possible
[09:47:34] <Caesium> there's a lot of people out there, writing a lot of libraries, and some of them even share them
[09:48:50] <mohsen_> I see, I don't know these stuff really, I'm quiet new to this world
[09:55:03] <Lambda_Aurigae> that guy davide gironi has lots of good stuff on his download site too.
[09:55:20] <Lambda_Aurigae> https://code.google.com/archive/p/davidegironi/downloads
[10:20:33] <cehteh> apropos C++
[10:20:53] <cehteh> Bjarne is Danish ... C++ is a danish language .. which comes to https://www.youtube.com/watch?v=s-mOy8VUEBk
[10:36:26] <Lambda_Aurigae> but, I like eating danish.
[10:36:47] <Lambda_Aurigae> http://www.beautiful-women-pedia.com/beautiful-danish-women.html
[11:20:43] <WormFood> http://wormfood.net/avrbaudcalc-testing.php <-- I've changed it, so that it automatically shows the additional double speed columns, and you now have a check box to disable it, instead of enabling it. I'm gonna add a column showing the actual bit rate (in addition to the desired bit rate). Where do you guys think that column should go on the tables? I was thinking about between the UBRR columns, and the error rate column.
[11:33:12] <antto> i think i built it (avr libc) but nothing quite happened, i still get the error
[11:48:17] <cehteh> you are sure gcc is using what you just build?
[11:50:01] <antto> of course not
[11:50:26] <antto> gcc is using the stuff in /usr/lib/avr/lib
[11:50:39] <antto> which i got from apt-get install avr-libc
[11:55:13] <WormFood> http://wormfood.net/avrbaudcalc-testing.php <-- added column for actual bit rate now. How does it look? Should I move that column?
[12:02:15] <Casper> yikes.. I didn't noticed before (because I never checked) how a 32768 crystal is shitty for serial
[12:03:11] <Casper> there might be a bug
[12:03:39] <Casper> fosc = 1.8432 MHz @ 76.8K, it say ubrr out of range (grey), while 1 is a valid ubr
[12:05:02] <WormFood> Casper, look at the columns. That is correct. You can get 76.8k with U2X=1
[12:06:28] <WormFood> I see what you mean. No, that's not a bug, it's just the closest value.
[12:07:18] <WormFood> ubrr=0 is 115.2k, and ubrr=1 is 57.6k. If you want 76.8k, what value should the calculator display as the closest ubrr value?
[12:07:57] <WormFood> Well, in this case, ubrr=1 is as close to 76.8k you can get, with u2x=0, and obviously way out of range, which is why it's gray
[12:10:11] <WormFood> Casper, anything that is 15% or more error, is shown in gray
[12:15:57] <cehteh> hey 50baud will do on watch crystal :D
[12:17:09] <antto> okay, i got it.. and it doesn't solve the problem
[12:17:40] <antto> after building and installing avr-libc, i still get undefined reference to __muluhisi3
[12:18:26] <cehteh> antto: i'd suggest to use linux :D
[12:18:51] <antto> uhm.. i _am_ using linux
[12:18:55] <cehteh> huh
[12:18:57] <cehteh> ok
[12:19:08] <cehteh> thought it was windows
[12:19:28] <antto> it compiles on windws just fine (with older avrgcc)
[12:19:31] <cehteh> and any avr-gcc which comes with your distribution does not work?
[12:19:58] <cehteh> i mean even if its not the newest, as long it works its ok
[12:19:58] <antto> this same problem happens on osx
[12:20:32] <cehteh> are you 100% sure it doesnt pick the wrong libs up, from another install?
[12:20:47] <cehteh> building cross tool chains can be a pita
[12:20:48] <antto> yes, because i did apt-get remove avr-libc
[12:21:01] <cehteh> add --purge
[12:21:27] <antto> i tested if it compiles - it totally did not find libs and headers
[12:22:01] <cehteh> check if the libs are installed and where it searches them
[12:22:12] <antto> then i built avrlibc myself, and installed it in a different location (/usr/local/avr) and changed the compiler options in my IDE
[12:22:24] <cehteh> which linux distro do you use?
[12:22:44] <antto> it finds the headers and libs, but still complains about __muluhisi3
[12:22:50] <antto> ubuntustudio14
[12:23:18] <cehteh> maybe it doesnt build 64bit stuff by default? ./configure --help
[12:26:18] <antto> i don't see anything helpful there
[12:27:39] <antto> can any of you who has avrgcc 4.7.1 or newer quickly test (maybe in an existing project) if 32bit integer math even compiles?
[12:28:23] <cehteh> moment
[12:28:27] <antto> const uint32_t testing = (uint16_t)(34554) * (uint16_t)(931);
[12:29:02] <cehteh> well i did that before and worked
[12:29:22] <cehteh> do you have your project public somewhere? git?
[12:29:29] <Caesium> fine for me with 4.8.2
[12:29:30] <antto> no
[12:41:02] <LeoNerd> Woo.. First experiment with PL2303SA works :)
[12:43:06] <WormFood> As it should.
[12:43:52] <antto> http://codepad.org/Vsjwd1zK <- here is the nasty function
[13:26:29] <rue_house> na
[13:26:44] <rue_house> nobody uses these macros I keep offering
[13:27:10] <rue_house> #define limit(v, l, h) ((v) > (h)) ? (h) : ((v) < (l)) ? (l) : (v)
[13:27:18] <rue_house> if (set_tempo > MAX_TEMPO)
[13:27:18] <rue_house> {
[13:27:18] <rue_house> set_tempo = MAX_TEMPO;
[13:27:18] <rue_house> }
[13:27:18] <rue_house> if (set_tempo < MIN_TEMPO)
[13:27:19] <rue_house> {
[13:27:20] <rue_house> set_tempo = MIN_TEMPO;
[13:27:24] <rue_house> }
[13:27:26] <rue_house> ----
[13:27:48] <rue_house> limit(set_tempo, MIN_TEMPO, MAX_TEMPO);
[13:27:55] <antto> that is actually untouched bits of code from ladyada in 2005 probably
[13:28:01] <cehteh> you have to pay us money to use your code :D
[13:28:31] <rue_house> ooo, I"ll write it all, so none of you can code anything without it BEING my code :)
[13:29:06] <rue_house> then I'll charge you lot
[13:29:09] <rue_house> :P
[13:34:43] <antto> well crap, i can't compile a basic atmega template project on the ubuntu even
[13:35:23] <rue_house> why not?
[13:36:27] <antto> complains about crtm2561.o and libm and libc
[13:37:55] <antto> oh wait, it finds them but says "skipping incompatible /usr/local/avr/avr/lib/libm.a when searching for -lm"
[13:38:12] <antto> incompatiburu? WAT?
[13:38:56] <rue_house> why not?
[13:39:17] <rue_house> C run time for the 2561
[13:39:39] <rue_house> your pointing to the intel libraries, not the avr libraries
[13:40:03] <rue_house> did you compile avr-gcc yourself or use the package?
[13:40:18] <antto> no, i took avr-gcc with apt-get
[13:40:28] <antto> but i compiled avr-libc with it
[13:40:29] <rue_house> interesting
[13:40:42] <antto> it's there, in /usr/local/avr/
[13:40:42] <rue_house> hmm
[13:40:56] <rue_house> /usr/local/avr/avr
[13:41:05] <rue_house> the last avr may screw things up, I seen it before
[13:41:07] <antto> yes.. that's how it turned out
[13:41:18] <rue_house> I think back when I used to compile libc-avr acutally
[13:41:40] <rue_house> can you pull the files back a directory?
[13:42:13] <antto> i did ./configure --prefix=/usr/local/avr ...
[13:42:27] <rue_house> ./configure --prefix=/usr/local
[13:42:38] <antto> okay, i'll rebuild it then
[13:42:47] <antto> how do i uninstall the current one?
[13:42:55] <rue_house> I cant garuntee its the problem tho
[13:42:58] <rue_house> no idea
[13:43:09] <rue_house> I usually had the machines die before I found out
[13:43:29] <rue_house> I suggest just copying the files back a level
[13:43:40] <rue_house> what in /usr/local/avr
[13:44:02] * rue_house hammers the SSssSSSsSSSSSssSSsssSSsssSSsSSS key for a bit...
[13:44:23] <antto> just another avr folder
[13:44:31] <rue_house> yes, just copy the files ack
[13:44:47] * rue_house hammers on the BBbbBbbbbbbbbbBBBbbbBbBbbb key for a bit
[13:45:04] <antto> ah no
[13:45:05] <rue_house> I hate it when they keybaord start to wear out
[13:45:19] <rue_house> sSSsssSSSssSSs
[13:45:25] <antto> /usr/local/avr has 3 folders: avr, bin, share
[13:45:54] <rue_house> mv /usr/local/avr/avr /usr/local/avr_temp
[13:46:01] <rue_house> ?
[13:46:25] <rue_house> cause I'm sure /usr/local/avr/avr just has lib and include in it
[13:46:36] <antto> yes it does
[13:46:51] <rue_house> or.
[13:47:05] <rue_house> mv /usr/local/avr/avr/include /usr/local/avr
[13:47:12] <rue_house> mv /usr/local/avr/avr/lib /usr/local/avr
[13:47:33] <rue_house> do you get my drift? can I please stop explaining now?
[13:48:00] <antto> yes..
[13:48:15] <rue_house> I'm gonna get dressed, and I'm gonna go shopping
[13:48:36] <rue_house> pvc pipe plugs, handles, 3" Ys
[13:48:50] <antto> it'd be easier to delete that wrong thing and ./configure again
[13:49:06] <rue_house> go for it
[13:49:21] <rue_house> tyou could try make unisntall
[13:53:00] <antto> make uninstall didn't seem to do it
[13:53:08] <antto> even tho it did something
[14:00:10] <antto> okay, same errors
[14:05:14] <antto> whereis avr-gcc says "/usr/bin/avr-gcc /usr/bin/X11/avr-gcc" o_O
[14:07:00] <Caesium> lrwxrwxrwx 1 root root 1 Jun 6 2015 /usr/bin/X11 -> .
[14:07:09] <Caesium> so thats not surprising :)
[14:08:43] <antto> i removed avr-gcc
[14:08:59] <antto> it dissapeared from both places now
[14:09:10] <Caesium> they're the same place :)
[14:09:22] <Caesium> the X11 directory is just a link back to /usr/bin
[14:09:27] <Caesium> probably for compatibility reasons
[14:13:46] <antto> http://codepad.org/9BEQr42i
[14:21:21] <Caesium> I have crtm2561.o in avr/lib/avr6, don't you?
[14:29:33] <antto> i surely do
[14:30:19] <antto> just like i have libm.a and libc.a in avr/lib/ but something is not right
[14:30:25] <Caesium> and also libm/libc in there, so I guess the question is why isn't it using those I guess
[14:30:34] <antto> yes
[14:31:05] <wondiws> anyone here has a MySmartUSB light?
[14:31:15] <Caesium> antto: hold on, why is it using avr-g++ on that third line?
[14:31:24] <antto> no idea
[14:31:25] <wondiws> I usually use that programmer in linux without problems
[14:31:32] <Caesium> for the linking. should be avr-gcc like the others, no?
[14:32:09] <wondiws> but now I'm trying to get acquanted with that bloated IDE Atmel Studio, so I need to install the driver in Windows 7
[14:32:16] <antto> "linker for dynamic libs: avr-g++"
[14:32:24] <wondiws> but it just hangs, altough I have used it succesfully in the past
[14:32:27] <wondiws> anyone?
[14:32:50] <wondiws> anyone used STK500 by the way?
[14:33:31] <antto> changed it to avr-gcc, but i still get those same errors
[14:33:43] <Caesium> ah :(
[14:33:50] <Lambda_Aurigae> wondiws, I've used stk500, some years back. I have one somewhere still.
[14:34:12] <wondiws> Lambda_Aurigae, STK500 just uses UART, right?
[14:34:21] <wondiws> this is a USB one, with UART bridge
[14:34:30] <wondiws> does it matter which driver you use for that UART bridge?
[14:34:41] <wondiws> would a potential generic driver work?
[14:34:41] <Lambda_Aurigae> stk500 only has serial port, yes...no usb on it.
[14:35:06] <Lambda_Aurigae> no clue what usb-serial bridge you have so no clue what driver is needed.
[14:35:06] <wondiws> Lambda_Aurigae, this one has a SiLabs CP210x bridge on it
[14:35:18] <Lambda_Aurigae> then you need the driver for the cp210x
[14:35:48] <wondiws> Lambda_Aurigae, Windows installed it automatically, but just hangs when I look up "details" in the hardware properties :S
[14:37:04] <wondiws> Lambda_Aurigae, hmm, I can use it in putty though
[14:40:09] <Lambda_Aurigae> no clue here
[14:40:13] <Lambda_Aurigae> I don't use windows.
[14:42:15] <antto> actually, who calls "ld" ?
[14:42:30] <antto> avr-gcc?
[14:42:43] <wondiws> antto, I guess so
[14:43:12] <wondiws> antto, I don't know if there's something in between still, but ultimately it is called by avr-gcc if you use it to link
[14:43:53] <antto> well, i give up then
[14:45:25] <WormFood> http://wormfood.net/avrbaudcalc-testing.php <-- more options enabled now. I'm almost finished with it. Any suggestions or requests?
[14:45:43] <antto> YES! xmega usart!
[14:45:48] * antto runs
[14:46:56] <WormFood> It supports that.
[14:47:24] <WormFood> I don't know. I'd have to look at the datasheets
[14:47:33] <antto> it does?
[14:48:23] <antto> xmega usart is different
[14:49:11] <antto> haz a fractional baudrate generator
[14:53:40] <WormFood> antto, the basics will work. They use almost the same formulas. Close enough, that the UBRR value can be used as BSEL....as long as you don't use the BSCALE option.
[14:54:39] <WormFood> It shouldn't be too hard, to make mine calculate the BSCALE value, for a given bit rate.
[14:55:20] <antto> i actually wrote myself c functions which calculate the BSEL and BSCALE values at runtime by desired conditions
[14:55:31] <WormFood> The error rates are identical
[14:59:14] <WormFood> antto, thanks for pointing out that the xmega is different. I can easily add that feature, but need to understand it a little bit better, before I can add the changes.
[15:06:17] <WormFood> I think I'm wrong about them being close enough to use UBRR as BSEL on an xmega. I'll need to add another formula, to make that work.
[15:09:37] <WormFood> actually, I was right about that, since 2^0=1. You can use UBRR values from my calculator, as the BSEL value, as long as BSCALE is zero. However, that is silly, because it loses the most useful feature of the xmega's usart
[17:06:37] <antto> if i'm compiling for atmega2561, should the linker use avr/lib/libc.a or avr/lib/avr6/libc.a ?
[17:13:34] <antto> rue: plz encourage me :~(
[17:17:54] <Lambda_Aurigae> antto, encouragement....you aren't as ugly as WormFood said and aandrew doesn't think you are dumb?
[17:18:39] <antto> what if you're wrong?
[17:18:47] <antto> i feel discouraged
[17:18:52] <Lambda_Aurigae> I've never been wrong.
[17:19:02] <Lambda_Aurigae> mistaken a time or three
[17:19:05] <Lambda_Aurigae> but never wrong.
[17:20:25] <Lambda_Aurigae> antto, why are you needing to use the newer avr-gcc anyhow? does the old one have an error or something?
[17:28:39] <antto> a fellow is trying to build my project, he uses osx.. so he obtained avrgcc, and my project didn't build at all
[17:30:33] <antto> any of you using avrgcc on 64bit OSes?
[17:30:54] <antto> * avrgcc above 4.7.1 i mean
[17:31:01] <Caesium> yeah, 64bit linux
[17:31:11] <Lambda_Aurigae> 4.8.2 on linux 64bit here.
[17:31:24] <antto> same as mine then
[17:34:06] <antto> so i guess something goes wrong when you rebuild avrlibc on 64bit linux i guess
[17:34:14] <Lambda_Aurigae> dunno.
[17:34:15] <antto> i guess much
[17:34:22] <Lambda_Aurigae> this is just installed with apt-get here.
[17:34:33] <Lambda_Aurigae> got a test app to compile?
[17:35:57] <antto> i did exactly the same thing at first, installed avrgcc, tried to compile - had errors, needed to also install avrlibc, tried again - it began compiling, till it gave me that undefined reference to __muluhisi3
[17:36:23] <Caesium> why compile? you haven't got packages with it?
[17:36:29] <Lambda_Aurigae> I have avr-libc, avr-gcc and binutils-avr all installed.
[17:36:59] <antto> then i removed the avrlibc, and built it myself, and with that one i can't even compile a basic hello-world project with an empty main()
[17:37:50] <Caesium> that sounds like a step backwards, you really shouldn't need to be building your own avr-libc imo
[17:38:17] <Caesium> like Lambda_Aurigae said, got a minimal test case?
[17:38:20] <antto> Caesium because people suggested that __muluhisi3 is related to something with avrlibc or multilib which has been changed, and avrlibc should be built with the same version of avrgcc as the other things
[17:39:31] <antto> no.. i can try making a minimal test case, i'd have to remove my own avrlibc and apt-get the "normal" one again
[17:39:51] <Caesium> just whatever is producing this __muluhisi3 error, enough for us to try and reproduce?
[17:40:00] <antto> yeah
[17:40:19] <Lambda_Aurigae> if we can try to compile it and duplicate it maybe we can figure out what the problem is.
[17:40:33] <antto> it's related to multiplying and/or dividing with big integers, uint32_t and uint64_t
[17:40:37] <Lambda_Aurigae> working over irc through another person is just not exactly good.
[17:41:15] <Lambda_Aurigae> a .c file and a makefile or at least a command line you are using for building would be useful.
[17:41:20] <antto> i just thought it's something simple.. but i've been stuck on this the whole day today
[17:41:34] <antto> i'll do that, tomorrow tho
[17:41:41] <antto> after work
[18:34:42] <Strangework> Quick question, dudes. I've been programming my tinyAVRs by bitbanging my beaglebone's IO pins. Looking for a permanent programmer. Can I get opinions/testimonies on programmers?
[18:38:21] <LeoNerd> For dev work I use bot_thoughts (on tindie) tiny breakouts.
[18:38:37] <LeoNerd> They just expand the pins onto a breadboard, plus add decoupling cap, reset button, and ISP6 header
[18:38:57] <LeoNerd> https://www.tindie.com/products/bot_thoughts/eezee-tiny-breakout-programming-board-kit/ e.g.
[18:40:09] <Lambda_Aurigae> Strangework, Tom_itx has a nice little usb interfaced progammer that does isp, tpi and pdi
[18:40:54] <Lambda_Aurigae> beyond that, I've used my stk200 clone for many years now...it worked first time and every time since.
[18:42:00] <Lambda_Aurigae> 74ls244, some wires, parallel port on the pc.
[19:08:34] <Strangework> Thanks for the recommendations! The Tox's USBtinymkii seems most comfortable
[19:08:52] <Strangework> Wold be fun giving that shot, Lambda_Aurigae, though I don't have any parallel ports
[19:10:23] <Lambda_Aurigae> I have at least half a dozen machines with parallel ports within 3 meters of me.
[19:10:50] <Lambda_Aurigae> 4 desktops and 2 laptops.
[19:11:07] <Lambda_Aurigae> one of the laptops uses a portable dock for serial and parallel ports.
[19:42:09] <WormFood> From the AVR manuals: "The baud rate is defined to be the transfer rate in bits per second (bps)" <-- It's nice of Atmel to redefine "baud" for us, to mean something totally different, that what it really means.
[19:43:18] <Lambda_Aurigae> companies do that all the time.
[19:43:39] <Lambda_Aurigae> heck, piracy has been totally redefined in the last 15 years.
[19:43:43] <WormFood> But I don't understand why Atmel did that.
[19:44:22] <WormFood> Probably someone screwed up in the first manual, and just ran with it.
[19:44:29] <Lambda_Aurigae> yup.
[19:44:49] <Lambda_Aurigae> or, someone writing it didn't actually know the difference.
[19:45:27] <Lambda_Aurigae> quite often technical writers don't have a clue on the details of what they are writing about.
[19:47:01] <WormFood> I think "baud" is one of the most abused words in computers/electronics
[19:47:07] <Casper> because bau
[19:47:07] <Lambda_Aurigae> yup.
[19:47:31] <Casper> because baud rate changed of definition past a long time ago...
[19:47:53] <Casper> 56k modem was all saying 56k baud rate..
[19:48:23] <WormFood> The highest aud rate for modems, is a little over 2400. Even the 33.6k modems don't run higher. They just pack in more bits per baud.
[19:49:09] <WormFood> The 56k modem is technically capable of 56k speeds, however they can't make the connection to the phone system they need, in order to get 56k, which is why it's limited to 53k at best.
[19:50:01] <WormFood> I have an ISDN "modem", that has an X2 server built into it, which is really cool, because you can connect to me at 53k speeds.
[19:50:28] <WormFood> Back in the old days, when I was using a modem, I didn't usually run at 56k speeds. I'd usually limit it to 33.6k.
[19:50:37] <Lambda_Aurigae> yeah.
[19:51:03] <Lambda_Aurigae> 33.6K was table where pushing 56K was not on most phone systems..the lines just couldn't handle it.
[19:51:24] <Lambda_Aurigae> table/stable
[20:58:26] <WormFood> Lambda_Aurigae, I used 33.6k, because it gives me a higher upload speed.
[20:58:52] <WormFood> 56k mode only uploads at maximum of 28.8k
[21:37:00] <Deskwizard> lmfao
[21:37:10] <Deskwizard> wow... X2... havent heard that in a while
[21:37:15] <Deskwizard> <= USR fan boy
[21:38:32] <Deskwizard> WormFood: nice info on the 56k there, I always wondered while the maths didnt make up back in the day
[21:38:39] <Deskwizard> I assumed it was me sucking at math as usual lol
[21:44:28] <Deskwizard> I never could ger mote than ... 38400 iirc, lived down in the country.... half a mile from the cable cables
[21:44:36] <Deskwizard> s/mote/more
[21:44:52] <Deskwizard> my friend further down the road was luckt to get 31200
[21:44:58] <Deskwizard> ah, those were the days ...
[22:00:03] <WormFood> I've seen damn close to 53k connections (not for me personally, but I've personally witnessed it)
[22:01:23] <WormFood> But, that was actually at the ISP's office, if I remember correctly. (my brother and friend worked there, so I had an inside connection. So, they hosted my 1st server back in '96)
[22:01:38] <WormFood> In fact, I didn't pay for Internet, for the longest time.
[22:02:36] <WormFood> Then I got a job at an ISP. I had 2 accounts there. When I left, they turned off one, but not the other, so I had free Internet for a year until they sold the company, then earthlink started sending me bills, which I never paid.
[22:14:25] <Casper> WormFood: x2 isn't it 33.6? I'm sure of it...
[22:14:35] <WormFood> It's not
[22:15:07] <WormFood> Kflex and X2 modes were limited to 28.8k upload
[22:15:08] <Casper> Deskwizard: got 51333 with mine back then, and dropped to 49something once it got discontinued and forced to move to v90
[22:15:18] <WormFood> That's DOWNLOAD
[22:15:30] <WormFood> review what I said. I was talking about upload speeds.
[22:16:01] <WormFood> I used to get 4xK connections. I don't think I ever got a 5xK connection, ever.
[22:16:24] <WormFood> But, I'd manually "limit" my modem to 33.6k, to get a higher upload speed.
[22:16:53] <Deskwizard> uh, I had no clue we could do that hehe
[22:17:00] <WormFood> really?
[22:18:12] <WormFood> I remember one customer was having problems transferring files to UK, over a modem (from Florida). They were using zmodem, and it'd slowly build up to a big block size, then get an error, and go really slow, as it resyncs. I fixed that, by lowering the speed slightly, and forcing zmodem to not use such huge block sizes.
[22:18:34] <aandrew> I worked on the "other end" of all of that
[22:18:41] <WormFood> They were really impressed, because they fought with it for months, and didn't know how to fix it.
[22:18:48] <aandrew> *why* 56k was the max theoretical speed was interesting
[22:19:07] <aandrew> and what exactly these modems did in order to extract as much bandwidth as possible was pretty fucking amazing
[22:19:13] <WormFood> I used to get 64k connections.
[22:19:15] <WormFood> :P
[22:19:17] <WormFood> on ISDN
[22:19:21] <aandrew> WormFood: on ISDN yeah
[22:19:28] <WormFood> ISDN = I Still Don't Need it
[22:19:41] <WormFood> I gotta go to the subway, and pick up my daughter. Chat later.
[22:19:45] <aandrew> I've got 53333 connections regularly when I was using modems
[22:19:48] <aandrew> later
[22:22:49] <Deskwizard> WormFood: LOL
[22:23:09] <WormFood> ISDN = It Still Does Nothing
[22:23:10] <Casper> it's funny that "go to the subway" and "go to subway" mean two things different...
[22:23:16] <Deskwizard> WormFood: you sound like the kinda guy that tried the rockwell line agregation (iirc)
[22:23:40] <WormFood> I'd bond 2 modems at 33.6k speeds
[22:25:04] <Casper> Deskwizard: can you imagine having a power outtage from 10am to 11pm today?
[22:25:16] <Casper> that's what some people got today...
[22:25:56] <Deskwizard> Casper: Holy hell, thats not nice
[22:26:15] <Casper> 61 client based on hydro quebec map...
[22:26:15] <Deskwizard> I got BAD mains dips yesterday but it survived here
[22:26:39] <Casper> I'm lucky to be on a very important main in this city
[22:26:49] <Deskwizard> lol 61... okay yeah i'd still stuck to be one of them hehehe
[22:27:07] <Deskwizard> Casper: we have local power here over HQ one so it saved our ass I think
[22:27:19] <Deskwizard> but barely, my desk lamped dimmed so much it was barely lit
[22:27:42] <Deskwizard> +1 for my main RIG psu for staying up lol
[22:27:49] <Deskwizard> rig, PSU
[22:30:41] <Casper> I wonder which side of those breakers is the "in"...
[22:57:27] <Deskwizard> I think they input both in parallel and do load balancing, but I'm totally talking out of my ass here... hydro sherbrooke has its own dams
[22:58:03] <Casper> I'm just wondering if the power come from the left or the right
[22:58:20] <Casper> basically, I'm google street view following the lines
[22:59:37] <Casper> west, it go underground, but no disconnect, just pole mounted fuse. between there and here there is a breaker half way. North it go underground... following south now
[23:00:42] <Casper> might have found the feeder...
[23:01:19] <Casper> I see the wire from underground, then fuses. Next pole is a breaker. Nothing powered between those 2 poles
[23:07:51] <Deskwizard> hehehe oh okay
[23:09:53] <Casper> and vbox is annoying
[23:25:09] <anonnumberanon> Does anybody know about micros with prescaling and stuff? If i make a function that returns time with accuracy of 62.5 nanoseconds (it's the best achievable) and poll it for a while whenever I need to, will this adversely effect anything else? Would this way to implement a more accurate Arduino "micros()" be too "busy".
[23:30:22] <Deskwizard> Casper: yes, there are some bugs that annoy me to no end... like USB not working properly in my case, but I think thats a general AMD issue (not just vbox)
[23:30:59] <Casper> Deskwizard: in vbox 4 for usb2 to work you need another package
[23:31:23] <Casper> but I'm gonna try 5.something... and hope that usb2 work ok enought for 2x rtl devices
[23:32:06] <Deskwizard> on 5 here... let me know how it works out for you
[23:32:14] <Deskwizard> oh that USB thing is for windows hosts btw
[23:32:23] <Deskwizard> well as far as I noticed
[23:32:40] <Deskwizard> with a linux host I think you'd be fine
[23:32:49] <Deskwizard> theres something fishy with windows and AMD usb2
[23:32:53] <Deskwizard> not sure what
[23:33:01] <Casper> quite possible
[23:33:13] <Deskwizard> well, not just windows, but in the case of vbox it was working under linux
[23:33:25] <Deskwizard> I suspect its an interrupt thing
[23:33:34] <Deskwizard> but I dont have an intel machine on hand to compare
[23:33:47] <Deskwizard> (atm)
[23:33:51] <Casper> I want a new computer
[23:34:00] <Deskwizard> me too
[23:34:12] <Casper> I want a 6 core intel i7 with 16+G ram
[23:34:28] <Deskwizard> I had a i7 4770K, a damn beast
[23:34:32] <Casper> I also want an I5 based xeon with 8G ram ECC :D
[23:34:43] <Deskwizard> Casper: I'm still looking for xeons hehehe
[23:34:52] <Deskwizard> havent found the motherload yet
[23:35:03] <Casper> but for now, I want to buy a new lens
[23:35:16] <Deskwizard> but I think I'll hit the federal gov auctions soon, their new budget is coming so... *roll eyes*
[23:35:23] <Deskwizard> you should check, theres nice catches sometimes
[23:35:31] <Casper> and ebay is really, REALLY not a place for camera lens
[23:35:33] <Deskwizard> just google "biens de la couronne" you'll get on it
[23:35:43] <Deskwizard> yeah I wouldnt trust ebay for those sorta things
[23:36:07] <Casper> http://www.ebay.ca/itm/EXCELLENT-SHARP-Canon-EF-100mm-F-2-8-L-IS-USM-Macro-Lens-bundled-Hood-Filter/141899967181?_trksid=p2050601.c100085.m2372&_trkparms=aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D20140211132617%26meid%3D3d88b2a43f4e44219b0b1c9298105c8a%26pid%3D100085%26rk%3D1%26rkt%3D4%26sd%3D141899967181%26clkid%3D3329687446710672801&_qi=RTM2247625
[23:36:08] <Casper> vs
[23:36:26] <Casper> http://www.adencamera.com/product-overviewer.asp?ProdID=3002&Category=7
[23:37:26] <Deskwizard> you mean, they both very expensive if you calculate $/sq in? :P
[23:38:48] <Casper> but really, check the price of the used, no warranty one and the brand new one with true warranty
[23:42:06] <Deskwizard> yeah, not really worth it indeed
[23:43:12] <Casper> few bux less... if any
[23:46:10] <Alex1992> Hi, very new to avr programming and I'm trying to get my computer to talk to the avr. The first thing I want to do is see if I can transmit and receive. I
[23:47:07] <Alex1992> I'm using realterm, and just holding down "f" on the console. I get "f" back on the console like 90% of the time, but the other 10 is garbage
[23:48:06] <Alex1992> the baud rate should be 38400 from the avr code, and I'm at 38400 baud on the computer, I've read that weird symbols are a side effect of baud, but i don't think that's the case for me
[23:48:14] <Alex1992> could it be bad solder connections?
[23:49:16] <Deskwizard> Alex1992: how are you doing the serial, circular buffer?
[23:49:17] <Casper> Alex1992: let me guess: youn use the internal RC oscillator?
[23:49:25] <Casper> if so
[23:49:31] <Alex1992> external 14.7456 MHz crystal
[23:49:50] <Casper> and you have set the fuse correctly?
[23:50:09] <Casper> is it a full swing oscillator option in the fuses for your device? if so make sure it is enabled
[23:50:14] <Alex1992> yeah, I've got all the avr programming via miso mosi stuff working
[23:50:40] <Casper> mosi miso don't care much about clock stability
[23:50:42] <Alex1992> I'm trying to use my computer to talk directly to the atmega via TTL with the rx tx pins
[23:51:10] <Deskwizard> Casper: re: federal auctions: https://www.gcsurplus.ca/mn-fra.cfm
[23:51:29] <Alex1992> I probably used programming incorrectly there, I just want to send my c code binary output straight into the mega
[23:51:49] <Deskwizard> Alex1992: I've had issues like that when my interrupts interrupted my USART code, might be worth looking into
[23:53:07] <Alex1992> deskwizard: that very well could be what's happening, thanks for the info. I'm very new, and am trying to use someone's code
[23:53:29] <Alex1992> I have all the c files and stuff, but for the life of me I can't figure out how to execute the code and send over the TTL line
[23:53:52] <Deskwizard> Alex1992: same exact thing I did ;) Look into "circular buffers"
[23:54:05] <Deskwizard> and make sure they to the empty/full check correctly
[23:54:43] <Alex1992> My thought is that I need to run make and create an executable, which i run from the console, but the make command gives "make (e=2): the system cannot find the file specified"
[23:54:59] <Alex1992> deskwizard: I'll do that, thanks!
[23:55:33] <Deskwizard> Alex1992: I know it uses make yes, but how exactly TBH I'm... not that good at that :P I use Eclipse with the AVR plugin
[23:55:41] <Deskwizard> but I know most people here use straight makefiles
[23:55:49] <Deskwizard> (as far as I noticed)
[23:57:37] <Alex1992> haha yeah, I've read like 5 beginner tutorials on it, but they all talk about setting up the connections, but not how to actually run it!
[23:58:05] <Alex1992> I've got a makefile in this guy's folder, so I have to be using make, and i'm in the right path, but the darn thing won't go a make itself
[23:58:12] <Alex1992> and make*