#avr | Logs for 2011-12-08

Back
[01:38:53] <j4cbo> i have a plain ol' atmega168 that i need to program, but no avr programmer on hand
[01:39:04] <j4cbo> i do, however, have some Teensy boards around
[01:39:33] <j4cbo> is there an already-written app that'll run on the teensy and use its gpio pins to program another avr?
[01:40:52] <Casper> no idea, but you don't have a parallel port
[01:40:53] <Casper> &
[01:40:54] <Casper> ?
[01:54:43] <Kevin`> j4cbo: yes, there is, there's an avrispii implementation from lufa you can run
[01:54:59] <Casper> http://www.youtube.com/watch?v=a8RnOIedZl8
[03:53:04] <Tom_itx> j4cbo you should be able to load lufa on it
[06:27:43] <lovre> hi all
[06:27:49] <Steffanx> lo
[06:28:26] <lovre> is the directive #pragma regalloc something thats specific to avr-gcc, or just CodeVision? What defines this directive?
[06:30:00] <lovre> and what compiler does CodeVision use?
[06:31:15] <Steffanx> CodeVision is/uses a custom compiler
[06:31:34] <lovre> Steffanx: ah, that explains alot :)
[06:32:44] <lovre> Steffanx: i was wondering how there can be a BIT type in C, but i thought codevision used avr-gcc. Since it uses its own compiler, it can do whatever it wants, so i guess that explains it
[08:42:07] <rvsjoen> anyone happen to have a clue whats the difference between AT86RF230 and AT86RF230B, I can't seem to find it anywhere
[08:48:17] <inflex> the B one is compatible for use in honey-harvesting operations ;)
[09:08:25] <rvsjoen> hehe
[11:21:58] <RikusW> A diode ladder multiplies voltage under software control ----> http://edn-mail.com/portal/wts/cemciv2dgDE6edy8Ba3rvj2e2vuSEa
[11:23:23] <RikusW> inflex: was it you who wanted to know about voltage multiplication ?
[11:38:54] <powderhound> Should AVR GCC allow me to define a variable twice, or should it fail with an error?
[11:39:17] <ziph> Depends on where and what warnings you have on.
[11:40:24] <powderhound> I was trying to define an int outside of a function, and it allowed the line to be there twice, but wouldn't allow it inside the main function. Is that normal?
[11:40:43] <powderhound> I believe I have all warnings on
[11:41:06] <ziph> Twice in the same file? It should complain about that.
[11:42:42] <powderhound> Yeah, that's what I was thinking.
[11:43:11] <powderhound> Would optimization settings change any of that?
[11:43:56] <ziph> Nope.
[11:44:19] <powderhound> Hmmm
[11:44:21] <ziph> Looks like it does just treat them as duplicate definitions.
[11:44:36] <ziph> The big no-no is the same variable in different .c files though.
[11:44:49] <ziph> Which is why all variables declared in headers require extern.
[11:44:58] <ziph> And you will get errors about that.
[11:46:17] <powderhound> That's really interesting, I had thought that was incorrect
[11:46:37] <ziph> You can do this:
[11:46:39] <ziph> extern int a;
[11:46:43] <ziph> extern int a;
[11:46:46] <ziph> (e.g. twice)
[11:46:49] <ziph> And it won't care.
[11:46:59] <powderhound> Yeah, that one makes sense to me, its when you don't have the extern that I was getting confused
[11:56:57] <karlp> rvsjoen: AT86RF230 vs AT86RF230B, could you just mean AT86RF230 hardware rev a vs hardware rev B?
[11:57:07] <karlp> I don't think yuou can order them differently,
[11:57:16] <karlp> hardware rev B fixes all the errata...
[12:35:32] <rvsjoen> oh
[12:36:11] <rvsjoen> if its that simple, jolly good. I just noticed that my rzraven board had RF230B, and the raven usbstick had RF230
[12:36:43] <grummund> pretty sure it's just a rev code
[12:36:51] * grummund used the RF212
[12:36:51] <rvsjoen> that being said, anyone have a clue whats the easiest way to turn the raven usb stick into a packet sniffer ?
[12:37:25] <rvsjoen> on windows :/
[12:37:32] <grummund> you could start with the datasheet :P
[12:38:48] <rvsjoen> hehe
[12:53:10] <grummund> rvsjoen: i haven't looked at that chip in particular but there should be a "Software Programming Model" document or other app notes to get you started
[12:53:54] <grummund> look out for "promiscuous" mode
[12:54:37] <karlp> you might only be able to do promiscuous on a single channel at a time mind you...
[12:55:19] <rvsjoen> yeh, I think I got a handle on that to a certain degree, the avr2025 library from atmel provides some examples on doing promiscuous mode, I just need to figure out how to talk to the stick from winblows
[12:56:04] <grummund> presumably it has an at90usb... or similar?
[12:56:37] <rvsjoen> yup
[12:56:43] <rvsjoen> at90usb1287
[12:57:45] <grummund> in which case it'll have a USB bootloader and Atmel's FLIP utility can be used to flash code onto the mcu
[12:58:19] <rvsjoen> holy crap
[12:59:06] <rvsjoen> i've been looking for a while to find a tool like that that doesnt require jtag
[12:59:09] <rvsjoen> thanks
[12:59:19] <karlp> DFU is pretty neat
[12:59:27] <karlp> buggers me why the aren't using DFU with arduino
[13:02:29] <rvsjoen> hmm.. perhaps I need to flash them once with jtag first, to get that usb loader
[13:04:48] <rvsjoen> oh well, i'll address that tomorrow, thanks for the help
[13:11:18] <grummund> rvsjoen: if you've already been using JTAG then almost certainly you wiped the bootloader
[13:13:41] <rvsjoen> it is a bit strange, I even tried with a brand new stick, which registers itself as rz usb stick when I plug it into usb, but FLIP is unable to open a connection to it
[13:15:19] <grummund> it needs to be put in DFU mode
[13:15:50] <grummund> have a look see how the HWB pin is connected, maybe there is a pushbutton...
[13:16:11] <grummund> hold HWB low at reset to enter DFU mode
[13:20:00] <rvsjoen> meh, I don't see any buttons :/
[13:21:10] <rvsjoen> but maybe I can use jtag to change the boot reset fuse
[13:21:40] <rvsjoen> need to get some connectors to solder on in that case
[16:44:04] <OndraLappy> so guys
[16:44:12] <OndraLappy> I spoke yesterday (OndraSter) about C vs ASM
[16:44:23] <OndraLappy> I realized that there is even NanoVM aka Java virtual machine for AVR
[16:44:26] <OndraLappy> I have to say
[16:44:29] <OndraLappy> "poor AVR!"
[16:44:57] <bram_> OndraLappy: how about javascript for AVR :)
[16:45:04] <OndraLappy> heh
[16:45:15] <OndraLappy> and what about Firefox!
[16:45:20] <OndraLappy> full firefox*
[16:45:34] <bram_> compiling...
[16:45:35] <OndraLappy> (I'd say Opera, but it is not opensource :( )
[16:45:37] <OndraLappy> heh
[16:45:41] <OndraLappy> with linux?
[16:45:57] <bram_> insufficient everything
[16:46:07] <OndraLappy> :P
[16:46:19] <OndraLappy> I thought about making "virtual machine" for AVR
[16:46:23] <OndraLappy> aka simulating AVR.. on AVR
[16:46:33] <bram_> or PIC on AVR
[16:46:38] <OndraLappy> blah, I don't like PIC
[16:46:41] <OndraLappy> my enemy uses PIC :D
[16:47:06] <OndraLappy> I
[16:47:08] <bram_> you wanna fight?
[16:47:12] <OndraLappy> I'd do Brainfuck for AVR lol
[16:47:18] <OndraLappy> nope
[16:47:38] <bram_> don't enemy's fight?
[16:47:55] <OndraLappy> well I am more of a calm guy
[16:48:03] <OndraLappy> I don't fight unless he starts 3ww
[16:48:24] <bram_> wwAVR
[16:49:35] <bram_> would it be possible to run ubuntu on many AVR's?
[16:49:41] <OndraLappy> hmm
[16:49:45] <OndraLappy> since AVR is harward
[16:49:53] <OndraLappy> not withotu the virtual AVR :P
[16:49:55] <OndraLappy> without*
[16:50:18] <bram_> so it will be ubuntu on javascript on vm on avr
[16:50:30] <OndraLappy> but I could make full virtual CPU with custom instructions right
[16:50:37] <OndraLappy> with proper 16bit instruction set :P
[16:50:45] <bram_> or 24 even
[16:50:55] <OndraLappy> is that some PIC thingy :P
[16:51:04] <OndraLappy> 24bit data operations
[16:51:08] <bram_> it's an address thingy
[16:51:19] <OndraLappy> hmm
[16:51:25] <OndraLappy> 286? :P
[16:51:37] <OndraLappy> I thought about making dev platform based on 486 CPU
[16:51:49] <OndraLappy> (32bit data line is still doable compared to 64bit on P I :P)
[16:52:55] <bram_> an adapted softcore on a virtex6
[16:53:04] <bram_> that will run anything
[16:53:16] <bram_> some gig's of mem
[16:53:18] <OndraLappy> is that some FPGA?
[16:53:32] <j4cbo> yeah
[16:53:40] <bram_> ubuntu!
[16:54:05] <j4cbo> i think ram space will be a bit of an issue :P
[16:54:29] * OndraLappy ran WinXP on 64MB RAM just fine
[16:55:05] * bram_ ran bigpenis on me just fine
[16:55:22] * bram_ made girlfriend happy too
[16:55:30] <OndraLappy> damn I want gf
[16:55:33] <OndraLappy> and not virtual one :P
[16:55:50] <bram_> get some big ass action now!
[16:55:56] <OndraLappy> huah
[16:56:06] <bram_> go out and find
[16:56:10] <OndraLappy> I am too occupied with projects to school and my personal
[16:56:13] <OndraLappy> that needs to be done ASAP
[16:56:17] <OndraLappy> or TSTB
[16:56:34] <bram_> ASAP will be there the rest of your life
[16:57:02] <bram_> tight asses will go saggy and wrinkly
[16:57:10] <OndraLappy> :D
[16:57:44] <bram_> excuse my english
[16:57:52] <OndraLappy> asses won't be saggy and wrinkly for at least 10 years
[16:57:53] <OndraLappy> for me
[16:58:42] <bram_> so ten years of fun with asses, then another 40-50 with avr
[16:58:52] <OndraLappy> :D
[16:58:52] <vectory> hey, is avr studio asm compatible with gcc inline asm?
[16:59:02] <bram_> yes
[16:59:08] <vectory> k
[16:59:09] <OndraLappy> it requires some weird registry usage though
[16:59:15] <OndraLappy> I rather rewrote the code fully in asm lol
[17:00:24] <bram_> maybe there will be some programmable avr ass in the future
[17:00:31] <OndraLappy> sexxy
[17:00:35] <OndraLappy> I think ARM is the future though
[17:00:47] <OndraLappy> that's why I will skip ATXmega and go to ARM :P
[17:00:58] <OndraLappy> in the future
[17:01:00] <OndraLappy> most likely
[17:01:16] <bram_> at32 pic32 or even x86, whatever
[17:01:18] <OndraLappy> Atxmega is _still_ 8/16bit data
[17:01:38] <OndraLappy> I did a bit of ARM alraedy, took apart few drivers from Windows Mobile :P
[17:01:42] <OndraLappy> already
[17:01:55] <OndraLappy> damnit my typing in bed is bad
[17:02:07] <bram_> i think ARM is happening now, therefore it is dead soon
[17:02:27] <OndraLappy> ARM is evolving
[17:02:29] <OndraLappy> and will evolve
[17:02:33] <OndraLappy> it is not that power hungry
[17:02:37] <OndraLappy> and it is becoming quite powerful
[17:02:42] <bram_> just like at32, pic32, x86
[17:03:20] <OndraLappy> I think that some AVR server with 90W total power would outperform any x86 or so with 90W TDP server
[17:03:27] <OndraLappy> I mean
[17:03:29] <OndraLappy> ARM server*
[17:03:46] <bram_> 90W means 10 core?
[17:03:53] <OndraLappy> actually more
[17:04:13] <OndraLappy> Tegra 2 is like... 500mA at 1.4V or so?
[17:04:16] <OndraLappy> would have to check
[17:04:18] <OndraLappy> now take out the GPU
[17:04:22] <OndraLappy> and put more cores
[17:04:26] <OndraLappy> and use actually Tegra 3
[17:04:28] <OndraLappy> and boom
[17:04:44] <bram_> if it is that dedicated, then you can use fpga
[17:05:16] <OndraLappy> fpga's don't run on XX GHz usually
[17:05:27] <OndraLappy> and when they do
[17:05:39] <OndraLappy> they do not go anywhere near 1 MIPS
[17:05:57] <OndraLappy> CPUs are quite impressively complicated..
[17:05:58] <bram_> you need some education
[17:06:02] <OndraLappy> yes I do
[17:06:20] <bram_> i need some sweet lovin
[17:06:23] <bram_> by!
[17:08:04] <OndraLappy> we all do
[17:08:10] <OndraLappy> or at least want
[17:12:58] <Steffanx> Veel plezier bram_
[17:24:39] <grummund> rvsjoen: probably you could just hold a paperclip on the HWB while reseting to force DFU mode - but check the HWB pin isn't used for anything else first.
[17:57:24] <ferdna> is there an electrical forum?
[17:57:38] <ferdna> meant channel...
[17:57:42] <ferdna> irc channel
[18:15:37] <vectory> ferdna: /msg alis list '*elec*'
[18:17:04] <vectory> without the quotes, actually
[18:19:35] <ferdna> vectory, hmmm... cant see any suitable channel
[18:19:37] <ferdna> :(
[18:20:13] <vectory> ##electronics
[18:21:46] <ferdna> vectory, that is electronics...
[18:21:49] <vectory> '/msg alis LIST *elec* -min 50' yields that
[18:21:59] <ferdna> vectory, i want electrical...
[18:22:03] <ferdna> as in house electrical
[18:22:03] <vectory> whats the difference?
[18:22:16] <ferdna> like house mains and stuff
[18:22:23] <ferdna> that type of electricity
[18:22:34] <vectory> dont suppose so, then there is not much of a difference is ther, only their level might be kinds high, for me at least
[18:22:59] <ferdna> vectory, electronics is like components in a pcb
[18:23:00] <ferdna> etc
[18:24:05] <vectory> electrical stuff is still part of electronics, isnt it
[18:24:43] <vectory> i mean an electro physicist/engineer should be allowd to install a wall mount socket
[18:26:50] <Landon> only as much as a physicist should be allowed to do engineering?
[18:29:50] <vectory> thats not what i meant to say
[18:33:36] <CMiYC> Doctors are doctors right?
[18:33:45] <CMiYC> So if you need brain surgery, your foot doctor can do it
[18:33:56] <CMiYC> It isn't like there is that much difference. Its just the human body
[18:37:53] <ferdna> CMiYC, couldn't agree more to that.... lol =D
[22:59:43] <Casper> inflex: have you made some frequency generator?