#avr | Logs for 2016-05-13

Back
[01:32:42] <WormFood> A baby seal walks into a club.
[03:23:25] <eszett> hi
[03:24:54] <eszett> question: has someone an idea about this phenomen: my multimeter measures correct Ohm values for all my resistors, which are four 1k's and four 22k's. However, when doing the continuity test, it beeps only at those 22k's and not at those 1k's. Why is that?
[03:27:13] <Jartza> _ami_: unfortunately no, those were customer projects
[03:27:21] <Jartza> I'm about to write audio bootloader for AVR though
[03:27:24] <Jartza> when I have some time
[03:37:13] <_ami_> Jartza: Audio bootloadeR?
[03:37:22] <_ami_> what does it mean?
[03:45:34] <Jartza> it means you can update firmware by playing audio to your avr
[03:45:42] <Jartza> even from cellphone/tablet/whatnot
[03:47:08] <Jartza> using the protocol I implemented some time ago
[03:47:09] <Jartza> http://labs.rakettitiede.com/12kbps-simple-audio-data-transfer-for-avr/
[03:48:15] <Jartza> Tagsu already updates it's firmware using that, so should be applicable to other AVRs too
[03:49:23] <Jartza> _ami_: ^
[03:51:32] <_ami_> wow!
[03:55:34] <_ami_> Jartza: you seem to struggle a lot initially on implementing this. I bet it must be highly satisfying when it was done. Respect! :)
[03:55:46] * _ami_ reading the article
[04:24:49] <Jartza> yeah, I was very happy when I got it working
[04:25:02] <Jartza> later testings have proven it to be very reliable. It also works over FM-radio, even with lot of noise
[04:25:43] <_ami_> Jartza: did u take patent of this?
[04:28:00] <Jartza> no, not really, it's open source.
[04:28:10] <Jartza> I'm a firm believer of open source :)
[04:28:51] <Jartza> I'm just happy if someone finds it useful
[04:29:27] <Jartza> and I'm hoping that if someone finds it Really useful, they buy Tagsu to support me :D
[04:30:01] <Jartza> except, currently they are only available from finnish online store, I'm not sure if they sell internationally
[04:30:04] <Jartza> https://www.verkkokauppa.com/fi/product/61543/gcdns/Tagsu-elektroninen-nimilappu
[04:31:01] <Jartza> _ami_: I also like to play with tiny chips. especially attiny85.
[04:31:29] <Jartza> _ami_: https://www.youtube.com/watch?v=G1QWNDck0yU
[04:31:59] <_ami_> Jartza: I am also crazy about attiny85 chips. I did not get this chip here so asked my relative to get it from London. :P
[04:36:36] <Jartza> what is "here"?
[04:37:35] <Jartza> that video is OctaPentaVeega...
[04:38:06] <Jartza> it's my VGA implementation using Attiny85 :)
[04:38:25] <Jartza> single chip gets you 32x16 characters on screen (yes, 512 bytes, full of the RAM)
[04:38:33] <Jartza> if you connect 3 attinys together, you get 8 colors
[04:38:41] <_ami_> Jartza: here is India! :)
[04:38:45] <Jartza> that's also open source
[04:38:45] <Jartza> https://github.com/Jartza/octapentaveega
[04:39:06] <_ami_> yes, i already subscribe to your github. following you now.
[04:39:08] <Jartza> _ami_: can't you order from china or something? :)
[04:40:15] <_ami_> Jartza: Shipments from China takes ages.. relative was coming back to india sooner :)
[04:40:33] <Jartza> oh :)
[04:40:43] <Jartza> well, that's unfortunate then
[04:41:10] <_ami_> Jartza: btw, I am learning AVR these days. Reading "Make:Avr programming" book currently.
[04:41:27] <_ami_> do you suggest any further/parallel reading as well ?
[04:45:00] <Jartza> hmm... hard to say, I haven't read any books about AVR in last 15 years or so, LOL :)
[04:45:19] <Jartza> join avrfreaks, read forums, read blog posts...
[04:45:30] <Jartza> http://www.avrfreaks.net
[04:51:41] <Jartza> _ami_: my asm example (the VGA) might be a bit extreme to start with :)
[05:00:43] <_ami_> Jartza: Writing ASM requires 6-7 brains :P
[05:01:01] <_ami_> i know ASM AT&T x86 but not the AVR one
[05:05:01] <Jartza> not really
[05:05:16] <Jartza> I started my programming career with asm
[05:10:34] <_ami_> Jartza: nice, :)
[05:13:31] <Jartza> well, not sure if it's nice, but it was the only option for the computer I started with
[05:13:44] <Jartza> which was DIY kit, in 1980, LOL
[05:13:52] <lorenzo> which one?
[05:14:12] <lorenzo> my school had this thing as a "DIY" PC :-D https://en.wikipedia.org/wiki/Micro-Professor_MPF-I
[05:14:20] <lorenzo> Z80
[05:26:33] <_ami_> Jartza: i was not born then. :)
[05:26:39] <Jartza> :)
[05:26:47] <Jartza> Mine was ABC-123, LOL
[05:26:51] <Jartza> quite innovative name
[05:27:02] <Jartza> but it was also z80
[05:52:09] <Lambda-Aurigae> not sure my Z80 machine had a name other than a generic homemade s-100 bus system.
[05:52:43] <Lambda-Aurigae> it might have but I got it second hand when the guy who built it couldn't make it work right and basically threw it out.
[05:54:42] <Jartza> Lambda-Aurigae: my friend's cousin brought that ABC-123 to me (and my friend) from UK
[05:55:06] <Jartza> there were zero home computers on sale in finland at that time.
[05:55:58] <Lambda-Aurigae> I remember stacking 1Kx1bit ram chips on top of each other, pulling out the chip select pins and wiring them all to an extra memory decoder circuit to give the thing 8K.
[05:56:01] <Lambda-Aurigae> it started with 1K
[05:56:10] <Lambda-Aurigae> 8 chips on the ram board.
[05:56:59] <Lambda-Aurigae> I pulled the extra ram chips off of old xerox processor control boards that were given to me by a xerox tech of the time.
[05:58:59] <Jartza> I only had 1k, but I didn't even know how to solder back then
[05:59:04] <Jartza> I was 8 years old :P
[05:59:17] <Jartza> friend's cousin was nice to solder those kits for us
[05:59:46] <Jartza> my next computer was vic-20 then, so that didn't require any soldering
[06:00:08] <Jartza> I was really interested in electronics also back then, but it took me good 30+ years to get started with really making my own stuff
[06:00:14] <Jartza> I mean, own electronics
[06:00:28] <Jartza> I've been tinkering and fixing stuff, but building my own
[06:08:48] <Lambda-Aurigae> I was about 9 when I started soldering.
[06:09:11] <Lambda-Aurigae> so you are about 10 years younger than me.
[06:24:56] <Jartza> I'm 43
[06:25:18] <Jartza> I think I was about 15 when I started any soldering
[06:26:59] <Jartza> but hey, I welded first time when I was 7!
[06:28:06] <Lambda-Aurigae> 48 going on 49 here.
[06:28:21] <Lambda-Aurigae> got my vic 20 when I was,,,,15...I think.
[06:29:15] <Lambda-Aurigae> and my z80 computer 2 years before that.
[06:39:19] <Jartza> yeah. around same time as me :)
[06:52:26] <inflex> mm... Z80
[06:52:33] <inflex> Lambda-Aurigae, couple of years ahead of me there I see
[06:57:11] <Jartza> my OCtaPentaVeega-testing-thingie has been running now for almost 3 months without crashes/boots
[06:57:19] <Jartza> maybe it's finally time to write the blog-post :)
[06:57:59] <Lambda-Aurigae> Jartza, definitely.
[07:57:12] <Jartza> Lambda-Aurigae: https://www.youtube.com/watch?v=YL0RwEtTN70
[07:57:20] <Jartza> it's been running that for 3 months :)
[08:22:35] <cehteh> Jartza: when it crashes now, then glhf debugging that :D
[08:23:38] <Jartza> it doesn't
[08:23:42] <Jartza> :)
[08:24:26] <Jartza> that's actually pretty easy to debug
[08:24:37] <Jartza> because there's no memory leaks ;)
[08:24:48] <Jartza> all of the memory is visible on screen
[08:25:48] <Jartza> there's just 30 registers to check then
[08:25:55] <Jartza> r0 always contains 0, r1 always contains 1
[08:26:05] <Jartza> r2-r31 are variables
[08:33:05] <Jartza> but all-in-all, it's running same loop 31450 times per second. if it's going to crash, if would've done it by now.
[08:33:14] <Jartza> unless hardware fault
[08:55:00] <cehteh> Jartza: thats what i meant, if it crashes now, but is not a hardware fault then that would be serious wtf
[08:59:19] <Jartza> well. EMI.
[08:59:26] <Jartza> I wouldn't even debug it ;)
[08:59:38] <Jartza> I would just say "EMI" and move forward :D
[09:12:52] <cehteh> if the hardware is well done (decoupling caps) i wont wonder if it stays running for the next dozen years :)
[09:13:08] <cehteh> better add a usv to it :D
[09:18:58] <Jartza> hmm
[09:19:22] <Jartza> unmanned space vehicle?
[09:19:41] <cehteh> ah german for usp ..
[09:20:00] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxRXVzSUNCT1h2NHM/view
[09:20:00] <cehteh> ups!
[09:20:11] <Jartza> that's how well the hardware is made ;)
[09:20:13] <cehteh> i know
[09:20:24] <cehteh> looks good or?
[09:20:34] <Jartza> it's decent
[09:21:01] <cehteh> did you read that avr dropped support for full swing osc's on newer 328p dies?
[09:21:02] <Jartza> although that one in picture is soldered with soldering iron, the one I've been testing has been "properly" soldered with solder paste and oven
[09:21:14] <Jartza> no I didn't
[09:21:55] <LeoNerd> Newer 328P or perhaps do you mean 328PB ?
[09:22:23] <cehteh> no
[09:22:33] <cehteh> new 328p mask revision
[09:22:36] <LeoNerd> Hmm
[09:22:40] <LeoNerd> I wonder why
[09:23:13] <cehteh> prolly because no one uses it and it made it cheaper to produce. leaving some stuff out
[09:23:23] <Jartza> I noticed it was removed from other mega chips like year ago or something
[09:23:37] <Jartza> but I don't mind, I use external clock :)
[09:23:40] <LeoNerd> It does seem slightly odd
[09:23:47] <Jartza> new clock chips are quite cheap anyway
[09:24:18] <Jartza> like LTC1799 or so
[09:24:49] <cehteh> http://hackaday.com/2016/05/03/atmel-removes-full-swing-crystal-oscillator/
[09:27:23] <Jartza> well. atmega328pb looks nice
[09:27:29] <cehteh> yep
[09:30:19] <Jartza> maybe it can be turned into vga controller
[09:36:50] <cehteh> lol
[10:44:23] <Chillum> wow... so no more external xtals, but internal can do 16mhz?
[10:44:36] <Chillum> or am I misunderstanding that
[10:44:48] <LeoNerd> Hm?
[10:45:00] <LeoNerd> No, just not doing the /full swing/ oscillator. The normal low-power xtal remains
[10:45:56] <LeoNerd> The full-power one is useful if you want to use the XTAL1 output as a clock signal to drive other chips
[10:46:37] <Chillum> ohhh
[10:46:44] <Chillum> well then that won't affect me
[10:47:20] <LeoNerd> Yah; I think in practice it's one few people use
[10:55:56] <cehteh> yes, wont affect much people, but will be pain when your design needs full swing xtal for some reason
[11:00:15] <carabia> http://elm-chan.org/fsw/ff/img/rwtest1.png Can someone please explain this to me? I thought the block transfer size is _fixed_ to 512 bytes with SDHC & -XC?
[11:01:17] <carabia> or if "at a time" doesn't refer to that, then what does it refer to...
[11:10:17] <bss36504> Well my understanding of the crystal thing was that the full swing oscillator was more forgiving to crappy capacitor choices and noise. Might make it a bit more tricky for newbies to get the oscillator going if that is the case.
[15:08:59] <liwakura> Should i set unused timer registers like TCCRnA to 0?
[15:13:57] <cehteh> no
[15:14:38] <liwakura> some dude on reddit is arguing i should
[15:14:50] <liwakura> defensive programming style.
[15:15:02] <cehteh> whats defensive there?
[15:15:26] <cehteh> its well defined how these registers operate and what the defaults are
[15:15:38] <liwakura> https://www.reddit.com/r/avr/comments/4fqtza/interrupt_firing_very_slow/d2bboez
[15:15:57] <cehteh> also i argue that too much defensive programming may shadow bugs
[15:16:44] <liwakura> how?
[15:17:41] <cehteh> just generic statement, but if something goes wrong then you better chrash hard and crash early
[15:18:24] <cehteh> defensive is leaving no garbage behind, and expecting garbage coming in .. but no more
[15:18:57] <liwakura> i think on an avr you have good changes of not encountering code of people you don't know
[15:19:07] <cehteh> i havent checked that code, is that yours?
[15:19:18] <liwakura> no
[15:19:49] <cehteh> my timer stuff in mµos works quite well for all kinds of variable time spans
[15:20:09] <cehteh> it has some considerable overhead there, lots machinery involved
[15:21:17] <cehteh> around 10µs latency and the scheduler part of the timers is voluntary other interrupts may delay the timed functions
[15:22:26] <cehteh> dunn what he does wrong that his timers somehow behaving odd, but i doubt that zeroing a register will fix it (unless he accidentally enabled some facility using that register)
[15:22:45] <cehteh> so better fix the bug than try'n'error
[15:23:28] <cehteh> well back to hacking filesystem caching :D ..
[15:44:15] <Jartza> datasheet defines defaults for the registers. if defaults are 0, why re-set them again to 0?
[15:46:35] <cehteh> reminds me of a story one posted on dailywtf ...
[15:46:52] <cehteh> some coworker made something like i= x+1; i = x+1;
[15:47:07] <cehteh> asking why he told "maybe the first one fails"
[15:47:49] <cehteh> most important thing: when you have a bug: fix that, not something else
[15:48:26] <cehteh> defensive programming is good, but you should be careful about what defensive means
[15:49:47] <RikusW> it fails the formatting test :-P
[15:58:31] <carabia> Reading 2048 consecutive sectors (1 MB) from sd card @ 5 mhz spi, getting about 355 kBps. Not too satisfying
[16:03:12] <carabia> and that's raw-read, discarding the data read in
[16:06:36] <carabia> I wonder if the hw usart in spi-mode is faster
[16:10:46] <LeoNerd> SD cards aren't always terribly fast in SPI mode
[16:10:56] <LeoNerd> That's what SDIO mode is for, to use multiple channels
[16:11:14] <CasperAtWork> is sdio documented yet?
[16:35:35] <carabia> LeoNerd: yeah but with usart spi that benchmark report says 1-2 MB/s @ 10 MHz
[16:36:01] <carabia> But the definition of "bytes at a time" isn't clear.
[17:01:40] <WormFood> Revision K, of the ATmega48/88/168 do not support a full swing crystal.
[17:16:09] <WormFood> Does anyone know of a low voltage drop, 3.3 volt regulator, that can handle 20 volts of input voltage, that isn't stupidly expensive?
[17:22:41] <CasperAtWork> what about 2x LDO?
[17:22:52] <CasperAtWork> hmmm that wouln't make an ldo then...
[17:27:22] <WormFood> I have no idea what you're thinking about
[17:28:58] <CasperAtWork> I had the idea of 2x ldo, like a 12 and a 3.3, some regulator output the full voltage if the input is bellow the regulation voltage, so might have worked
[17:29:21] <CasperAtWork> but then, it would be 1-1.2V drop I guess, at that point some non-ldo would work better
[19:13:43] <inflex> WormFood, I'd be looking at a cascade as well... but what's with the highly dynamic supply voltage?
[19:13:52] <inflex> also, what current levels?
[19:14:18] <inflex> things like the MCP1703 will handle 17V input down to 3.3 but that's only up to a few tens of mA
[19:23:30] <cehteh> WormFood: lm2931
[19:24:12] <cehteh> its a bit unusal (huge cap at the output)
[19:24:34] <cehteh> and has a strange current spike when undervoltaging it
[19:24:42] <cehteh> but its quite stable and reliable
[21:48:45] <_ami_> which avr simulator actually work on linux?
[21:49:06] <_ami_> is there any good which actually work?
[21:49:16] <_ami_> cehteh: ^
[21:49:42] <cehteh> simavr and simulavr both work
[21:49:56] <cehteh> one of them is very limited ... iirc the later
[21:50:27] <cehteh> the other one is quite good
[21:50:44] <cehteh> *but* usually rigging sims isnt fun :D
[21:52:21] <_ami_> cehteh: ok, thanks, gonna try compiling simavr source code taken from github.
[21:54:34] <_ami_> cehteh: it is for trying things when i don't have the actual hardware. basically At work! :)P
[22:52:55] <_ami_> cehteh: http://pastebin.com/iPW0Rhrd - simavr seems to stuck
[22:53:04] <_ami_> why is it so?
[22:55:07] <cehteh> how should i know?
[22:55:40] <_ami_> i meant .. did u facer similar problem?
[22:55:55] <cehteh> no
[22:56:39] <cehteh> i tried ot long ago, it worked, recently i compiled a new version and did only a simple test, worked too
[22:56:58] <cehteh> but never used it extensively esp not recently
[22:59:12] <cehteh> i just did a short test if i can hook up remote gdb debugging ..
[22:59:26] <cehteh> basically only the example code they given somewhere
[23:00:21] <_ami_> i am not trying with the example code. trying with my blink example. i think i am doing some wrong
[23:08:04] <Xark> _ami_: Are you using Linux?
[23:08:20] <Xark> _ami_: Yeah...nevermind. :)
[23:08:20] <_ami_> Xark: yes
[23:08:48] <Xark> _ami_: I was just going to say simavr does suck and recommend Atmel Studio simulator (but you don't want to hear that). :)
[23:08:59] <_ami_> :)
[23:20:03] <_ami_> alright, simulators really suck Xark cehteh^ :)
[23:20:15] <_ami_> gave up.