#avr | Logs for 2014-02-08

Back
[03:02:59] <johnwalkr> does anyone know the maximum resolution of atmega8l using oversampling and decimation?
[03:03:12] <johnwalkr> the atmel documentation thing seems ot be down for maintenance
[05:16:27] <braincracker> hello my friends :)
[05:16:57] <JFK911> hi
[05:17:03] <JFK911> so the arduino ide is all java?
[05:19:38] <braincracker> hahaha something like that
[05:19:54] <braincracker> i just go native and use gcc to compile
[05:20:37] <johnwalkr> the ide still uses gcc to compile
[05:21:59] <braincracker> the arduino is like a framework for scripting for noobs
[05:22:20] <braincracker> but the hardware can run native code
[05:22:59] <johnwalkr> when you use the ide, it’s still c code that is compiled.
[05:24:29] <hackvana> The IDE is Java. It uses the gcc toolchain (written in C) and some fancy preprocessing to compile an extended C/C++ into AVR object code
[05:29:14] <johnwalkr> yeah, braincracker makes it sound like the IDE is bad to use. in reality unless you are running out of space you’re not going to see any negatives compared to “native c code” http://forum.arduino.cc/index.php?topic=5680.0;wap2
[05:30:42] <braincracker> no i was thinking about the arduino thing
[05:31:01] <braincracker> not related what you write your code in
[05:31:15] <braincracker> use whatever
[05:32:50] <braincracker> i can suggest geany as C IDE, but notepad works fine.
[05:37:01] <johnwalkr> why though? i don’t think taht’s a useful recomendation unless there is a reason, like the user is out of space. beginners will get the most support if they use the same process that most other people do
[05:38:56] <braincracker> i beg to be different
[08:03:58] <Lambda_Aurigae> johnwalkr, arduino is fine if you don't mind the wiring and processing libraries abstracting everything and slowing things down.
[08:06:47] <johnwalkr> i agree, but “arduino is just a scripting thing for noobs” is different than a conversation about the advantages of going beyond the arduino environment.
[08:08:07] <Lambda_Aurigae> ardweeny environment limits you in some interesting and frustrating ways and teaches bad habits that are difficult to break when you get outside that environment.
[08:08:43] <PoppaVic> well, it's based on C++ - what do you expect?
[08:08:57] <Lambda_Aurigae> I would rather see people start with C and a text editor than the ardweeny environment.
[08:09:08] <braincracker> i came from asm, do not want :(
[08:09:55] <Lambda_Aurigae> braincracker, I started with asm on microcontrollers too but still like C for rapid development.
[08:10:15] <Lambda_Aurigae> and can see no need for C++ in microcontrollers myself...nor on a full fledged pc either but,,,
[08:10:55] <braincracker> that is a waste of resources
[08:10:57] <braincracker> ;/
[08:11:08] <Lambda_Aurigae> hence modern OSs.
[08:11:23] <braincracker> unless, we have magic libraries and references, and 128kB flash
[08:11:31] <PoppaVic> I've always been irked that cfront abandoned "translate it to C" for the extra weight/space of c++ compiling itself
[08:11:36] <braincracker> and flash executing cpu
[08:11:40] <Lambda_Aurigae> windows for workgroups 3.11 works great on this computer but can't take advantage of most of it...but it is FAST!
[08:11:50] <johnwalkr> see, this conversationis useful
[08:12:01] <braincracker> hm, why not linux ?
[08:12:08] <johnwalkr> the earlier one seemed like it could result in osme serious confusion
[08:12:20] <Lambda_Aurigae> braincracker, that's what I run...but before installing linux I put wfw3.11 on it for the fun of it.
[08:12:36] <braincracker> i installed win 3.1 on a ramdisk in 2001 for fun, but you can only play minesweeper with it and format floppy disks
[08:12:52] <Lambda_Aurigae> I have it in vmware now just for the fun of it.
[08:13:18] <Lambda_Aurigae> I have a lot of older windows software that will run on dos and win3.1/wfw3.11
[08:13:27] <Lambda_Aurigae> including borland C compiler!
[08:13:51] <braincracker> i just got this today :) http://matthewgreen.me/asterisk-pbx-on-wyse-vx0/ mini x86 pc
[08:14:03] <braincracker> awesome programming pc
[08:14:13] <braincracker> (with linux on it)
[08:14:30] <Lambda_Aurigae> I just built this computer a couple weeks ago....quad core fx 4150, 8gb ram, and stuff.
[08:15:01] <Lambda_Aurigae> I would love to get some of those little boxes like that.
[08:15:01] <braincracker> well this is like 1200g, and miniitx form factor, and has no fans
[08:15:24] <Lambda_Aurigae> I have a first gen intel mac mini that's not much bigger.
[08:15:26] <braincracker> about 15W tops i guess, didn't measure yet
[08:15:42] <braincracker> heatsink is smaller than an atom's :)
[08:15:45] <Lambda_Aurigae> need to put a dual core processor in it so i can upgrade the OS past 10.4
[08:16:21] <braincracker> oh and 12V in
[08:16:29] <braincracker> car pc ?:)
[08:16:47] <Lambda_Aurigae> that's what my tablet is for.
[08:17:03] <braincracker> i don't like having no keyboard
[08:17:07] <braincracker> :/
[08:17:12] <Lambda_Aurigae> no problem with my tablet.
[08:17:14] <braincracker> and usb ?
[08:17:21] <Lambda_Aurigae> has usb host and usb device ports.
[08:17:34] <Lambda_Aurigae> so I can plug in a keyboard/mouse wireless combo adapter.
[08:17:52] <braincracker> so you code on that ?
[08:17:53] <Lambda_Aurigae> looking to get a mini bluetooth keyboard/mouse unit.
[08:17:58] <braincracker> 800x480 ?
[08:17:58] <Lambda_Aurigae> I have, yeah.
[08:18:14] <Lambda_Aurigae> even got avrdude to run on it and upload to an avr.
[08:18:18] <braincracker> :)
[08:18:20] <braincracker> fun
[08:18:24] <braincracker> usbasp?
[08:18:25] <Lambda_Aurigae> but can't get gcc working yet.
[08:18:33] <Lambda_Aurigae> no...used Tom_itx's usb programmer.
[08:18:35] <braincracker> why not?
[08:19:12] <braincracker> assuming you meant avr-gcc
[08:19:14] <Lambda_Aurigae> just can't get things compiled right for avr-gcc and all associated stuff to work on it.
[08:19:31] <Lambda_Aurigae> still learning arm and cross compiling and all that whatnot.
[08:19:41] <Lambda_Aurigae> but, trying to get a full gcc working on it too.
[08:19:45] <braincracker> fixit and you have a mobile dev workstation :)
[08:19:50] <Lambda_Aurigae> anyhow, gotta go do chicky chores.
[08:20:09] <braincracker> bb
[08:27:32] <Lambda_Aurigae> chickies are still alive.
[08:27:42] <johnwalkr> lately for stuff like that i’m using beaglebone blacks
[08:27:58] <Lambda_Aurigae> would be nice but I don't have one.
[08:28:18] <johnwalkr> around 3-5 watts and are $50
[08:28:30] <Lambda_Aurigae> I get 20 a week allowance for lunches.
[08:28:36] <Lambda_Aurigae> and any extra I can spend on toys.
[08:28:52] <Lambda_Aurigae> we are saving money to buy our house and have lots of bills at the moment so not much left over for toys.
[08:29:22] <Lambda_Aurigae> for me electronics and microcontrollers is just a hobby so I can't justify spending much on them.
[08:29:57] <johnwalkr> i use them for research so my school pays for them
[08:31:50] <Lambda_Aurigae> I have a nice 10 inch acer iconia tablet that I use for mobile work then upload my code to my pc at home for compiling.
[13:09:56] <ravon> Sometimes I wonder if the C++ bashers have the numbers to back their claims up or if they just make things up as they go along.
[13:28:09] <illumer> hello
[13:29:31] <illumer> any body free for a little consultation
[13:29:35] <specing> ravon: I use C++ not because it is the best possible language, but because it is the best I've ever laid eyes on.
[13:30:14] <illumer> regarding SPI problem
[13:33:38] <illumer> hello
[13:33:48] <illumer> anybody is there?
[13:59:47] <Lambda_Aurigae> http://www.openlogiclabs.com/?p=118
[14:00:05] <Lambda_Aurigae> an interesting little design....android based compiler and IDE along with bluetooth connection for programming.
[14:05:08] <ravon> specing: Yeah, kind of the same here. For my purposes it's the best thing. I was referring to earlier conversations about it apparently adding bloat to both size and speed.
[14:07:09] <Lambda_Aurigae> I don't know about C++ adding bloat but the arduino libraries do...that's what I was referring to.
[14:09:21] <Lambda_Aurigae> I've just never seen the need or usefulness of anything in C++ over C....
[14:10:42] <ravon> They add bloat how?
[14:11:25] <ravon> You mean they don't contain the optimal implementation? I can give you that, but neither does Atmel's ASF and it's written in C.
[14:11:36] <Lambda_Aurigae> I don't use atmel's asf either.
[14:12:03] <Lambda_Aurigae> guess I just don't understand the need for something like the wiring system.
[14:12:43] <ravon> Some things C++ has as an advantage over C could be RAII, type safety and possibly faster implementations (std::copy over memcpy).
[14:12:44] <Lambda_Aurigae> probably comes from me being entirely self taught when it comes to electronics and microcontrollers...I just like to keep things closer to the core.
[14:13:01] <Lambda_Aurigae> no clue what RAII is.
[14:13:18] <ravon> I see it the other way. Not sure why one would pick C over C++ :)
[14:13:39] <twnqx> typing overhead, runtime overhead
[14:13:46] <twnqx> memory overhead
[14:13:55] <ravon> Sure, exceptions add a lot of space overhead and virtual calls add some runtime overhead but then just don't use them.
[14:14:19] <specing> then don't use exceptions?
[14:16:15] <Lambda_Aurigae> guess it's all down to personal preference.
[14:16:41] <ravon> True :)
[14:17:15] <ravon> specing: Yes, nobody is forcing you to use them though libstdc++ makes a damn good effort.
[14:17:24] <Lambda_Aurigae> I started with basic, then moved to assembly, then pascal, fortran, C, ada, and then assembly on multiple other processors,,,,before moving to the "Object oriented" languages like C++ and Java
[14:20:32] <Lambda_Aurigae> heck, the microcontrollers I'm working with now are more powerful in memory and processor speed than the first 4 computers I owned.
[14:20:54] * Xark posts a comparison of "native" digitalWrite vs Arduino implementation -> http://pastebin.com/dSRSxgax
[14:21:26] <Lambda_Aurigae> what is digitalWrite?
[14:21:41] <ravon> I offloaded most of our work to Python running on a Telit modem. It has faaaaaar more RAM and storage than our MCU.
[14:21:42] <Xark> Lambda_Aurigae: Set a GPIO pin HIGH/LOW
[14:22:05] <ravon> Plus, it's Python so you can focus on doing your job.
[14:22:41] <Lambda_Aurigae> ravon, yeah, python...another of those languages I don't understand the need for,,,but I'm too old fashioned..hehe
[14:23:46] <Lambda_Aurigae> Xark, aahh..yeah, that looks a little overboard just to toggle a pin.
[14:24:13] <Xark> Lambda_Aurigae: Indeed. Arduino folks moved to a pin remap lookup table (not so efficient on AVR).
[14:24:38] <johnwalkr> some of those are for safety but yeah the pin lookup part can suck
[14:24:51] <johnwalkr> and that causes a lot of confusion when you move to c
[14:24:56] <Lambda_Aurigae> safety...let's round off the edges so you can't hurt yourself.
[14:25:24] <Xark> johnwalkr: No excuse when all the parameters are constant. :)
[14:25:53] <johnwalkr> yeah
[14:26:20] <johnwalkr> though, there’s no reason why you can’t use the “native” version in the arduino ide
[14:27:57] <Xark> johnwalkr: Correct. That is what I did. This pastebin was made as an example for someone in #arduino that said there was "little difference". :)
[14:29:18] <johnwalkr> arduino certainly has its place
[14:31:34] <Xark> johnwalkr: Sure, I love Arduino. Like Lambda_Aurigae it is more powerful than my first computer (and can even "bit-bang" my first and 2nd computers video output and still be faster). -> http://imgur.com/a/JO4Cq
[14:33:56] <Xark> However, that said, not all that impressed with Arduino "software engineering" (i.e., no real documentation and inconsistent API design). Still good enough though and very easy to get started with.
[14:34:16] <johnwalkr> yeah it has some weirdness
[14:34:48] <johnwalkr> but the whole thing overall is great, and i’m confused because there always seems to be people that
[14:35:00] <johnwalkr> it’s today’s basic though
[14:35:37] <Xark> Yeah, lots of "Arduino hate" out there. :)
[14:36:32] <johnwalkr> not sure how i didn’t finish that sentence
[14:36:43] <johnwalkr> but yah
[14:36:46] <Xark> :)
[14:54:05] <ravon> Xark: Compared to what Atmel has produced with ASF the Arduino libraries are a dream come true both in terms of documentation and API design though.
[14:56:57] <ravon> When I'm in doubt how to structure my libraries I usually peek at Arduino and aery32.
[15:00:48] <Xark> ravon: Yes, ASF is a mess. I have avoided it (and just hit their datasheet typically).
[15:01:13] <Xark> Aery32 also does seem to have good software design.
[16:03:33] <hjohnson> heh... I'm liking the named address spaces in the newer versions of GCC
[16:27:18] <tomatto> is possible to make uint24_t ?
[16:27:48] <braincracker> yes
[16:27:53] <braincracker> but why?
[16:28:10] <braincracker> they use uint32_t because it is faster
[16:28:15] <braincracker> aligned
[16:28:35] <braincracker> at least on 16-32 bit systems...
[16:31:01] <tomatto> braincracker: i have 8bit system - atmega8
[16:31:53] <braincracker> yea well 24 bit is not std
[16:32:19] <braincracker> only in video memory, but they use 32 bit too usually
[16:33:21] <tomatto> braincracker: so it is better to use uint32 instead of somehow making uint24?
[16:33:53] <braincracker> no, if you build an array and have low ram
[16:34:39] <braincracker> you can build a 24 bit type for example using 16bit+8 bit or 3x8 bit
[16:35:18] <tomatto> braincracker: how can i build it as a regular type?
[16:35:54] <braincracker> typedef union {
[16:35:54] <braincracker> struct{ uint8_t r, g, b, a; };
[16:35:54] <braincracker> uint32_t z;
[16:35:54] <braincracker> } muxrgba_t;
[16:37:32] <braincracker> typedef struct {
[16:37:32] <braincracker> uint8_t a1, a2, a3;
[16:37:32] <braincracker> } limit_24_t;
[16:37:41] <braincracker> for example
[16:39:19] <tomatto> i want to uint24_t works like uint8_t, overflow features etc.
[16:54:48] <PoppaVic> you don't get to add yer own types.
[16:57:53] <braincracker> well, there are no 24 bit registers...
[17:13:21] <tomatto> braincracker: 32 or 16 bit neither
[17:13:26] <tomatto> on 8 bit system
[17:15:30] <braincracker> been using 16bit + 8 bit on 8 bit avr
[17:16:02] <braincracker> and 32 bit
[17:16:33] <braincracker> will you rewrite gcc to support 24 bit variables? ;/
[17:16:36] <Xark> tomatto: You could do something ugly with C++ types and overloads and inline asm, but it would be pretty hacky/ugly. I suggest int32_t for operations on elements and something like braincracker suggests to save bulk memory. :)
[17:17:29] <braincracker> you can macro it or whatever, it will never be native type, only emulated
[17:28:49] <AsgardBSD> Hi
[17:29:05] <AsgardBSD> Should i learn pic 16 bit, or is it a waste of time if i need mroe power and directly learn 32 bit, and keep 16 bit for low power like msp430?
[17:29:51] <AsgardBSD> I am hesitating between msp430, AVR, ARM, PIC 16 bit, PIC 32 (MIPS) and XMOS
[17:30:34] <AsgardBSD> I want to choose maybe 2-4 different mcu (AVR for sure)
[17:30:39] <myself> I don't see why anyone would do anything other than 8051.
[17:30:45] * myself scuttles back under his bridge
[17:31:07] <AsgardBSD> Wanted to learn 8051, but cant find any programmer nor the programmer software
[17:31:21] <AsgardBSD> Have 14 AT89 collecting dust
[17:32:03] <myself> in all seriousness, an astonishing number of commercial USB devices are 8051-inside.
[18:04:57] <vsync1> hello
[18:04:58] <vsync1> i love pwm
[18:05:03] <vsync1> and transistor
[19:03:35] <braincracker> AsgardBSD just learn C and use whatever :)
[19:04:28] <The_Coolest> I think vsync1 is the reincarnation of beaky
[19:05:44] <braincracker> possibly
[19:06:16] <The_Coolest> but it's great to know he/she loves those things
[19:06:32] <The_Coolest> It is very useful information to us all
[19:07:23] <braincracker> who loves vsync ?
[19:07:50] <braincracker> pwm and transistor loves vsync too?
[19:07:57] <The_Coolest> vsync can be useful
[19:08:06] <The_Coolest> lol
[20:28:36] <AsgardBSD> braincracker: i already know C
[20:28:43] <AsgardBSD> I learned that 6 year ago
[20:29:44] <braincracker> why is architecture a problem for you then?
[20:35:28] <AsgardBSD> Architecture is also learning using periphiral around the cpu
[20:44:49] <AsgardBSD> from what i saw... msp430 look like as powerful as all 8 bit mcu, has almost all the same peripheral has the 8 bit mcu, and beat 1/2 of the pic24 and dspic...
[20:45:30] <AsgardBSD> So i guess then the best thing to do is to go AVR, msp430 and either pic32 or arm
[20:45:34] <Lambda_Aurigae> but not nearly as easy to work with as avr
[20:45:47] <Lambda_Aurigae> in my opinion anyhow.
[20:46:49] <AsgardBSD> I wonder what about avr32
[20:46:52] <AsgardBSD> does it worth it?
[20:47:15] <Lambda_Aurigae> no
[20:47:21] <Lambda_Aurigae> go with arm instead.
[20:47:31] <Lambda_Aurigae> avr32 was a nifty idea 6 years ago.
[20:49:11] <AsgardBSD> what about pic32?
[20:52:40] <AsgardBSD> well, msp430 has only max 5 timer
[20:55:02] <AsgardBSD> :( no ethernet on AVR nor msp430
[20:55:04] <Lambda_Aurigae> each has its own niche....I use avr, pic18, pic32, and 8051/2 chips here and there.
[20:55:16] <Lambda_Aurigae> that's what the enc28j60 chip is for.
[20:55:24] <Lambda_Aurigae> aaand, off to bed.
[20:58:20] <AsgardBSD> Lambda_Aurigae: How do you know when you need pic18, pic32, 8051 or avr?
[21:31:54] <rue_shop3> easy, you alwasy need avr
[21:32:03] <rue_shop3> pics can go in the trash
[21:32:14] <rue_shop3> the 8051 can stay under the glass lid