#avr | Logs for 2013-01-31

Back
[04:10:23] <Guest62997> hi what are DMIPS? http://www.arm.com/products/processors/cortex-r/cortex-r7.php
[04:11:22] <dunz0r> Guest62997: Dhrystone MIPS
[04:11:28] <dunz0r> Guest62997: http://en.wikipedia.org/wiki/Dhrystone
[04:11:43] <Guest62997> so its not the same as 1.28 BIPS (160 MIPS x 8 cogs) maximum instruction execution rate(1) ?
[04:12:01] <Richard_Cavell> what's a cog in that context?
[04:12:12] <Guest62997> 1 core i think
[04:12:18] <Guest62997> there are 8 cores in this microcontroller
[04:12:38] <Guest62997> 160 * 8 = 1280 MIPS?
[04:12:53] <DrLuke> hehe, bips
[04:13:17] <DrLuke> what's next, tips?
[04:13:41] <Guest62997> wait: No, that's 4 clocks per instruction (except hub memory) for 20Mips/cog or 160 Mips total.
[04:14:32] <Guest62997> so 160 vs 1280 MIPS?
[06:22:31] <RikusW> http://www.arcfn.com/2013/01/a-small-part-of-6502-chip-explained.html
[08:32:04] <rue_bed> avrs dont divide the clock by 4, thats what pics do
[08:38:31] <OndraSter_> yep
[08:38:45] <OndraSter_> they finish instructions each cycle
[08:38:46] <OndraSter_> (most of them)
[08:39:03] <OndraSter_> (conditional) jumps take >1 cycle
[08:39:05] <OndraSter_> and memory stuff too
[08:55:46] * amee2woof idly looks around the channel for ... Erroneous users....
[11:05:24] <clynamen> I'm compiling a simple main with avr-gcc. I'm looking at the objdump and I can't figure out why there are two rcall .+0 at 4 http://pastebin.com/Vrd8jngt
[11:06:49] <clynamen> Is there any reference about the non-obvious instructions added by the compiler?
[11:18:39] <mindw0rk> Yo guys, what's the best and clienest i2c lib for USI devices like the attiny45
[11:19:18] <mindw0rk> I've looked at the codalyze repo, but there's a bunch of questions that I'm getting from it
[11:19:31] <mindw0rk> not to mention I can't get it to work
[11:20:32] <mindw0rk> I'm not really fond of porting that appnote from atmel to gcc myself
[11:20:38] <mindw0rk> any suggestions?
[13:48:42] <abetusk_w> I'm looking for suggestions on how to record the power consumption of a low power circuit. I'm running an attiny85 with some other peripherals, like an EEPROM and an RTC and would like to make sure I have a good idea of what kind of power draw it's using
[16:42:59] <jadew> what are your favourite features of an editor? and what features do you wish your fav. editor would have?
[16:44:34] <jadew> aside from coloring, autocompletion and folding
[16:44:48] <jadew> and a good file browser
[16:45:35] <Malinuss> automagic
[16:45:46] <Malinuss> I press compilie - magic - compiled
[16:46:04] <jadew> you mean a build system?
[16:46:42] <jadew> it's sort of out of the scope of an editor, but I was planning to add that too
[16:47:43] <Malinuss> I like the autowordfinish that is called something specific that I can't remember... all m$ visual products have them iirc
[16:47:57] <jadew> intellisense
[16:48:02] <jadew> that's what autocompletion is
[16:49:00] <Malinuss> aww yeah
[16:49:01] <Malinuss> heh
[16:49:07] <jadew> :)
[16:49:31] <Malinuss> well If it's for a specific programming language, then a variable/class browser thingie is nice too
[16:49:46] <Malinuss> or is that what "folding" is....?
[16:50:05] <jadew> no, folding is when you can fold functions or different blocks of code
[16:50:14] <jadew> so they occupy only one line
[16:50:21] <jadew> I was planning on a class browser too
[16:50:33] <jadew> most languages can make use of that
[16:50:42] <Malinuss> oh folding is a must then
[16:50:56] <Malinuss> make it so you can fold everything (comments etc.)
[16:51:37] <Malinuss> oh oh and a total number of lines in a project thing... msvc (express) doesn't have that!
[16:52:41] <jadew> gonna add that to the todo list, will most likely come as a plugin
[16:57:26] <OndraSter> AAAAAAAAA
[16:57:29] <OndraSter> I completely fucked it up
[16:57:44] <tzanger> OndraSter: that's why you keep your source in git and commit often
[16:57:47] <OndraSter> heh
[16:57:56] <OndraSter> I have got some older revisions on svn
[16:58:01] <OndraSter> but it started out of nothing
[16:58:04] <OndraSter> no changes
[16:58:09] <OndraSter> the code gets STUCK in the middle of execution
[16:58:21] <OndraSter> and the PC goes on a trip to unused flash space
[16:58:27] <OndraSter> PC as program counter, not computer
[16:58:33] <tzanger> I'm getting to be pretty religious abou tit in fact
[16:58:34] <OndraSter> the disassembly is OK
[16:58:44] <OndraSter> arrgh
[16:58:53] <OndraSter> I commented out everything
[16:58:59] <OndraSter> left just LED blinking
[16:59:02] <OndraSter> and it still gets stuck
[16:59:03] <OndraSter> arrgh
[17:00:46] <OndraSter> it is completely broken
[17:00:49] <OndraSter> arrrrrrrrrgh
[17:02:56] <yunta> jadew: I'm weird, but my editor has to 1) support navigation without arrows (they can work, but also non-arrows navigation must be there)
[17:03:03] <yunta> 2) support screen splitting
[17:03:47] <jadew> yunta, what do you mean about navigation with out arrows?
[17:04:03] <yunta> like ctrl+f to go forward one character
[17:04:17] <yunta> that's much more convenient than using keyboard arrows
[17:04:28] <jadew> I see, I guess that's doable
[17:04:34] <yunta> it sounds crazy
[17:04:34] <jadew> screen splitting is already supported
[17:04:38] <OndraSter> ctrl-f is for FIND
[17:04:39] <jadew> including same file splitting
[17:04:50] <jadew> yeah :P but I suppose it can be remapped
[17:04:51] <yunta> OndraSter: that was example only
[17:05:22] <OndraSter> ok
[17:05:34] <yunta> jadew: this requirement sounds stupid, but when you work entire day typing - having to go to arrows is really annoying
[17:06:25] <jadew> yunta, I'm used to using the arrows, but I understand what you mean and it's deffinitely not something complicated to add, it's just some additional key mapping
[17:06:38] <yunta> are you writing your own editor?
[17:06:42] <jadew> yeah
[17:06:47] <tzanger> yunta: it's called vim. :-)
[17:06:57] <jadew> I always have complaints about other editors
[17:07:02] <tzanger> I spend about equal parts of my time between vim and sublime text 2
[17:07:30] <yunta> jadew: 3) code colorization for all langs :D
[17:07:33] <yunta> 4) smart-tabs
[17:07:34] <jadew> tzanger, I tried sublime text 2 a few days ago, but I just couldn't get used to it (comming from np++ - lots of years)
[17:07:51] <jadew> yunta, what smart-tabs?
[17:08:14] <tzanger> jadew: I needed to futz with the settings a bit to get something I'm happy with
[17:08:37] <tzanger> I still have to learn/fix a couple things (moving between tabs being one of them) but I like it
[17:08:40] <jadew> tzanger, I did that too, I actually made it look completely different, but still wasn't happy, for one, I hate that side bar
[17:08:45] <tzanger> I used kate on Linux a lot
[17:08:52] <tzanger> I grew to love the sidebar
[17:09:01] <jadew> it doesn't show icons, I can't tell which files are up to date in the svn, which aren't
[17:09:07] <tzanger> you're talking about the one that shows the entire file with what's on screen shaded, yes?
[17:09:13] <yunta> jadew: it's when you use tab-characters for logical indentation and spaces for alignment
[17:09:23] <jadew> tzanger, that's the minimap, that's fine
[17:09:28] <tzanger> yunta: ew. :-)
[17:09:33] <tzanger> oh, that's the only sidebar I have
[17:09:53] <jadew> yunta, yeah, I guess that would be standard in an editor (most likely as an option)
[17:09:59] <yunta> tzanger: it actually came from vim, and is surprisingly awesome
[17:10:36] <yunta> jadew: good embedded shell would be awesome, but not strictly required
[17:10:52] <jadew> yunta, yeah, I miss that too
[17:11:00] <jadew> will deffinitely have one
[17:11:13] <tzanger> yunta: I can't stand spaces ... code should not be aligned so precisely
[17:11:20] <tzanger> tabs are tabs
[17:11:25] <tzanger> op, ride is here
[17:12:14] <yunta> tzanger: this is the best description of it I found so far: http://www.emacswiki.org/SmartTabs
[17:12:23] <yunta> tzanger: worth reading even if you disagree imho
[17:12:36] <yunta> jadew: your editor sounds good so far :)
[17:12:45] <yunta> jadew: one more thing: remote editing
[17:12:52] <yunta> like opening file over ssh
[17:13:06] <yunta> or ftp
[17:13:29] <jadew> yunta, maybe as a plugin, I'd rather let other specialized programs deal with that and just hand me the file
[17:13:47] <yunta> plugin is good enough
[17:15:27] <yunta> just one more thing and I'm downloading it: bookmarking views. I mean, saving the state of your editor, so that you can keep several "states", with opened files, and screen split to your need.
[17:15:29] <Tom_itx> is there a read_byte function in libc?
[17:15:48] <yunta> getc ?
[17:16:10] <jadew> yunta, what do you mean several states? as in if a change happens somewhere it shouldn't happen in the other split screen?
[17:16:12] <Tom_itx> what's the difference between getc and fgetc?
[17:16:23] <Tom_itx> or getchar
[17:16:28] <yunta> jadew: no, wait. I'll try again.
[17:16:55] <yunta> jadew: so, you start working with editor, you open shitload of files, you split your screen, you mark some places, you place bookmarks in some files.
[17:16:55] <yunta> so
[17:17:25] <jadew> bookmarks are already in the todolist
[17:17:25] <yunta> at the end of the day you have nicely split screen with all your files in proper positions
[17:17:54] <jadew> hmm I might misunderstand what kind of bookmarks you're refering to
[17:18:06] <jadew> the way I see bookmarks:
[17:18:40] <jadew> you're editting some file(s) and you have to constantly switch from one point to another
[17:18:58] <jadew> you hit ctrl + 1..0 to set a bookmark, alt + 1..0 to go back there
[17:19:07] <jadew> (like in warcraft :P)
[17:19:46] <jadew> I suppose additional bookmarks could be added but this behavior seems perfect to me
[17:21:55] <jadew> (I think I'm gonna love this editor)
[17:22:52] <yunta> like, xxx.c on the left, yyy.cpp on the right, and so on
[17:22:53] <yunta> now, suspend is broken because of intel being morons, so you turn off your computer
[17:22:54] <yunta> next day, you turn it back on, start your JAE (Jadew's Awesome Editor)
[17:22:54] <yunta> and it starts up in exactly the same configuration like when you turned it off
[17:22:54] <yunta> with screen split into 2 panels, with xxx.c in the left, and yyy.cpp on the right
[17:22:54] <yunta> that's one scenario
[17:22:55] <yunta> does that make any sense?
[17:22:55] <yunta> (it's 1am here, and I'm still at work, so I may be babbling)
[17:23:21] <jadew> ah, you mean saving the session
[17:23:24] <yunta> yes, sorry, I overused the word
[17:23:41] <jadew> it's called razed (already in the works btw)
[17:23:46] <yunta> see, I imagine sessions to be kind of bookmarks :)
[17:23:48] <jadew> and it already supports splitting like that
[17:23:57] <yunta> like, named bookmarks of editor state
[17:24:00] <jadew> saving the session shouldn't be an issue
[17:24:07] <jadew> I see what you mean
[17:24:27] <jadew> yeah, that's a useful feature
[17:24:34] <jadew> yunta, I think you're lagging a lot
[17:24:37] <jadew> either you or me
[17:24:57] <yunta> may be me
[17:25:15] <yunta> just drilled hole for ethernet cable today
[17:25:28] <yunta> 'cause wireless sucks :(
[17:26:07] <yunta> whitespace-showing mode
[17:26:40] <yunta> colorful delimiters (parenthesis in matching colors, to identify them easily)
[17:26:42] <jadew> gonna have that
[17:26:47] <jadew> same
[17:27:37] <yunta> white-on-black mode :)
[17:28:00] <yunta> configurable coding styles (for smart indentation)
[17:28:53] <yunta> so, where can I get it? :)
[17:29:32] <tandoori> hi yunta
[17:29:41] <jadew> yunta, not ready yet and I have a feeling you'll be dissapointed, it's going to be windows only :P
[17:29:50] <yunta> hi tandoori , how r u ?
[17:30:11] <tandoori> i am well. assembling my circuit on my bredboard
[17:30:18] <yunta> jadew: uh...
[17:31:05] <yunta> jadew: why would you limit that?
[17:31:24] <yunta> jadew: can't you write it in something like qt/qml, so it would run also on my phone ?
[17:32:06] <yunta> jadew`: uh...
[17:32:12] <yunta> jadew`: why would you limit that?
[17:32:14] <jadew`> yunta, did you get the screenshot?
[17:32:16] <yunta> jadew`: can't you write it in something like qt/qml, so it would run also on my phone ?
[17:32:23] <yunta> jadew`: no
[17:32:30] <jadew`> http://dumb.ro/files/razed/razed2.png
[17:32:50] <jadew`> yunta, I think I didn't like qt because of the license
[17:32:54] <yunta> tandoori: so, what's your first circuit
[17:32:57] <jadew`> I tried it several years ago
[17:33:17] <yunta> jadew`: I had exactly same problem with it :) it's LGPL now though
[17:33:25] <jadew`> http://dumb.ro/files/razed/razed3.png
[17:33:40] <yunta> jadew`: fortunately it got lgpl-ed before nokia suicided
[17:34:01] <jadew`> well, nokia seems to be getting back on its feet
[17:34:16] <jadew`> they made a good move with windows phone, symbian is what killed them
[17:34:39] <yunta> they had better choices than win phone :)
[17:34:50] <yunta> editor looks nice
[17:34:57] <yunta> simple, clean
[17:35:08] <yunta> I'd make icons bar optional
[17:35:16] <tandoori> hmm
[17:35:17] <jadew`> yeah, that stuff won't be there by default
[17:36:05] <jadew`> I'm working on it now so I need them there, but they'll be hidden by default
[17:36:18] <jadew`> I like to bring stuff up with short cuts and hide them the same way
[17:37:02] <yunta> cool
[17:40:30] <jadew> !zlog
[17:51:40] <yunta> jadew: out of curiosity, what's your language of choice ?
[17:51:40] <jadew> c++
[17:52:10] <jadew> I guess the same for you, since you looked into qt :)
[17:52:26] <yunta> hm, usually not really c++
[17:52:57] <yunta> I worked for nokia so naturally had contact with qt
[17:53:13] <jadew> ah, I see
[17:53:58] <jadew> you're not responsible for symbian, are you? :P
[17:54:10] <jadew> that's the sole reason I stopped buying nokia phones
[17:54:34] <jadew> now I'm back on nokia tho, but I'm not particularly happy with the direction ms took
[17:54:59] <jadew> luckly I'll be getting a dev. license for wp from work, so I'll be able to write my own software once again
[18:03:34] <jadew> http://www.youtube.com/watch?v=jH4xYN9I5Kw
[18:03:34] <jadew> YouTube: Nokia Lumia 920 Drop Test
[18:03:35] <jadew> and for a comparison: http://www.youtube.com/watch?v=DuwD7pdxxyo
[18:03:35] <jadew> YouTube: iPhone 5 vs Samsung Galaxy S3 Drop Test
[18:03:35] <jadew> and that's why I always prefered nokia over the other phone manufacturers
[18:03:35] <yunta> jadew: no, I'm responsible for maemo and meego
[18:03:35] <jadew> this too: http://www.youtube.com/watch?v=k2BxL0nRDlY
[18:03:35] <jadew> YouTube: Apple iPhone 5 Hammer Drop & Knife Scratch Test
[18:03:35] <jadew> http://www.youtube.com/watch?v=yDEahsoa_N4
[18:03:35] <jadew> YouTube: Nokia Lumia 920 Hammer & Knife Scratch Test
[18:03:36] <jadew> yuun, don't know them
[18:03:37] <OndraSter> I'll be damned
[18:03:37] <OndraSter> the project works
[18:03:51] <OndraSter> I have just tightened the piece of wire that goes between the top board and the bottom board (uart to USB to transmit debug messages)
[18:04:18] <OndraSter> jadew, have you seen fruit ninja
[18:04:20] <OndraSter> on Lumia 920?
[18:04:21] <OndraSter> :D
[18:04:41] <OndraSter> http://www.youtube.com/watch?v=YuQAbo3-Gp0
[18:04:48] <OndraSter> "play fruit ninja like a balls"
[18:06:30] <jadew> saw that one, that dude is great :) people hate him
[18:06:36] <yunta> with all my hate towards windows, I'm actually proud this hw design came from linux based Nokia N9
[18:07:49] <OndraSter> hehe
[18:08:07] <OndraSter> Nokia is part of the ... grafene? graphene? ship
[18:08:16] <OndraSter> I do wonder when the first phones with graphene chassis will appear
[18:08:27] <OndraSter> thin and very very sturdy
[18:10:38] <yunta> if it's pure graphene, I don't want it :)
[18:10:42] <yunta> I have lots in my pencil....
[18:10:45] <OndraSter> haha
[18:10:57] <OndraSter> http://research.nokia.com/page/11906
[18:11:31] <OndraSter> it is the 1atom thick layer which is stronger than a diamond
[18:12:17] <yunta> but if you just have lots of it - it's normal graphite
[18:12:30] <OndraSter> :)
[18:12:33] <yunta> if they figure out how to join them rigidly - that will be awesome
[18:12:43] <OndraSter> no idea, I don't know anything other than the videos
[18:12:45] <jadew> put something else between the layers
[18:12:52] <OndraSter> check the website
[18:13:12] <OndraSter> probably the first thing I like from the european union lol
[18:13:23] <OndraSter> it can be used to build also transistors
[18:13:44] <jadew> I bet that guy who discovered it is getting a lot of pussy right now
[18:13:49] <OndraSter> haha
[18:13:52] <OndraSter> they got nobel prizes
[18:13:52] <OndraSter> both
[18:14:05] <jadew> oh man...
[18:14:34] <Horologium> bah..win a nobel prize in science guarantees you are gonna be a virgin the rest of your life.
[18:14:45] <OndraSter> ahaha
[18:14:48] <OndraSter> so I will stop
[18:14:49] <OndraSter> okay :(
[18:14:53] <jadew> hehe, I doubt that
[18:14:59] <jadew> not in this age
[18:15:34] <jadew> all the smart chicks would want to bang you, out of those, you can only pick the hot ones, so you end up banging hot AND smart chicks
[18:15:45] <jadew> which is every man's dream
[18:15:47] <OndraSter> heh
[18:15:53] <yunta> is it?
[18:15:57] <OndraSter> mine is
[18:16:03] <Horologium> life's too short to fuck stupid chicks.
[18:16:06] <OndraSter> haha
[18:16:13] <yunta> easier to fuck stupid chicks and speak with smart ones.....
[18:16:20] <OndraSter> depends on how much are you drunk Horologium
[18:16:27] <Horologium> true too.
[18:16:31] <OndraSter> or scientists do not drink?
[18:16:31] <Horologium> luckily I don't drink.
[18:16:34] <OndraSter> alcohol
[18:16:35] <OndraSter> oh
[18:16:38] <Horologium> and am married to a smart chick.
[18:16:43] <OndraSter> oh nice
[18:16:44] <OndraSter> congrats
[18:16:50] <OndraSter> married and not drinking.. wow :D
[18:16:51] <Horologium> she has a 4 year degree.
[18:17:03] <Horologium> can't drink...on too many meds that alcohol would fuck with..
[18:17:10] <OndraSter> oh
[18:17:19] <yunta> same here wrt wife
[18:17:19] <Horologium> on insulin and warfarin.
[18:17:30] <Horologium> alcohol is just a sugar..
[18:17:33] <yunta> I don't drink either, but not because of medicines.
[18:17:36] <Horologium> so it shoots my blood sugar through the roof.
[18:17:41] <OndraSter> "wrt wife" = ?
[18:17:50] <yunta> wrt = with regard to
[18:17:56] <OndraSter> oh
[18:17:57] <Horologium> and it can cause me to bleed out through my intestines due to the high levels of warfarin I take.
[18:18:02] <yunta> ow
[18:18:06] <Horologium> yeah.
[18:18:09] <OndraSter> medical issues suck
[18:18:18] <Horologium> warfarin = rat poison.
[18:18:22] <OndraSter> uh
[18:18:25] <Horologium> anticoagulant.
[18:18:37] <yunta> what's your condition?
[18:18:41] <Horologium> it is in some rat poison in high doses...makes them bleed out internally.
[18:18:49] <OndraSter> my only source of medical stuff was Dr House...
[18:18:53] <Horologium> my legs and lungs get blood clots.
[18:19:00] <yunta> ow
[18:19:10] <Horologium> spent most of last january laying on my back because of clots...
[18:19:16] <yunta> OndraSter: House M.D.
[18:19:21] <OndraSter> sorry, House M.D.
[18:19:29] <Horologium> doc said I had the heaviest clot load in my lungs he had ever seen.
[18:19:35] <yunta> OndraSter: dr house in polish too :)
[18:19:40] <OndraSter> hehe
[18:19:48] <OndraSter> yes, it was Dr House in CZ. But I watched the english original
[18:20:09] <Horologium> House is,,,,fun to watch for the humor...for the medical correctness,,,,,it's,,bah...at best.
[18:20:20] <OndraSter> still better than nothing tbh
[18:20:26] <OndraSter> I know nothing, I sucked at biology
[18:20:29] <Horologium> kinda depends.
[18:20:32] <OndraSter> just as geography
[18:20:36] <Horologium> you can get a lot of bad info watching such shows.
[18:21:56] <yunta> OndraSter: history and geography for me
[18:22:01] <Horologium> having been an EMT some years back, I have enough knowledge to know what is right, what is wrong, and what is simply silly.
[18:22:03] <OndraSter> oh history of course too
[18:23:56] <Horologium> http://solowheel.com/
[18:25:31] <jadew> fuck dr house
[18:25:36] <Horologium> $1795.00 US
[18:25:48] <jadew> everyone who watches that shows (including me) becomes paranoid
[18:25:58] <Horologium> not me.
[18:26:01] <Horologium> I was born paranoid.
[18:26:04] <OndraSter> the fact that you are not paranoid that does not mean that they are not watching you :)
[18:26:08] <OndraSter> yep, I am highly paranoid myself too
[18:26:19] <Horologium> I am paranoid and they are watching me.
[18:26:19] <jadew> same here
[18:26:27] <jadew> they're watching all of us
[18:26:33] <Horologium> that solowheel is AWESOME
[18:26:48] <OndraSter> gives me error 403
[18:27:13] <jadew> it's only for the US
[18:27:17] <jadew> 403 for me as well
[18:27:59] <yunta> they aren't watching me, I made sure of that
[18:28:19] <Horologium> very odd.
[18:28:21] <yunta> unless I'm out
[18:28:28] <Horologium> it's like a segway with one wheel and no handlebar.
[18:28:35] <Horologium> a uniseg.
[18:28:41] <OndraSter> arrgh yunta you know that feeling when somebody writes something and half of that sentence is also name of some (old) song?
[18:28:41] <jadew> yunta, aluminium foil helmet?
[18:29:06] <yunta> OndraSter: no
[18:29:08] <yunta> :D
[18:29:10] <OndraSter> oh
[18:29:33] <jadew> notice that he didn't say no to me :D
[18:29:48] <jadew> now we know who we're dealing with :P
[18:30:35] <OndraSter> wouldn't it be easier to pick up your thoughts WITH your tin foil hat on?
[18:31:00] <yunta> I don't think they actually hear my thoughts
[18:31:02] <jadew> not unless it's plugged
[18:31:38] <jadew> well, that would be weird, but I'm sure in the future that's going to be an issue
[18:31:51] <yunta> but a sound-proof layer before window can save you from bloody lasers
[18:31:57] <jadew> passwords will be obsolete
[18:32:25] <jadew> you'll have to login into everything trough retina readers
[18:32:38] <OndraSter> hehe
[18:32:39] <OndraSter> http://pastebin.com/g22G8PfB
[18:32:44] <OndraSter> I am happy person now!
[18:33:00] <OndraSter> manual ZLP and multipacket transfers
[18:33:01] <jadew> it's finally working?
[18:33:03] <OndraSter> well
[18:33:06] <OndraSter> something like that, yes
[18:33:10] <OndraSter> I have to try out the CDC part yet
[18:33:15] <OndraSter> but it should work
[18:33:27] <jadew> that was fast!
[18:33:31] <jadew> </sarcasm>
[18:33:34] <OndraSter> lol
[18:33:36] <jadew> :P
[18:33:41] <OndraSter> see, I got some games...
[18:33:42] <OndraSter> and school
[18:33:45] <OndraSter> and now Logitech G27
[18:33:48] <OndraSter> distraction ftw
[18:33:51] <OndraSter> procrastination ftw!
[18:34:00] <jadew> :)
[18:41:04] <jadew> ok, back to making my awesome editor :P
[18:50:10] <OndraSter> http://pastebin.com/4Rw7GLrg
[18:50:11] <OndraSter> woohoo
[18:50:13] <OndraSter> CDC works too
[18:50:20] <OndraSter> now also "tx"
[18:50:50] <OndraSter> no idea why putty, when opening the port, does so many times Get Line Coding command
[18:51:04] <OndraSter> probably to check if the applied settings was applied
[18:51:06] <OndraSter> which it was not :P
[18:52:20] <jadew> well, if you don't do serial forwarding, you don't even care about the line settings
[18:52:32] <OndraSter> nope
[18:52:51] <jadew> (even when you do, you don't normally care)
[18:52:54] <OndraSter> :)
[18:53:02] <OndraSter> xmega has got autobaud option *I think*
[18:53:21] <OndraSter> oh I don't think I am going to sleep tonight
[18:53:26] <jadew> still, you normally want your chips to communicate at a specific baud rate
[18:53:26] <OndraSter> I need to pick up today morning PE class
[18:53:35] <jadew> the PC doesn't have any business in interfering with that
[18:53:43] <OndraSter> nope
[19:52:44] <Tom_itx> does strlen() return the length including the null at the end of a string?
[19:56:16] <OndraSter_> Tom_itx, no
[19:56:22] <OndraSter_> or at least I always thought it does not :)
[19:57:07] <Horologium> it shouldn't.
[19:58:47] <timemage> it doesn't. =)
[19:59:37] <Tom_itx> is it better to read to the null or use strlen?
[20:01:02] <timemage> Tom_itx, only way to know for sure is to test. not user for an avr, for a pc strlen would probably end up being quicker.
[20:01:54] <timemage> Tom_itx, another way to do it would be to use memchr
[20:02:34] <Tom_itx> what's it do?
[20:02:55] <Tom_itx> or what header file is it in?
[20:03:11] <timemage> Tom_itx, searches a block of memory for whatever char value you specify, returns a pointer to it.
[20:03:23] <OndraSter> what did I miss?
[20:03:24] <timemage> Tom_itx, <string.h> what are you trying to do?
[20:04:31] <Tom_itx> i'm sending a string to an lcd a char at a time
[20:05:12] <Tom_itx> trying to implement a 'scroll' function
[20:05:14] <jadew> Tom_itx, reading till you hit 0 or using strlen has the same effect, I'd go with reading to 0
[20:05:17] <timemage> Tom_itx, so then, you're not just trying to advance the pointer.
[20:05:20] <jadew> since you don't have to use a counter
[20:05:34] <jadew> while (c = buff[pos++]) { send character }
[20:05:41] <timemage> Tom_itx, if you have to do io for each char then there isn't any point in using another function to locate the end and iterate to it.
[20:05:45] <OndraSter> for(int i = 0; string[i] != '\0'; i++) { send_char(string[i]); }
[20:05:56] <Tom_itx> jadew, but it has to also move across the display
[20:06:05] <OndraSter> or while(*string != '\0') send_char(*string++);
[20:06:22] <Tom_itx> either from right to left or left to right
[20:06:26] <jadew> Tom_itx, what do you mean? the LCD will increment the position anyway
[20:06:37] <Tom_itx> like a banner
[20:06:48] <jadew> Tom_itx, the LCD should be able to handle that
[20:06:59] <Tom_itx> moving in from the right side across the display etc
[20:07:00] <jadew> unless you have more than 40 characters
[20:07:15] <Tom_itx> it's just something to do
[20:07:20] <Tom_itx> nothing critical here
[20:07:23] <jadew> I see
[20:07:39] <jadew> well, testing for 0 is deffinitely better than using strlen, no matter how you put it
[20:07:47] <OndraSter> yes
[20:07:54] <OndraSter> because strlen takes some time to compute
[20:07:58] <OndraSter> checking for 0 is faster :)
[20:08:06] <Tom_itx> i did it in basic on a 68hc11 once long time ago
[20:08:17] <Tom_itx> just thougt i'd try it on an avr
[20:08:23] <yunta> + for jadew's solution, pretty C
[20:08:50] <rue_house> I dont know if -$32 on a creditcand means I owe money or not
[20:08:56] <OndraSter> lol
[20:09:01] <jadew> thanks yunta :)
[20:09:12] <OndraSter> whatever you do, do NOT do for (int i = 0; i < strlen(somestring); i++)
[20:09:20] <OndraSter> because the strlen would run every single cycle :P
[20:09:57] <Tom_itx> i stored strlen to a var before the loop
[20:16:12] <jadew> damn, sitting on a pillow at the desk is like driving a jeep
[20:16:37] <yunta> Tom_itx: libc strlen is 14 + number_of_characters * 5 cycles
[20:16:40] <yunta> hand coded assembly
[20:16:49] <yunta> but I'd still go for jadew's solution
[20:19:43] <jadew> could be made faster by incrementing a pointer tho
[20:20:20] <jadew> altho, I suspect the compiler knows how to optimize that
[20:21:43] <yunta> it's already pointer incrementation in asm
[20:22:14] <jadew> so it's optimizing it
[20:22:28] <jadew> cuz unoptimized it would be buff + pos each time
[20:22:40] <yunta> I mean, in libc. strlen is coded in assembly, not in C.
[20:22:52] <jadew> ah, I don't doubt that
[20:24:20] <Tom_L> scroll:
[20:24:20] <Tom_L> e = pull()
[20:24:20] <Tom_L> for s = 0 to* e
[20:24:20] <Tom_L> wait = 20 do loop until wait = 0
[20:24:20] <Tom_L> gosub LCDCmd, 24
[20:24:20] <Tom_L> next
[20:24:20] <Tom_L> return
[20:24:37] <Tom_itx> i think that's what i used way back when on the 6811
[20:27:35] <Tom_L> cmd 24 is 0x18 (MOVE DISPLAY LEFT)
[20:47:53] <yunta> finally, work is over
[20:48:11] <yunta> I hate overtime.
[20:48:21] <yunta> gn people
[20:48:40] <Tom_itx> :)
[20:48:51] <OndraSter> isn't he from poland? :D
[20:48:57] <OndraSter> that is very late work
[20:57:24] <Tom_itx> jadew, that's pretty much what they do in their puts function
[20:57:52] <Tom_L> while ( (c = *s++) ) {lcd_putc(c);}
[20:58:47] <jadew> Tom_L, that's what I meant when I said it could be done with a pointer
[21:00:06] <jadew> if the compiler knows what its doing it should result in the same code tho
[22:14:19] <rick2047> hey can anyone help me find out if i set the wrong fuse values for an atmega162?
[22:14:29] <rick2047> i set hfuse to D9 and lfuse to ff
[22:14:58] <rick2047> i have an 16MHz oscillator attached to the controller and checked with a DMM and it is connected
[22:15:08] <rick2047> still the controller is not responding