#avr | Logs for 2016-08-04

Back
[00:20:21] <ewong> I'm setting up an ATmega8 on the prototype part of the AVR Dragon. do I connect the VCC (pin 2) to the ATMega8 pin 7 or do I hook the Atmega8 pin 7 to the SPI pin 2 (VTG)?
[06:20:21] <Lambda_Aurigae> http://dilbert.com/strip/2016-08-04
[07:03:29] <_ami_> how do we overclock an AVR 8 bit MCU? especially atmegas
[07:04:06] <_ami_> just attach higher Mhz crystals to xta1 and xta2?
[07:05:20] <_ami_> e.g. m16a - DS says Speed can be from 0 - 16Mhz.
[07:05:36] <_ami_> will it work with 21 MHz? or may be 27 Mhz?
[07:36:35] <gjm> http://hackaday.com/2015/08/04/clocking-or-overclocking-an-avr/
[13:23:09] <Lambda_Aurigae> _ami_, I have successfully overclocked an atmega32 to 20MHz...rated max at 16MHz...
[13:23:22] <Lambda_Aurigae> and an atmega1284p to 32MHz where it is rated at 20MHz.
[13:23:54] <Lambda_Aurigae> only problems I had was the ADC stopped working reliably....well, and baud rates were all kinds of out there for the USART.
[13:24:28] <Lambda_Aurigae> I didn't run them for extended periods overclocked, but they did function.
[13:24:59] <Lambda_Aurigae> to overclock, I just put higher speed crystal on the atmega32 and used an external 32MHz can oscillator for the atmega1284p.
[13:29:34] <bss36504> To me it's not surprising you can do some crazy overclocking. I'd bet money that atmel has a testable way to verify that the chip is functioning at test, over a range of frequencies. Whether they test every part leaving the plant this way or if it's just a check inspection on a small qty is besides the point; they know what the distribution of func
[13:29:34] <bss36504> tional frequencies looks like. Most manufacturers would spec the limits so that they had a 3-sigma guard band. So, of course some parts will work at high frequencies, but it literally depends on the individual part.
[13:32:45] <sebus> 19:55:47 <Lambda_Aurigae> _ami_, I have successfully overclocked an atmega32 to 20MHz...rated max at 16MHz..
[13:33:06] <sebus> Meh, even 40MHz for avr is nothing...
[13:33:26] <sebus> But on sme mpu's pwm might not work as you expect
[13:33:44] <sebus> and adc
[13:34:01] <bss36504> Yes exactly. 20Mhz is slooooow
[13:34:19] <bss36504> Granted, the AVR family parts are probably manufactured on a pretty old process
[13:34:26] <bss36504> at least the old ones.
[13:35:04] <sebus> I have mine mega8 running at 40MHz generator. Works with my zx spectrum as soundcard (ay-3-8910 emulator) :D
[13:35:51] <bss36504> Neato. any reliability issues?
[13:36:02] <sebus> http://www.avray.ru/ just check it out
[13:36:12] <sebus> sometimes it can glitch in parallel mode
[13:36:45] <sebus> but this might be also because of dummy connection of write strobe which is tied to ground
[13:37:58] <sebus> in serial mode (rs232) works well but with crystals like 18.432 or 22.1184MHz, also overclocking a bit avr with such crystal = no problem; still out of spec.
[13:39:27] <sebus> Only once I had problems with high freq crystals and avr and it was most common on mega32 and mega644
[13:40:24] <sebus> protip = use 6..10pf caps or clock generator... Or if you really need fast processing, grab yourself ARM chip :P
[13:41:14] <bss36504> Haha but what's the fun in that?! I wonder if that guy who did the arm emulator to run linux on an AVR ever tried overclocking.
[13:41:34] <sebus> hahaha, 6kHz arm emulation, respect
[13:41:46] <bss36504> Yeah it was pretty cool tho
[13:42:08] <sebus> I saw other stuff done on AVR's
[13:42:18] <sebus> like 6502 emulation
[13:42:34] <bss36504> That same guy did a JVM implementation that was really quite good.
[13:43:12] <bss36504> Anybody try upping the core voltage to support higher frequencies? It would reach a point of diminishing returns though...
[13:43:46] <sebus> bss36504 this might happen https://www.youtube.com/watch?v=mZ7pUADoo58
[13:43:47] <sebus> :D
[13:44:16] <bss36504> lol
[13:45:17] <sebus> besides, avr has no divide opcode ;(
[13:47:16] <Casper> this is why a division add so much code and is so slow and use so much ram
[13:47:25] <Casper> specially if you divide a float...
[13:48:45] <sebus> subi, brne, subi, brne... madness
[13:51:51] <sebus> also, extra code is generated with volatile... Good idea if you can use register instead (for eg. volatile uint8_t foo => register uint8_t foo asm ("r2..r7");
[13:52:01] <sebus> for small projects it'll be fine
[13:53:25] <Lambda_Aurigae> 20MHz should be more than enough for anybody!
[13:53:38] <sebus> 4 variables done like this saves over 200 bytes of flash, which is neat while you're playing with attiny13, 2313 or other stuff like this
[13:53:55] <Lambda_Aurigae> not like the things are supposed to be general purpose desktop processors.
[13:54:09] <Lambda_Aurigae> however, they do run faster than an old 386sx16 I have.
[13:54:20] <Lambda_Aurigae> right down to floating point math being faster even.
[13:56:05] <Casper> it's just sad that it don't have an higher precision ADC and no DAC
[13:57:40] <sebus> Lambda_Aurigae if 386 could fetch / execute most opcodes in one-two cycles...
[13:57:50] <Lambda_Aurigae> if only.
[13:58:43] <sebus> oops. Sorry, time to learn english >.<
[14:02:44] <bss36504> Casper: get on board the xmega train
[14:04:30] <Casper> smd...
[14:04:41] <Lambda_Aurigae> bah.
[14:04:46] <Lambda_Aurigae> MIPS!
[14:04:47] <bss36504> So? Anybody can solder a TQFP
[14:04:49] <bss36504> Literally
[14:04:51] <Lambda_Aurigae> pic32mx270f256b
[14:04:52] <bss36504> anyone
[14:05:05] <Lambda_Aurigae> 28pin dip with hardware usb running at 50MHz/83dmips
[14:05:23] <bss36504> Yeah I just go straight for PCBs. Works pretty well most of the time
[14:05:51] <bss36504> Why screw around with breadboards and dip packages when I can rapidly prototype almost as efficiently and with better parts on a PCB
[14:06:45] <bss36504> You just gotta be willing to build a few test boards once in a while to vet a circuit (eg switching regulator), then, you have that circuit/layout in your "toolbox" and you just plop it down on the new designs
[14:06:51] <bss36504> idk, to each their own
[14:07:21] <Lambda_Aurigae> I do a lot of build/teardown/rebuild/teardown/rinse and repeat
[14:07:31] <Lambda_Aurigae> working with kids in the 10 to 18 year old range.
[14:07:43] <Lambda_Aurigae> it would get very expensive making boards for such things.
[14:07:43] <bss36504> Well, that's a whole different story :)
[14:07:49] <bss36504> I just mean for me.
[14:07:55] <bss36504> True true
[14:08:09] <Lambda_Aurigae> we do end up making some boards eventually in the course
[14:08:14] <bss36504> But, you could pre-assemble some broken out xmegas into a DIP form factor and it would work swimmingly
[14:08:24] <bss36504> or other processor, I dont judge.
[14:08:37] <Lambda_Aurigae> or I can use avr and pic32 in dip and not bother learning yet another platform.
[14:08:45] <bss36504> I just hate when ppl are like "Nope, cant use that, it doesn't socket into a breadboard"
[14:08:51] <bss36504> I understand that
[14:08:57] <Lambda_Aurigae> I use what works.
[14:09:28] <Lambda_Aurigae> played with an xmega once and the performance vs complication compared to atmega for what I do just wasn't worth it.
[14:09:33] <Lambda_Aurigae> I'm sure it has its place.
[14:09:39] <bss36504> Again though, teaching a group and doing a project for yourself are different. Modern chips are to freaking cool to not use because you only have some LM317s or 7805s for regulators, cuz they fit into your breadboard.
[14:09:50] <Lambda_Aurigae> I work with avr, pic, pic32, and 8052 chips thesedays.
[14:09:56] <bss36504> too* cool
[14:10:11] <Lambda_Aurigae> each chip for best fit.
[14:10:12] <bss36504> I never liked pic's toochain very much but otherwise I guess they are alright
[14:10:21] <Lambda_Aurigae> the new xc compilers are ok.
[14:10:31] <Lambda_Aurigae> I use some pic chips to build usb-serial adapters basically
[14:10:42] <Lambda_Aurigae> and pic32 for higher end stuff that is bordering on going arm.
[14:11:03] <Lambda_Aurigae> pic32 can be programmed through sdcc, xc32, or gcc-mips.
[14:11:17] <Lambda_Aurigae> xc32 just being gcc-mips with some addons and limitations.
[14:11:35] <Lambda_Aurigae> you can get the source, modify it, and compile it yourself to remove the limitations imposed by the licensing code.
[14:48:25] <carabia> Seriously, fuck xmega. Go arm or pic.
[14:48:40] <bss36504> Why?
[14:49:10] <carabia> well, first of all the cost
[14:50:43] <carabia> then, if you need a lot of memory (or for some weird reason, DIP), you've got PICs which are both cheap and available in DIP
[14:51:55] <carabia> aaand thirdly, arms are ridiculously easy and with CMSIS you aren't even tied to a certain mfg
[14:52:06] <carabia> why the hell did i write easy. I meant cheap.
[14:52:25] <carabia> well, they are "easy" too, ...
[14:53:43] <bss36504> I mean, I'd argue that xmega is just "mega++". Plus with EBI you can get more SRAM at least
[14:54:00] <bss36504> idk, they're way more flexible than a mega, but it's true there are cheaper arms and pics out ther
[14:55:05] <carabia> bss36504, sure EBI, but with some PICs you don't even need it. They
[14:55:13] <carabia> ...'re stacked with memory
[15:03:37] <Lambda_Aurigae> that pic32mx270f256b has 256K flash and 64K sram.
[15:04:06] <Lambda_Aurigae> and, like the xmega, it can execute code from flash or sram.
[15:23:34] <eszett> hi
[15:23:51] <eszett> im looking for some SMD tweezers with good "price/quality" ratio.
[15:24:05] <eszett> do you think this offer is worth the price, or rather china crap? http://www.ebay.de/itm/6-Antistatisch-Pinzetten-Anatomisch-Chirurgisch-Antimagneti-Werkzeug-Set-SMD-ESD-/360957634242?hash=item540ac066c2:g:7ysAAOSwM4xXZTFU
[15:24:20] <eszett> it says its made of steel, at least
[15:26:44] <Chillum> Antimagneti... that is good
[15:27:06] <eszett> but the price.. is "too" cheap?
[15:27:22] <eszett> .. to be truely good quality?
[15:29:05] <Chillum> I don't know. I just ordered them
[15:29:12] <Chillum> it is nice to have some tweezers that I am not afraid to damage
[15:29:26] <Chillum> I have a single pair I paid $20 for and they are pretty nice
[15:29:38] <Chillum> but I always have to avoid bending the tips and stuff
[15:29:41] <Chillum> so I need some I can abuse
[15:32:01] <eszett> ah, you bought exactly the same, i linked to ebay?
[15:34:45] <Chillum> just now
[15:35:08] <liwakura> https://media.8ch.net/lewd/src/1470309860573.png
[15:35:24] <liwakura> okay you haven't seen that, wrong channel
[15:54:21] <carabia> Lambda_Aurigae, yeah, but you can get pics with 512K sram with the same price as you get 32K sram xmegas
[15:55:01] <carabia> not to mention the pics stil run faster dishing out way more MIPS
[15:55:27] <carabia> and i needed to add another "l" in there somewhere :)
[15:58:09] <carabia> Also, don't the pic32's even have an FPU? Which even the xmega lacks. Arguably probably for some niche application, but still you don't have to start performing goofy arithmetics to avoid floating points not to hurt performance
[15:59:18] <Lambda_Aurigae> some of the higher end pic32 chips might have an FPU.
[15:59:22] <Lambda_Aurigae> not the ones I use.
[16:00:16] <twnqx> can always add an old AMD fpu.
[16:01:21] <Lambda_Aurigae> or intel
[16:01:24] <Lambda_Aurigae> 80387!
[16:01:53] <Lambda_Aurigae> or a motorola 68882!
[16:02:38] <Lambda_Aurigae> dang but I miss the 68000 series processors.
[16:58:38] <Tom_itx> so do i
[16:59:26] <carabia> hey sure you can even add an extra x86 as a co-processor... if you want to!
[16:59:40] <carabia> just not sure if it's the greatest of ideas
[17:00:13] <carabia> you can also add a fax machine, a vacuum cleaner and the kitchen sink, only if you want to!
[17:07:42] <twnqx> but the AMD 9511 is a natural fit.
[17:53:38] <carabia> "a natural fit"?
[17:54:00] <carabia> it's a natural fit as long as you make it a natural fit. Much the same way the fax machine is a natural fit.
[18:21:00] <eszett> I have a question: Is "CS" on bus pirate the same as "RST"?
[18:23:56] <cehteh> likely not
[18:24:18] <cehteh> CS == chip select, RST == reset
[18:24:24] <eszett> hi cehteh
[18:24:41] <eszett> i just found something here http://dangerousprototypes.com/docs/Bus_Pirate_AVR_Programming
[18:24:59] <eszett> the table " Bus Pirate AVR programming connections " says CS resembles RST if i understand that right
[18:24:59] <cehteh> dunno specifically bout the bus pirate
[18:25:21] <cehteh> well if the docs say so
[18:25:31] <cehteh> sounds odd, but if it is that way
[18:25:43] <eszett> ye..
[19:05:42] <eszett> HI
[19:05:54] <eszett> I have a question, "0b1011110" is the same as "0b11011110" right?
[19:08:09] <Casper> no
[19:09:27] <Casper> 0b1011110 == 0b01011110 != 0b11011110
[19:12:55] <eszett> Casper, ah Zeros are default, thanks
[19:13:07] <rue_shop3> 01 == 00000001 see?
[19:13:14] <eszett> ye, got it
[19:13:16] <Casper> zero is always default for numbers
[19:13:31] <rue_shop3> you can put as many zeros as you want INFRONT of a number without changing its value
[19:13:31] <eszett> But I have a lil prob, it seems as if i deactivated the SPIEN fuse.
[19:13:54] <rue_shop3> eszett, throw it away, buy another chip and learn to not mess with fuses
[19:14:42] <eszett> i dont throw it away.. the pcb is 20€, the Atmega is 5€, and i soldered the pcb for hourse
[19:14:56] <rue_shop3> yea, you really shouldn't have screwed up the fuses then eh?
[19:15:43] <rue_shop3> is jtag still enabled?
[19:15:56] <eszett> I learn by trial and error. And deactivated the SPIEN doesnt seem to bust the whole chip
[19:16:12] <rue_shop3> it does if all you ahve is an spi programmer
[19:16:25] <rue_shop3> then again, iirc you cant use spi to turn off spi
[19:16:33] <eszett> BEcause i read that an ATMEL STK500 can still programm the Atmega
[19:16:40] <rue_shop3> jtag
[19:16:46] <Casper> spien shouln't be able to be disabled via spi
[19:16:52] <eszett> yes i wonder, how my ISP programmer was able to deactivate SPIEN?
[19:16:54] <rue_shop3> ah good
[19:17:11] <eszett> let me describe the symptoms of AVRDUDE
[19:17:27] <rue_shop3> ah wait, does the avr have a clock source?
[19:17:35] <eszett> no idea..
[19:17:43] <rue_shop3> cause if you set it to external clock, and there isn't one, it wont connect
[19:18:00] <eszett> I have the external clock connected and fuses set right for it
[19:18:09] <rue_shop3> Casper, ? I'm giong to go work on the unprintable object I designed
[19:19:11] <Tom_itx> how is it unprintable?
[19:19:34] <rue_shop3> its a pulley with square sides , on its side
[19:20:13] <Tom_itx> i bridged a 2" gap just fine
[19:20:21] <rue_shop3> its an overhang
[19:20:27] <Tom_itx> how is that unprintable?
[19:20:32] <rue_shop3> ][
[19:20:34] <rue_shop3> pulley
[19:20:48] <eszett> When i run this command with AVRDUDE:
[19:20:48] <eszett> avrdude -c USBasp -p m32u4 -U lfuse:w:0xde:m
[19:20:48] <eszett> avrdude -c USBasp -p m32u4 -U hfuse:w:0xd9:m
[19:20:48] <eszett> avrdude -c USBasp -p m32u4 -U efuse:w:0xfb:m
[19:20:48] <eszett> I get the error message
[19:20:48] <eszett> " avrdude: safemode: lfuse changed! Was de, and is now 5e Would you like this fuse to be changed back? [y/n]"
[19:20:48] <eszett> Does someone know why this happens?
[19:21:19] <rue_shop3> its saying your being stupid and would you like not to be :)
[19:21:35] <eszett> please?
[19:21:54] <rue_shop3> did you use the fuse calculator or work it out yourself
[19:22:05] <eszett> I've used a fuse calculator
[19:22:26] <rue_shop3> and you didnt' turn off spien?
[19:22:44] <Tom_itx> https://grabcad.com/library/hard-drive-adapter-1
[19:22:44] <eszett> maybe not
[19:22:45] <Tom_itx> rue_bed
[19:22:50] <Tom_itx> i printed that standing on end
[19:22:57] <Tom_itx> came out just fine
[19:23:27] <Tom_itx> worried about sag?
[19:23:27] <rue_shop3> thats fine
[19:23:30] <rue_shop3> no
[19:23:36] <rue_shop3> I have no support on the edges
[19:23:40] <rue_shop3> side view is ][
[19:23:45] <Tom_itx> you can't add supports?
[19:23:56] <Tom_itx> like 10% fill or such
[19:23:58] <rue_shop3> I"m playing with that
[19:24:03] <Tom_itx> then break them away
[19:24:12] <Tom_itx> that's what they do at the lab on alot of things
[19:24:39] <ferdna> anyone doing cctv? recommend me rg59 siamese cable from ebay....
[19:24:55] <Tom_itx> rue_shop3, print me 2 of those and send em to me :D
[19:25:11] <rue_shop3> ?
[19:25:17] <rue_shop3> ok, but how tall is it?
[19:25:23] <Tom_itx> i need a couple more hdd adapters
[19:25:34] <Tom_itx> like a hdd width?
[19:25:41] <Tom_itx> i forget how tall
[19:25:47] <rue_shop3> when its standing, how tall is it?
[19:25:59] <Tom_itx> maybe 5" ?
[19:26:05] <Tom_itx> i'd have to measure it
[19:26:15] <Tom_itx> i have a model of the one i modded
[19:26:28] <rue_shop3> I MIGHT be able to pull of a print 10cm high
[19:26:28] <Tom_itx> i need extra screw holes on the mount side
[19:26:52] <Tom_itx> it's taller than that i'm pretty sure
[19:26:54] <rue_shop3> only about 8 or 9cm on my machine
[19:27:55] <Tom_itx> i could get the lab to do another one but i'm not in class atm
[19:27:59] <rue_shop3> can you invert the outter wings up?
[19:28:06] <rue_shop3> so its got a flat side?
[19:28:15] <rue_shop3> put some screw access holes in it?
[19:28:23] <Tom_itx> no need
[19:28:31] <rue_shop3> there is if you want me to print it
[19:28:41] <Tom_itx> i drilled the others to what i needed
[19:28:46] <Tom_itx> what screw access holes?
[19:28:58] <rue_shop3> the outter edges, flip them up
[19:29:10] <rue_shop3> so its got a flat side and can be printed against the bed
[19:29:13] <Tom_itx> what for?
[19:29:21] <rue_shop3> so i can print you some
[19:29:22] <Tom_itx> ahh i see what you mean
[19:29:24] <rue_shop3> remember?
[19:29:27] <rue_shop3> ugh!
[19:29:29] <Tom_itx> meh, it's ok
[19:29:50] <Tom_itx> the first couple they printed at 100%
[19:30:02] <Tom_itx> which helped the screw mounts
[19:30:14] <Tom_itx> ABS
[19:30:19] <Tom_itx> iirc
[19:30:27] <Tom_itx> maybe not.. i can't remember
[19:32:03] <rue_shop3> I want to try abs sometime
[19:32:07] <rue_shop3> I have some
[19:32:12] <rue_shop3> need to get a heated bed going
[19:32:26] <Tom_itx> they print all sorts of stuff there
[19:32:42] <Tom_itx> they had some flexible stuff they made a timing belt out of for a machine
[19:34:38] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/cnc/temp/prints/plastic_prints.jpg
[19:34:44] <Tom_itx> see the red belt in the middle?
[19:35:12] <Tom_itx> some of that stuff is metal impregnated
[19:35:13] <rue_shop3> support material wont work, its burrying the print in the supports
[19:35:46] <Tom_itx> open the jpg
[19:36:06] <rue_shop3> what was the 4 part glued togethor with?
[19:36:14] <Tom_itx> the vase near the lower right? they did a full size one that was 1 layer thick
[19:36:17] <rue_shop3> everyone wanted to do the octopus eh?
[19:36:22] <rue_shop3> the roof vent
[19:36:33] <Tom_itx> huh?
[19:36:42] <rue_shop3> left, large square
[19:36:46] <Tom_itx> nothing was glued
[19:36:51] <Tom_itx> all printed like that
[19:37:02] <rue_shop3> uh, that was printed in 4 peices, I"m sure
[19:37:11] <Tom_itx> they do alot of prototype stuff for companies too
[19:37:20] <Tom_itx> i'm sure it wasn't
[19:37:36] <Tom_itx> they've got a 3 x 3 or larger print table or three
[19:38:25] <Tom_itx> well i'm not sure about that one...
[19:38:32] <Tom_itx> now that i see it up close
[19:38:52] <rue_shop3> hahaha
[19:38:53] <rue_shop3> hahahahahah
[19:38:56] <rue_shop3> I think
[19:38:57] <Tom_itx> see the orange pulley?
[19:39:08] <rue_shop3> I think I can print the pulley on edge
[19:39:09] <rue_shop3> hahahahaha
[19:39:33] <rue_shop3> I might have to slightly flat one side
[19:39:53] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/cnc/temp/prints/Ti_print1.jpg
[19:40:00] <Tom_itx> those are all Ti prints
[19:40:21] <rue_shop3> $$$$$
[19:40:37] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/cnc/temp/prints/Ti_print2.jpg
[19:40:42] <Tom_itx> done as one piece
[19:41:26] <Tom_itx> see the legos?
[19:41:48] <rue_shop3> yea
[19:41:58] <Tom_itx> some of em pulled up
[19:42:15] <Tom_itx> you miss one layer on that and the whole print is screwed up from there on
[19:42:29] <rue_shop3> yea
[19:43:08] <Tom_itx> you'd have a ball going thru that place
[19:43:17] <rue_shop3> :)
[19:45:21] * rue_shop3 sits back to see what the printer does with THIS
[19:46:05] <Tom_itx> you get your printer fixed?
[19:46:14] <rue_shop3> fixed?
[19:46:19] * Tom_itx moves over to #robotics
[19:46:21] <rue_shop3> always adjusting
[20:11:08] <ferdna> cu is copper
[20:11:10] <ferdna> what is ccu?
[20:16:05] <Tom_itx> not an element
[20:17:48] <ferdna> i know... i did look up the element table
[20:25:01] <Casper> is there an application where alu is better than copper? beside weight?
[20:25:15] <Casper> weight and cost..
[20:26:06] <Tom_itx> airplanes
[20:26:36] <Casper> that.s the weight part
[20:27:31] <Tom_itx> machinability is easier too
[20:28:30] <Casper> true
[20:29:32] <Tom_itx> cost
[20:29:38] <Tom_itx> but you said that
[21:47:44] <Piecat> Are there any nice AVR's with USB built in?
[22:04:55] <Tom_itx> a couple
[22:05:11] <Tom_itx> only one with host
[22:05:13] <Tom_itx> afik
[22:05:19] <Tom_itx> i dunno about xmegas
[22:05:45] <Tom_itx> the pic usb is probably easier to use