#avr | Logs for 2014-11-13

Back
[00:00:07] <Casper> the concrete is a bit soft, but still a 10" thick
[00:00:13] <rue_house> prolly smaller than the widowmaker at work
[00:00:38] <rue_house> 1/2 horse 50lb...
[00:00:42] <rue_house> I hate that thing
[00:01:03] <rue_house> if your not braced well and it catches you dont stand a chance
[00:01:15] <rue_house> and when it breaks thru it always catches
[00:01:30] <rue_house> I think last week it knocked someones tooth out
[00:01:41] <Casper> bro used one at a job to drill 2" in concrete... his boss said: if it bite, step back, don't try to hold it
[00:01:50] <rue_house> yea
[00:01:55] <rue_house> its true
[00:02:00] <rue_house> just get out of the way
[00:02:19] <rue_house> if your braced you can stall it, kinda
[00:02:32] <Casper> or break your wrist
[00:02:40] <rue_house> have to make sure your finger dosnt' get trapped on the trigger
[00:02:51] <rue_house> its an impact, not a drill
[00:03:10] <rue_house> so not all its power goes into rotating, its got like a slip clutch in it
[00:05:56] <Casper> hamemr drill
[00:06:00] <Casper> so it did turned
[00:06:25] <rue_house> indeed
[00:06:40] <rue_house> it hot up there yet, were freezing over here
[00:06:43] <Casper> but I need to find a way to make a holder for my drills...
[00:06:43] <rue_house> ?
[00:06:50] <Casper> for baby, mama and daddy
[00:06:59] <rue_house> get a peice of wood and a drill
[00:07:19] <rue_house> er, not drillbits, nevermind!
[00:07:24] <rue_house> use the 3d printer?
[00:07:26] <Casper> https://www.dropbox.com/s/x4e9r0rbkk3051f/2014-10-30%2022.02.09.jpg?dl=0
[00:07:39] <rue_house> haha all cordless
[00:07:49] <Casper> yup
[00:08:03] <Casper> big sale on the first 2
[00:08:03] <rue_house> I have the mating snakes thing going on under the shop bench with my power tools
[00:08:52] <Casper> first had 100$ rebate, came with 2 batts and a charger.... second had 120$ rebate + 15% because the cardbox around the plastic box had a scratch, came with 2 battery and a charger
[00:08:55] <rue_house> SWEEEEET the i2c code worked!
[00:09:06] <rue_house> YES!
[00:09:17] <Casper> the other one was the tool only, no packaging, so instead of like 230$ it was 90
[00:09:17] <rue_house> http://www.robot-electronics.co.uk/htm/ATMEGA32_examples.htm
[00:09:22] <rue_house> ^^^ working i2c code!
[00:09:28] <Casper> came with no batts however...
[00:09:39] <Casper> I also bought the CCFL light
[00:09:48] <Casper> so now I'm well equipped in yellow
[00:10:03] <Casper> you know, that tiny impact can still do 110lbft
[00:10:12] <Casper> the big one do 300lbft
[00:10:23] <rue_house> I have a big corded impact
[00:10:38] <rue_house> I'v had one thing it couldn't break free
[00:10:56] <rue_house> I think it was a plug in a tank
[00:11:23] <rue_house> damn near sheered off the 1/2" drive I was using with it
[00:13:15] <Casper> hehe
[00:14:34] <rue_house> all the bits used to drive it got REALLY hot, like over 100c hot
[00:15:46] <rue_house> yay, I ahve a working i2c master, now I can sleep in peices
[00:15:50] <rue_house> peace
[00:16:38] <rue_house> tho I dont get why only this guys code works
[00:32:47] <Casper> rue_house: sleep in pieces or rest in peace? :D
[00:36:36] <xbrother> rue_house: did you use http://www.nongnu.org/avr-libc/user-manual/group__twi__demo.html ?
[00:39:05] <rue_house> no
[00:39:18] <rue_house> cant rest till supper is settled more
[00:39:26] <rue_house> see if I fall asleep on the keyboard
[00:39:46] <Casper> rue_house: actually, I can't sleep right now, if I would eat I would then drop like a bomb
[00:40:37] <Casper> I should have been in bed since a good hour...
[00:40:42] <Casper> not falling asleep... again
[00:40:45] <rue_house> I was > < that far away from writing a bit-bang library for i2c
[00:41:09] <rue_house> Casper, your english is falling apart
[00:42:24] <Casper> I still blame my teachers
[00:42:34] <rue_house> I blame irc
[00:42:39] * Casper got really unlucky with teachers
[00:42:57] <Casper> the one I got for 3 years claimed to speak "brittish" english
[00:43:08] <Casper> ... he was just one of the worst teacher...
[00:43:47] <rue_house> if english made sense, I could give you locigal correction rules
[00:43:50] <Casper> I learned more in 6 weeks with simon hawks than with him in 2 years...
[00:44:06] <rue_house> but english is a bastard language made of almost everything, so I cant
[00:46:49] <Casper> oh I can assure you that english is WAY better than french
[00:47:48] <Casper> you know... why is a table a she, but a desk is a he?
[00:47:57] <Casper> and a car is a she but a truck is a he?
[00:48:16] <megal0maniac> German has neutral as well
[00:48:24] <megal0maniac> And it's just as strange
[00:49:00] <Casper> waster is he, but ice is she, so is vapor
[00:49:52] <Casper> as for the "o" sound.... o au eau eault ....
[00:50:19] <Casper> atleast they are slowly fixing stuff, but teachers always complain...
[00:50:29] <Casper> they are removing some exceptions...
[00:51:32] <Casper> like horse... "cheval" the plurial was "chevaux" now "chevals" is accepted, but most french teacher refused to accept it for a few years, until the direction started to get involved and they got a letter that if they kept doing it they would be fired
[00:53:26] <rue_house> 12 terminal windows up, and I'll be damned if they aren't all involved in something
[00:53:41] <rue_house> so I have to open a 13th to do an ls of a directory
[01:08:54] <rue_house> calc "3+4(ResultBase=16)"
[01:08:54] <rue_house> 3+4(ResultBase=16) -->> 0x7
[01:09:12] <rue_house> and I figured out how to get it to tell me the version
[01:09:30] <rue_house> calc "Version"
[01:09:30] <rue_house> Version -->> 3
[01:09:42] <rue_house> its built into the built-in constants
[01:10:42] <rue_house> ok I understand how this basic i2c code works
[07:15:13] <Tulitomaatti> is there a sensible way to produce short pulses every N clock cycles with timer1 on atmega328? i was thinking about running the timer in CTC and having it set OC1A on compare match, but i can't figure out a nice way to make OC1A low again nicely after it gets set.
[07:30:35] <Tulitomaatti> is that viable or would i be better off putting some kind of edge-triggered monostable multivibrator after oc1a to produce pulses
[09:18:42] <ecilop> PWM..
[09:26:57] <twnqx> Tulitomaatti: i think that was directed to you, and might not even be totally wrong...
[09:36:44] <rue_house> anyone done audio out with pwm?
[09:38:03] <LeoNerd> You surely want a DAC for audio output
[09:38:50] <rue_house> you can use high freq pwm and filter it, but I'v never tried it
[09:49:55] <day> i tried pwm frequency modulation
[09:50:00] <day> its imo a pita
[09:50:54] <day> you can never hit the desired frequency due to the 8bit resolution. That forces you to jitter around the optimum
[09:51:52] <day> maybe you can solve it with a 16bit counter and a variable pwm frequency :/
[09:52:21] <LeoNerd> Or.... just get a DAC? ;)
[09:52:27] <day> yes
[09:53:44] <day> from what ive heard a simple 8 ladder voltage divider connected to a port, does a better job than the pwm dac
[09:55:53] <eatyourguitar> a long time ago someone in here showed me how to do exponents without using exponents in avr c
[09:56:00] <eatyourguitar> using bit shift and addition
[09:56:36] <eatyourguitar> or was it something about avoiding float math
[09:56:44] <eatyourguitar> to make the code run fast
[09:57:36] <eatyourguitar> something about doing multiplication without float using only bitshift and addition/subtraction before and after the bit shift
[09:58:13] <eatyourguitar> does anyone know how?
[09:58:53] <LeoNerd> Well, multiplication is shifts + adds
[11:25:02] <miguelanxo> Hello
[11:26:06] <miguelanxo> I've got this weird problem with an Atmega128: when using USART0 at 115200, no interrupts, but polling, I lose chars
[11:26:37] <miguelanxo> same code, executed after the bootloader works ok, so boot loader must set some parameter for it to work ok I'm ignoning
[11:26:54] <miguelanxo> any advice?
[11:29:06] <miguelanxo> I have disabled global interrupts, and the 4 timers
[12:09:03] <tosmo> hi. do i get this right: external interrupts (rising edge on pin for example) always effect the interrupt flag register independent of the interrupt mask register? so the interrupt mask register solely controls wether ISR is called?
[12:09:17] <tosmo> effects->affects
[12:09:58] <tosmo> solely->only
[12:30:04] <miguelanxo> looks like I'm having framing errors. How is that even posible if both PC and AVR are configured for 115200?
[12:30:22] <LeoNerd> Slight timing upsets?
[12:30:34] <LeoNerd> What timing crystal on the AVR? If it's not a neat divisor there'll be an error
[12:30:45] <LeoNerd> Well, a chance of error. 115200 is quite high
[12:47:35] <miguelanxo> LeoNerd. baud is 115200. The thing is It works or not depending on if I boot my code or the firmware updater boots it
[12:48:06] <miguelanxo> when the firmware update boots my code (its does so automatically after receiving it), code works ok
[12:48:28] <miguelanxo> when I reset the avr and the code boots , it doesn't work.
[12:49:17] <miguelanxo> even more strange, when my code boots (no firmware updater before), the success or not depends on the data transmitted itself
[12:50:02] <miguelanxo> I suspect some kind of low power setting gets triggered on boot, but not on firmware boot
[12:50:28] <miguelanxo> and when in such low power setting, the AVR can't get the timings right. That's my suspicion
[12:50:56] <miguelanxo> apart from that, all the registers I chechek are the same in both modes (clean boot/firmware updated boot)
[12:51:53] <miguelanxo> interrupts are disabled globally
[14:11:53] <Jartza> hmmh
[14:12:06] <Jartza> I know how to put data in specific address on flash
[14:12:11] <Jartza> but how about code?
[14:15:45] <tosmo> when i define a function with float argument, and in the actual code the float argument is constat at compile time, will the compiler evaluate it at compile time or will the float math actually be leveraged by the AVR?
[14:15:55] <tosmo> (gcc compiler)
[15:27:47] <RikusW> Jartza: what do you mean by code ?
[15:28:38] <RikusW> flash use word not byte addressing...
[15:28:45] <RikusW> 2 bytes
[16:04:09] <LeoNerd> I got myself a nice shiney magnifier lamp for soldering
[16:04:22] <LeoNerd> I think I'm all set now, apart from waiting on the -actual- boards
[16:07:00] <LeoNerd> I just need some actual solder that doesn't suck piggie
[16:26:26] <aandrew> is the ATTINY13A reference voltage REALLY 1.1V or is it 1.024V?
[16:27:59] <aandrew> hmph. I guess it is 1.1V. Seems an odd value for a reference, especially for a 10-bit ADC
[17:25:34] <aandrew> http://pastebin.com/TSnte1wX
[17:26:02] <aandrew> I don't think I'll ever understand why avr-gcc -Os loads values into a pair of registers only to move them immediately inot other registers
[17:26:20] <aandrew> doesn't the AVR ISA allow you to move the contents of a memory location into any register?
[17:36:39] <timemage> aandrew, i haven't examined the post, but i can tell you that avr-gcc can be rather stupid occasionally. with more mainstream gcc you're much less likely to encounter a bug or blatant inefficiency.
[17:53:51] <aandrew> timemage: understood
[18:01:05] <aandrew> hm, I thought it was possible to drive the reset pin low with an AVR to force a reset. I know I can use the WD for this but I'm using that pin as a way to turn on my own power supply, so I am trying to also shut myself off that way
[18:01:46] <aandrew> it's a little attiny13a, I'm trying to avoid going to a bigger part which is why I'm playign these silly games
[18:04:42] <timemage> aandrew, you've found that it won't reset if you drive reset low?
[18:06:16] <aandrew> yes, I am trying to determine if I can drive the reset pin low in software ... I know about RSTDSBL but am trying to avoid HVSP
[18:06:31] <aandrew> is it possible to disable the reset pin in software?
[18:08:28] <timemage> aandrew, i don't really understand the question. if you man drive it internally for reset purposes whilst still using it as gpio, no. not in any way that i know of. the closest thing which you seem to know about already is exploiting the watchdog. next to that, just jumping to the reset vector, which is not exactly a reset.
[18:09:07] <aandrew> right
[18:09:33] <aandrew> I'm not new to micros at all, but I'm trying to do something unconventional on purpose
[18:10:24] <aandrew> basically the tiny13a has 6 I/O... I was trying to determine if there is a way to drive the reset pin (PB5) without blowing RSTDSBL
[18:10:39] <aandrew> I've got other designs where I blow that fuse bit and have a normal I/O on PB5
[18:10:45] <aandrew> but that necessitates HVSP of course
[18:10:57] <timemage> aandrew, i'm not aware of any way to do that.
[18:11:04] <aandrew> damn. :-/
[18:11:13] <aandrew> I can get around this other ways I guess
[18:11:31] <timemage> aandrew, i don't remember having used the 13a. but have used 10 and 45. and the 45 is pretty similiar iirc.
[18:11:41] <aandrew> I find HVSP such a pain in the ass. Not sure if the dragon is just a little goofy or if my particular one is iffy
[18:14:09] <timemage> aandrew, you don't have way to combine pins then? there are somewhat hacky ways of combining led output with button input for example. nothing like that to be exploited in your project?
[18:29:43] <aandrew> timemage: I'm thinking. That's definitely an option
[18:30:22] <aandrew> I could also self-program the fuse bit one way, then back, but there are limited write cycles
[18:30:37] <Lambda_Aurigae> aandrew, I would use a fusedoctor to reset the fuses on the chip myself.
[18:30:51] <Lambda_Aurigae> you can't self-program fuses far as I remember.
[18:31:02] <Lambda_Aurigae> internal bootloader can't change fuses.
[18:31:14] <aandrew> bugger
[18:31:24] <aandrew> oh well, there are ways around this, I just don't like them. :-)
[18:31:26] <Tom_itx> oh poo are you sure?
[18:31:51] <Lambda_Aurigae> Tom_itx, no, but I don't ever remember seeing how to do it.
[18:32:02] <aandrew> it rubs me the wrong way to leave the pin alone, but I know in my business mind that this is a no-brainer. my engineer mind wants to do something novel
[18:32:15] <Lambda_Aurigae> never read the attiny13 datasheet though.
[18:32:43] <Lambda_Aurigae> but on the atmega1284p, atmega32, and atmega128, there is no way to write fuses from bootloader...you can read them from program but not write.
[18:33:20] <Tom_L> http://www.avrfreaks.net/forum/tut-using-fuse-bits-c-code
[18:33:25] <Tom_L> not necessarily for this
[18:33:31] <Tom_L> someone else was asking about it
[18:34:03] <Lambda_Aurigae> Tom_L, yeah...that's not changing the fuses from within the bootloader...it is still using avrdude to do it externally.
[18:34:17] <Lambda_Aurigae> you just define them in the C program and avrdude reads the defined file.
[18:34:27] <timemage> Tom_L, that just uses a special address range to represent fuses in the hex file. doen't help you go about changing them.
[18:34:38] <Tom_L> i know...
[18:34:50] <Tom_L> somebody was wanting it all in an elf file
[18:35:08] <Tom_L> http://electronics.stackexchange.com/questions/12684/how-to-set-atmega88pa-fuses-in-code-or-hex-file
[18:35:11] <Tom_L> says it can't be done
[18:35:34] <Lambda_Aurigae> yeah.
[18:35:43] <Lambda_Aurigae> they are readable from in the AVR code but not writeable.
[18:36:20] <Tom_L> the same dude that wanted the cmd line programming thing wantd that
[18:38:38] <Jordan_U> I never asked to set fuses in an elf.
[18:38:48] <Tom_L> yeah you did
[18:39:08] <Tom_L> you said you wanted an all inclusive file for fuses and code
[18:39:25] <Jordan_U> Nope.
[18:39:32] <Tom_L> i'll check the logs
[18:41:19] <Lambda_Aurigae> http://www.smbc-comics.com/comics/20141113.png
[18:44:05] <Tom_itx> yeah you're right :D
[18:44:06] <Tom_itx> <Jordan_U> I have a completed avr project that we've shipped, and I'm trying to develop a procedure for programming future boards with two major requirements. 1: It should not be difficult to modify accidentally, we don't want the Atmel Studio project in our "Manufacturing" directories because we want all changes to be made in "Engineering", so having only the compiled image in "Engineering" is ideal. 2: It should be easy to walk a non-deve
[18:44:06] <Tom_itx> <Jordan_U> ...Fogot splitlong.pl 2: It should be easy to walk a non-developer through programming the chip. Unfortunately these goals currently conflict because the Atmel Studio project contains all of the infomation about the exact chip and programmer we have, meaning those things don't need to be specified in the steps for programming. Finally, while I wish I could just make a script to automate this using ardude instead of Atmel ...
[18:44:06] <Tom_itx> <Jordan_U> ... Studio, avrdude doesn't support the Atmega 64M1 that we're using. Any suggestions?
[18:47:32] <Tom_itx> but you could!
[18:53:08] <Tom_L> http://www.electronicproducts.com/Computer_Systems/Modules/Intel_owes_you_a_15_check_if_you_purchased_a_Pentium_4_processor_between_2000_and_2002.aspx
[18:53:13] <Tom_L> go get your lunch money
[18:53:43] <Valen> I did do that
[18:53:50] <Valen> how the crap would I prove it though
[18:54:24] <Tom_L> maybe they'll just take your word for it?
[18:54:31] <Valen> aparently they do
[18:54:36] <Valen> so sayeth the article
[18:55:06] <Tom_L> list the model number of the system you bought
[18:55:27] <Valen> I baught bare CPUs
[18:55:29] <Tom_L> unless you live in Illinois
[18:55:40] <Valen> I live in austraia
[18:55:44] <Valen> australia
[18:55:51] <Tom_L> i know
[18:55:56] <Valen> I somehow think I won't be getting any cheques
[18:55:56] <Tom_L> i bet it only applies to US
[18:56:45] <Valen> https://www.intelpentium4litigation.com/ "All residents of the United States, other than those residing in Illinois, who (i) purchased a new computer equipped with a Pentium 4 processor, (ii) purchased the computer between November 20, 2000 and December 31, 2001, and (iii) purchased the computer for personal, family, or household use;"
[18:57:23] <Valen> why only home use not business?
[18:57:24] <timemage> Valen, heh
[18:57:55] <Valen> hell I've probably still got one or two of those CPU's in production
[18:58:03] <timemage> Valen, i was told recently you can get money out of redbull because it didn't give you wings.
[18:58:10] <Valen> I heard that
[18:58:23] <Tom_L> haha
[18:58:30] <Valen> http://www.sbs.com.au/news/article/2014/10/08/red-bull-does-not-give-you-wings-company-settles-us13mil-lawsuit-over-false
[18:58:43] <timemage> Valen, i'd rather donate $10 or whatever i could get to project to fight stupid lawsuits.
[18:58:59] <Valen> actually the intel one I agree with
[18:59:10] <Valen> they were being dodgy there
[18:59:25] <timemage> Valen, they've always been that way. what specifically?
[18:59:44] * Valen hasn't found intel paticularly dodgy
[18:59:54] <Valen> screwing with benchmark results
[19:00:45] * Valen got snippy with nvidia when they mucked with their drivers to give better bench results when it detected a benchmark was running
[19:00:47] <timemage> Valen, umm, whose their own?
[19:01:43] <Valen> read http://www.extremetech.com/computing/193480-intel-finally-agrees-to-pay-15-to-pentium-4-owners-over-amd-athlon-benchmarking-shenanigans
[19:07:22] <aandrew> fuck it, disabled reset and made a connector harness for hvsp. seems stable. :-)
[19:07:29] <aandrew> thanks for the dialogue on it, it was helpful
[19:07:56] <timemage> aandrew, =)
[19:15:15] <timemage> Valen, what of what i'm not getting is who's being sued? intel's paying out but it's the sysmark benchmark that's supposedly responsible. if intel makes sysmark i'm not sure why anyone would pay attention to it in an amd-vs-intel comparison anyway.
[19:17:05] <Valen> I presume that given they have won a class action suit that dodgyness was proved beyond a reasonable doubt
[19:17:17] <Valen> This lawsuit is about whether Intel manipulated Pentium 4 performance scores in violation of California’s Unfair Competition Law. The lawsuit also addresses whether Hewlett-Packard (“HP”) knew about and substantially assisted Intel in manipulating the Pentium 4’s performance scores.
[19:17:42] <Valen> I think it comes down to the intel compiler fucking up on AMD
[19:17:50] <Valen> then sysmark using said compiler
[19:17:58] <Valen> and intel trumpeting the results
[19:19:34] <timemage> Valen, i saw the it about checking the intel-genuine vs sse flags. i'd need to read it tomorrow to have a chance of understanding it well.
[19:20:20] <timemage> Valen, really an article that separates out the different parties into their responsibilities. i'm guessing the main focus of their article was just to let people know about the suit.
[19:20:35] <Valen> yeah