#avr | Logs for 2013-05-28

Back
[05:34:25] <megal0maniac> RikusW: Just installed Debian Wheezy & MATE & Cinnamon
[05:34:38] <megal0maniac> MATE is quite nice. :)
[05:36:43] <megal0maniac> Although Debian comes with "GNOME3" and "GNOME classic" already. But MATE is still nicer than classic
[05:37:00] <megal0maniac> Cinnamon is nice too. Oh, choices choices...
[05:38:12] <RikusW> yep
[05:38:25] <RikusW> MATE is windows like
[05:38:59] <megal0maniac> Well I wouldn't go /that/ far :P
[05:39:04] <RikusW> so far the least irritating desktop (after getting my new PC)
[05:39:35] <RikusW> win7 gets annoying at times...
[05:39:50] <RikusW> so since installing XP in VBox I haven'
[05:39:55] <RikusW> t booted win7 again
[05:40:17] <RikusW> megal0maniac: I did manage to install iATKOS ML2 in VBox :)
[05:40:34] <RikusW> it works, slowly... no graphics acceleration
[05:41:27] <megal0maniac> Windows 7 is great once you get used to it. Not surprised that iATKOS is slow :P
[05:41:27] <RikusW> I've installed cinnamon too, and that installed ubuntu as side effect
[05:41:40] <megal0maniac> Ubuntu? Nooo...
[05:41:51] <megal0maniac> I installed it and it pulled ~12mb of packages only
[05:41:52] <RikusW> the osx ripoff :-P
[05:42:13] <RikusW> cinnamon install installed ubuntu too...
[05:42:20] <megal0maniac> That's not right
[05:42:27] <RikusW> so I logged in, and then logged out immediately :-D
[05:42:33] <RikusW> just had a peek
[05:42:55] <RikusW> well M$ just had to go hide the administrative settings in all kind of weird corners :S
[05:43:00] <megal0maniac> You add the repo to sources.list, update packages, install the keychain, update again and install. That's all
[05:43:03] <RikusW> that annoys me a lot
[05:43:19] <megal0maniac> But once you get used to it...
[05:43:23] <RikusW> I use the Software Manager in MATE
[05:43:32] <megal0maniac> I haven't touched XP in ages. Hardly remember how it works
[05:43:35] <RikusW> way easier, it takes care of the details :)
[05:44:13] <RikusW> At least in XP the admin stuff is in obvious places, not buried too deeply
[05:45:19] <RikusW> I nearly finished a quad terminal app, multiplexing 4 serial streams over a single uart
[05:45:49] <twnqx> sloooooow
[05:45:49] <RikusW> and abusing editboxes to make a terminal display
[05:45:56] <RikusW> side effect of this abuse is terminal that scrolls down :-P
[05:46:03] <twnqx> you are only allowed to do that on slowaris :X
[05:48:46] <RikusW> this is on XP ;)
[05:50:40] <jadew> RikusW, why is it scrolling down?
[05:51:27] <megal0maniac> RikusW: Disconnected from wired network and lost my ssh session. Couldn't reconnect over wireless, kept getting "no route to host"
[05:51:31] <megal0maniac> Had to restart :(
[05:51:46] <megal0maniac> Installed for 10 minutes and problems already
[05:52:17] <RikusW> jadew: because I add stuff to the start of the string, and because I don't want to scroll down the editbox each time after adding text
[05:52:30] <jadew> RikusW, you don't have to
[05:52:41] <RikusW> any better ideas ?
[05:52:49] <RikusW> I'm using MFC4.2
[05:52:54] <jadew> you can select the end of the text
[05:52:57] <jadew> and insert data in there
[05:53:06] <jadew> IIRC that's how I did it
[05:53:13] <jadew> let me check and I'll let you know
[05:53:20] <RikusW> yes, and then when changing editbox text it jumps to top...
[05:53:36] <RikusW> and I'll have to scroll it down again and get artifacts
[05:53:43] <RikusW> jumping all around...
[05:53:51] <megal0maniac> tmux :)
[05:54:00] <RikusW> anyways I did the terminal hack in 10 lines of code :)
[05:54:07] <jadew> RikusW: yep, that's how I did it
[05:54:10] <RikusW> and 2 editboxes in a dialog
[05:54:39] <jadew> m_edit.SetSel(lenText, lenText); m_edit.replaceSel("newstuff\r\n");
[05:54:52] <jadew> and it does the vertical scrolling properly for you
[05:54:56] <RikusW> ah
[05:55:06] <RikusW> will try that thanks :)
[05:55:07] <jadew> I think you might be able to select the end of the text also by passing -1
[05:55:12] <jadew> so SetSel(-1, -1)
[05:55:15] <jadew> np
[05:55:47] <jadew> if it doesn't work like that, int lenText = m_edit.GetWindowTextLength();
[05:56:22] <Fleck> http://paste.opensuse.org/57982204 << what's wrong here? I don't get 500ms/500ms toggle, toggling much faster
[05:56:59] <jadew> Fleck, wrong F_CPU
[05:57:22] <megal0maniac> CKDIV8
[05:57:26] <megal0maniac> No wait
[05:57:33] <Fleck> much faster, not slower
[05:57:36] <megal0maniac> The opposite of that :)
[05:57:46] <Fleck> clock is 9.6MHz
[05:58:18] <Fleck> F_CPU is in Hz, so 9 600 000
[05:58:27] <twnqx> haha
[05:58:41] <Fleck> no?
[05:58:43] * twnqx laughs at the code since he made the same stupid just two weeks back
[05:58:51] <megal0maniac> I've done the same
[05:58:57] <twnqx> _delay_ms(500);
[05:58:58] <twnqx> PORTB 1= (1<<PB0);
[05:58:58] <megal0maniac> I just can't remember what it was :/
[05:59:01] <twnqx> much more elegant :X
[05:59:07] <twnqx> PORTB ^= (1<<PB0);
[05:59:10] <twnqx> that should have been
[05:59:16] <RikusW> its somewhat interesting to read raw irc in wireshark :-P
[05:59:29] <megal0maniac> RikusW: Why? Because it isn't encrypted? :P
[05:59:38] <RikusW> actually its not
[05:59:50] <megal0maniac> "isn't encrypted" :)
[06:00:00] <twnqx> btw fleck
[06:00:03] <RikusW> :megal0maniac!~megal0man@unaffiliated/megal0maniac PRIVMSG #avr :RikusW: Why? Because it isn't encrypted? :P
[06:00:03] <jadew> because it's someone else's IRC connection :P
[06:00:12] <twnqx> let me quote from include/util/delay.h
[06:00:17] <twnqx> The maximal possible delay is 262.14 ms / F_CPU in MHz.
[06:00:32] * twnqx remembered right
[06:00:55] <jadew> twnqx, don't they issue a warning?
[06:01:15] <jadew> ah wait, it's not constant
[06:01:25] <twnqx> nope they don't
[06:01:33] <jadew> I mean, it's a variable, they can't know at compile time
[06:03:11] <twnqx> fleck: do do an inner loop of 20x 25ms delays ;)
[06:03:19] <twnqx> (or use a timer interrupt)
[06:03:21] <Fleck> ;D
[06:04:01] <Fleck> on avr studio this code worked just fine :/
[06:04:14] <twnqx> strange
[06:04:34] <twnqx> but remember
[06:04:44] <megal0maniac> If the avr-gcc toolchain has __builtin_avr_delay_cycles(unsigned long) support, maximal possible delay is 4294967.295 us/ F_CPU in MHz
[06:04:50] <megal0maniac> Could be that?
[06:04:51] <twnqx> no plan survives the first contact with the battlefield :P
[06:05:00] <jadew> RikusW: http://pastebin.com/3FZNDkzL
[06:05:30] <jadew> that's a snippet from OLSFront, it also takes care of missing \r
[06:05:31] <RikusW> thanks
[06:05:40] <twnqx> megal0maniac: that path is taken with
[06:05:41] <twnqx> #if __HAS_DELAY_CYCLES && defined(__OPTIMIZE__) && \
[06:05:41] <twnqx> !defined(__DELAY_BACKWARD_COMPATIBLE__) && \
[06:05:41] <twnqx> __STDC_HOSTED__
[06:05:44] <twnqx> in avr libc
[06:05:51] <RikusW> the \r\n is supposed to come from the modem
[06:07:37] <[z_z]> How can i gauge the stack usage on an avr32? I've got a project that behaves strangely, and i suspect its because i'm overflowing stack space.
[06:07:50] <jadew> I guess if you know for a fact it's going to be \r\n, you don't have to take care of it
[06:08:00] <jadew> you will have to add the \r\n at the end tho
[06:08:23] <jadew> if you add it at the begining you would end up with a blank line the first time you run it
[06:08:38] <[z_z]> If i do not use malloc etc is there a way i can calculate the stack usage of all global vars?
[06:08:50] <jadew> that unless you don't want to automatically add new lines
[06:12:14] <jadew> [z_z], I had the same question when I got into AVR's, the answer was that gcc might be able to tell you that
[06:12:38] <jadew> I don't know what the options for that are, or if it's true, but if you find out, please do share
[06:12:53] <Fleck> anyone can give me a direct link to avr studio 6 ?
[06:13:07] <Fleck> dunno my login, reset pass not working :D
[06:13:50] <jadew> you can download as guest
[06:14:52] <[z_z]> jadew, first glance says -fstack-usage I'll try that out.
[06:15:02] <jadew> cool, let us know how it goes
[06:15:36] <twnqx> beware that global variables do not reside on the stack (afaik)
[06:16:00] <jadew> hmm... why not?
[06:16:21] <twnqx> they are static
[06:16:36] <jadew> yeah, but where would it allocate that memory?
[06:16:47] <twnqx> .text section
[06:17:46] <twnqx> however that is difficult from a harvard architecture binary
[06:19:45] <twnqx> hm wrong
[06:19:54] <twnqx> .text is the code, and of course the constants are in there initially
[06:20:35] <twnqx> of course the variables (and the stack) reside in the .data section
[06:21:27] <Fleck> twnqx: http://paste.opensuse.org/18015758
[06:22:01] <twnqx> mh
[06:22:17] <twnqx> then you have a different avr libc than me
[06:23:24] <[z_z]> damn. avr32-gcc version 4.4.3 does not have this option
[06:24:00] <Fleck> twnqx: avr-gcc 1.8.0 manual says that
[06:24:29] <[z_z]> I am using the avr32-gc binaries from atmel... is there a native more up to date version i get?
[06:24:33] <twnqx> [z_z]: stack usage is not compile time guessable anyway
[06:25:08] <twnqx> just use one recursive function and the compiler is lost
[06:25:08] <RikusW> jadew: its working :)
[06:25:16] <RikusW> did you handle the text limit or not ?
[06:25:18] <jadew> RikusW: nice
[06:25:40] <RikusW> seems if you reach some limit (64k ? ) it will stop adding text....
[06:25:53] <twnqx> Fleck: i use avr-gcc 4.7.x
[06:25:56] <jadew> RikusW, I don't think I increased it, IIRC it can be virutally anything
[06:26:01] <RikusW> I just did a Left(8000) before the new mod
[06:27:14] <RikusW> seems to be 30000
[06:27:22] <RikusW> GetLimitText() returns that
[06:27:40] <jadew> I think the default is 64k
[06:27:55] <jadew> oh wait
[06:27:59] <jadew> that's for rich edit controls
[06:28:03] <jadew> don't know what's for an edit
[06:28:09] <jadew> but you can increase it
[06:28:19] <RikusW> or clip the text somehow
[06:28:23] <jadew> SetLimitText()
[06:28:43] <RikusW> and I just checked SetLimitText(40) it does stop adding text ;)
[06:28:46] <jadew> Edit controls on Windows NT/2000/XP: If this parameter is zero, the text length is set to 0x7FFFFFFE characters for single-line edit controls or –1 for multiline edit controls.
[06:28:59] <RikusW> wow
[06:29:11] <RikusW> 2GB text ?!
[06:29:16] <jadew> that's -1 for multiline edit controls
[06:29:21] <jadew> RikusW, it seems like it :)
[06:29:47] <jadew> I guess you can count the lines, as you edit them
[06:30:00] <jadew> and when you reach x number of lines, you can remove one from the top
[06:30:24] <jadew> or just check for size and remove one at the top
[06:31:47] <jadew> while (textLen > 10000) { removeTopLine(); textLen = m_edit.GetWindowTextLength(); }
[06:32:00] <jadew> don't know how you could implement the removal with out triggering a scroll as well
[06:33:12] <jadew> I suppose you could do SetRedraw(FALSE); SetSel(0, newLinePos); ReplaceSel(""); SetSel(back to the end); SetRedraw(TRUE);
[06:33:45] <jadew> and you could do the normal insertion before re-enabling Redraw
[06:34:28] <RikusW> SetSel(0,20); ReplaceSel(""); does that :)
[06:35:01] <jadew> but if you're scrolled down already
[06:35:04] <jadew> doesn't it scroll up?
[06:35:07] <RikusW> stays down
[06:35:14] <jadew> ah, neat
[06:35:48] <RikusW> I did that before replacing the bottom though
[06:35:59] <jadew> ah, then that's why :)
[06:36:01] <RikusW> but it seems ok so far
[06:36:17] <jadew> yeah, you might get a glance at it scrolling up and then down tho
[06:37:17] <jadew> I guess you could make it so if you have to remove the top line to do the SetRedraw to false and if you did that do a SetRedraw(TRUE) at the bottom, that should ensure that it won't get visibly scrolled up and then back down
[06:39:11] <RikusW> it does scroll up...
[06:39:31] <jadew> how about if you do the Redraw thing?
[06:39:33] <RikusW> but when removing top and the adding at bottom it scrolls right
[06:39:38] <jadew> yeah
[06:39:42] <jadew> because it scrolls back down
[06:39:58] <jadew> and you have to hide that behaviour
[06:39:59] <RikusW> no noticeable artifacts
[06:40:40] <RikusW> maybe put the first replace inside a redraw false/true block
[06:40:56] <RikusW> that would be the right way :)
[06:41:03] <jadew> that would have the same effect as if you didn't do it
[06:41:11] <jadew> because it might redraw with the scroll bar at the top
[06:41:29] <jadew> then scroll back to the bottom when you do the next SetSel
[06:43:17] <jadew> http://pastebin.com/K5ni4mnG
[06:43:19] <jadew> this is what I mean
[06:43:57] <jadew> so you only do redraw off / on only when you have to remove text from the top
[06:44:17] <jadew> and when that happens it scrolls up and down, but it's not visible
[06:44:43] <jadew> when you don't have to do it, it will only scroll down and it's going to be visible anyway
[06:47:26] <jadew> since you're using such an old MFC version, why aren't you using WTL instead?
[06:48:10] <jadew> I don't think that one has anything the last WTL doesn't have
[06:48:43] <jadew> and WTL is much nicer to work with, really C++ oriented
[06:49:08] <jadew> it's open source, it's super fast and generates smaller code
[06:49:26] <jadew> and best of it: it's made by microsoft so the code is top notch
[06:50:16] * twnqx shakes head
[06:50:40] <jadew> microsoft and opensource eh?
[06:51:07] <twnqx> more like "microsoft" and "top notch code"
[06:51:15] <jadew> oh, that's a given
[06:52:31] <jadew> you can't get such a great OS with shitty code, if you have shitty code you get linux : (
[06:52:59] <twnqx> nice attempt at trolling, but sadly fails
[06:53:07] <jadew> hehe
[06:53:42] <jadew> I really meant what I said about the code tho
[06:53:58] <jadew> MS doesn't have dumb developers
[06:55:13] <jadew> and they have standards when it comes to code, for better or worse, they do ensure a certian code quality
[06:56:40] <jadew> either way, it's better than MFC
[07:03:48] <twnqx> MS will have their share of dump developers, too
[07:03:54] <twnqx> (dumb, too)
[07:04:30] <jadew> well, I'm sure they have/had some, but generally speaking, none of them are noobs
[07:05:04] <jadew> and for the things that have recently started to annoy me, I blame the management
[07:05:26] <twnqx> the thing that annoyed me since i started to use windows
[07:05:36] <twnqx> is the "all our users are utter retards" approach
[07:05:51] <twnqx> "if you deactivate the device, it will not work any more. are you sure?"
[07:06:05] <foo303> microsoft is the bane of my happiness.
[07:06:05] <twnqx> i could kill the guy who coded that dialog.
[07:06:07] <jadew> hehe
[07:06:23] <twnqx> computers should do as told and not ask stupid questions
[07:06:28] <jadew> twnqx, again, not the coder is at fault, it's the guy who told him what to say there
[07:06:39] <twnqx> they should not say *anything* there
[07:06:44] <foo303> a few days ago I was modifying some VBA code I wrote 7 years ago, only to have Excel damage the file(while I'm editing the code, not even running it) and say "Catastrophic failure"
[07:06:48] <foo303> then you click "ok
[07:06:49] <jadew> but I think it's fine to be a bit more verbose than not
[07:06:53] <foo303> and excel crashes
[07:07:19] <twnqx> if i click on deactivate i expect the device to be deactivated, not the computer asking me if i clicked deactivate because i want to deactivate something, maybe. or maybe not.
[07:07:37] <jadew> what if it was some important device and you missclicked?
[07:07:44] <twnqx> that's pebkac
[07:08:08] <jadew> and the message box is avoiding some of the pebkacs
[07:08:13] <twnqx> first thing i have to on on every bloody windows install is flip just about every single gui switch there is
[07:08:24] <jadew> I think it's resonable really, that's not what annoys me
[07:08:43] <jadew> I'm more annoyed by the general direction they've taking since bill gates stepped down
[07:08:44] <twnqx> computers must not ask back to users, period
[07:09:02] <twnqx> never. even if the results are catastrophic.
[07:09:20] <timemage> foo303, a used to find that access would sometimes not recompile modules. so you could have an error in that module for weeks, months, years, and it would only show next time you touched it. to that end, i wrote another module that did nothing but force recompiles of everything.
[07:09:39] <foo303> hahaha
[07:09:49] <jadew> RikusW, did you get my message about WTL?
[07:09:52] <foo303> yeah. I have a practice of clicking "Recompile" for that reason too
[07:10:14] <foo303> eclipse does the same thing. IDEs are mostly going to show their sucky side, when you least expect it
[07:11:08] <jadew> it just seams that way because you're already used to the regular way in which they suck :P
[07:11:11] <foo303> eclipse has some weirdass trippy race conditions and dead locks that show up at the weirddddest times. sometimes you'd be typing, and it won't show what you type, but the GUI is responsive nontheless...
[07:11:38] <jadew> that's java for you
[07:11:44] <timemage> foo303, used to have to use vss with access as well. that's a good way to get things screwed up as well.
[07:11:49] <jadew> and shitty ideas java coders have about coding
[07:11:55] <foo303> I just dumped that shit altogether, edit in vim, clean in eclipse(which automatically rebuilds) and pray to the heavens that eclipse doesn't hit me with a "feature"
[07:12:04] <foo303> yes. like "refactor?"
[07:12:54] <foo303> what the fuck is refactoring? it should be renamed "shitty code rewrite bro? yes, no" click yes "no problem. that's what we've been doing for a long ass time, and no one has fixed the problem really. now, write better code please"
[07:12:58] <RikusW> jadew: got the part about WTL
[07:12:58] <twnqx> i tried eclipse once, years ago
[07:13:08] <twnqx> typing would lag ~1s
[07:13:13] <twnqx> totally unusable
[07:13:25] <jadew> RikusW, well, you should take a look at it, it might suite you better if you're using such an old mfc version
[07:13:34] <jadew> twnqx, I had the same experience
[07:13:43] <jadew> felt like coding on a 286
[07:13:49] <jadew> the PC couldn't keep up with me
[07:13:56] <foo303> any DAS keyboard users here?
[07:14:14] * jadew uses a lopold keyboard
[07:14:14] <foo303> I don't know. I am just so damn psyched. It brings joy :D
[07:14:38] <jadew> I don't remember, which switches is it ussing?
[07:14:43] <jadew> cherry reds?
[07:14:46] <foo303> cherry blue
[07:14:49] <jadew> got it
[07:14:50] <foo303> mx
[07:14:53] <jadew> yeah
[07:14:56] <jadew> mine is using browns
[07:15:06] <jadew> it's a bit quietter
[07:15:09] <foo303> ah. quite!
[07:15:24] <foo303> but it is mechanical, right? just a little rubbery?
[07:15:34] <RikusW> jadew: I mainly use MFC for quick hacks
[07:15:36] <jadew> it's mechanical, not rubbery at all
[07:15:40] <RikusW> but will look into WTL
[07:15:55] <jadew> it just doesn't have that click, the only sound you hear is the key bottoming down
[07:16:31] <jadew> RikusW, it's nice and my library of choice on top of win32
[07:16:41] <foo303> I realized yesterday after testing the keyboard at the coffee shop, that this thing brings joy to me, and sorrow to anyone else around me :p
[07:16:45] * twnqx would consider wx instead
[07:16:55] <jadew> and does everything pretty much the same as MFC, but the end result is way nicer
[07:16:56] <foo303> especially since I got the one without the print on the keys
[07:17:16] <jadew> heh
[07:17:35] <jadew> twnqx, you mean wx widgets?
[07:17:39] <twnqx> yes
[07:17:56] <twnqx> though personal preference is GTK :P
[07:17:59] <jadew> haven't tried it, but I would suspect it has more piping code around it than WTL
[07:18:04] <foo303> iirc, gtk+ also works on windows
[07:18:04] <twnqx> less classy, if you know what i mean
[07:18:13] <jadew> which basically just makes win32 API calls in most cases
[07:18:16] <twnqx> so umm
[07:18:24] <twnqx> my xchat just lost its cursor in the input window
[07:18:25] <twnqx> yey?
[07:18:33] <jadew> linux :P
[07:18:41] <jadew> had to say it :D
[07:18:52] <twnqx> and a piece of software out of maintenance for several years
[07:19:17] <jadew> foo303, it does, but as with other cross-platform frameworks, they have piping code one might not need
[07:19:23] <jadew> especially if the target is windows
[07:19:37] <twnqx> yes, the only windows program i ever wrote
[07:19:42] <twnqx> was cygwin+gtk
[07:19:42] <jadew> if you're only targetting windows, the logical approach is to code as close to the win32 api as possible
[07:19:58] <foo303> win32 is dead, I thought?
[07:20:06] <twnqx> long live win8!
[07:20:24] <jadew> foo303, don't know in win8, but up to 7, it's there
[07:20:32] <foo303> jeez. win32 is damn old guys!
[07:20:33] <jadew> and it's at the base of everything
[07:20:49] * twnqx uses win 3.11 APIs
[07:20:57] <twnqx> and 16bit code for good measures
[07:21:07] <jadew> heh
[07:21:12] <foo303> oh right. I forgot I'm in avr
[07:21:29] <foo303> :D
[07:21:46] <twnqx> i should still have some win 3.11 floppies around
[07:21:57] <jadew> did you think we were talking about the PC version of windows? no sir, we're talking about the AVR one
[07:22:00] <tzanger> morning
[07:22:09] <twnqx> good day, sir!
[07:22:14] <tzanger> xchat? use irssi like a man :-)
[07:22:14] <foo303> jadew: aw god. :D
[07:22:31] <twnqx> nah, i dislike irssi's multi-network handling
[07:22:46] <foo303> Windows on AVR is like hell and heaven *sabbath black*
[07:23:19] <twnqx> windows CE? windows mobile?
[07:23:29] <twnqx> i bet avr32 could run it
[07:23:37] <twnqx> if they compiled a version for it
[07:23:43] <foo303> can you really rely on a windows OS to run your embedded programs?
[07:24:07] <twnqx> i don't rely on windows to run any of my programs
[07:24:09] <foo303> I mean... what if it is asking to send or don't send an error report while you're milliseconds away from a catastrophy?
[07:24:16] <foo303> hahaha twnqx!
[07:24:17] <twnqx> i use it primarily as a HAL to play games :P
[07:24:22] <tzanger> twnqx: really? it works pretty nicely for me I find. I may just not know what I'm missing though
[07:24:42] <Tom_itx> morning
[07:24:49] <twnqx> tzanger: usage patterns of 15 years of linux desktop
[07:24:53] <tzanger> embedded windows is closer to NT than 95, I wouldn't have issues running it
[07:24:54] <twnqx> nothing more
[07:25:00] <tzanger> I just hate the damned Windows APIs
[07:25:09] <jadew> yeah, windows CE was great
[07:25:13] <twnqx> i'd hate their hungarian notation :P
[07:25:18] <tzanger> twnqx: same here, I just never really "stuck" with xchat or any of the others
[07:25:22] <tzanger> and yes, there is that
[07:25:28] <foo303> yes. thank you, twnqx!
[07:25:29] <tzanger> Cypress uses it, it drives me fucking nutty
[07:25:47] <tzanger> I do not need to encode my variable type and use into the name
[07:26:15] <tzanger> pzfuquwin32MyVarName
[07:26:47] <tzanger> I also don't really like camelCaseVariables
[07:27:02] <foo303> msft's approach: every man for himself! compile the code you're reading while reading it and type check it just by skimming. determine scope through telepathy. chop chop!
[07:28:43] * twnqx is a bit scared of the numbers in this article
[07:28:55] <jadew> what article?
[07:28:55] <twnqx> "needs 1200V rated switches" (transistors & diodes in this context)
[07:29:04] <jadew> heh
[07:29:15] <jadew> arc time!
[07:29:27] <twnqx> and unfiltered mains
[07:29:28] <twnqx> hm
[07:29:37] <foo303> make me one iron man suite while you're at it, twnqx. kthxbye.
[07:29:41] <foo303> 1200V...
[07:31:14] <tzanger> that's nothing
[07:31:29] <tzanger> when switching inductive loads you can easily ring up 2x the nominal line voltage
[07:31:37] <twnqx> yes
[07:31:46] <twnqx> that's how this requirement comes into play.
[07:32:12] <twnqx> it's not about switching these voltages, just surviving the backlash :P
[07:32:14] <tzanger> we used to use 1800V devices on 600V systems
[07:32:41] <tzanger> and (it's been a while now) 3x1800V devices in series with static and dynamic snubbering for 4160V systems
[07:55:24] <Fleck> twnqx: btw, same info is written in /usr/lib/avr/include/util/delay.h file
[07:59:41] <Fleck> twnqx: and, and, and #define __DELAY_BACKWARD_COMPATIBLE__ did the trick :D
[08:03:51] <Fleck> Code::Blocks rocks! :)
[08:06:18] <bitd> Try vim :P
[08:06:41] <Fleck> why? I hate vim
[08:06:48] <bitd> Why so?
[08:07:14] <Fleck> cause I am gui guy :D
[08:07:26] <Fleck> I love crystal buttons etc LOL
[08:07:31] <jadew> hate it or not, it's the only tool that works nicely in text mode
[08:07:45] <jadew> Fleck, for nix, you might also try CodeLite
[08:07:53] <Fleck> jadew: dunno, love to use mcedit/mcview when needed
[08:07:56] <jadew> decent IDE as well
[08:08:05] <Fleck> or nano
[08:08:16] * Fleck googles CodeLite
[08:08:43] <bitd> I see jadew, all the sqigglies in a gui like codeblocks distract me from the task at hand.
[08:09:00] <Fleck> then you have menatl problems :D
[08:09:01] <bitd> s/jadew/Fleck
[08:09:38] <jadew> the coding environment is always a matter of taste, unless you depend on something that's only available in a specific tool
[08:10:00] <Fleck> jadew: thx, codelite installed! :)
[08:10:25] <jadew> Fleck, np, it's worth a try too, I went trough several IDEs as well
[08:10:34] <bitd> jadew I like vim in combination with my datahand.
[08:10:44] <bitd> I no longer need to "mouse".
[08:11:10] <tzanger> balls. I created a routing problem for myself
[08:11:21] <tzanger> stupid HVSP.
[08:11:26] <jadew> bitd: http://www.clickykeyboard.com/2006/sep012006/sep012006-004.jpg
[08:12:07] <jadew> tzanger, you want to do HVSP while the chip is plugged in?
[08:12:11] <tzanger> yep
[08:12:18] <jadew> is that a good idea?
[08:12:23] <tzanger> yep. :-)
[08:12:32] <jadew> what do you have to isolate?
[08:13:00] <tzanger> I use a BSS84 to isolate the AVR's VCC from the real VCC net
[08:13:15] <tzanger> so when the ISP is plugged in and providing power, the BSS84 is off and disconnects VCC from the VCC net
[08:13:25] <tzanger> moment I'll show
[08:13:26] <bitd> Haha, no really jadew, the datahand is probably the best thing I ever tried.
[08:13:31] <Fleck> how about reset ping tzanger?
[08:13:36] <bitd> They be expensive as hell, but worth it.
[08:13:47] <jadew> bitd, I've came across that keyboard before, but it looked wierd
[08:13:57] <tzanger> I'm doing a few things that aren't quite kosher but work fine
[08:14:08] <bitd> You need a cheatsheet for 3 to 4 months.
[08:14:16] <bitd> After that, it once again becomes second nature.
[08:14:45] <jadew> I don't think I could give up on regular keyboards
[08:15:04] <tzanger> http://mixdown.ca/dump/pump.png
[08:15:21] <jadew> bitd, what typing speed do you get with it?
[08:15:37] <tzanger> I have been typing on laptop keyboards for over 15y as my primary keyboard... I have difficulty typing on real keyboards, but love the buckling spring ones
[08:15:51] <jadew> tzanger, nice
[08:16:35] <tzanger> my power supply "rides" the 24VAC power source. +5 = line voltage, common "dangles" 5V below it
[08:16:52] <jadew> tzanger, is that a P-FET?
[08:17:06] <tzanger> yes
[08:17:19] <jadew> hmm
[08:17:34] <bitd> I think it was about 85 a few years ago :P
[08:17:40] <bitd> wpm that is.
[08:17:41] <jadew> you probably need a pull up in there, no? but you can't have one
[08:18:11] <tzanger> you cannot have any capacitance on the +5V line or HVSP fails, which is why I have the pfet to "disconnect" the attiny from the 5V rail
[08:18:12] <jadew> bitd, nice
[08:18:27] <jadew> tzanger, yeah, I figured that
[08:18:34] <jadew> but when ISP is not connected, the gate is floating
[08:18:39] <tzanger> a weak pullup would work, I will add one on the board but try not stuffing it
[08:18:48] <tzanger> yes I know, I'm not super happy about that
[08:19:16] <jadew> maybe you can have one that would activate the regular VCC with the help of a pull down
[08:19:32] <tzanger> actually I want a pulldown. I want the fet ON when ISP is disocnnected
[08:19:36] <tzanger> 10k to ground would work very well
[08:20:03] <jadew> oh, right
[08:20:08] <jadew> hehe
[08:20:16] <jadew> yeah, pulldown should work, doh
[08:20:28] <jadew> the P-FET confused me
[08:22:32] <twnqx> tzanger: are the diodes in parallel to the Z diode freewheeling for the other half-wave?
[08:25:33] <jadew> tzanger, I have another suggestion for your arrangement there
[08:26:30] <jadew> you should remove the connection from ISP VCC to MCU VCC
[08:26:35] <jadew> and pass it trough another FET
[08:26:43] <jadew> controlled by the output of Q1
[08:27:03] <jadew> that way you wold power the MCU, only when Q1 is off
[08:27:23] <jadew> wait, that wouldn't work so well..
[08:27:29] <jadew> hmm
[08:31:00] <tzanger> twnqx: those "double diodes" are just two different packages for alternate stuffing. only one is used
[08:31:17] <tzanger> jadew: one pfet will work I think
[08:31:26] <tzanger> I have to test yet to make sure that the pfet disconnects "enough"
[08:31:31] <tzanger> the board will not be powered when the ISP is used
[08:31:43] <tzanger> but I just don't want the ISP seeing all that capacitance because it'll fail to program
[08:31:58] <tzanger> wow routing crisis averted but I really don't like it
[08:32:12] <jadew> well, the capacitance you have to worry is not on the rail side
[08:32:22] <jadew> it's on the data lines
[08:33:05] <tzanger> actually it *is* on the supply
[08:33:19] <tzanger> dragon refuses to HVSP if it can't reliably turn the AVR on and off
[08:33:25] <jadew> ah
[08:33:25] <tzanger> discovered that the hard way
[08:33:26] <jadew> I see
[08:33:31] <tzanger> http://mixdown.ca/dump/pump2.png
[08:33:33] <tzanger> not happy about that routing
[08:35:22] <tzanger> the ISP connector there is just pads/holes, no part will be stuffed (pogoboard programmed) I could get rid of it and just have random pads on the bottom but I figure this will help with development
[08:35:40] <tzanger> you should see my current development board, the original design used a PIC12 and I moved it to AVR. it's a hack job for sure :-)
[08:45:24] <tzanger> IIRC I also have a problem with that LED circuit with HVSP, but I'll drop the LEDs before I add another fet
[08:47:49] <twnqx> add more regulators :P
[08:48:18] <bitd> When in doubt, add more regulators?
[08:49:42] <twnqx> yes, though the floating ground makes that approach a bit more challenging
[08:56:06] <tzanger> regulators? why would I need more regulators?
[08:57:21] <Fleck> jadew: I don't see avr project/chip selection in CodeLite
[08:57:52] <jadew> ah, I only suggested it as a nice IDE
[08:58:02] <Fleck> ok :)
[08:58:03] <jadew> I'm sure you can configure it to use the avr-gcc toolchain tho
[08:58:23] * bitd coughs vim, cough cough
[08:58:25] <bitd> ;D
[08:58:37] <Fleck> :P
[08:58:54] * Fleck removes vim from bitd's PC :D
[08:59:56] <megal0maniac_afk> zlog
[09:09:09] <megal0maniac> < tzanger> xchat? use irssi like a man :-) << whoo!
[09:09:19] <Fleck> lol
[09:09:39] <megal0maniac> * bitd coughs vim, cough cough << whoo!
[09:11:16] <megal0maniac> I think that's it
[09:24:41] * twnqx replaces vim with emacs while megal0maniac is afk
[09:25:07] <tzanger> http://www.flickr.com/photos/akohlsmith/8866552403/
[09:25:15] <robotustra> megal0maniac_afk use bitchX
[09:25:22] <tzanger> that's the dev board, AVR deadugged into a PIC12's space :-)
[09:25:59] <twnqx> i think your board might be... buggy
[09:26:40] <twnqx> so why didn't you just stick with the pic?
[09:53:09] * megal0maniac_afk will accept emacs
[09:57:07] <tzanger> twnqx: I hate PIC's IDE. I don't like IDEs in general
[09:58:14] <tzanger> it's not buggy, just deadbugged. :-) lots of changes for the next board rev. the connector glued to the side is for my HVSP
[10:05:37] <twnqx> tzanger: i was told by the guys from dasngerous prototypes that the pic cross toolchain works as goos as avr's, once you managed to install it
[10:07:14] <tzanger> which cross toolchain is that?
[10:07:23] <tzanger> xc8/16?
[10:07:29] <twnqx> gcc for pic 8
[10:07:42] <tzanger> oh I haven't seen it
[10:07:50] <tzanger> no matter, I tend to like AVRs better these days
[10:08:18] <twnqx> i only ventured a little bit into picland for bus pirate weirdness
[10:08:52] <twnqx> (and istill have no idea how the bus pirate gets into the state it hits every now and then)
[10:10:27] <tzanger> heh
[11:09:59] <megal0maniac> twnqx: I still want an AVR based bus pirate :/
[11:10:15] <twnqx> build one!
[11:10:21] <megal0maniac> Firmware!
[11:10:35] <twnqx> you have my emacs!
[11:10:50] <megal0maniac> :)
[11:12:32] <megal0maniac> https://github.com/jobytaffey/bus-ninja
[11:14:14] <LoRez> sweet!
[11:14:50] <twnqx> pirates vs. ninjas, eh
[11:16:53] <megal0maniac> Yeah.. the project is dead, too
[11:17:03] <megal0maniac> But the groundwork is there
[11:20:46] <UnderSampled> how do I find the hame of the part specific include file for my chip?
[11:20:50] <UnderSampled> *name
[11:21:24] <twnqx> no need to
[11:21:30] <twnqx> or do you want to look into it?
[11:22:28] <twnqx> if yes... read include/avr/io.h , search for the define you put in your Makefile, read the file that is included
[11:23:08] * robotustra use Sublime
[11:31:45] * megal0maniac installs emacs
[11:32:43] <twnqx> megal0maniac: if you build that thing
[11:32:55] <twnqx> could you update my spitool to work with it please?
[11:33:10] * twnqx goes lazy
[11:33:32] * megal0maniac goes dead
[11:33:51] <megal0maniac> I'm putting it on the Dockstar :)
[11:35:55] <megal0maniac> twnqx: What is your spitool?
[11:36:23] <twnqx> just a toy i needed to read spi eeproms with the bus pirate
[11:36:30] <twnqx> and live dump spi traffic
[11:37:13] <megal0maniac> I'll probably build it in the holidays with Rikus' U2S board or the Teensy
[11:37:59] <twnqx> https://github.com/chrschmidt/spitool
[11:39:02] <twnqx> guess i should add the nor flash tables i built for my avr...
[11:39:16] <twnqx> and make it read/write nor flash chips as well
[11:39:25] <megal0maniac> Heh :)
[11:39:38] <megal0maniac> Maybe I'll give it a bash
[11:40:08] <megal0maniac> Plan to figure out SPI first and get two nrf24l01s talking to one another
[11:40:32] <twnqx> spi is trivial
[11:40:40] <twnqx> ask me if you need something
[11:41:11] <megal0maniac> I'm always here :P
[11:41:12] <megal0maniac> Thanks
[11:41:18] <megal0maniac> Played with serial recently
[11:41:37] <megal0maniac> comms is easy, just took a while to get familiar with the registers and set-up
[11:41:59] <twnqx> ah
[11:42:10] <twnqx> ping me if you're at the code stageon avr :P
[11:42:31] <twnqx> that one is not complicated, but has some pitfalls
[11:42:54] <megal0maniac> Will do :)
[11:43:24] <megal0maniac> For now, though, I need to prove my knowledge of BJTs and FETs and full-wave regulators :P
[11:44:03] <megal0maniac> Electronics 1 exam in 14h 30m
[11:58:57] <megal0maniac> twnqx: http://shop.fsf.org/product/gnu-emacs-reference-mugs/
[12:17:20] <stanreg> [attiny44]: My straightforward code isn't waking up from sleep (http://pastebin.com/SCH1RF5L). If "SLEEP_MODE_PWR_DOWN" is replaced by "SLEEP_MODE_PWR_SAVE", all is well. Any clues as to why it won't deep-sleep?
[12:17:38] <stanreg> Or, rather, wake up from deep sleep?
[12:51:32] <xaxes> hey all .. Few months ago I built a jtag ice mkI clone. It was working fine, but now I have destroyed something. I guess I tried to flash something in the first seconds of the bootloader (blinking LED).. now I cant connect. I also tried to connect from a win-box to update the firmware, but avrstudio doesn't recognize the device .. any suggestions how to fix this?
[12:51:51] <xaxes> the LED is still blinking on boot, so I think it should be possible to update/fix the firmware
[12:52:52] <megal0maniac> Do you have another programmer?
[12:53:48] <xaxes> I could try to fix an old circuit which Im using for general purpose stuff. I think I could make a simple SPI programmer
[12:54:20] <megal0maniac> I assume the jtag ice clone is AVR based?
[12:55:37] <xaxes> yes
[12:55:58] <xaxes> atmega16.. unfortunately I cant find the page with schematics/hex's
[12:57:42] <megal0maniac> xaxes: Well if you're able to flash the chip with another programmer, then try this: https://sites.google.com/site/megau2s/home/jtag
[12:58:33] <megal0maniac> RikusW: By the way, the link to the schematic on that page is 404
[12:59:01] <megal0maniac> Oh. Haha :) http://tom-itx.dyndns.org:81/~tom-itx/irc/logs/%23avr/2012-08-28.html
[12:59:09] <xaxes> megal0maniac: thank you.. I think this doesn't fit, because I have no usb, but rs232
[12:59:21] <megal0maniac> (Search isojtag)
[12:59:37] <xaxes> brb phioen
[12:59:40] <xaxes> phone*
[13:04:08] <megal0maniac> xaxes: Here's the page you used last time: http://www.avrportal.com/?page=jtag
[13:04:19] <megal0maniac> Ooh! too fast
[13:05:28] <xaxes> megal0maniac: yes, I think you're right.. but it isn't available
[13:05:31] <xaxes> at least for me
[13:05:40] <megal0maniac> http://web.archive.org/web/20120315143740/http://www.avrportal.com/?page=jtag
[13:05:53] * megal0maniac loves the way back machine :)
[13:06:04] <xaxes> hah! cool :)
[13:06:10] <xaxes> *bookmark* :)
[13:07:12] <xaxes> megal0maniac: you saved my day :)
[13:08:17] <megal0maniac> The hex files and source aren't available, though
[13:10:00] <xaxes> I think I have a chance without reflashing the bootloader.. but got a hint from the page.. I have to set a jumper to be able to program the mkI :) hopefully avrstudio will find it after jumping
[13:10:52] <megal0maniac> Have a look at the sources on the previous link if you don't come right. The sources for a plain ol' atmega16 are there too
[13:11:03] <megal0maniac> Not specifically USB
[13:14:17] <megal0maniac> Supper time!
[13:19:29] <xaxes> megal0maniac_afk: thank you very much! will check it the next days .. :)
[13:19:53] <stanreg> Is it normal that there's a ~500 ohms resistance between the vcc and gnd pins of an avr device?
[13:20:29] <twnqx> 5V/500R ~ 10mA
[13:20:43] <twnqx> sound reasonable for power consumption, don't you think?
[13:21:15] <stanreg> twnqx, right.
[13:22:27] <jacekowski> and measuring resistance of any semiconductor will not yield any useful results
[13:23:40] <stanreg> jacekowski, i had gnd and vcc going to a switch, which outputs to a pin ... upon some weird results, i took out the multimeter and the 'conductance' beeped between gnd and vnc.. so I thought it could be the culprit.
[13:24:20] <megal0maniac_afk> xaxes: Last link http://www.alelec.net/saab-articles/isojtagisp/
[13:24:39] <megal0maniac_afk> And possibly the most useful one
[13:30:42] <stanreg> gnd & vcc should be enough to get a chip up and running on int. clock, right? no need to connect any other pins, such as reset, correct?
[13:31:36] <megal0maniac_afk> Mmm... yes, it'll work
[13:32:58] <twnqx> all gnd and all vcc and avcc
[13:33:07] <twnqx> and capacitors on all vcc pins *might* be needed
[13:33:14] <twnqx> (some don't start without)
[13:33:38] <megal0maniac_afk> s/it'll work/it'll usually work
[13:35:01] <Voodoofish430> So is the AVR dragon the lowest cost tool to allow for in system debugging using debugwire with something like an attiny85 for example?
[13:35:12] <megal0maniac_afk> Yip :)
[13:35:44] <tzanger> well, that makes a lot of sense
[13:37:04] <tzanger> I had this really fucking insidious bug where my code would "see" a command (logic high on an input) about half the time when ther was no command. cycle power and it'd go away, maybe
[13:37:17] <tzanger> wasn't an uninitialized variable, wasn't a glitch
[13:37:55] <tzanger> I had to only look at the i/o line on the negative half cycle... it floats to the line and would read high on the +ve half and low on the -ve half unless the command was there, in which case it is high in both cases
[13:38:16] <tzanger> so my pin change interrupt grabs the state of the line when it is fired and I only look at the signal on the -ve edge. works great now heh
[13:38:44] <l9_> twnqx: i am using a attiny2313a it has four pwm channels, is it possible too make those run with just one internal clock?
[13:39:22] <stanreg> l9, 4 pwm channels but one converter, it's fine with the internal clock.
[13:39:59] <stanreg> tzanger, what device?
[13:40:46] <l9> stanreg: I am now running mine using two diffrent internal ocks both 8 bit and a 16 bit clock, I wanna use the 16 bit clock too interups
[13:41:25] <stanreg> hm, above my head, sorry.
[13:43:05] <l9> stanreg: please have a look at my code, i bet my ass this could have been done easier than the way i did it :P http://pastebin.com/SEqBfpNE
[13:48:48] <tzanger> stanreg: tiny13
[13:52:37] <stanreg> l9, I'm not a pwm expert (or an expert on anything, heh) but I've used it once for a class project. You first had to initialise the ADC (configure channels, select voltage reference, select the conversion format, select the clock division factor, and active the adc) -- then you would read the results using this (or similar) function: http://pastebin.com/NXq8ymCu
[13:52:59] <stanreg> and activate* the adc
[13:58:13] <l9> thats the analog too digital converter used for input, I am seeking a way too use pwm channels for output :/ but with just one internal clock, freeing the second one too timer interups
[14:04:00] <Voodoofish430> analog too digital?
[14:12:01] <tzanger> hm, weird
[14:12:10] <tzanger> this tiny13a started having a verify error at address 1
[14:12:13] <tzanger> 0xc0 != 0xe0
[14:13:01] <tzanger> of course that's the reset vector
[14:13:35] <Fleck> ;p
[14:20:25] <RikusW> megal0maniac_afk: this link still works http://www.alelec.net/saab-articles/isojtagisp/
[14:23:52] <RikusW> ah you found it already...
[14:24:14] * RikusW was reading scrollback
[14:32:54] <megal0maniac> Anyone care for some transistor theory? I have some questions...
[14:33:18] <twnqx> me too
[14:34:28] <twnqx> why does it seem impossibly for semiconductor manufacturers to make mosfets survive a Vgs of a few hundred volts?
[14:35:33] <megal0maniac> Expense
[14:35:39] <megal0maniac> It's always expense
[14:36:08] <megal0maniac> Although you're about to discover how little I actually know :P
[14:36:10] <megal0maniac> http://atinyhedgehog.za.net/Electronics%201%20Test%203%20Sem%201%202012.pdf
[14:36:33] <megal0maniac> Sorry about the filename. I know it's naughty
[14:36:42] <megal0maniac> Question 5...
[14:40:30] <megal0maniac> How would you calculate Rb if the current isn't fixed?
[14:54:45] <thetruthisoutthe> h
[14:55:18] <Tom_itx> w
[15:06:46] <tzanger> yeah I think this tiny13a is done. hfuse bit 0 won't program either
[15:06:57] <tzanger> 0xfe != 0xff
[15:07:49] <twnqx> so HVP destorys devices faster than normal programming
[15:07:52] * twnqx makes a note
[15:09:25] <megal0maniac> Depends on where you put the 12V
[15:09:34] <Fleck> ;p
[15:10:43] <tzanger> twnqx: oh I don't know about that, it could be any of the other abuses I've subjected it to, heh
[15:12:17] <twnqx> a bi-directional Zener diode, called Transorber
[15:12:26] <twnqx> i keep hearing of new components i never heard of before :X
[15:12:28] <tzanger> transzorb yes
[15:12:42] <Fleck> https://github.com/dop3j0e/noiseplug/blob/master/avr/noiseplug.s << who can explain basic principle of this code? as far as I understand is - timer0 runs w/o prescaler at 8MHz from 0x00 to 0xFF. no clue how it makes sounds though... :(
[15:12:44] <tzanger> basically a fast pair of inverse-series zeners
[15:13:09] <twnqx> ah
[15:13:25] <Badaboom> Tom?
[15:14:42] <thetruthisoutthe> big bada boom
[15:14:51] <Badaboom> :)
[15:18:55] <megal0maniac> I like this transorber thing
[15:27:35] <Fleck> st Z+, r16 << whats happening here?
[15:29:35] <megal0maniac> Fleck: http://www.atmel.com/images/doc0856.pdf
[15:29:59] <Fleck> yeah - and did not explain anything :D
[15:30:02] <Fleck> no clue anyway
[15:30:44] <plasmasolutions> Hi guys, I'm on an at32uc3b0128 and got it on a custom board. Atm, I am trying to program it via USB DFU, but I can't get it to show up in Linux... I have wired up usb and hold down pin Ap13 to grnd while powering up. Do you have any idea why I would not see anything in dmesg?
[15:31:50] <plasmasolutions> I already checked if the 3.3 and 1.8V are coming through..all good
[15:31:57] <plasmasolutions> on USB it's 5 V
[15:32:17] <twnqx> no bootloader on the chip? :P
[15:32:27] * megal0maniac backspaces
[15:32:39] <twnqx> chip held in reset?
[15:32:43] <Badaboom> twnqx: datasheets will be here at 6:)
[15:32:48] <twnqx> :)
[15:33:05] <twnqx> so early at your place :X
[15:33:20] <Badaboom> lol
[15:33:21] <plasmasolutions> twnqx: Are you kidding? :) I thought that all uc3bs are delivered with a bootloader
[15:33:32] <Badaboom> brb,, need food
[15:33:33] <twnqx> no idea :P
[15:33:44] <megal0maniac> Not from the factory, they aren't afaik
[15:33:46] <plasmasolutions> ok...puh ':)
[15:33:56] <megal0maniac> But we're just speculating
[15:33:57] <Tom_itx> badabing
[15:36:03] <plasmasolutions> Talked with HcE the other day..he confirmed that all should have one...
[15:36:24] <plasmasolutions> megal0maniac: But that would certainly explain the issue ;)
[15:36:33] <beaky> hello
[15:36:58] <beaky> 2kb of ram isn't sufficient for my algorithms... how do I fit more ram to my avr? :D
[15:37:14] <megal0maniac> Write better algorithms
[15:37:15] <twnqx> a) (simple) use an avr with more ram
[15:37:29] <megal0maniac> twnqx: Beat you to it? :P
[15:37:36] <Badaboom> lol
[15:37:39] <twnqx> b) (complicated) use an avr capable of extmem interface and build one
[15:37:44] <beaky> ah
[15:37:45] <twnqx> c) see megal0maniac
[15:37:48] <tzanger> hm, I changed the attiny13a out with a brand new one and the dragon is spitting out the same error
[15:37:52] <Badaboom> lol
[15:37:54] <tzanger> I don't think the AVR was at fault here
[15:38:01] <tzanger> which really makes me sad
[15:38:04] <megal0maniac> tzanger: Maybe the dragon is at fault
[15:38:05] <twnqx> tinymurderer
[15:38:09] <megal0maniac> Because that's not rare
[15:38:12] <twnqx> dragonslayer?
[15:38:13] <beaky> I wish I could just stick those DIMM sticks to an avr and get GBs of ram :D
[15:38:20] <Badaboom> roflmao
[15:38:28] <Badaboom> smegol
[15:38:46] <tzanger> beaky: you can. stick an FPGA with a SDRAM controller in it and a SPI interface between the AVR and RAM and you're good to go
[15:38:54] <beaky> wow
[15:39:01] <twnqx> lol tzanger
[15:39:03] <twnqx> THAT is evil.
[15:39:23] <Badaboom> we went from avr to just plain wrong
[15:39:28] <twnqx> tzanger: better. connect it to the extmem interface
[15:39:35] <twnqx> and use SPI to control bank switching
[15:39:40] <Badaboom> wtf?
[15:39:42] <megal0maniac> atxmegaxxxA1U supports extmem, yeah?
[15:39:42] <Badaboom> lol
[15:40:03] <Badaboom> Oh sure,, it has headlamp fluid too
[15:40:04] <beaky> maybe an ATmega1284 is enough
[15:40:08] <twnqx> ... i should bet that for the lulz
[15:40:15] <twnqx> build*
[15:40:37] <plasmasolutions> anyone more ideas in my case?
[15:40:59] <megal0maniac> plasmasolutions: Wrong pin held to ground
[15:41:01] <twnqx> your clock is not running/running at a frequency that breaks USB
[15:41:15] <megal0maniac> There's a fire
[15:41:21] <twnqx> you forgot one of those strange signaling resistor on the USB pins
[15:42:42] <plasmasolutions> hmmm...maybe clock is a good topic.. until now I thought that I don't have to use an external clock ...cause all is wired internally... but maybe that's my error?
[15:43:10] <plasmasolutions> megal0maniac: I looked the user configuration dwords up...the pin is right
[15:44:14] <plasmasolutions> twnqx: The resistors I use are only 32 ohms - do you think this could be it?
[15:44:16] <twnqx> plasmasolutions: does the chip have the usb "i am here" pullup embedded?
[15:44:27] <twnqx> uhh 32?
[15:44:30] <twnqx> for what?
[15:44:37] <twnqx> series resistors?
[15:45:05] <plasmasolutions> For the resistors that complete the DP and DM connections
[15:45:36] <megal0maniac> I usually see 68 ohm
[15:45:52] <megal0maniac> Don't think that 32 would cause complete failure though
[15:46:03] <megal0maniac> I don't know what the actual spec is
[15:46:05] <twnqx> datasheet say 39R, 1%
[15:46:05] <plasmasolutions> lm check
[15:46:06] <Kev-> I
[15:46:16] <megal0maniac> h
[15:47:47] <plasmasolutions> 39R 1% as twnqx said!
[15:47:47] <tzanger> aha
[15:47:49] <tzanger> figured it out
[15:48:09] <twnqx> your dragon is blowing fire?
[15:48:14] <plasmasolutions> twnqx: What is a I am here pullup?
[15:48:27] <twnqx> seems not needed from the datasheer
[15:49:05] * megal0maniac is getting a AT32UC3A1 board soon :)
[15:50:07] <twnqx> AT32UC3 devices are shipped with a USB bootloader 8,12 or 16 MHz Crystal is required on Osc0 (according to USB DFU bootloader.pdf)
[15:50:15] <twnqx> random google result
[15:50:21] <Fleck> http://www.youtube.com/watch?v=zfNq8uPIQ1k :D
[15:50:44] <Kev-> Anyone of you using the sparkfun eagle library?
[15:50:56] <Kev-> I just grabbed it from github and the connectors seem to be broken..
[15:51:01] <Kev-> line 14280, column 10: Opening and ending tag mismatch.
[15:51:02] * twnqx puts large crystals, pins up, around plasmasolutions's bed
[15:51:19] <plasmasolutions> twnqx: So maybe this is it...
[15:51:40] * plasmasolutions lays in his bed and sleeps from crystals
[15:51:52] <tzanger> twnqx: no. pin 5 goes to the gate of a triac through a 1k resistor. I added a 0.1uF cap in parallel to give a little "oomph" to the leading edge of the firing pulse, and that AC "short" was messing with the data transfer
[15:51:58] <Kev-> ah looks like something was committed there just 5 hours ago.. and it's broken
[15:52:25] <twnqx> i had enough failures so i only trust my own eagle libraries :X
[15:53:19] <megal0maniac> Fleck: OW!
[15:53:46] <Fleck> megal0maniac: ?
[15:55:11] <megal0maniac> Video
[15:55:52] <Tom_itx> twnqx, they're getting better
[15:56:00] <Tom_itx> but i mod a few myself now and then
[15:56:03] <Fleck> OW stands for megal0maniac? :D
[15:56:30] <megal0maniac> Ouch
[15:56:38] <Fleck> ok! :)
[15:57:38] <Fleck> twnqx: btw, it was CLKPR that locked my attiny13 :D
[15:57:43] <Fleck> dunno why though
[15:58:04] <Fleck> but after I flash code where CLKPR is set, I can't use ISP anymore
[15:58:08] <twnqx> at least now you know how to recue them :)
[15:58:18] <Fleck> yeah, thats great!
[16:01:20] <Fleck> twnqx: just make a note :D
[16:01:35] <twnqx> ;)
[16:05:57] <thetruthisoutthe> Fleck <= how you flash code to the position of fuse bits ? ;/
[16:06:27] <Fleck> ?
[16:06:50] <thetruthisoutthe> <Fleck> but after I flash code where CLKPR is set, I can't use ISP anymore
[16:07:17] <tzanger> man I wish I remembered about that cap before I changed out the AVR
[16:07:53] <Fleck> thetruthisoutthe: CLKPR is not a fuse, but a register
[16:08:01] <Fleck> Clock Prescale Register
[16:08:19] <twnqx> that behavior makes no sense
[16:08:25] <twnqx> a simple powercycle should reset that
[16:09:16] <Fleck> CLKPR = 0x80; CLKPR = 0x08; << and done...
[16:12:29] <thetruthisoutthe> Interrupts must be disabled when changing prescaler setting to make sure the write procedure is
[16:12:29] <thetruthisoutthe> not interrupted.hee setting.
[16:12:37] <thetruthisoutthe> what does this sentence mean ?
[16:12:48] <thetruthisoutthe> http://www.atmel.com/Images/doc2535.pdf page 28
[16:13:02] <Fleck> yeah I saw that misspell too :D
[16:13:18] <twnqx> you need these two instructions (see above) excuted within 4 clock cycles
[16:13:25] <thetruthisoutthe> hee setting
[16:13:33] <Fleck> yeah and need to disable interrupts
[16:13:51] <thetruthisoutthe> interesting thing to change clock with 2 writes
[16:14:11] <thetruthisoutthe> but then all delays must be recalculated
[16:14:15] <twnqx> i still can't see how that can brick your chip beyond power cycle
[16:14:36] <thetruthisoutthe> maybe it stays set after reset?
[16:14:37] <thetruthisoutthe> :)
[16:14:47] <twnqx> might be, but i wrote power cycle
[16:15:17] <thetruthisoutthe> well the capacitor might hold the voltage for x ms
[16:15:37] <thetruthisoutthe> that is enough not to go powerdown
[16:16:29] <Fleck> Ill do some more tests :D
[16:17:25] <thetruthisoutthe> i get this when i turn off my cmos temperature controller circuit, 1-2V is enough for it to maintain settings
[16:17:58] <thetruthisoutthe> and it takes some time to fully discharge the capacitors from 5V wiith a few uA power drain
[16:18:00] <Fleck> no caps here
[16:18:15] <thetruthisoutthe> 100nf ? lol.
[16:18:27] <thetruthisoutthe> i even have 10u in parallel
[16:20:10] <Fleck> http://wstaw.org/m/2013/05/28/plasma-desktopHz2789.png << this breaks ISP here... thetruthisoutthe, twnqx
[16:21:58] <Fleck> power cycle does not help!
[16:22:13] <twnqx> tempting to test
[16:22:46] <Fleck> yeah, would be great if some of you can confirm this
[16:22:47] <thetruthisoutthe> that is a divide by 256 setting
[16:22:47] * twnqx stares at tiny13a
[16:22:55] <thetruthisoutthe> :)
[16:22:57] <twnqx> so?
[16:23:09] <thetruthisoutthe> not eveb invalid
[16:23:11] <thetruthisoutthe> n
[16:24:02] <Fleck> and revived with HVSP
[16:24:36] <Fleck> (clearing/reseting fuses does not help too...) :D
[16:24:42] <Fleck> need to erase flash
[16:25:05] <Fleck> let me try div by 2, but I think I tried that too :D
[16:25:43] <Fleck> no... Ill just try set clock div to 1 :D
[16:26:14] <Fleck> that didn't brake anything :D
[16:26:20] <twnqx> is there a reason you made it not c&pable *sigh*
[16:26:28] <thetruthisoutthe> Fleck <= well if you have too low clock isp will not work, you must scale down isp clock too
[16:26:33] <Fleck> twnqx: no, sec
[16:26:33] <twnqx> man
[16:26:36] <thetruthisoutthe> tried that ?
[16:26:39] <twnqx> thetruthisoutthe
[16:26:47] <Fleck> http://paste.opensuse.org/77711063
[16:26:47] <twnqx> this behavior persists over a power cyclew
[16:26:57] <plasmasolutions> ciao guys, thanks for the help so far!
[16:27:16] <plasmasolutions> will hunt a crystal tomorrow :)
[16:27:38] <thetruthisoutthe> twnqx <= first i'd short gnd and vdd together before stating that :)
[16:29:11] <thetruthisoutthe> – Power-down Mode:
[16:29:11] <thetruthisoutthe> • < 0.1 µA at 1.8V
[16:29:13] <thetruthisoutthe> hahah
[16:29:30] <thetruthisoutthe> this is vanishingly
[16:29:32] <thetruthisoutthe> low
[16:30:13] <thetruthisoutthe> the device probably won't power down if you disconnect it
[16:30:31] <twnqx> so let it rest a day?
[16:30:33] <twnqx> :P
[16:30:47] <thetruthisoutthe> or use a wire to short vcc and gnd
[16:31:03] <Fleck> twnqx: 0x01 does some weird things, like reading serial wrong etc...
[16:31:10] <twnqx> that is expected
[16:31:14] <Fleck> thetruthisoutthe: shorting did not help!
[16:31:15] <twnqx> you change ALL clocks
[16:31:40] <Fleck> so the problem is my usbasp?
[16:32:03] <twnqx> no, it should be gone after you shut it down...
[16:32:09] <Fleck> but with 0x01 you still can flash other .hex and get back to normal :D
[16:32:13] <twnqx> i mean, you don't even sleep...
[16:33:07] <Fleck> yep you can
[16:33:17] <twnqx> then
[16:33:18] <Fleck> short vcc/gnd and then gnd/reset...
[16:33:19] <Fleck> reads ok
[16:33:29] <twnqx> your programmer is at fault, yes
[16:33:29] <Fleck> let me try 0x80
[16:33:38] <Fleck> *0x08
[16:33:40] <twnqx> it applies power with reset not being held :P
[16:33:46] <twnqx> so your code has a chance to execute
[16:34:39] <Fleck> yep
[16:35:57] <Fleck> yep, misterry solved :D shorting vcc/gnd then reset to gnd - can read ID/reflash etc...
[16:38:07] <thetruthisoutthe> lol
[16:38:17] <Fleck> make a note twnqx! :)
[16:40:10] <beaky> are there better programming languages than C?
[16:40:20] <twnqx> no.
[16:40:41] <Fleck> yes
[16:40:41] <twnqx> (the true answer is: every tool depdns on what you want to use it for)
[16:40:43] <Fleck> ams ;D
[16:40:48] <Fleck> *asm
[16:41:43] <twnqx> there are some things that are way too much effort in C, compared to a scripting language
[16:42:30] <twnqx> there are a few things where assembler is the only choice
[16:42:52] <twnqx> and there are things where you want very much high level stuff like modelling instead of programming
[16:44:15] <thetruthisoutthe> asm when very clock cycle matters
[16:44:23] <thetruthisoutthe> otherwise, C
[16:44:33] <twnqx> that again depends on the platform
[16:44:37] <thetruthisoutthe> *every
[16:44:58] <thetruthisoutthe> well you may prefer to use timers instead of timed delay loops
[16:44:59] <twnqx> you might want asm to access SIMD stuff
[16:45:51] <RikusW> tzanger: you do know bit0 on hfuse for t13a is RSTDSBL ?
[16:46:07] <tzanger> yep
[16:50:39] <Fleck> http://imgur.com/gallery/skgmjlP :D
[16:56:22] <thetruthisoutthe> Fleck <= http://i.imgur.com/dyiDMJ4.gif
[16:56:38] <Fleck> yeah, saw that in comments ;D
[16:57:08] <thetruthisoutthe> xbox is making you a ninja ?
[16:57:22] <Fleck> ? ;p
[16:57:39] <thetruthisoutthe> you know, step in place ;>>
[16:58:24] <thetruthisoutthe> yo mega addict
[17:11:27] <UnderSampled> twnqx: I worgot to specify assembler
[17:12:50] <UnderSampled> how do I find the hame of the part specific assembler include file for my chip?
[17:12:57] <UnderSampled> *name
[17:13:38] <twnqx> i doubt there are any assembler include files...
[17:13:42] <twnqx> but if tehre are, no idea.
[17:14:15] <UnderSampled> surely there's something that provides register names, right?
[17:14:45] <twnqx> register names? like the rXX? that's intrinsic to the assembler, no need to include anything
[17:14:55] <twnqx> if you mean IO registers - again, no idea
[17:14:59] <UnderSampled> no, like PORTB
[17:15:10] <twnqx> i never wrote pure assembler
[17:15:13] <UnderSampled> and any settings register
[17:18:36] <Fleck> UnderSampled: usualy linker knows about them :D
[17:20:13] <twnqx> Fleck: the linker is clueless
[17:22:05] <Fleck> well - compiler then :D
[17:23:41] <twnqx> nope, not without includes.
[17:23:53] <Fleck> with -mcu arg :D
[17:25:37] <Fleck> http://www.youtube.com/watch?v=m1pchpDD5EU << amazing! :D
[17:28:48] <UnderSampled> fleck how does that work in avr studio6>
[17:28:50] <UnderSampled> ?
[17:29:16] <Fleck> UnderSampled: what? :D
[17:29:38] <Fleck> ohh that
[17:29:43] <Fleck> compiler options I think
[17:29:54] <Fleck> not sure though, not using avr studio :D
[17:32:27] <Fleck> UnderSampled: this is what happens in codeblocks: http://wstaw.org/m/2013/05/29/plasma-desktopOE2789.png
[17:33:54] <UnderSampled> well, it seems to compile and run, but It doesn't do intelisense
[17:41:12] <UnderSampled> I'm running off of an arduino since I don't have a programmer. What happens if I change the reset vector?