#avr | Logs for 2013-03-10

Back
[00:07:56] <creep> haha yea carbonized a toast in about 15 mins
[03:53:38] <creep> ok now i have to figure out another control method for my IR oven, temperature control has not much to do with this :)
[03:54:17] <creep> i should be able to control IR exposure, and IR power
[03:55:01] <creep> and temperature too
[05:14:19] <volbus> hello everybody
[05:15:05] <volbus> I'm new with linux, can anyone help me getting started with the avr 8-bit gnu toolchain?
[05:28:41] <Horologium> volbus, what flavor of linux do you use?
[05:30:26] <volbus> the great OpenSuse 12.2
[05:30:41] <volbus> I'm new to it - lovely thing!!
[05:31:01] <Horologium> same here,,both ways...
[05:31:13] <Horologium> just searching for the avr toolchain now.
[05:31:53] <volbus> and I downloaded the 8-bit avr GNU-toolchain from atmel, but I don' know how to use it...
[05:32:21] <volbus> it seems compicated, I want to write assembler programs
[05:34:33] <Horologium> then you don't need the full gnu toolchain.
[05:34:37] <Horologium> just the assembler.
[05:35:28] <volbus> and how do I use it?
[05:36:09] <Horologium> have you done anything with avr in the past?
[05:37:25] <volbus> a lot of work in AVRStudio, on windows
[05:37:48] <volbus> but nothing with single assemblers etc
[05:38:29] <Horologium> guessing you are very new to linux too?
[05:38:59] <volbus> one week old!
[05:39:27] <volbus> and decided never to leave it! I hate windows and microsoft...
[05:40:51] <Horologium> you are going to be working at the command line for AVR then.
[05:41:00] <Horologium> unless you like eclipse
[05:42:22] <volbus> what is eclipse?
[05:43:09] <Horologium> it is a general programming IDE
[05:46:01] <Horologium> I'm still trying to figure out how to get yast to see the avr toolchain.
[05:48:25] <volbus> is there no GUI interface for the AVRISP programmer? ...to more easely read/write the lockbits and everything...
[05:50:05] <kdehl> Um. Newbie question here, so Flash ROM is where I put my program, the EEPROM can be used to store values by the program during runtime, and SRAM is... well.. RAM. Ís this correct?
[05:50:49] <volbus> yeap!
[05:51:16] <kdehl> Awesome.
[05:51:32] <volbus> you can also store constants in flash, whatever you want
[05:52:08] <kdehl> Ah. But not change them during run-time?
[05:52:22] <OndraSter__> no
[05:52:30] <volbus> some uC can write the flash
[05:52:42] <OndraSter__> all megas/tinies/.. can
[05:52:44] <OndraSter__> but by pages only
[05:52:59] <volbus> the same way works self-programming
[05:53:01] <Horologium> volbus, you use avrdude...command line program.
[05:53:02] <OndraSter__> plus you can do it from bootloader only
[05:53:21] <kdehl> Um. Okay. Which kinda blurs the difference between the two types.
[05:53:24] <kdehl> Oh, I see.
[05:53:47] <kdehl> Alright.
[05:53:50] <volbus> it seems so..., but I'm a little scared of all the options you have to write in the command line
[05:54:17] <Horologium> flash is for program space...you can store constants in flash as well.....eeprom is for semi-volatile storage,,things you want to keep when power is turned off but not necessarily change constantly...
[05:54:39] <Horologium> volbus, you are using linux now...command line is your new life on some things.
[05:54:45] <volbus> somebody just explaind me how to use avrdude, it seems a little complicated...
[05:54:50] <Xorm> eeprom has a limited number of writes before it wears out
[05:55:06] <kdehl> Horologium: Right. Okay.
[05:55:09] <Horologium> Xorm, yeah, but 100000 writes is pretty good for most stuff.
[05:55:11] <volbus> I've seen that! And I have no problem with it- I like it!
[05:55:14] <Xorm> indeed
[05:55:38] <Xorm> but, right, you don't want to write to the same address 20 times a second
[05:56:23] <volbus> Xorm, eeprom is no sram, you don't write it so often
[05:56:31] <Horologium> like, I use eeprom for storing basic programs when I have a basic interpreter on the chip...
[05:56:52] <Xorm> 'avr fuse calculator'
[05:57:18] <Xorm> http://www.engbedded.com/fusecalc/
[05:57:42] <Xorm> is useful for generating fuse bytes
[06:04:04] <volbus> if I have the .asm with the .h files for a project written in AVRStudio, can I compile and assemble the project to obtain the .hex file with avr-gcc?
[06:04:17] <Horologium> volbus, found out how to install full avr toolchain for opensuse...
[06:04:21] <Horologium> you have to add the repository.
[06:04:50] <Horologium> volbus, you would use avr-as most likely....avr-gcc is for compiling C programs
[06:05:03] <volbus> right!
[06:05:04] <Horologium> although, avr-gcc could do it I suppose..
[06:05:08] <volbus> and how?
[06:05:19] <Horologium> how to which? install toolchain?
[06:05:22] <theBear> gcc is for c, it aint gonna do asm
[06:05:40] <theBear> they all part of the same compiler/build, but gcc means c
[06:05:57] <volbus> no, obtain the hex file from the .asm and .h files
[06:06:27] <volbus> ok, one more thing cleard...
[06:08:18] <volbus> is there a good tutorial for writing programs for avr-as? in assembler
[06:08:44] <Horologium> I thought you already knew avr assembler
[06:08:50] <Horologium> err...avr assembly
[06:09:19] <theBear> unless you got special reasons it usually makes sense to program in c and just inline asm for critical bits
[06:09:48] <volbus> I know the assembly language for avrstudio, now I've heard the gnu-assembly is a little different
[06:09:50] <Horologium> http://www.avr-asm-tutorial.net/avr_en/
[06:10:17] <theBear> the language should be the same, there might be something minor about headers or something
[06:10:23] <Horologium> that doesn't use the gnu toolchain but a different assembler that is available for both linux and windows.
[06:10:31] <volbus> I'm a little master in assembler for avr, while not so good with c
[06:10:48] <theBear> heh, unusual, but if yer a master go with that i spose :)
[06:11:34] <volbus> in assembler you can really do wonders..., not so much control in c - so far I know
[06:12:05] <theBear> nah not so much, just that most stuff isn't timing/cpu time critical so it's not an issue, and the stuff that is you can do little functions/segments in asm anyway
[06:12:40] <theBear> you can still do wonders, and you can mess around with looking at compiled c->asm and different optimizations and approaches and get a much better idea what is gonna happen with given codde
[06:12:43] <theBear> code
[06:13:56] <creep> how would you conrol infrared power in IR oven ?
[06:14:01] <volbus> however, I think the interrupt-handle cannot be handled so good in C
[06:15:35] <theBear> power i'd control linear or pwm, and for an oven thing profiles are probly fine... but if i was making an ir soldering station i'd have to go a combination of power and temp feedback
[06:15:52] <theBear> interrupt handling is easy in c, you have been misled
[06:16:22] <volbus> might be, I've never tried C out
[06:16:31] <creep> theBear<< ok, but i'd like to control IR power not power to the lamp
[06:16:44] <volbus> I trust the "clean" assembly code :)
[06:16:56] <theBear> creep, then you gotta workout a conversion from lamp power <> ir power, should be in the datasheet
[06:17:12] <Horologium> ok...waaay too early in the morning...how do I see what chips are supported in avr-gcc version I have?
[06:17:34] <theBear> errrrr, i think it should be in a system header file somewhere, but it's been a LONG time
[06:17:47] <Horologium> creep, controlling power to the lamp IS how you control the IR power...
[06:17:56] <theBear> MAYBE -march help
[06:18:01] <Horologium> theBear, yeah....I thought there was an avr-gcc command line option.
[06:18:04] <Horologium> will try that.
[06:18:18] <theBear> if theres a commandline and that aint it man gcc should tell you
[06:19:07] <Horologium> have you ever looked through the manpage?!?!
[06:19:07] <Horologium> hehe
[06:19:20] <theBear> yeah, i use this crazy new thing called plaintext search :)
[06:20:03] <theBear> they just invented it, like, 40 years ago <cheekygrin>
[06:20:19] <creep> Horologium<< but it is nonlinear, and the line voltage varies, temperature varies, efficiency varies
[06:20:37] <theBear> you sure it is nonlinear ? you looked it up ? what kinda emitter you using ?
[06:21:00] <theBear> and line voltage shouldn't be an issue, and temperature/efficiency can be accounted by measuring current not voltage
[06:21:04] <theBear> or both
[06:21:40] <creep> theBear<< yes i am sure
[06:21:48] <Horologium> then measure your temperature and use a PID controller to control it.
[06:21:51] <theBear> so what emitter you using ?
[06:21:52] <creep> i am using a nonbranded chinese IR lamp
[06:21:57] <theBear> define lamp
[06:22:35] <creep> i think it is made from opal quartz tube, nickel plated heating wire inside
[06:22:42] <theBear> so incandescant ?
[06:22:48] <creep> no
[06:22:59] <creep> i have defined it right now
[06:23:11] <creep> it is made from opal quartz tube, nickel plated heating wire inside <<<
[06:23:26] <creep> IR heater lamp
[06:28:21] <kdehl> Wait, are the general-purpose registers part of RAM space?!
[06:28:27] <Horologium> kdehl, yes.
[06:28:37] <kdehl> Oh.
[06:28:40] <kdehl> That's kinda cool.
[06:28:42] <Horologium> all registers are part of ram space.
[06:28:44] <kdehl> But different.
[06:28:49] <kdehl> I see.
[06:28:54] <Horologium> so, commands that can access ram can also access registers.
[06:29:02] <kdehl> Well, it makes sense in a simple architecture, I guess.
[06:29:03] <Horologium> but there are some commands that can only access registers.
[06:29:04] <kdehl> Yeah.
[06:29:31] <kdehl> Okay.
[06:32:15] <Horologium> theBear, found it.... --target-help
[06:54:20] <volbus> help! - about the avr gnu-toolchain
[06:55:09] <volbus> in the extraction dir I have the directories "avr" and "bin"
[06:55:35] <volbus> the bin dir contains: avr-as, avr-ar etc
[06:56:13] <volbus> the avr dir contains also a bin dir, witch contains: as, ar etc
[06:56:34] <volbus> what is the difference detween "avr-as" and "as"?
[06:57:02] <volbus> witch one do I use?
[07:03:43] <OndraSter> volbus, WinAVR?
[07:03:59] <OndraSter> or the one from atmel's website?
[07:04:02] <OndraSter> and windows or linux?
[07:05:01] <volbus> no, the gnu-toolchain for linux
[07:05:28] <volbus> from the atmel's website
[07:06:56] <theBear> i think you'll find the bin links to the /avr/bin, this allow multiple versions to 'happily' coexist
[07:07:10] <OndraSter> why not apt-get install avr-gcc avrlibc?
[07:07:13] <theBear> try err, ls -la /usr/bin/avr-gcc-blah/bin for example
[07:09:34] <volbus> they appear in boath locations, also, in ../bin - avr-as, avr-ar etc
[07:09:51] <volbus> and in ../avr/bin/ - as, ar etc
[07:10:14] <theBear> ls -la ?
[07:10:24] <volbus> and the files have the same size (as and avr-as, ar and avr-ar etc
[07:11:16] <theBear> if there are two copies, i'd have to say the atmel toolchain is stupid, but links are very likely
[07:11:18] <volbus> ls -la: the same output, just more detailed, with permissions and all
[07:11:56] <OndraSter> why not apt-get install avr-gcc avrlibc?
[07:12:07] <OndraSter> similar for gentoo and emerge
[07:12:11] <theBear> i have to say, that question makes a lot of sense
[07:12:27] <volbus> 'cause I read it doesn't get the latest version with updates, bug-fixes etc
[07:12:33] <OndraSter> well
[07:12:36] <OndraSter> what distribution?
[07:12:39] <theBear> that changes from day to day
[07:12:43] <theBear> opensuse
[07:12:44] <volbus> opensuse 12.2
[07:12:51] <OndraSter> hmm can't say there
[07:12:56] <OndraSter> I am used to gentoo and/or debian only
[07:12:59] <OndraSter> if I have to use looniks
[07:13:05] <theBear> me too, what does opensuse use for packaging stuff ?
[07:13:20] <creep> nah, fixed a PT100 RTD to a blackbody
[07:13:25] <volbus> ehhh.., yaST
[07:13:25] <OndraSter> yummi
[07:13:27] <creep> am i in game?
[07:13:27] <OndraSter> oh
[07:13:56] <theBear> you don't have a blackbody
[07:14:01] <creep> yes i do
[07:14:03] <OndraSter> racists! :D
[07:14:04] <OndraSter> jk
[07:14:16] <creep> curing thte matte black high temperature paint right now
[07:14:32] <theBear> batte black paint isn't a blackbody
[07:14:34] <theBear> matte
[07:14:52] <creep> hm, assuming it is more black then cookies- usually
[07:15:02] <theBear> that doesn't make it a blackbody
[07:15:13] <theBear> maybe close, but not the same
[07:15:34] <theBear> and if by fixed you mean anything other than clamped, well even if you mean clamped, it's not that close
[07:15:37] <creep> my point was if it heats up more from the IR
[07:15:38] <creep> ...
[07:16:06] <theBear> it's still attached to a 'heatsink'
[07:16:13] <creep> sure
[07:16:25] <creep> i picked a thin sheet of copper
[07:17:05] <theBear> you painted all surfaces ?
[07:17:21] <theBear> even then it doesn't work... paint doesn't behave like theoretical black metal
[07:17:23] <creep> no, only this sensor plate
[07:17:38] <kdehl> How about those ATtiny that claim to have no RAM? Do they still have the 32 general-purpose registers? If so, it kinda' has 32 bytes of RAM, still..
[07:17:49] <creep> the inside walls work like a mirror
[07:17:51] <OndraSter> they have got only 16 regs
[07:17:56] <OndraSter> iirc
[07:18:04] <MrMobius> kdehl, not really
[07:18:06] <OndraSter> what tinies are those? I thought they have all been EOLed already
[07:18:11] <OndraSter> also no
[07:18:14] <OndraSter> you can not use it for stack
[07:18:16] <OndraSter> which is not there at all
[07:18:20] <kdehl> MrMobius: But they have a few registers?
[07:18:21] <kdehl> Ah.
[07:18:23] <kdehl> Oh my.
[07:18:29] <kdehl> A challenge to code, indeed.
[07:18:32] <OndraSter> ;)
[07:18:47] <OndraSter> what tinies are those?
[07:18:48] <creep> theBear i would like to measure something more related to the cookie temperature to be able to regulate the process
[07:18:52] <MrMobius> ram and registers are fundamentall different
[07:19:01] <theBear> what cookie ? you aren't talking sense\
[07:19:08] <kdehl> But it does have a few registers, and that's all you have to deal with in those. And a few bytes of EEPROM.
[07:19:14] <kdehl> Is that true?
[07:19:20] <OndraSter> check datasheet
[07:19:23] <creep> theBear<< i am baking food in this
[07:19:46] <theBear> cookies have very high thermal resistance
[07:19:50] <theBear> copper does not
[07:20:11] <creep> sure, that is not my point
[07:20:15] <kdehl> ATtiny15: 1kb of Flash, 0 bytes of RAM, 64 bytes of EEPROM. It's a really cute chip.
[07:21:01] <creep> theBear<< did a test run, but my sensor close to the side of the chamber wall at the bottom was only like 60C after 5 minutes, and the toast was already done...
[07:21:32] <creep> copper reflected nearly all IR
[07:21:41] <theBear> well obviously, it's shiny
[07:22:04] <OndraSter> kdehl, attiny15 has been long time ago EOLed
[07:22:10] <OndraSter> you can get attiny13 or 85
[07:22:10] <theBear> but cookies start light in colour, and get darker... you're doing it wrong, you need to use empirical evidence, and ir isn't a good way to cook cookies anyway
[07:22:26] <OndraSter> both 13a and 85 are super cheap
[07:22:33] <creep> i can get away with that with fine tuning, using less, and more time
[07:22:36] <OndraSter> like 0.5€/0.6€ in volumes
[07:22:38] <OndraSter> (100pcs)
[07:22:49] <kdehl> OndraSter: Ah. Yeah, I did get an '85. But still, I'm fascinated by the fact that people program chips that have _no_ RAM. Heh.
[07:22:59] <OndraSter> looong time ago
[07:23:04] <theBear> all cpus have no ram
[07:23:10] <creep> theBear<< but you're right :) i made a carbonized toast in about 15 minutes
[07:23:10] <theBear> and that isn't so long ago
[07:23:23] <OndraSter> theBear, CPU != MCU
[07:23:27] <theBear> finally that statement makes some sense
[07:23:32] <theBear> OndraSter, obviously, thus my statement
[07:23:33] <creep> best part is, the silicone and teflon plate under it is fine
[07:24:22] <creep> the toast turning black was heated much more than anything else
[07:24:34] <theBear> only the surface of it tho, the insides were probly raw
[07:24:38] <creep> no
[07:24:40] <theBear> ir isn't good for food
[07:24:44] <creep> it penetrated a few cms
[07:24:56] <theBear> wtf ? how thick is your toast ?
[07:25:04] <creep> it was like 5cms
[07:25:07] <creep> for test
[07:25:33] <creep> and obviously, i need to take down the IR power :)
[07:25:48] <Malinuss> kdehl, nothing stoppes one from getting external sram though... both for a mcu with no ram, or a "bare-cpu"
[07:33:08] <creep> theBear<< IR is the best thing for cooking anyway
[07:33:42] <creep> it is because it penetrates the food and causes more internal heating
[07:34:21] <creep> this way heating done more evenly
[07:35:08] <creep> when you use a "halogen lamp" type heater you will not get this performance
[07:36:30] <theBear> of course not, but if you use ambient heat like any traditional oven, you get even better heating, maybe not more efficient, but better and more even and penetrating
[07:36:59] <creep> conventional heating works from the outside by means of heat conduction
[07:37:45] <creep> i have cooked a whole potato fast to demonstrate this, the outside was crispy, the inside was raw
[07:37:50] <theBear> and convection thru any holes, ir only works thru places light can penetrate
[07:37:55] <creep> heated in hot oil
[07:39:35] <creep> loafs and cookies can be penetrated by IR radiation, unlike PCBs with a ground plane
[07:39:46] <creep> metals reflect IR
[07:39:56] <theBear> so does white cookie dough
[07:40:17] <creep> what you call white can absorb IR radiation
[07:40:33] <theBear> this is all conventional knowledge .. there is nothing that needs proof through experiementing
[07:40:48] <theBear> it can absorb some of it, not all of it
[07:41:37] <creep> i will measure it after the loaf is done :)
[07:42:01] <creep> ( the absorbed IR radiation of course )
[07:42:37] <creep> i like it with a bit of butter
[07:50:25] <Horologium> volbus, there's a better way.
[07:51:06] <Horologium> add the repository to suse and install it in yast.
[07:52:26] <Horologium> using the one from atmel in linux is kind of a pain if you are not real familiar with linux.
[07:52:56] <theBear> any non-packaging-system-based install is less than ideal in a given linux distro
[07:52:58] <Horologium> because you have to do the "install" manually by adding the bin directory to your path and adding some kind of avr home variable.
[07:53:18] <Horologium> whereas the opensuse repository has a decently current version.
[07:53:28] <creep> theBear<< tried an 1n4148 if it senses IR, but it rather reacts to temperature
[07:53:54] <Horologium> creep, why not an IR photodiode or phototransistor?
[07:54:00] <theBear> well obviously, it's about as non-transparent as you can get
[07:54:13] <creep> maybe :(
[07:54:30] <creep> but i tested them with a strobe light, you can use it for phototriggering
[07:54:57] <theBear> why do you do these things ? they are so very backwards !
[07:55:18] <creep> what? the 4148 lightflash sensing?
[07:55:29] <theBear> for example, yes
[07:55:51] <creep> how is it worse than anything else?
[07:55:59] <Horologium> or,,,an old webcam...pull the IR filter..
[07:56:18] <theBear> other things don't have 1mm or so of light and temperature insulating material between the junction and the thing they are trying to sense, for example
[07:56:45] <theBear> how can you possibly not see that as a disadvantage ?
[07:57:04] <creep> theBear<< since when my glass packaged 1n4148 is light insulating ?
[07:57:14] <creep> it has transparent glass encapsulation
[07:57:38] <creep> this is why i tried it with light
[07:57:45] <Horologium> or, what about a PIR sensor?
[07:57:49] <theBear> oh, 4148... good point, it's still far from ideal, it's a slowish diode, and that glass isn't designed to transmit light, OR ir
[07:58:12] <creep> theBear<< yeah possible it will just absorb IR
[07:58:14] <theBear> glass is about 10% trasmittive for ir
[07:58:47] <theBear> if that
[07:58:48] <Horologium> rip your TV apart and get the IR remote receiver unit...from that rip out ye olde IR phototransistor.
[07:58:48] <creep> no matter was just a test
[07:59:08] <theBear> feel free to waste your time testing, or just use existing knowledge and build on that
[07:59:24] <creep> theBear<< wasted 5 mins for that
[07:59:36] <theBear> yeah, and you been talking about burnt toast for almost 24hours
[07:59:41] <theBear> i'm havin me a shower
[07:59:47] <creep> haha
[08:00:21] <creep> well i did a few toasts with it those were fine.
[08:00:58] <creep> but control needs development, i'm on it, paint is cured i think
[08:01:42] <creep> 20 min @ 150C
[08:13:28] <creep> theBear<< relax, i was not working on this for countless hours ^^
[09:26:16] <volbus> need help! it seems that avr-as dosn't know the ".def"- assembler directive, how do I define things in assembler?
[09:27:15] <volbus> I mean regs
[09:27:18] <Malinuss> volbus, in general, everything you need to know about avr-asm is in here: http://www.avrbeginners.net/
[09:28:25] <Malinuss> volbus, that question is kinda saying "I don't know how assambler actually works" (as you can't "define" variables as such in avr-asm), so I would sugest you started from the start of the linked tutorial... Also any particular reason you want to use asm?
[09:29:19] <theBear> cos he both doesn't know and doesn't trust c :)
[09:29:39] <Malinuss> lol wut?
[09:29:48] <volbus> well in the link above it appears allright the .def directive
[09:30:53] <volbus> but when I try to assembler a simple file with avr-as it says:unknown pseudo-op
[09:31:47] <Malinuss> volbus, did you seriously just ignore my help? sigh...
[09:32:44] <volbus> I am not new to assembler, I just used the AVRStudio
[09:33:11] <volbus> and trying to figure out how to use the avr-as
[09:33:24] <Malinuss> volbus, yes you are ;D
[09:33:39] <Malinuss> I'm new too so we are two hehe
[09:34:50] <volbus> it should be clear: .def defines a name for a reg; but it sais to me unknown pseudo-op
[09:34:52] <RikusW> I've only use AS4 asm
[09:34:57] <volbus> what am I doing wrong?
[09:35:02] <RikusW> didn't like avr-as too much...
[09:35:41] <theBear> err, i just looked at that link, it doesn't mention .def at all
[09:35:45] <RikusW> why not just use the Atmel asm ?
[09:37:04] <volbus> Atmel asm? is that not avr-as? on linux
[09:37:25] <theBear> he said the, as in, THE software
[09:37:37] <volbus> theBear, yes it does, in Directives/Expressions
[09:37:45] <Malinuss> nah my bad volbus, I understood your question like you were asking how to define variables in asm.. <- the reason I linked to it theBear
[09:37:49] <volbus> for linux?
[09:38:03] <theBear> oh wow, they did a good job of alphabetical order eh ?
[09:39:53] <volbus> so RikusW, what were you saying about "Atmel asm"? what is that?
[09:40:04] <RikusW> AVR Studio asm
[09:40:18] <volbus> it is only for windows
[09:40:20] <RikusW> but you're on Linux...
[09:40:27] <volbus> right!
[09:42:09] <RikusW> iirc I did run the AS4 asm in wine
[09:42:47] <RikusW> just had a minor problem with the include files not being found
[09:43:04] <volbus> what exactly is "AS4 asm"?
[09:43:20] <RikusW> the assembler that comes with AVR Studio 4
[09:43:23] <theBear> atmel studio 4
[09:43:23] <RikusW> or 6
[09:43:27] <theBear> c'mon man !
[09:43:36] <volbus> ahaaaaaa!!
[09:43:45] <RikusW> C:\Program Files\Atmel\AVR Tools\AvrAssembler2
[09:43:55] <volbus> sorry man, I was thinking of other solutions...
[09:44:04] <theBear> i never used ateml studio... not sure it even existed when i was really into this stuff
[09:47:16] <volbus> so, can anyone tell me why avr-as doesn't know ".def"-directive, or what am I doing wrong?
[09:47:55] <RikusW> C:\Program Files\Atmel\Atmel Studio 6.0\extensions\Atmel\AVRAssembler\2.1.51.46\avrassembler
[09:47:55] <theBear> what do your .def lines look like ?
[09:48:22] <volbus> very simple: .def data=t17
[09:48:34] <RikusW> I don't use avr-as...
[09:48:44] <RikusW> why not use plain r17 ?
[09:49:12] <RikusW> C:\Program Files\Atmel\Atmel Studio 6.0\extensions\Atmel\AVRGCC\3.4.0.65\AVRToolchain\bin\avr-as.exe
[09:49:23] <RikusW> seems AS6 got both
[09:49:37] <volbus> 'cause whaen you deal with many regs you forget what is in r16, r17....; but with names you have a better sight
[09:49:39] <RikusW> though I much prefer avrasm2
[09:49:47] <theBear> err, t17 is a reg ?
[09:49:52] <RikusW> r17
[09:50:00] <theBear> you tried with spaces ?
[09:50:15] <volbus> yes, spaces, tabs, no way!
[09:50:43] <theBear> you told the compiler what chip you have ?
[09:50:52] <theBear> compiler/assembler
[09:50:59] <volbus> you mean uC? yes!
[09:51:36] <volbus> it also accepts the .include directive, but no .def
[09:51:59] <theBear> so what's the cmdline that fails look like ?
[09:52:25] <RikusW> volbus: do you have access to AS6 ?
[09:52:27] <RikusW> C:\Program Files\Atmel\Atmel Studio 6.0\extensions\Atmel\AVRGCC\3.4.0.65\AVRToolchain\doc\binutils\as.html
[09:52:38] <RikusW> here is what seems to be the avr-as docs
[09:53:08] <volbus> avr-as -mmcu=attiny261a er.S
[09:53:24] <theBear> that looks suspiciously like avr-gcc ... you sure the studio doesn't use gcc ?
[09:53:40] <volbus> acces to AS6, no, I don't know
[09:55:00] <theBear> actually, that even says gcc in the path
[09:55:07] <volbus> I've looked at that help file, but it doesn't specify anything about program code...
[09:55:17] <theBear> 3.4 is a bit old tho
[09:56:09] <RikusW> volbus: check in your package manager, the docs should be installed somewhere
[09:56:36] <theBear> /usr/share/doc/blah is common, but you don't expect full docs with gcc
[09:57:01] <theBear> have you asked the wide wide world of web about that error ?
[09:57:31] <RikusW> seems as use .def for something else...
[09:57:32] <volbus> not much in google about assembler in avr-as...
[09:57:33] <Horologium> RikusW, he doesn't have it installed as a package...he has the atmel generic one.
[09:58:10] <volbus> yeap! so it is, from atmel
[09:58:45] <RikusW> there might be docs with it..
[09:59:10] <theBear> maybe /opt/avr-gcc/doc/blah ? do they even install in a sensible place?
[09:59:13] <RikusW> just use avrasm2 in wine...
[09:59:22] <volbus> I've already looked throug them, not much about program code thou!
[09:59:47] <Horologium> theBear, they don't install...
[10:00:01] <Horologium> you have to put it where you want it and setup paths and environment to suit yourself.
[10:00:11] <theBear> jeez, that sucks
[10:00:17] <theBear> just get a real toolchain
[10:00:39] <volbus> but this should work, it is a simple thing
[10:00:53] <Horologium> volbus, what did you do to install that toolchain?
[10:01:00] <theBear> maybe, if it's 100% static, otherwise it could be not finding libs or all kinds of things
[10:02:01] <volbus> I fallowed the instructions in the package: just unpack, and add the path to the ...
[10:02:08] <Horologium> it is built static...but you still have to set your path up.
[10:04:16] <volbus> and I just tried .equ insted of .def - no error!
[10:04:57] <volbus> so I guess, avr-as really doesn't know the .def directive
[10:05:22] <theBear> err, .equ != .dif
[10:05:24] <theBear> def
[10:05:50] <volbus> I know! not the same!
[10:06:40] <Horologium> so, up to this point you've been asking these questions without actually reading the manual that comes with that toolchain?
[10:07:20] <volbus> yes I did! maybe not deeply...
[10:07:42] <theBear> doesn't need to be deep, just the relevant parts :)
[10:07:43] <volbus> I still don't understand, no .def in avr-as?
[10:08:03] <volbus> ohhh yeah, I've done that
[10:08:32] <Horologium> give us a pastebin of your code that doesn't compile maybe? Then we might can see what's done wrong?
[10:09:05] <Horologium> or at least the line that's futzing up.
[10:09:09] <volbus> the thing is, in manuals it's all about c/c++
[10:09:23] <Horologium> I'm looking at the as manual.
[10:09:28] <theBear> not the right manual
[10:09:29] <Horologium> says nothing about C/C++
[10:09:36] <theBear> heh, just as i suspected
[10:09:40] <Horologium> the one that comes with that atmel version of the toolchain.
[10:10:13] <Horologium> file:///home/ray/Downloads/avr8-gnu-toolchain-linux_x86/doc/binutils/as.html/AS-Index.html not like that link will work for you but shows where it is in the directory structure.
[10:10:23] <RikusW> in the as manual it specifies .def name and is used with .endef
[10:13:42] <volbus> "Begin defining debugging information for a symbol name; the definition extends until the .endef directive is encountered. "
[10:14:50] <RikusW> AI couldn't fine the avrasm2 .def equivalent
[10:14:54] <RikusW> *I
[10:15:53] <Horologium> volbus, how were you using .def? got a section of code we could see?
[10:16:36] <volbus> yeap, ".def data=r17"
[10:17:11] <volbus> but that with the debuging info for a symbol name I don't understand
[10:17:12] <theBear> so err, you just quoted something... you tried a .endef yet ?
[10:17:30] <volbus> not yet, now
[10:17:39] <RikusW> I used the same (.def rnull = r2) on avrasm2
[10:17:54] <RikusW> works perfectly, now avr-as just had to be otherwise...
[10:18:04] * GuShH wonders if theBear has any booze around
[10:18:57] <theBear> a little, why ? you gonna be the 4th person this week to say my judgement is impaired, ignoring for the purposes of that comment that i'm more sober than i've been 99.99% of the last 10 years ?
[10:19:10] <theBear> surely you know better
[10:19:44] <GuShH> no I would ask for a sip :p
[10:19:46] <volbus> RikusW, can you try that with avr-as?
[10:19:49] <theBear> good boy :)
[10:19:54] <theBear> and not a chance <grin>
[10:19:58] <GuShH> >_<
[10:20:09] <theBear> hey, i'm the one spending my food money on liquor
[10:20:21] <GuShH> I'm the one with no liquor!
[10:20:31] <theBear> yeah, but i bet you had a couple meals in the last 2 days
[10:20:45] <GuShH> just salads
[10:20:52] <theBear> better than nothing !
[10:21:02] <theBear> but liquor helps me ignore the hunger pains
[10:22:49] <kdehl> Well, well. I now have output on a display, but only a single button as input. Seems somewhat limited.
[10:23:00] <GuShH> "History Ch How the States Got Their Shapes" does anyone even care about this?
[10:23:08] <theBear> i sure don't
[10:23:17] <kdehl> They ate a lot of burgers?
[10:23:23] <kdehl> I'm so hilarious.
[10:23:28] <GuShH> kdehl: you can mux a single gpio adc to map multiple buttons if you want
[10:23:51] <kdehl> GuShH: Actually I was thinking of a PS/2 keyboard and maybe even a mouse.
[10:23:51] <GuShH> kdehl: burgers and poop shaped this country! 'merica!! hurrahh we fat!
[10:24:06] <kdehl> You guys eat poop?
[10:24:06] <theBear> kdehl, whatever you do, program harder, that's why it seems limited
[10:24:13] <GuShH> I ain't no 'merican, sorry.
[10:24:25] <theBear> "i eat pieces of shit like you for breakfast !" "you eat pieces of shit for breakfast ?"
[10:24:25] <GuShH> tap the keys harder, check.
[10:24:59] <GuShH> yum
[10:25:39] <kdehl> Right, right. More coding it is.
[10:25:45] <GuShH> enough with the unhappy gilmore references, kdehl needs moar keys!
[10:25:55] <kdehl> Damn, I should study for exams instead.
[10:26:07] <kdehl> Or not. Screw exams, I need keys!
[10:26:34] <theBear> ahh yes, that is the key
[10:26:53] <theBear> unhappy !?!?!? pfft ! that guy was happy as hell
[10:26:55] <Horologium> http://avrprogrammers.com/example_avr_keyboard.php
[10:27:05] <theBear> i like that one where he does school in 2 weeks/year too
[10:27:08] <theBear> that makes me smile
[10:27:26] <GuShH> he's always happy
[10:27:33] <GuShH> after all he wipes his arse with 100 dollar bills
[10:27:33] <theBear> exactly !@
[10:27:36] <kdehl> Horologium: Hah! I had that opened already.
[10:27:38] <theBear> heh, there is that
[10:27:40] <theBear> ooh, deeds
[10:27:46] <GuShH> well, in real life I mean
[10:27:53] <theBear> "i think sir, you may have underestimated my sneakiness !"
[10:27:59] <GuShH> lol
[10:28:01] <theBear> maybe, but he doesn't have that awesome butler dude
[10:28:11] <GuShH> well he's in charge of the corporation now!
[10:28:15] <theBear> "take these, they will make your head seem smaller"
[10:28:15] <GuShH> as per the movie..
[10:28:48] <Horologium> guess I have no clue what movie you are talking about.
[10:28:54] <GuShH> Mr Deeds
[10:29:00] <theBear> watch them, that and happy gilmore
[10:29:04] <Horologium> never seen it.
[10:29:10] <theBear> he may be a silly-ass, but they are his finest work
[10:29:32] <Horologium> if happy gilmore is one of his finest works,,,,,,,eeeewwww.
[10:29:33] <GuShH> silly jews!
[10:29:45] <theBear> hey, i didn't say he was amazing, just that it was his finest work
[10:29:56] <GuShH> what about Click?
[10:29:56] <theBear> and you, quiet you ! i know jews that aren't madcap at all !
[10:30:04] <theBear> click ?
[10:30:09] <GuShH> one of sandler's movies
[10:30:15] <Horologium> click was horrid.
[10:30:16] <GuShH> where he gets a magic remote control
[10:30:17] <theBear> hmmmmmmm, what happens ?
[10:30:20] <Horologium> want the dvd? I have one here.
[10:30:22] <theBear> i aint seen that
[10:30:23] <theBear> lol
[10:30:26] <GuShH> Horologium: they're all horrid if you watch hem twice dude
[10:30:34] <GuShH> poorly scripted, shitty jokes, etc.
[10:30:35] <Horologium> I couldn't get through it once!
[10:30:38] <theBear> nah, deeds is good at least 3 times
[10:30:38] <GuShH> and yet he makes millions.
[10:30:47] <Horologium> guess I'm too old.
[10:30:48] <theBear> and that 50 first dates has redeeming features
[10:30:55] <theBear> and remember, most 'punters' are stupid
[10:31:06] <GuShH> Couch was even worse
[10:31:10] <Horologium> no clue what a 'punter' is.
[10:31:22] <Horologium> to me it has something to do with football.
[10:31:27] <theBear> err, a plebian that spends money
[10:31:28] <GuShH> oh what's the one with the devil... the one that almost got them bankrupt
[10:31:32] <GuShH> that one wasn't tooooo bad.
[10:31:39] <theBear> no no, it's nothing to do with football, tho it can refer to one who bets on football
[10:31:51] <GuShH> something nicky
[10:31:56] <Horologium> don't you punt the ball or something?
[10:32:00] <theBear> in gambling circles it means a gambler, but it's bigger than that
[10:32:00] <GuShH> little nicky?
[10:32:01] <Horologium> "Little Nicky"
[10:32:08] <theBear> oh, yes, you can punt a ball, but this is different
[10:32:20] <theBear> well, a non-round football anyway
[10:32:33] <Horologium> you can punt about anything you can pick up and drop.
[10:32:39] <Horologium> including little yappy dogs.
[10:32:43] <Horologium> aka punt-puppies
[10:32:54] <theBear> lol, "the bad man punted baxter"
[10:33:28] <theBear> but punter is a term that means err, kinda like a consumer... bar owners refer to those that come to events as punters
[10:33:36] <theBear> for example
[10:33:48] <Horologium> think I might have to put on a good movie...either Spaceballs or Red Green:Duct Tape Forever.
[10:34:04] <theBear> OH MY FG ! redgreen rocks my world !
[10:34:12] <theBear> and yes, spaceballs is also awesome
[10:34:34] <GuShH> lmao http://filmdrunk.uproxx.com/2012/10/adam-sandler-is-making-parody-films-now
[10:34:38] <Horologium> got some construction work to do...will throw one of those on the netbook and put it on a shelf while I'm working.
[10:34:47] <theBear> "now" eh ? hehehe
[10:34:49] <GuShH> the paragraph about why he thinks the studio had no further comment is so true
[10:34:55] <Horologium> I thought all his movies were parodies of something.
[10:35:02] <GuShH> theBear: I was looking up little nicky and that popped up, old stuff
[10:35:17] <GuShH> it's true, he mumbles shit and then he casts his 4-5 friends on all his movies
[10:35:24] <theBear> im herlihy ? is he the "YOU CAN DO-EEEET" guy, or the giant with the ugly head ?
[10:35:41] <theBear> i heard it was a throwback from theatre school, they were all together, but that's by the by
[10:36:21] <theBear> anyway, it's time for sleep, got a big day tomorrow, visit the doctor, visit the govt money people, then visit old work if i can still walk a block by then..
[10:36:26] <theBear> gnight :)
[10:36:43] <theBear> ooh wait, one more pill or i won't sleep
[10:36:55] <GuShH> pills huh!
[10:37:47] <theBear> hopefully he got another pack of samples tomorrow, or he tells me the govt-assisted medication list includes this since last month... i can't afford another $80 pack of pills in a week
[10:38:01] <theBear> gnight then :)
[10:38:57] * GuShH wonders if these are happy pills
[10:39:00] <GuShH> with little smileys
[10:39:37] <theBear> nah not really, nerve-targeting 'painkillers', but they put me on my ass..
[10:42:59] <GuShH> I want some :(
[10:43:20] <GuShH> theBear: they probably have muscle relaxants all over
[10:43:46] <GuShH> I used to take some of those, they would calm the pain down and make me all fluffy, then after a while they did nothing
[11:42:10] <kdehl> Has anyone here ever connected a PS/2 keyboard to an AVR before?
[11:42:14] <kdehl> http://www.electronics-base.com/index.php/projects/complete-projects/108-avr-ps2-keyboard-key-readout
[11:42:51] <kdehl> I'm looking at that page, but the third picture must be wrong there... The numbers of the pins on the _male_ connector seem to be mirrored...
[11:43:06] <kdehl> The female connector is right, if I understand it correctly.
[13:02:20] <Hukka> Hi'a. I've been trying to use Tom's usbtiny mkII on OS X, but neither avrdude from macports or in the crosspack seems to work
[13:02:46] <Hukka> Is there a trick I'm missing, or is OS X just not currently working?
[13:07:48] <kdehl> So, on an 1284p, I use EIMSK instead of GICR, is that correct?
[13:10:17] <Horologium> Hukka, no clue here...I avoid iCrap more than I avoid mickysoft.
[13:11:12] <Hukka> Well, you could then perhaps tell where to get a working version of avr-gcc for xmega32a4u
[13:11:34] <Hukka> Since the one in Ubuntu repos doesn't know what mmcu that is, would only work with the non-u version
[13:11:55] <Hukka> I tried looking for the atmel patches, but didn't found anything for that chip
[13:12:16] <Hukka> I guess it's possible it's been upstreamed pretty recently, and thus not yet in distro repos
[13:14:31] <Hukka> Tom_itx: I'm now trying avrdude on Linux. It seems to be working, but is *really* slow. It has been flashing for five minutes now. Normal?
[13:15:03] <Hukka> I'm also getting some "avrdude: stk500v2_recv_mk2: error in USB receive" which don't seem to be fatal
[13:17:20] <Hukka> And now a timeout. Might be a problem with the usb hub I'm using, though. I'll try directly connected too
[13:20:35] <Hukka> Yeah, that worked immediately
[13:30:50] <kdehl> Oh for the love of what the fuck! I've been struggling with a button connected to an interrupt for hours, couldn't understand why it didn't work...
[13:31:08] <kdehl> I realize I've connected it wrong.
[13:31:40] <kdehl> It's like, "why doesn't the computer start?" "-Uh, how about trying to turn it the fuck on?"
[14:01:21] * Tom_itx smacks kdehl with a clue bat
[16:18:53] <jadew> sup?
[16:24:16] * kdehl is hurt
[16:24:55] <jadew> what happened?
[16:26:43] <kdehl> Tom_itx smacked me
[16:30:12] <GuShH> kdehl: kinky
[16:32:03] <kdehl> Oh yeah.
[16:59:10] <tzanger> hm, avr-gcc doesn't seem to optimize ISR prologue/epilogues
[16:59:22] <tzanger> it saves all regs and restores all, even if hte ISR only touches a few
[17:13:45] <Grievre> tzanger: Did you find that out on your own or did you read it somewhere?
[17:14:03] <Grievre> tzanger: So actually, it only saves all regs if you call another function
[17:14:05] <tzanger> Grievre: I'm looking at the -Os compiled listing
[17:14:15] <Grievre> if you don't call another function, it only saves the regs it uses
[17:14:21] <Grievre> the annoying part is that it saves them at the beginning
[17:14:24] <Grievre> instead of right before using them
[17:14:31] <Grievre> so if you have one execution path that uses fewer regs, too bad
[17:14:32] <tzanger> Grievre: that's typical ISR
[17:14:59] <tzanger> oh you're right, I call functions in the ISR, I totally forgot about that
[17:15:02] <tzanger> let me take a look at those
[17:16:03] <tzanger> nope, it still saves more than it needs to
[17:16:06] <Grievre> er?
[17:16:20] <Grievre> o.o
[17:16:31] <Grievre> unless it's inlining the functions, it doesn't know what registers they will use
[17:17:14] <tzanger> my functions use r24/r25, the ISR uses r24/r25 as well, and the prologue/epilogue saves 0,1,18,19,20,21,22,23,24,25,26,27,30,31
[17:17:26] <tzanger> yeah I could inline it I guess
[17:17:40] <tzanger> I figured the compiler could figure that out on its own though
[17:20:41] <tzanger> nope inlining the functions doesn't change the prologue/eiplogue
[17:26:22] <tzanger> it definitely has to do with calling functions in the ISR; if I don't do that it saves r0,r1,r24 only
[17:26:31] <tzanger> but inlining didn't help reduce it
[17:33:21] * Grievre nods
[18:16:23] <tzanger> all avrs have a DES instruction?
[18:43:19] <tzanger> wow this code is a pig. 780 bytes of ROM, 8 bytes of RAM
[18:44:04] <tzanger> it fits well within the 13a's flash/ram, but it could be much smaller if I wanted to write it in assembly
[18:45:41] <Malinuss> tzanger, why would you use a 13a - lower current consuption? It's only .20$ cheaper then the 85
[18:55:21] <tzanger> yes, power consumption. I need a timer, *maybe* the ADC but low power is the requirement
[18:56:18] <Malinuss> tzanger, I'm not even suere that the 85 uses more... I think the V version could actually use less
[18:56:37] <tzanger> the avr will be in power down most of the time, my power supply will have trouble sourcing even 5mA for any appreciable amount of time
[18:57:01] <tzanger> 13 and 85 are pin-compatible anyway are they not? I can swap it out if I need
[18:57:43] <tzanger> I'm also seeing a *significant* price difference between 13a and 85
[18:58:12] <Malinuss> tzanger, well yeah it's 0.2$ ! :O
[18:58:15] <tzanger> $0.91 vs $1.31 in onesie-twosie
[18:58:25] <Malinuss> is that with shipping btw.?
[18:58:32] <tzanger> shipping is free on orders over $200
[18:58:41] <Malinuss> lol 200$
[18:58:47] <Malinuss> nothanks
[18:58:52] <tzanger> my digikey orders are usually pretty big
[18:58:54] <tzanger> last one was $2500
[18:59:13] <Malinuss> lol
[18:59:19] <yunta> uh, 2.5k wow
[18:59:49] <yunta> what do you do there?
[18:59:51] <Malinuss> tzanger, 2500$ did you make a satelite go to mars? Or just a small shuttle to orbit and come back to earth?
[19:00:07] <tzanger> smallest 85 is $0.73 in 100 qty, 13a is $52 in same qty
[19:00:13] <tzanger> er $0.52
[19:00:17] <tzanger> there's the $0.2 difference
[19:00:35] <tzanger> lol, no.
[19:00:42] <tzanger> stock and prototypes for a few clients
[19:00:57] <tzanger> there was also $700something from mouser
[19:01:16] <Malinuss> tzanger, well if you are buying in 100, sure 0.2$ is a lot, but you need to say that first... normally people assume you need 10>?
[19:03:37] <tzanger> at90can128s, r/c/ls, some oled displays... it adds up fast
[19:04:28] <tzanger> I think my next design will use stm32f3, it's cheaper than at90, more flash/ram, hw fpu, faster...
[19:06:59] <tzanger> of course it doesn't have avr-libc, but that's ok
[19:29:22] <BJfreeman> why not go all the way to F4
[19:29:50] <BJfreeman> get the discovery for $14
[19:31:46] <kdehl> Damn. It feels like I'm going to go to bed without figuring out what's wrong with my code.
[19:31:56] <kdehl> I will not be able to sleep well tonight!
[19:33:27] <kdehl> I'm trying to read scancodes from a PS/2 keyboard, but it seems that I get out of sync right after boot...
[19:40:51] <kdehl> Nah, it doesn't seem to be my only problem. Heh.