#avr | Logs for 2012-02-05

Back
[00:20:11] <multiplex> if i put 0xff0 in a PORTX i have 0xf0 in this PORT.
[00:20:35] <multiplex> or oxFF ?
[00:21:25] <multiplex> I am trying to debug a program and I am a little confused at once
[00:28:42] <ureif> you can't debug if you're confused.
[00:34:21] <multiplex> i'm going to test with led to be sure it's 0xFF
[00:37:36] <brentbxr^> 0xFF0 = 111111110000
[00:37:39] <brentbxr^> but im wondering
[00:37:51] <brentbxr^> why put FF0
[00:38:12] <brentbxr^> Why do you have so little control of your applicaiton you are wondering what it is doing
[00:38:16] <brentbxr^> you programmed it right?
[00:40:19] <brentbxr^> I own multiple programmers with debuggers; and there is the rare occasion I need to use it
[00:40:34] <brentbxr^> but 90% of the time I know exactly what my code is doing because I coded it
[00:41:02] <brentbxr^> there are times when I make the code adapt to certain outside variables and a debugger is needed
[00:41:49] <brentbxr^> but even then its rare; as I coded it to match a certain outside variable; they dont come by chance
[00:42:39] <multiplex> i search a paste code
[00:45:36] <multiplex> http://pastecode.com/og
[00:46:33] <multiplex> i'm learning lcd module
[00:49:28] <multiplex> yesterday i'did run the pascal fleury lib without R/W (thanks to tip o avrfreak)
[00:50:18] <multiplex> but i preffer to do first a little lib without asm inline to well uderstanding
[00:50:31] <multiplex> but yes i'm a newbie
[00:51:24] <multiplex> maybe there is a better way to write this
[00:57:29] <multiplex> soon it'll work I'd look a little closer assembler
[01:05:12] <brentbxr^> screw asm
[01:05:31] <brentbxr^> what are you tring to do? just learn how to control a lcd chipset?
[01:08:36] <multiplex> exactly, i have now a functional library but i want to do my own.
[01:10:12] <multiplex> i think the pascal fleury lib is to hard right now
[02:15:12] <brentbxr^> feury pascal????
[02:15:17] <brentbxr^> fleury
[02:15:37] <brentbxr^> i used fleurys libs
[02:15:38] <brentbxr^> in c
[02:15:44] <brentbxr^> whats in pascal
[02:19:32] <multiplex> oups sory for him
[02:20:07] <multiplex> his web site http://homepage.hispeed.ch/peterfleury/avr-software.html
[02:21:01] <multiplex> peter fleury 's lib
[02:21:28] <multiplex> Peter FLEURY
[02:23:36] <multiplex> i had to mix Pascal STANG & Peter Fleury
[02:46:33] <brentbxr^> ok i was going to say
[02:46:40] <brentbxr^> im aware of peter's libs
[02:46:48] <brentbxr^> i think every AVR user is
[02:47:00] <brentbxr^> anyways good luck, stick with C
[02:47:22] <brentbxr^> im out
[02:48:38] <Landon> multiplex: don't know if you've found these yet, but the External Links to Everyday Practical Electronics in http://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller are a pretty good resource
[02:52:18] <cyanide> guys
[02:52:26] <cyanide> im using an rj11 connector on a board
[02:52:37] <cyanide> all connectors ive seen are 90 degree type
[02:53:05] <mrfrenzy_> you want it straight up?
[02:53:13] <mrfrenzy_> I think I've seen that on some board using RS485
[02:53:16] <cyanide> do you get connectors where the connector itself is perpendicular to the board
[02:53:18] <cyanide> yes
[02:53:27] <mrfrenzy_> try farnells parametric search
[02:53:32] <cyanide> ok
[02:53:35] <cyanide> thanks!
[02:53:45] <mrfrenzy_> let us know what you find ;)
[02:53:58] <cyanide> sure give me a few mins
[02:57:12] <cyanide> http://uk.farnell.com/jsp/search/browse.jsp?N=202551+2031+110201457&Ntk=gensearch&Ntt=rj11&Ntx=mode+matchallpartial&No=0&getResults=true&appliedparametrics=true&locale=en_UK&divisionLocale=en_UK&catalogId=&skipManufacturer=false&skipParametricAttributeId=&prevNValues=202551+2031&mm=1002208||,&filtersHidden=false&appliedHidden=false&autoApply=false&originalQueryURL=%2Fjsp%2Fsearch%2Fbrowse.jsp%3FN%3D202551%2B2031%26Ntk%3Dgensearch%26Ntt%3Drj11%26Ntx%3Dmode%2B
[02:57:19] <cyanide> i suppose these are it?
[02:57:38] <cyanide> surface mount vertical
[02:57:58] <cyanide> stupid link lol
[02:58:22] <multiplex> Thanks Landon, I have not visited all the page link
[02:58:31] <cyanide> yes sir mrfrenzy_, here is them http://uk.farnell.com/molex/85510-5019/jack-rj11-vertical-6-6/dp/2060720
[02:58:36] <cyanide> thanks. i love you
[02:59:06] <mrfrenzy_> your welcome
[02:59:13] <mrfrenzy_> parametric search owns
[02:59:33] <cyanide> always
[03:40:28] <cyanide> are there any smd leds larger than 1206/1210?
[03:41:28] <mrfrenzy_> well yes, there are huge 3W SMD leds
[03:42:14] <mrfrenzy_> http://www.cree.com/products/xlamp7090_xre.asp
[03:43:14] <CapnKernel> cyanide: Yep, a lot bigger. Not all of them have a light emitting area that big, they are mostly packaging
[03:43:58] <CapnKernel> (I wish I had my CF adaptor, I could show you a pic of my family and I standing outside the "International LED Trading Centre", which is one of the buildings in Shenzhen China, where I live.
[03:44:11] <cyanide> haha wow
[03:44:32] <cyanide> mrfrenzy_, are those practical?
[03:44:51] <cyanide> im building a circuit for formula 1 style rpm-sequential leds
[03:45:00] <cyanide> those will blind the driver lol
[03:45:20] <CapnKernel> Sure they are. But those are power LEDs for illumination, rather than signal LEDs for indication.
[03:45:28] <cyanide> yeah
[03:45:59] <cyanide> it would look retarded at night
[03:46:09] <cyanide> my face being lit up everytime i rev my engine
[03:46:10] <cyanide> haha
[04:00:08] <CapnKernel> cyanide: Tell us more about your project!
[04:02:20] <carp3> What's wrong with this code ? typedef struct vec{ int16_t x, y, z; }vec;
[04:02:36] <carp3> error: storage class specified for parameter 'vec'
[04:06:40] <Landon> have you got any missing semicolons above it?
[04:06:45] <Landon> or in headers
[04:10:48] <carp3> yeah . now another error
[04:10:53] <carp3> error: redefinition of 'struct vector'
[04:11:03] <carp3> error: redefinition of 'struct vec'
[04:11:08] <Landon> well that one should be easier to track down :P
[04:11:52] <ElMonkey> hmm, does the gcc toolchain have macros or instrinsics for the setbit type instructions?
[04:12:17] <ElMonkey> the code i am working from has some plain macros for those
[04:12:24] <ElMonkey> or does the optimizer do the right thing=
[04:12:25] <ElMonkey> ?
[04:29:25] <Sgt_Lemming> home now, had some fun flying this arvo
[04:51:53] <CapnKernel> ElMonkey: The optimiser does a pretty good job.
[05:03:17] <carp3> What's wrong ? confused . code : typedef struct vector { float x, y, z; } vector;
[05:03:18] <carp3> ../imu.h:1: error: redefinition of 'struct vector'
[05:03:20] <carp3> ../imu.h:1: error: redefinition of typedef 'vector'
[05:03:22] <carp3> ../imu.h:1: error: previous declaration of 'vector' was here
[05:03:43] <Landon> what's on line 1 of imu.h ?
[05:03:52] <carp3> typedef struct vector { float x, y, z; } vector;
[05:04:19] <specing_> carp3: LOL
[05:04:30] <carp3> why ?!
[05:04:31] <specing_> You fail at coding ;D
[05:04:45] <Landon> and there's not a single other typedef struct vector in your code?
[05:04:59] <specing_> Landon: don't you see what he did?
[05:05:06] <carp3> specing_: i just copy/past code from an example
[05:05:07] <Landon> oh
[05:05:08] <Landon> derp
[05:05:14] <Landon> that's awesome specing_
[05:05:14] <specing_> ;D
[05:05:54] <carp3> ???
[05:06:11] <specing_> carp3: here is what you did, uber simplified: int int;
[05:06:14] <Landon> unlike many gcc errors, this one is just as advertised :)
[05:06:47] <carp3> i copy code from http://www.pololu.com/file/0J436/LSM303DLH-orangutan-example-code.zip
[05:07:44] <specing_> IT IS WRONG NO MATTER FROM WHERE YOU COPIED IT
[05:07:44] <Landon> carp, do you know what a typedef is?
[05:08:00] <carp3> to define a new type ?
[05:09:05] <Landon> good
[05:09:10] <Landon> you know how a struct works too?
[05:10:12] <carp3> holds some variables together ?
[05:10:16] <Landon> right
[05:11:05] <Landon> and the declaration syntax is "struct StructName { variable nonsense };" or "struct StructName { variable nonsense } VariablesOfTypeStructName;"
[05:12:15] <Landon> er, not VariablesOfTypeStructName, I meant to say NewTypeName :)
[05:12:28] <carp3> but why i can compile http://www.pololu.com/file/0J436/LSM303DLH-orangutan-example-code.zip without any error ?
[05:12:34] <carp3> specing_: ^
[05:13:52] <specing_> because it is wrong?
[05:16:42] <Landon> hm, both compile for me actually
[05:17:20] <specing_> weird
[05:17:29] <specing_> maybe he copied it wrong
[05:29:45] <carp3> i found the problem . i used #include "imu.h" twice . i should put if ndef or something ...
[05:40:06] <ElMonkey> #pragma once
[05:56:21] <RikusW> sleepy sunday time again it seems...
[06:01:01] <RikusW> jadew: gcc error: undefined reference - is it a linker error? this will happen if you use gcc instead of g++
[06:51:43] <jadew> RikusW, was using g++ but I just didn't recognize the error, especially since I specified the library to link to, so in case the library was missing I was expecting it to fail with a library not found error
[06:52:45] <jadew> the problem was with avr studio, not passing the specified libraries to the linker
[06:54:37] <jadew> actually, avr studio 5 seems severely crippled/bugged by missing features from the standard VS and missing VS macros
[06:58:37] <jadew> also, I figured out it's not a good idea to have custom built libraries when doing avr coding, it's better to just compile the library sources as part of the main project, since you want to disable stuff you don't need
[07:01:50] <amee2k> i don't think AVR studio was intended as a port of the other integrated development environment from redmond...
[07:02:30] <jadew> what other IDE?
[07:02:47] <amee2k> i assumed by VS you meant visual studio, no?
[07:02:51] <jadew> yeah
[07:03:00] <amee2k> there ya go :)
[07:03:10] <jadew> it's based on VS
[07:03:27] <amee2k> lol
[07:03:37] <jadew> the engine is VS
[07:03:39] <amee2k> well, evidently not really
[07:03:45] <jadew> they just wrote a couple of plugins
[07:03:56] <skorket> I think I might have fried one of my ATTiny13's. It programs just fine, but when it runs, it does some weird stuff. I run the same code on another ATTiny13 and it runs fine. Is there a way to do a consistency check on the chip to verify it's still intact?
[07:03:57] <amee2k> also, lol at VS... i haven't used that since my visual basic days XD
[07:04:26] <jadew> amee2k, VS is the best IDE around
[07:04:26] * Jan- knocks politely on the door
[07:04:28] <Jan-> may I come in?
[07:04:59] <jadew> I was not comparing the standard VS with AVR studio tho, but VS provides some macros you can use to define external commands and stuff
[07:05:01] <amee2k> haha, i found i got pretty overcomplicated in VS6 already
[07:05:04] <jadew> AVR studio makes use of those
[07:05:12] * Jan- likes Visual Studio
[07:05:13] <jadew> but while specified, they are not always defined
[07:05:20] <amee2k> i don't suppose they streamlines anything on it in the meantime?
[07:05:55] <jadew> streamline? (sorry my english might be at fault here)
[07:06:10] <amee2k> well, make the interface easier to understand and handle
[07:06:22] <jadew> the interface is really easy
[07:06:24] <Jan-> streamline might mean simplify in that context
[07:06:35] <jadew> easier than the VS6 one
[07:06:40] <jadew> but deffinitely more powerful
[07:06:43] <amee2k> in VS6 i found it is completely undocumented for one
[07:07:17] <jadew> oh, in the later ones everything is well docummented and you get contextual help as well, in some cases
[07:07:24] <Jan-> I notice that dealextreme does a bluetooth serial module for US$6.90
[07:07:28] <Jan-> I assume it will be crappy, for that price
[07:07:28] <amee2k> i kind of have an aversion to IDEs ever since i discovered text editors i suppose
[07:07:29] <Jan-> no?
[07:08:21] <jadew> amee2k, I have the same thing when working with some languages, but it's required on desktop apps
[07:08:23] <amee2k> everything on dealextreme is presumed crappy until proven innocent. less disappointments this way
[07:08:29] <Jan-> I guess :)
[07:08:33] <jadew> especially for the nicely integrated debugging and for profiling
[07:08:45] <Jan-> aargh, I hate when websites prevent you deep linking in from a google result, and redirect you to a landing page
[07:08:59] <Jan-> I googled for "atmega168" in hopes of finding the data sheet, and I did
[07:09:08] <Jan-> but then I ended up at atmel.com/products/microcontrollers/default.aspx
[07:09:09] <Jan-> grrr
[07:09:10] <amee2k> jadew: well, yeah, the integrated debugging is a selling point of IDEs but i find the whole shebang until i get to the debugging part quite cumbersome
[07:09:25] <jadew> Jan-, atmel side had some issues this past few days
[07:10:10] <Jan-> so uh what's an "xmega"
[07:10:23] <jadew> amee2k, one thing you'll find in VS that you can't find in any other IDE is almost flawless autocompletion
[07:10:30] <amee2k> i'm not so much opposed to the actual editor thing in IDEs, these are usually very nice with highlighting and "folding up" blocks
[07:10:33] <Jan-> yay for intellisense!
[07:10:39] <jadew> and really easy code navigation
[07:10:40] * Jan- less-than-three intellisense
[07:10:53] <Jan-> although it doesn't screenread very well
[07:10:57] <Jan-> it still works somewhat
[07:11:06] <amee2k> but i generally find the configuration dialogs are a huge mess, making it hard to find important compiler options or even see the resulting compiler command line
[07:11:38] <RikusW> Jan-: http://sites.google.com/site/megau2s/home
[07:11:39] <amee2k> and the editor itself isn't very configurable usually, so if you don't like a small aspect of it, you're hosed
[07:11:42] <jadew> amee2k, after a few projects you get used to them and they'll come to you naturally
[07:11:46] <RikusW> Jan-: click on the datasheet page
[07:11:59] <Jan-> oh now this is better
[07:12:01] <Jan-> who did this
[07:12:12] * RikusW and rue
[07:12:21] <Jan-> aaargh it doesn't include the atmega168
[07:12:28] <jadew> amee2k, what's your prefered language?
[07:12:29] * Jan- waves her arms
[07:12:33] <Jan-> ooh.
[07:12:35] <amee2k> jadew: i couldn't care less about completion. what is more important to me is that i don't get forced to use the messy favourite indentation style of the lead developer of the IDE
[07:12:38] <Jan-> I'd kiss you, except I have the lergy still.
[07:12:43] * Jan- exudes horrible goop
[07:12:52] <jadew> amee2k, that's not the case with VS
[07:12:55] <RikusW> it does
[07:12:55] <jadew> it never was really
[07:13:06] <RikusW> Jan-: http://www.atmel.com/dyn/resources/prod_documents/doc2545.pdf
[07:13:10] <amee2k> especially what i think is called "gnu style" indentation is exceedingly ugly because every declaration is split over like 5 lines >_<
[07:13:17] <jadew> you can customize the editor pretty much anyway you like, from colors to idents
[07:13:23] <Jan-> RikusW: 404
[07:13:25] <Jan-> don't worry
[07:13:26] <Jan-> I can find it
[07:13:33] <Jan-> I just hate atmel a bit more every second I spend on this :D
[07:13:34] <amee2k> jadew: i think i have several... C, perl, java, some PHP... in no specific order
[07:13:48] <amee2k> Jan-: you looking for the atmegaX8 datasheet?
[07:13:53] <Jan-> nono
[07:13:56] <Jan-> the atmega168
[07:14:00] <Jan-> unless that's what you meant
[07:14:01] <amee2k> lol
[07:14:03] <Jan-> in which case yes
[07:14:04] <Jan-> er
[07:14:07] * Jan- looks sheepish
[07:14:10] <jadew> well, for C, I suppose you could give a try to VC++, it will compile C just fine, you might fall inlove with the IDE
[07:14:14] <amee2k> megaX8 = mega48/88/168/328
[07:14:15] <RikusW> Jan-: http://www.atmel.com/dyn/resources/prod_documents/doc8271.pdf
[07:14:16] <RikusW> this one ?
[07:14:26] <Jan-> The requested page cannot be found.
[07:14:34] <Jan-> The page you have requested might have moved or has been archived. Please use our Product Finder or site search to locate your document or page.
[07:14:45] <RikusW> ugh
[07:14:53] <RikusW> seems like atmel broke our links :(
[07:14:55] <Jan-> the 16 means... er, amount of ram? amount of program flash?
[07:15:01] * Jan- did know this once, honest
[07:15:02] <amee2k> i can upload an older one from my datasheets collection
[07:15:14] <jadew> amee2k, PHP will work on VS as well, with the VS.PHP plugin, but I don't really like it, since I usually add files manually in explorer and it doesn't detect the changes (you have to add them to the project)
[07:15:34] <amee2k> Jan-: the number usually indicates the amount of flash. but the amounts of RAM and EEPROM usually change along with that
[07:16:09] <amee2k> e.g. the 4/8/16/32k atmegas have256/512/512/1024 bytes of SRAM iirc
[07:16:19] <Jan-> that's not much SRAM
[07:16:38] <Jan-> sounds like a lot of program flash and not much ram
[07:16:49] <amee2k> Jan-: well, the other problem is that i usually do my languages "vanilla", i.e. without any frameworks unless i know i need them
[07:16:53] <jadew> that's a lot of ram compared to what I'm working on
[07:17:12] <amee2k> i've seen some that had no RAM at all, only the register file >_>
[07:17:28] <Jan-> I guess it depends what you're doing
[07:17:42] <jadew> amee2k, yeah, that's no problem, you can build your programs however you want
[07:18:10] <jadew> Jan-, yeah, if you need to buffer stuff, RAM is important
[07:18:11] <amee2k> if you need large lookup tables, you may want to look into external SPI SRAM
[07:18:21] <Jan-> SPI always seems complicated
[07:18:23] * Jan- hides behind the sofa
[07:18:46] <RikusW> SPI is easy
[07:18:54] <Jan-> Everyone says that :(
[07:19:11] <amee2k> SPI stuff that runs at 25+ MHz is easy to find usually so you can floor it and a lookup only takes a dozen cclocks or two
[07:19:12] <RikusW> just connect the 3 wires + gnd
[07:19:18] <Jan-> then write code
[07:19:19] <Jan-> code!
[07:19:22] <Jan-> coooooooode :(
[07:19:22] <jadew> I2C is supported by AVR's under the name of two wire communication, right?
[07:19:34] <amee2k> yes
[07:19:42] <jadew> good to know, thanks
[07:19:53] <RikusW> Jan-: so learn C
[07:19:59] <Jan-> *tremble*
[07:20:00] <amee2k> I2C is a trademark of philips i think, so people usually invent fancy names for it when they use it in datasheets
[07:20:09] <RikusW> C isn't that hard
[07:20:25] <amee2k> thats what she said
[07:20:30] <Jan-> I've written heaps of javascript and some C#
[07:20:36] <Jan-> so I'm hoping it won't do my head in
[07:20:42] <Jan-> C actually seems primitive compared to those two
[07:20:50] <RikusW> its simpler than C#
[07:20:55] <Jan-> but
[07:20:56] <Jan-> structs!
[07:20:59] <amee2k> jadew: thats what brings me back to the obscure compiler and linker options in 7 levels of configuration dialogs >_>
[07:21:01] <Jan-> and manual memory management!
[07:21:07] * Jan- runs around in circles, waving her arms
[07:21:21] <CapnKernel> C is like a small child: You drag it kicking and screaming to your problem
[07:21:25] <jadew> Jan-, don't manually allocate anything and you should be fine
[07:21:28] <Jan-> I don't like children.
[07:21:31] <amee2k> Jan-: i think you'll have an easier time with C if you understand it as an improvement over assembler
[07:21:33] <Jan-> They make a noise.
[07:21:33] <CapnKernel> I don't like C
[07:21:34] <RikusW> actually I don't use any memory management on avr, only static allocation
[07:21:39] <amee2k> not as a simplification of C# or whatever
[07:21:46] <CapnKernel> Programmed in it for 20 years, but now I'm officially OVER it.
[07:21:47] <Jan-> amee2k: in some ways it almost seems like a macro language for assembly code
[07:21:49] <CapnKernel> I got better.
[07:21:53] <CapnKernel> Portable assembler.
[07:22:07] <Jan-> It always occurred to me to write assembler for microcontrollers.
[07:22:14] <amee2k> Jan-: actually, thats not too far off from the truth when it was first invented
[07:22:15] <Jan-> Especially as I want exact timing.
[07:22:41] <RikusW> Jan-: you know avr asm ?
[07:23:03] <amee2k> before C and fortran and whatver, people had pretty fancy macro packages for actual assemblers to get many of the high level constructs of ti
[07:23:04] <CapnKernel> The resemblance is because the majority of processors invented since then have specifically been designed to try to run C well.
[07:23:10] <jadew> Jan-, going for asm will mean your code might not compile for other controllers, since some are missing instructions
[07:23:30] <amee2k> http://ompldr.org/vY214ag/ATmega48PA-88PA-168PA-328P_new.pdf << 8271B–AVR–04/10
[07:23:30] <Jan-> hrrrrm
[07:23:50] <Jan-> RikusW: No, but I guess I can just look up what I need as I go on.
[07:23:51] <amee2k> thats my version of it... i make a point of having local copies for all the datasheets for all my parts
[07:23:58] <Jan-> And bother you guys when I get stuck :D
[07:24:14] <jadew> Jan-, go for C and save yourself some pain
[07:24:23] <amee2k> in case they get obsoleted and i'm left hunting the internet for specs
[07:24:44] <jadew> then when you get the hang of it you can go for C++ (you kinda have to be familiar with both, in order to keep C++ code small)
[07:25:17] <amee2k> i wouldn't bother with C++ at this point, really
[07:25:39] <amee2k> C + assembler is fairly powerful already, and C++ has very few advantages in MCU land
[07:25:57] <jadew> well, I can tell you one: objects
[07:26:15] <jadew> I have this project where I want to control 2 LCDs from the same MCU
[07:26:49] <jadew> I had to either write a library where all the functions take a struct parameter or just write a class and have something way more elegant
[07:27:02] <Jan-> I have to port a timecode library from javascript to C
[07:27:04] <Jan-> it sucks
[07:27:13] <Jan-> every one of my methods now has to become a static function with a struct parameter
[07:27:17] <Jan-> this is assbanditry
[07:27:28] * Jan- wants her OOP
[07:27:29] <amee2k> well, then you've got a special case already because you need a lib that supports two displays
[07:27:37] <amee2k> not a lot do that, from what i've see
[07:28:20] <amee2k> and huge amounts of good quality code has been written with the "passing struct pointers around" approach. think about file handles, eh?
[07:28:36] <amee2k> also, your OO compiler does nothing else in background really
[07:28:50] <jadew> I know
[07:28:52] <amee2k> so i don't think C++ is a requirement for MCU stuff at all
[07:28:58] <jadew> which is why I prefer C++ over C
[07:29:06] <jadew> I'll let the compiler do that in the background
[07:29:08] * Jan- thinks there should be javascript for MCUs :)
[07:29:11] <jadew> while I enjoy nicely designed code ;)
[07:29:29] <amee2k> projects are usually very small compared to ones that run on desktop computers too so the extra code complexity from not going OO is still quite manageable
[07:29:41] <jadew> yeah, deffinitely, I usually go for C as well
[07:29:47] <jadew> but this project really needed C++
[07:33:32] <Jan-> the only thing about object orientation is that it sometimes (often?) makes it easier to multi thread things
[07:33:47] <Jan-> but that's not really an issue on a microcontroller with... well, by Pentium standards, not even a whole core :)
[07:34:49] <amee2k> on a micro you want to push for efficiency, not nice looking code
[07:35:25] <amee2k> beyond the hardware itself there are also usually no schedulers or other facilities for multithreading
[07:35:28] <Jan-> I guess there's a big grey area in the crossover between two when you get to big microcontrollers/small CPUs
[07:36:03] <amee2k> yeah, some micros are quite powerfull. then they're somtimes called "SoC" or "system-on-chip"
[07:36:23] <Jan-> it would be nice to have an FPU
[07:36:34] <Jan-> only being able to divide things by powers of 2 sucks.
[07:36:52] <amee2k> the term MCU usually applies to to the bottom end of the size range, i.e. the really micro ones like AVRs pr PICs or MCP430 orwhatsitcalled
[07:37:20] <amee2k> iirc some AVRs have an integer divider/multiplier unit in hardware
[07:38:00] <amee2k> and the compiler can usually fake it reasonably efficiently for most purposes
[07:38:16] <Jan-> I assume the compiler will actually let me do floating point division, and just do it in software, slowly
[07:38:23] <amee2k> yep
[07:38:25] <jadew> yeah
[07:38:32] <Jan-> potentially very very slowly?
[07:38:42] <jadew> yeah, but you can avoid it
[07:38:43] <amee2k> it'll like a FP library in that is like 5k in flash >_>
[07:38:51] <amee2k> depending on what you're doing
[07:39:04] <Jan-> Well yes you just design around it
[07:39:17] <Jan-> The "more advanced" project I want to do does involve some division, but I can reduce it all to powers of 2
[07:39:52] <jadew> like... if you have to display 4.5 which is a reslult of 9/2 you can just make sure that 9 is actually 90 in the code and do 90/2
[07:39:55] <amee2k> using a larger integer type and fixed-point calculations is sometimes a viable option over floating-point
[07:40:21] <CapnKernel> In order to divide by any number, calculate an equivalent fraction so that the denominator is a power of two. Multiply by the numerator, then shift to divide by the denominator
[07:42:27] <amee2k> i wish *printf had a way to shift the decimal point around while rendering a field
[07:42:49] <amee2k> that would make using base-10 fixed point calculations easier sometimes
[07:44:03] <Jan-> so ingeneral, don't use the FP library, just figure out a less computationally intensive approach manually?
[07:44:19] <amee2k> well, you should at least consider it
[07:44:40] <amee2k> if you find out FP is going to work for you and you have the flash memory to spare, then by all means do it
[07:44:45] <Jan-> how can I tell if the thing decides to compile in the library
[07:44:53] <Jan-> suddenly my binary becomes 5k bigger?
[07:44:57] <amee2k> yep :P
[07:44:59] <amee2k> exactly that
[07:45:12] <Jan-> cripes
[07:45:16] <Jan-> well I have to go and make nice to some visitors
[07:45:18] <Jan-> I'll be back in a few
[07:45:27] <Jan-> they're boring friends of phil's so he won't expect or want me to hang out :D
[07:45:29] <amee2k> good hunting!
[07:47:41] * amee2k . o O ( mmh... cyanide and happiness... )
[07:48:15] <CapnKernel> He's back and this time he might tell us about his formula-1 project :-)
[07:48:38] <amee2k> 0.0
[07:48:44] <amee2k> cyanide is drivin'?
[08:07:03] <CapnKernel> He must be shy.
[08:09:38] <specing_> Is it normal for the ADC to give very strange readouts?
[08:10:09] <impulze> what kind of question is that?
[08:13:23] <Jan-> hey, if we connect a piezo-electric sounder to the PWM output of an AVR, can I make it play tunes by varying the PWM frequency?
[08:14:57] <amee2k> Jan-: yep
[08:15:02] <Jan-> kickass
[08:15:11] <Jan-> does it matter much what kind of sounder it is?
[08:15:14] <Jan-> we just have some from the junk box
[08:15:23] <amee2k> you'll probably want CTC + pin toggle output compare mode
[08:15:34] <amee2k> doesn't really matter
[08:15:45] <amee2k> you can only really play one tone at a time though
[08:16:21] <Jan-> sure
[08:16:28] <Jan-> otherwise you'd need a softwre mixer and a DAC
[08:16:34] <CapnKernel> You can do polyphony in software
[08:16:43] <Jan-> ...that
[08:16:54] <amee2k> well, you could turn the PWM channel into a class D kind of DAC
[08:17:23] <CapnKernel> Sounds interesting, do you have a web link?
[08:17:36] <Jan-> you'd need a super fast pwm though wouldn't you|?
[08:17:46] <amee2k> CapnKernel: you need a link for an RC filter?
[08:18:08] <CapnKernel> No, for a discussion of the concept.
[08:18:31] <amee2k> from what i know about class D amps, the pwm frequency should be at least 10x - 15x higher than the rolloff frequency of the filter
[08:18:35] <CapnKernel> Humour me here, I'm a digital guy. And others might find it interesting too.
[08:18:55] <amee2k> and high enough to be surely supersonic or it'll get creepy
[08:19:33] <CapnKernel> Your technical terms are frightening me :-)
[08:19:38] <amee2k> CapnKernel: check out how a "class D" amplifier works. now skip the input PWM modulator and do the PWM modulation thing in software
[08:19:50] <amee2k> http://en.wikipedia.org/wiki/File:Pwm_amp.svg
[08:20:24] <amee2k> for a low-powered DAC you can just use the pin driver for the push-pull stage
[08:20:57] <amee2k> i think GuShH made an 8 bit DAC this way before for something
[08:21:07] <CanyonMan> Does anybody know if printf in libc-avr is reentrant?
[08:21:14] <CanyonMan> or specifically is it NOT reentrant?
[08:21:23] <CanyonMan> specifically,
[08:21:38] <CanyonMan> I'm debugging some spark fun code, and at one point it does a printf("%something", dosomething());
[08:21:48] <amee2k> being reentrant is a feature, so if noone brags about it on the man page, you can assume it most likely isn't reentrant
[08:21:50] <CanyonMan> and dosomething() calls printf, and it producs garbage output
[08:22:05] <CanyonMan> hm
[08:22:15] <CanyonMan> that's true
[08:22:25] <CanyonMan> or, at least, I'd find that somewhere right
[08:22:32] <amee2k> or at least noone ever thought about it, which means most likely something non-reentrant snuck in somewhere
[08:22:36] <CanyonMan> the googles, the bing
[08:22:38] <CanyonMan> yeah
[08:22:55] <grummund> it is mentioned in the FAQ, of course... ;)
[08:22:58] <CanyonMan> experienc from some compiler I used for pic is what lead me to this
[08:22:59] <amee2k> C libraries love static, shared buffers
[08:23:01] <CanyonMan> it is??
[08:23:10] <CanyonMan> yeah that's waht I was trying to find
[08:23:42] <grummund> http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_reentrant
[08:24:08] <CanyonMan> weird
[08:24:22] <amee2k> CapnKernel: did that help?
[08:24:24] <CanyonMan> that makes it look like it could scew up flags and character ounts in FILE but not buffer overruns and such
[08:24:32] <amee2k> (i mean, pointing at the class D amp)
[08:25:08] <CapnKernel> CanyonMan: the gnu avr-libc's printf and FILE* handling can call malloc, which is not reentrant.
[08:25:36] <CanyonMan> huh
[08:26:01] <CapnKernel> amee2k: Interesting, thanks.
[08:26:43] <CanyonMan> can you prevent it from setting up a heap and using malloc, and allocate statically?
[08:27:05] <CapnKernel> I'll let someone else answer that
[08:27:24] <CapnKernel> If you print to stdout, expect malloc to be called.
[08:27:32] <CapnKernel> (printing to stderr may be better)
[08:30:14] <grummund> why would printf() need to call malloc() ?
[08:31:52] <CapnKernel> There are certain % thingies which need to allocate memory
[08:32:09] <CapnKernel> And I believe printing to stdout is buffered, and malloc is called for that buffer
[08:33:25] <CanyonMan> i'll look into how all this works in a minute
[08:33:39] <grummund> i somehow doubt that printf() causes any call to malloc
[08:33:41] <grummund> but nevertheless printf() is not reentrant
[08:33:42] <CanyonMan> the other issue i had was this sparkfun code was all one ginormous file, I'm splitting it up and making the makefile sane now
[08:33:55] <CanyonMan> yeah id on't know
[08:34:15] <CanyonMan> on the gcc for arm7tmdi printf allocates static space for a scratchpad area
[08:38:55] <karlp> grummund: I don't really know why it would, but quite a few printf man pages I've read warn that printf will or might call malloc, and to be prepared for that.
[08:41:42] <grummund> ok. but afaict avr-libc is not such a case
[08:42:51] <CapnKernel> A few minutes with nm should resolve the issue...
[08:43:24] <amee2k> hmm mildly off-topic but does anyone by chance know how long Bosch offers service for their "blue" professional lines?
[08:43:51] <grummund> CapnKernel: go for it
[08:44:28] <amee2k> i'm still looking at that range finder but the non-replacable battery pack is really putting me off at this point. i can't find anything on how long they're planning on making replacements available
[08:47:16] <CapnKernel> grummund: Don't quote me on this, but I did an nm on libc, libprintf_min.a and libprintf_flt.a from avr-glibc, and there was no mention of malloc.
[08:50:46] <grummund> CapnKernel: "the gnu avr-libc's printf and FILE* handling can call malloc, which is not reentrant."
[08:51:05] <grummund> CapnKernel: i guess we should not quote you on that either :P
[08:52:24] <karlp> hehe :)
[08:53:10] <grummund> but the FAQ says it's not reentrant for other reasons
[08:53:27] <grummund> use sprintf() + fwrite() instead
[08:54:41] <CanyonMan> or snprintf() if it exists
[08:54:45] <grummund> or just don't use printf from an ISR! :P
[08:55:03] <CanyonMan> this wasn't an isr problem that caused me to ask the question.
[08:55:17] <karlp> it was printf("blah", somethingcallingprintf)
[08:55:20] <CanyonMan> right
[08:56:55] <grummund> interesting that that should cause a problem
[08:57:07] <CanyonMan> i agree
[08:57:11] <CanyonMan> wha ti twuld do was this:
[08:57:25] <CanyonMan> Temperature = 21.1CirmwareVersion=2.0
[08:57:28] <CanyonMan> it should have stopped at 21.1C
[08:57:54] <CanyonMan> so it was outputting leftover crap from some previous printf
[08:57:55] <CanyonMan> weird
[08:58:09] <CanyonMan> their whole thing was a bad strategy when, to be honest, vprintf_float is really not all that big
[08:58:37] <CanyonMan> there's plenty of code space left and time isn't an issue either. I "fixed" (avoided) the problem by just using printf_float and %f
[09:04:06] <dirty_d> just to be sure, avr-gcc stores ints and shorts etc in little endian format?
[09:08:21] <grummund> dirty_d: yes, but ordinarilly you shouldn't need to be concerned about that
[09:11:24] <Jan-> I've just been told that, due to illness, I now have a voice like something that was dug up on an egyptian archaeological site.
[09:11:32] <Jan-> *croak*
[09:11:59] <CanyonMan> huh.
[09:12:22] <CanyonMan> That's a good, creative description.
[09:14:02] <Jan-> If only I could actually *say* it :(
[09:15:44] * Jan- coughs out deadly infective spores
[09:18:57] <dirty_d> grummund, im reading in 16 bit values over i2c in big endian format
[09:19:07] <dirty_d> so i just had to do a switcharoo
[09:20:38] <grummund> dirty_d: but still it shouldn't matter how gcc arranges things
[09:23:09] <dirty_d> hmm yea i guess i wasnt doing it the smartest way using pointers
[09:23:30] <dirty_d> i change it to bitshift stuff, so yea it doesnt matter what endianness now
[09:24:02] <grummund> yep, casting pointers is asking for trouble
[09:28:30] <amee2k> depends on how servicable the code needs to be >_>
[09:30:23] <amee2k> what i find quite interresting is that the GLM80 is rated for +/-1.5mm precision and the GLM150 is +/-1mm at almost twice the range 0.=
[09:30:31] <amee2k> 0.0*
[09:44:37] <Jan-> where's Tom_itx's basic startup guide
[09:46:07] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/how_to/atmega168/mega168_howto_main_index.php
[09:46:16] <Jan-> *readreadread*
[10:10:48] <ben1066> is there any reason to go avr32 over arm>
[10:11:18] <CanyonMan> like m3 or arm7tmdi?
[10:11:39] <CanyonMan> idunno
[10:12:01] <CanyonMan> i'm finding the avr stuff a little quicker to get started than arm
[10:12:05] <CanyonMan> the arm is more powerful IMO
[10:35:18] <ben1066> yea
[10:35:45] <ben1066> arm seems a bit cheaper...
[10:35:53] <ben1066> or at least, it scales a lot lower
[10:36:31] <ben1066> meh
[10:36:34] <ben1066> I get my DE1 tommorow :D
[10:38:40] <Tom_itx> abcminiuser you up?
[10:52:34] <Jan-> blutch
[10:52:36] * Jan- wakes up
[10:52:48] <Jan-> phlargh! wzft! mngh! gwazlfw... wha? huh?
[10:52:52] <Jan-> ...oh
[10:54:25] <dirty_d> TWCR = (1 << TWEN) | (1 << TWINT) | (1 << TWSTO); while(TWCR & TWSTO);
[10:54:30] <dirty_d> thats hanging forever any ideas?
[10:54:48] <dirty_d> "When the STOP condition is executed on the bus, the TWSTO bit is cleared auto-matically."
[10:54:51] <Jan-> avr C looks like assembler anyway!
[10:55:11] <dirty_d> oh duh!
[10:55:14] <dirty_d> damnit
[10:55:24] <dirty_d> while(TWCR & (1 << TWSTO));
[10:55:33] <Jan-> twisto?
[10:55:37] <abcminiuser> Tom_itx, yup
[10:55:37] <Jan-> tiwcker?
[10:55:41] * Jan- trembles
[10:55:45] <abcminiuser> Tom_itx, just preparing the new beta
[10:58:26] <dirty_d> ok i take that back, its still hanging forever
[11:07:10] <Jan-> Haw haw
[11:07:18] <Jan-> My friend liz is having to dig her Mark 1 Bug out of the snow
[11:07:31] <Jan-> it's drifted 2 feet deep over the roof
[11:08:55] <Tom_itx> abcminiuser would you check the description of the update for accuracy for me?
[11:09:20] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[11:09:26] <Jan-> careful tom, that sounds like an open source author checking his facts, we can't have that :)
[11:09:43] <Tom_itx> bottom
[11:09:53] <Tom_itx> he should know what he changed
[11:10:57] <Tom_itx> i think i'll dump the others
[11:11:14] <Jan-> why do your URLs have tildes in them
[11:11:37] <abcminiuser> Tom_itx, looks good, I think FLASH was affected as well as EEPROM on some devices
[11:11:52] <Tom_itx> meh
[11:12:24] <Tom_itx> i'm pretty happy with these new boards
[11:12:36] <Tom_itx> only thing i could change now that i see would be the size
[11:13:07] <ben1066> Tom_itx: your small tpi addon board, would that work with teh official programmer?
[11:13:10] <Tom_itx> but it's not that bulky as is
[11:13:17] <Tom_itx> it should
[11:13:39] <Tom_itx> i haven't tested it though. it's a standard 6pin input
[11:13:48] <ben1066> also, other than powering the target, is there anything else extra your programmer can do?
[11:14:00] <Tom_itx> PDI and TPI
[11:14:11] <Tom_itx> i'm not sure the original does both of those yet
[11:14:17] <Tom_itx> it may by now
[11:14:21] <Tom_itx> i haven't looked
[11:14:33] <Tom_itx> and mine is cheaper
[11:14:34] <ben1066> it does
[11:14:41] <Tom_itx> targets down to 1.75v
[11:15:17] <Tom_itx> and it's smaller
[11:15:24] <Tom_itx> for OTG programming :)
[11:15:53] <ben1066> meh I might get one in addition to my official one :P
[11:16:11] <Tom_itx> i figured every geek carried one in their pocket by now
[11:16:29] <Tom_itx> i think it programs targets faster too
[11:16:35] <ben1066> the official one fits in the pocket, just :P
[11:16:52] <Tom_itx> you could put several of mine in your pocket
[11:17:03] <Tom_itx> even the blue one
[11:17:06] <Tom_itx> it's tiny
[11:17:20] <ben1066> is your update a firmware update or a layout change?
[11:17:31] <Tom_itx> both
[11:17:44] <ben1066> what does it change?
[11:17:45] <Tom_itx> i ordered new boards and with the new board came a hardwired recovery clock
[11:17:53] <Tom_itx> instead of using the PDI clock
[11:17:55] <ben1066> ah
[11:18:15] <Tom_itx> the header hole above the translator chip
[11:18:58] <Tom_itx> the original doesn't have that
[11:19:07] <ben1066> i find it nicer not to screw up the clock :P
[11:19:26] <Tom_itx> happens to noobs
[11:19:35] <Tom_itx> most everybody else remembers that mistake
[11:19:51] <ben1066> avrstudio makes it easy enough not to screw up
[11:19:58] <ben1066> since it tells you precisely what each thing does
[11:19:59] <ben1066> <3
[11:20:47] <Tom_itx> i use that fusebit calculator site
[11:21:28] <Tom_itx> before this 1.1c rev you had to load the recovery firmware to get the clock output on the PDI clock pin
[11:21:35] <Tom_itx> now it's available all the time
[11:21:49] <ben1066> ah
[11:21:57] <ben1066> Now you just need to make a jtagice mk2 clone :D
[11:22:09] <ben1066> or JTAGICE3, thatd be fine too :p
[11:22:12] <Tom_itx> 4Mhz
[11:22:29] <ben1066> thats to support all voltages?
[11:22:44] <Tom_itx> what is?
[11:22:45] <carp3> why i get '?' with printf("%f",3.1f); ?
[11:22:48] <ben1066> 4mhz
[11:22:53] <ben1066> rather than say 8 or 16
[11:23:02] <Tom_itx> no the programmer runs at 16
[11:23:21] <Tom_itx> the recovery clock is 4Mhz
[11:23:33] <ben1066> yea, I know
[11:23:36] <ben1066> thats what I meant
[11:23:39] <Tom_itx> it needs to be 4x the spi clock rate
[11:23:41] <ben1066> so all target voltages work...
[11:23:52] <Tom_itx> far as i know yes
[11:23:57] <ben1066> considering at 1.8V the max specced clock is 4mhz
[11:25:32] <Tom_itx> in reality i don't know anybody using an avr at 1.8v though
[11:25:41] <ben1066> Lol
[11:25:46] <Tom_itx> i have
[11:25:52] <Tom_itx> actually 1.75
[11:25:54] <ben1066> some avrs have a .7V boost converter...
[11:26:02] <Tom_itx> i know
[11:26:41] <Tom_itx> i stopped at 1.75v because the blinky test was getting hard to see
[11:27:16] <Tom_itx> the translator is spec'd at 1v
[11:29:41] <ben1066> So theoretically...
[11:30:18] <ben1066> any reason you didnt include the 12V recovery into the main board?
[11:30:31] <Tom_itx> for TPI?
[11:30:33] <ben1066> you could probably get it cheaper with a standard mc4046a or whatever step up
[11:30:35] <ben1066> for TPI
[11:30:48] <Tom_itx> not many people are using tiny4,5,9 and 10
[11:31:05] <Tom_itx> that's all that are affected by it
[11:31:55] <Tom_itx> most parts i found didn't step up high enough
[11:32:00] <Tom_itx> most were doublers
[11:32:27] <ben1066> I meant one that uses an inductor
[11:32:42] <Tom_itx> the inductor would cost more than what i have
[11:33:04] <ben1066> really?
[11:33:54] <Tom_itx> it's a .70 part
[11:34:13] <Tom_itx> quantity of course
[11:34:45] <keenerd> You can stack doublers.
[11:34:59] <ben1066> then youd have 20V
[11:35:07] <Tom_itx> this gets it right at 11+ - 12v
[11:35:11] <ben1066> 20V+regulator, at a guess, costs more or less the same
[11:35:13] <Tom_itx> that would be too high
[11:35:33] <Tom_itx> this is a very simple workable solution
[11:35:43] <ben1066> also will 11-13V work since this charge pump I managed to build on a 555 is really unstable :p
[11:35:53] <keenerd> There are also adjustable capacitive boosters...
[11:36:19] <Tom_itx> there are lots of ways to do it but i don't think you can come under my cost
[11:36:32] <Tom_itx> the danm headers cost more than anything
[11:36:55] <keenerd> So what is your secret? I did not see it in the scrollback :-)
[11:37:06] <Tom_itx> i never really said
[11:37:07] <ben1066> digikey have inductors at 20p
[11:37:20] <ben1066> cent
[11:37:21] <ben1066> even
[11:37:37] <ben1066> however at 1000 unit quantities
[11:37:52] <Tom_itx> this is $1.06 quan 1
[11:38:25] <ben1066> I take it youd buy 100 at time?
[11:38:34] <Tom_itx> you have to
[11:38:40] <Tom_itx> or it's not worth the trouble
[11:38:42] <Tom_itx> ask inflex
[11:39:03] <ben1066> indcutors get a lot cheaper between 100 and 1000
[11:39:19] <ben1066> http://search.digikey.com/us/en/products/SDR1005-152KL/SDR1005-152KLCT-ND/2127182 albeit something like that should be usable
[11:39:20] <Tom_itx> then china comes along and undercuts his stuff
[11:39:30] <Tom_itx> that's why he closed his site down
[11:39:54] <Tom_itx> although i think he's back at it in limited fastion now
[11:39:58] <Tom_itx> fashion
[11:41:39] <ben1066> i can imagian you could build a 5-12V stepup for a few $ at quantity
[11:44:58] <ben1066> webench thinks its possible for $0.98
[11:45:28] <Tom_itx> :)
[11:45:38] <ben1066> http://www.national.com/webench5/power/webench5.cgi?lang_chosen=en_US&VinMin=4.15&VinMax=5.5&O1V=12&O1I=0.03&op_TA=30
[11:45:43] <ben1066> not sure if you can link like that
[11:46:08] <Tom_itx> my flash isn't up to date
[11:46:23] <Tom_itx> flash player
[11:46:34] <ben1066> ill screenshot it
[11:47:05] <abcminiuser> BAM, new LUFA beta is out
[11:47:08] * abcminiuser hides
[11:47:16] <ben1066> http://dl.dropbox.com/u/11197643/stepup.png
[11:47:44] <Tom_itx> abcminiuser just declared open season!
[11:48:09] <Tom_itx> the board cost would be higher
[11:48:20] <Tom_itx> more realestate
[11:48:29] <ben1066> the design is that tight?
[11:49:01] <Tom_itx> the bulk of the board is for connectors
[11:49:21] <ben1066> do hmm
[11:49:34] <ben1066> thats supposedly 182mm2
[11:49:42] <abcminiuser> Tom_itx, the guy that makes the Zeptoprog programmer based on my code uses analog MUX chips to route the signals to a single header
[11:50:09] <Tom_itx> nice
[11:50:19] <ben1066> Now I want to make my own varient :p
[11:50:37] <Tom_itx> how does it know to switch between protocols?
[11:50:47] <ben1066> you can get it under 100mm2 but the cost more than doubles to $2.04
[11:52:51] <ben1066> Tom_itx: what do you use for pcb design?
[11:52:58] <Tom_itx> eagle
[11:54:43] <Tom_itx> the actual board space for mine is ~10 x 13mm but that's just the components not the headers etc
[11:54:54] <Tom_itx> i could have crammed it tighter but meh
[11:55:56] <SianaGearz> eagle <3
[11:55:57] <Tom_itx> .016" trace widths etc
[11:56:21] <ben1066> altium looks nice but expensive D:
[11:56:25] <Tom_itx> .007 would be adequate but not necessary
[11:56:50] <Tom_itx> i think eagle is the cheapest commercial solution you'll find
[11:57:19] <Tom_itx> it doesn't have all the features of high end packages but it works
[11:57:43] <Tom_itx> i wouldn't use it to lay out a motherboard for sure
[11:58:10] <Tom_itx> altium, pads etc
[11:58:33] <SianaGearz> well it's very simple to use, and what do we need for AVR related purposes, it covers...
[11:58:36] <ben1066> yea
[11:58:52] <ben1066> the issue is, as you start to move to high pin count stuff
[11:59:00] <ben1066> big arms, cplds, fpgas
[11:59:07] <ben1066> it starts to become less..convinient
[11:59:14] <SianaGearz> -.-
[11:59:36] <ben1066> _._?
[11:59:40] <ben1066> -.-?*
[12:00:03] <Tom_itx> i notice when people compare circuits alot of times they fail to include board cost
[12:00:10] <SianaGearz> how does kicad fare in those scenarios? when i tried to use it for simpler things, i kind of had an impression it wants to break my fingers. but maybe i simply didn't learn to use it right or so.
[12:00:39] <Tom_itx> gawd i need a shower
[12:00:57] <ben1066> why does doxygen hate me
[12:01:05] <ben1066> I cant find the applications in the docs anymore
[12:10:35] <keenerd> SianaGearz: I use Kicad for my work. It is pretty nice.
[12:13:12] <ben1066> Tom_itx: doesnt avr studio try to update your programmer?
[12:15:09] <abcminiuser> ben1066, I hardcoded it to reject it if it tries
[12:15:44] <ben1066> ah :p
[12:15:49] <ben1066> hmm...i wonder
[12:16:03] * Jan- sniffs at Tom_itx experimentally
[12:16:12] <ben1066> if you mimicked said device....it would be possible to dump the firmware if it tried to update it, no?
[12:16:35] <ben1066> or does it send the firmware across usb encrypted?
[12:16:47] <abcminiuser> ben1066, IIRC it uses basic encryption in the bootloader
[12:16:58] <abcminiuser> So all you'd get is some encrypted garbage
[12:17:09] <ben1066> and its not very easy to dump the bootloader from an avr >_>
[12:17:12] <abcminiuser> Probably not hard to decode, but then you'd need to clone the original HW too
[12:17:30] <ben1066> I was thinking thatd it show you how teh jtag emulation works :p
[12:17:53] <ben1066> so itd be possible to create a clone of it..
[12:19:05] <ben1066> Damn atmel
[12:19:13] <ben1066> changed the location of their datasheets
[12:19:17] <ben1066> so google gives wrong links
[12:22:22] <abcminiuser> Tom_itx, still not dead?
[12:23:45] <Steffanx> "Probably not hard to decode, but then you'd need to clone the original HW too" .. don't the newer AVR tool use AES?
[12:24:02] <Steffanx> Pretty hard to decode
[12:24:17] <Tom_itx> ok, much better
[12:24:55] <abcminiuser> Steffanx, most likely, they use a UC3 chip, probably the secure version to prevent cloning
[12:25:21] <Steffanx> Some chinese where able to clone the jtagice mkii though, so it's not impossible
[12:25:34] <Steffanx> Or they just removed the lockbits using some fancy equipment
[12:26:45] <Jan-> lockbits?
[12:27:12] <Steffanx> Yes, the lockbits from the AVR's inside the dragon/avrisp/jtagicemkii etc
[12:27:27] <Steffanx> To lock the AVR's :)
[12:27:41] <Jan-> what you mean like literally poking at the flash device
[12:27:54] <Jan-> with an electron microscope or something?
[12:27:58] <Steffanx> Yes
[12:28:04] <Jan-> Holy hell :/
[12:28:18] <Jan-> what do these lock bits do
[12:28:19] <ben1066> someone managed to selectively erase a pic
[12:28:35] <ben1066> http://www.bunniestudios.com/blog/?page_id=40
[12:28:36] <Steffanx> I don't think it's impossible to remove the lock bits that way. Jan-
[12:29:07] <Steffanx> Depends on the type of lock bits enabled Jan-, but you can disable reading/writing to flash etc.
[12:29:30] <Jan-> oh so this stops people reading the program code back out of it?
[12:29:38] <Steffanx> Yes
[12:29:41] <Jan-> I see
[12:29:58] <Jan-> solemmegetthisstraight
[12:30:15] <Tom_itx> they basically keep a noob from progressing when he/she sets them
[12:30:20] <Jan-> a chinese clone shop wanted to steal and/or reverse engineer some code on an AVR programmer that actually used an AVR itself.
[12:30:46] <Jan-> So they bought one, stripped the top of the package off with acid, and reached in with a STEM and flipped the protection bits in its flash?
[12:30:51] <Jan-> Without destroying the device.
[12:30:55] <abcminiuser> Jan-, most of Atmel's AVR tools use AVRs in them
[12:31:00] <Steffanx> No, I don't know HOW they did it.. but it's possible Jan-
[12:31:12] <abcminiuser> STK500, STK600, all the JTAGs and whatnot - IIRC only the AVR ONE has something different
[12:31:15] <ben1066> Jan-: http://www.bunniestudios.com/blog/?page_id=40
[12:31:19] <Jan-> all that just to avoid developing their own?
[12:31:24] <Jan-> or was it to get secret data?
[12:31:36] <Steffanx> Or to get the original bootloader
[12:31:51] <Steffanx> To make it fully compatible with the official one
[12:31:54] <Jan-> boot-lo-der?
[12:31:57] <Steffanx> bootloader
[12:32:01] <Jan-> yes
[12:32:04] <Jan-> what's a bootloader?
[12:32:13] <Jan-> What do they do? Can you get them on discount at Sears? Do they come in pink?
[12:32:20] <Jan-> Do they taste good?
[12:32:28] <abcminiuser> Jan-, special program in upper memory that allows you to reprogram the lower portion through a non-standard interface
[12:33:00] <Jan-> ohhh this is how arduino works isn't it
[12:33:05] <Steffanx> Yes
[12:33:11] <Jan-> So er
[12:33:16] <Steffanx> It's uses a uart bootloader afaik
[12:33:21] <Jan-> I have these factory fresh AVRs that presumably have absolutely nothing on them
[12:33:28] <Steffanx> Some have :P
[12:33:29] <Jan-> does that present any special challenges?
[12:33:35] <Steffanx> Most of them don't have anything on them
[12:34:22] <Jan-> sowha... this PIC has metal shields over the security bits
[12:34:31] <Jan-> so not only is someone stripping the package down and looking at it with a microscope
[12:34:40] <Jan-> but ALSO, the manufacturer is deploying countermeasures to that!
[12:35:14] <Jan-> Industrial espionage is pretty fricken advanced :/
[12:35:15] <Steffanx> In China everything is cheap and possible :)
[12:37:34] <Jan-> so, ok
[12:37:44] <Jan-> he's erasing the flash with UV light, just like an old school eprom
[12:37:47] <Jan-> and he's...
[12:37:54] <Jan-> ":a very carefully cut piece of electrical tape that was stuck onto the surface of the die using a steady hand, two tweezers, and a microscope."
[12:37:57] <Jan-> he's insane.
[12:38:11] <Jan-> isn't the die like 0.5 by 0.5 millimeters
[12:38:13] <Steffanx> Why? As long as it works :)
[12:43:46] <ben1066> whats teh avrisp mk2 got inside? avr32?
[12:43:54] <Steffanx> No
[12:43:58] <abcminiuser> Fixed my Greasemonkey to remove the new Atmel site registration page: http://pastebin.com/8RGCFU5s
[12:44:03] <Jan-> The snow is making it hard to get the back door open.
[12:44:04] <ben1066> No? thats hopeful
[12:44:13] <Steffanx> The jtagice mk3 has an AVR32 inside ben1066
[12:44:41] <ben1066> ye, I figured that
[12:44:56] <ben1066> i saw a picture of it :p
[12:45:13] <ben1066> Oops
[12:45:14] <ben1066> not avrisp
[12:45:18] <ben1066> jtagice mk2 :P
[12:45:26] <ben1066> avrisp mk2 has an atmega128
[12:45:29] <ben1066> and some usb ic
[12:45:33] <Steffanx> Yes
[12:46:28] <Steffanx> afaik the jtagice mkii has two atmega128's inside
[12:46:29] <Steffanx> it
[12:47:11] <ben1066> Explains the two firmware images
[12:47:46] <ben1066> appears to have a master and a slave device
[12:50:32] <Jan-> by the way I love the names
[12:50:35] <Jan-> mega, tiny
[12:50:35] <Jan-> hehe
[12:50:41] <ben1066> and the firmware images appear to be indeed encrypted garbaeg
[12:52:03] <Tom_itx> a friend told me they don't try to prevent theft rather make a new encryption method every 6 mo to prevent it. it takes about that long to decipher
[12:52:30] <Tom_itx> for what they do anyway
[12:52:43] <ben1066> crafty :P
[12:53:13] <Tom_itx> add circuitry that has nothing to do with the end product etc
[12:53:59] <Jan-> what exactly are they trying to prevent people stealing?
[12:54:11] <Tom_itx> or must be operable for the main loop to execute
[12:54:49] <abcminiuser> I wonder if I'll get a word from marketing about bypassing the reg pages
[12:55:12] <Tom_itx> should i send a note to tech support to help the process along?
[12:55:19] <Jan-> you can bypass thos? on atmel.com?
[12:55:38] <abcminiuser> Jan http://pastebin.com/8RGCFU5s
[12:55:47] <Jan-> oh also abcminiuser would your employers care at all if their website could easily be made more accessible for people using a screenreader
[12:55:50] <abcminiuser> It's pretty simple for now
[12:56:04] <ben1066> hmm, avrfwupgrade is seperated from the rest of the idea
[12:56:06] <ben1066> ide*
[12:56:10] <Tom_itx> it's not the first time it's been done
[12:56:11] * Tom_itx leaves it at that
[12:56:20] <abcminiuser> Jan-, I seriously doubt it, I hate the new site with a passion but it's HQ corp that comissioned it
[12:56:28] <Jan-> abcminiuser what is that code
[12:56:44] <ben1066> abcminiuser: how about making the old links work again, every link to atmel.com says page not found
[12:56:47] <ben1066> >_>
[12:56:48] <Tom_itx> ok 315M looks better than 40.. let's try this again
[12:56:48] <abcminiuser> Jan-, Greasemonkey script for Firefox/Chrome to bypass the atmel reg page
[12:56:54] <Jan-> oh greasemonkey
[12:57:01] <Jan-> I never got into that
[12:58:31] <Jan-> I use chrome, anyway
[12:58:35] <Tom_itx> abcminiuser, does it prompt to add new / replace 5.0?
[12:58:36] <Jan-> I like the shortcut search engines thing
[12:59:45] <abcminiuser> Tom_itx, it installs along side
[12:59:54] <abcminiuser> Have to remove 5.0 if you don't want it anymore
[12:59:55] <Tom_itx> so i see
[13:00:11] <Tom_itx> check back tomorrow when it finishes...
[13:04:36] <Tom_itx> i swear the progress bar just went backwards
[13:05:40] <ben1066> hmm
[13:05:46] <Jan-> what're you waiting for?
[13:05:48] <ben1066> I think the firmware may be decoded by the pc
[13:07:50] <atmega> "i swear the progress bar just went backwards" :D the best what I have heared today
[13:08:07] <ben1066> atmega: is there a person called attiny? :P
[13:09:09] <atmega> no, I use a much atmega
[13:10:34] <atmega> and I have never buy a attiny ...
[13:10:47] <ben1066> D:
[13:10:48] <ben1066> never?
[13:12:10] <ben1066> I really need an oscillosopce
[13:12:18] <SianaGearz> doesn't mean that there isn't a person who says "hello, my name is attiny. i have 10000000 attiny and i don't need any of your atmega, because i just throw more attiny at it"
[13:15:17] <specing_> I think atmega should get a better nick
[13:15:28] <atmega> okay, until now I never need one
[13:21:39] <ben1066> does the stk600 do jtag?
[13:21:43] <ben1066> or just isp?
[13:21:53] <grummund> it does it all
[13:22:19] <ben1066> I assume it has headers as well as the routing card?
[13:22:25] <grummund> yep
[13:22:35] <abcminiuser> Anyone here have a real AVRISP MKII?
[13:22:52] <ben1066> cause the stk600 costs £7 more than the jtagice
[13:22:54] <ben1066> abcminiuser: I do
[13:23:02] <abcminiuser> ben1066, can you do something quick?
[13:23:10] <ben1066> abcminiuser: sure
[13:23:14] <abcminiuser> I need the serial number on the bottom for a quick test, PM it to me
[13:25:42] <dirty_d> hmm you guys see anything wrong with what im trying to do?
[13:25:45] <dirty_d> sensor_data[0] = (h << 8) | l;
[13:26:07] <grummund> atmel don't have real programmers in the lab? :-O
[13:26:12] <dirty_d> h and l are the low and high bytes of a 16 bit 2's compliment number
[13:27:17] <grummund> what are the variable types?
[13:28:08] <dirty_d> char for the h and l
[13:28:11] <dirty_d> short for sensor_data
[13:28:20] <dirty_d> ((char *)sensor_data)[0] = l; ((char *)sensor_data)[1] = h;
[13:28:22] <dirty_d> that works fine
[13:28:39] <dirty_d> but whats wrong with bitshift way?
[13:29:00] <dirty_d> oh wait
[13:29:11] <dirty_d> i think i need to cast before i shift
[13:30:25] <dirty_d> nope
[13:31:57] <grummund> use unsigned types
[13:32:06] <grummund> uint16_t and uint8_t
[13:32:22] <grummund> problem is char is signed
[13:33:30] <dirty_d> yea that works
[14:29:46] <ben1066> do you get COB avrs?
[15:17:20] * Tom_itx waits
[15:24:43] <OndraSter> how can anybody buy laptop with 15.6" and 1366x768 :(
[15:24:48] <OndraSter> my eyes would bleed out
[15:27:54] <abcminiuser> Mine already do on 1080p
[15:28:10] <OndraSter> 1080p = biggest ripoff ever
[15:28:15] <OndraSter> my primary LCD is 1920x1200
[15:28:30] <OndraSter> too bad that the only x1200 are now expensive (poor student here), so my second LCD is 1080p only :(
[15:29:47] <OndraSter> yay, my tablet runs better with XP drivers than Vista drivers in W7
[15:29:54] <OndraSter> and hopefuly even sleep might now work! lol
[15:29:54] <ben1066> I have 2x1280x1024
[15:29:55] <ben1066> didnt pay for either
[15:30:53] <OndraSter> yes, sleep works!
[15:30:58] <OndraSter> but it has borked rotation :P
[15:31:05] <ben1066> now install windows 8
[15:31:09] <OndraSter> hah impossible
[15:31:11] <OndraSter> well possible
[15:31:11] <OndraSter> BUT
[15:31:14] <ben1066> no...
[15:31:15] <OndraSter> the GPU can't handle Aero
[15:31:16] <ben1066> not impossible...
[15:31:21] <OndraSter> so the screen flickers
[15:31:30] <ben1066> win 8 has software aero
[15:31:38] <OndraSter> still it flickers
[15:31:38] <OndraSter> I tried disabling as much as possible
[15:31:44] <OndraSter> 32MB RAM for GPU for 1400x1050 screen :(
[15:31:52] <OndraSter> Toshiba just couldn't pay extra $2 for 64MB VRAM
[15:32:01] <OndraSter> Aero runs fine even with transparency
[15:32:11] <OndraSter> as long as you have 2 windows opened tops :P
[15:32:32] <OndraSter> but W8 starts to flicker immediatily so changing anything = pain
[15:32:32] <ben1066> ah lol
[15:32:32] <OndraSter> I run without Aero W7 just fine
[15:32:32] <OndraSter> <3
[15:32:38] <OndraSter> Android can kiss my bottom :)
[15:34:43] <OndraSter> hopefuly rotation fixed... a bit of changing in registry
[15:34:48] <OndraSter> supposedly
[15:34:48] <OndraSter> http://www.tabletpcbuzz.com/showthread.php?36590-M200-Windows-7-Drivers-amp-Issues
[15:34:59] <OndraSter> and why am I talking in this channel when I want to talk in diff channel
[15:37:06] <OndraSter> yap, rotation works
[15:37:13] <OndraSter> NFSU2 plays good too
[15:37:27] <OndraSter> sleep too
[15:37:29] <OndraSter> I am satisfied
[15:37:39] <OndraSter> SSD won't wear out now so fast with sleep rather hibernation
[15:39:38] <rue_mohr> the hosting bastards charged me $36 and auto renewed ruemohr.org DAMN
[15:39:51] <rue_mohr> I AM canceling that next year
[15:40:24] <OndraSter> haha
[15:40:32] <OndraSter> I have the exact opposite
[15:40:41] <OndraSter> they send me money request
[15:40:42] <OndraSter> for another year
[15:40:46] <OndraSter> but I won't pay probably
[15:40:48] <OndraSter> and they will close it down
[15:41:34] <rue_mohr> and I think my oxygen tank rental went from $40/mo to $107/mo
[15:41:44] <ben1066> oxygen tank?
[15:41:47] <rue_mohr> in which case I go throw it back thru their window
[15:41:50] <rue_mohr> for welding
[15:41:53] <ben1066> ah
[17:01:34] <Sgt_Lemming> brb
[17:24:02] <Tom_itx> ben1066 you around?
[17:42:31] <Jan-> ah, rue_mohr
[17:42:35] <Jan-> oh no wait that was ages ago
[18:05:54] <CanyonMan> but i obtained one on the sly
[18:05:59] <CanyonMan> so I figured I'd make use of it.
[18:21:51] <Jan-> Phil has now gone from Building My AVR Dev Board duty to Snoring On The Couch duty
[18:21:54] * Jan- *grrrr*
[18:23:46] <CanyonMan> there's only one thing left to do.
[18:23:53] <CanyonMan> Hand in the warm bucket of water.
[18:24:28] <CanyonMan> It's your only option.
[18:24:31] <CanyonMan> We're all counting on you.
[18:24:49] <Jan-> I think I'll revert to the "swift kick" option
[18:27:05] <Jan-> he now says he's going to bed
[18:27:06] <Jan-> BWAAA
[18:27:20] <Jan-> I was hoping to get further than this :(
[18:34:31] <Jan-> who decided that # means "pounds"
[18:34:37] <Jan-> so people write "I weigh 108#"
[18:34:56] <CanyonMan> wow, 108 octothorpes
[18:35:48] <CanyonMan> I don't know, but they also decided that the abbreviation for ounces is z. I think we have the food service industry to blame.
[21:27:17] <Kevin`> CanyonMan: you can use the spi port for both isp and perhipherals if your perhipherals have cs
[21:27:30] <CanyonMan> woah
[21:27:38] <CanyonMan> how long ago was that from :D
[21:28:01] <Kevin`> only a few lines ;p
[21:28:04] <CanyonMan> yeah. I know. In fact I'm planning on using the ISP port for my anemometer
[21:28:23] <Kevin`> you can also of course use it for multiple perhipherals
[21:28:25] <CanyonMan> really though in this case it's just a matter of how sparkfun decided to wire it
[21:28:47] <CanyonMan> I replaced all their stupid delays with an inline function that does 10 NOPs hehe
[21:29:06] <CanyonMan> that meets the pressure sensor's specs and it finally works reliably
[21:29:35] <Kevin`> avr-libc's _delay_* functions are actually rather nice
[21:30:02] <CanyonMan> yeah i could have used that too
[21:30:19] <CanyonMan> Really was looking for 1 uS
[21:30:35] <CanyonMan> I don't know what the overhead of making a real function call would have been but 1 uS is only 10 instructions
[21:31:00] <CanyonMan> actually, is it?
[21:31:24] <CanyonMan> I don't actually know what the instruction rate is
[21:32:20] <CanyonMan> Is it single cycle at 10 MHz ?
[21:32:49] <CanyonMan> yep
[21:33:29] <CanyonMan> I wrote logic to talk to this anemometer in an fpga already
[21:33:48] <CanyonMan> there's debounce activities, and there's a transition between pulse width counting and pulse counting depending on the speed
[21:33:52] <CanyonMan> it should be fun
[22:16:37] <CapnKernel> SianaGearz: I use KiCad, so do a lot of my friends. Some aspects are terrible, but the good things outweigh the terrible.
[22:16:57] <CapnKernel> SianaGearz: If you want to talk about KiCad, head over to #kicad
[22:17:47] <SianaGearz> ok <3
[22:18:17] <CapnKernel> It's not Altium, but it's definitely in the league of Eagle.
[22:18:31] <CapnKernel> (And someone recently made an Eagle to KiCad converter...)
[22:18:42] <SianaGearz> ooooh shiiiiny!
[22:19:01] <CapnKernel> (Back later, just popping out to the world's largest electronics market...)
[22:19:09] <Tom_itx> what about vise versa?
[22:19:45] <jadew> I love AVR's so much fun
[22:20:46] <Casper> yeah, automatic voltage regulator are fun
[22:20:49] * Casper hides
[22:21:05] <jadew> haha, I found those too while searching for the meaning of AVR
[22:21:35] <Casper> avr is meaningless it seems
[22:23:59] <jadew> any idea if there's an easier way to calibrate the internal oscilator from USART than sending a brust of known data and trying to get it right?
[22:24:25] <Casper> yes, use an external crystal
[22:24:28] <jadew> I'm missing some comma's, sorry
[22:24:38] <jadew> commas
[22:24:44] <Casper> you shouln't use the internal RC for uart
[22:24:56] <jadew> yeah, the external crystal doesn't give good results all the time either
[22:25:15] <jadew> my calibration routine does tho, on all baud rates
[22:25:30] <jadew> but I was hoping to simplify it, to reduce the size
[22:26:44] <jadew> the fact that I had problems with an external crystal and the PC (couldn't get data over 40-50kbps)
[22:26:52] <CapnKernel> jadew: This might be what you want but...
[22:27:08] <CapnKernel> There's a project/library called V-USB that lets the AVR do USB1.1 in software
[22:27:16] <Casper> jadew: use proper crystal speed and ALL uart speed will work
[22:27:32] <Casper> like 18.431MHz (iirc)
[22:27:35] <CapnKernel> You can do it on the ATtiny45/85, using the internal RC oscillator. (That tiny also has a PLL)
[22:27:39] <jadew> made me realize I can't rely on a crystal driven avr and an internal clock avr to comunicate reliably (I can't have an external crystal on the other one)
[22:27:58] <CapnKernel> There's code for the ATtiny85 that listens to the USB data from the PC, and calibrates the RC off that.
[22:28:11] <jadew> CapnKernel, I know
[22:28:21] <CapnKernel> So you could work out the constant for that.
[22:28:23] <jadew> but I'm calibrating off of a serial bus
[22:28:25] <Casper> and you do not need a known data to calibrate the RC
[22:28:36] <Casper> you just need to mesure a single bit
[22:28:55] <CapnKernel> Also, the AVR has an internal temperature sensor, so you could adust the RC oscillator accordingly, as the temperature varies
[22:29:03] <jadew> hmm, would that be possible with a PCINT?
[22:29:59] <Casper> even possible 100% software...
[22:30:41] <jadew> I didn't look into timing stuff
[22:32:26] <CapnKernel> Tom_itx: Can you receive IRC PMs?
[22:33:46] <jadew> I currently calibrate the master AVR. the way I do it is set a pin to high, the slave AVR knows it's calibration time, so it sends out 0x55 until the pin goes low. durring this time the master compares what it gets from USART with 0x55 while changing the OSCCAL value and computing min/max values that work. when it's done it just uses the average between the two.
[22:34:00] <jadew> since you say I can measure one bit, it means I'm overdoing it
[22:35:00] <jadew> so how would I measure one bit and figure out the OSCCAL value?
[22:35:30] <CapnKernel> jadew: nice
[22:35:39] <CapnKernel> Ok I'm off.
[22:35:45] <jadew> night