#avr | Logs for 2013-11-27

Back
[00:03:15] <rue_bed> if you want to use the io ports properly, you have to have jtag off
[00:03:55] <Casper> rue_bed: you said you weren't too good with smps right?
[00:04:34] <rue_bed> I was ok
[00:05:00] <rue_bed> I forgot most of my magnetics stuff
[00:08:36] <Casper> rue_bed: http://imageshack.com/a/img132/623/0iwx.png ← that will be sepic, the X1-4 is the transformer... do you see any issue there?
[01:19:45] <Sefid_par> I need a simple program to write on my avr from linux
[01:20:14] <Sefid_par> this doesn't work on my mega16: http://www.tldp.org/HOWTO/Avr-Microcontrollers-in-Linux-Howto/x207.html
[01:21:06] <twnqx> look at avrdude
[01:21:22] <Sefid_par> twnqx: I used avrdude
[01:21:32] <twnqx> then use a newer version
[01:21:32] <Sefid_par> do you have any simple program?
[01:21:38] <twnqx> definitely supports mea16
[01:21:46] <Sefid_par> it supports mega16
[01:21:57] <Sefid_par> I tested a program to blink led
[01:22:00] <Sefid_par> but led is off
[01:27:32] <Sefid_par> twnqx: worked properly :*
[01:27:38] <twnqx> that - to me - suggests that your program is not working, you got the wrong pin, compiled ...
[01:27:40] <twnqx> lol
[01:29:01] <twnqx> anyway, if programming and verification works in avrdude, it's normally not the hardware's or the flasher's fault
[01:29:37] <Sefid_par> I had copied the avrdude command and forgot to change the part number
[01:29:44] <twnqx> ah :)
[01:29:54] <Sefid_par> it was set on m328p
[01:30:00] <Sefid_par> (y)
[01:30:12] <twnqx> happens
[01:32:57] <Sefid_par> viva :)
[01:33:16] * Sefid_par is happy of blinking LED :D
[06:29:01] <Sefid_par> Which library has declared UBRR?
[07:33:45] <Fornaxianian> http://hackaday.com/2013/11/27/update-sd-card-locker-now-supports-password-protect/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+hackaday%2FLgoM+%28Hack+a+Day%29
[09:14:15] <Darkwell> helo there
[09:17:11] <Darkwell> using an arduino uno rev 3.0 . I have a GPRS shieald with microSD slot on. I would like to be able to store executables on MicroSD card that one can run whenever wanted/needed. Any hints how to achieve this ?
[09:18:50] <Casper> Darkwell: sorry to break your dream, but the atmega can not do that
[09:19:17] <Casper> the only way to work around that limitation is to write a bootloader that would read the code from the SD and flash it to the avr
[09:19:41] <Darkwell> well
[09:19:43] <Casper> which mean that you add lots of wear on the flash, which have a 10k write cycle endurance
[09:19:52] <Casper> and take relativelly lots of time
[09:20:27] <malinus> Darkwell, maybe if you tell us what you want to archive, instead of what you think you want to do :). Unless that is actually exactly what you want to archive
[09:20:37] <Darkwell> http://www.youtube.com/watch?v=5h28QiYlXe8
[09:20:51] <Darkwell> it should be possible to run executabe from SD storages
[09:21:04] <Darkwell> maybe you need to modify bootloader etc
[09:21:25] <Casper> it's not possible to run executable except if you make an interpreter and "emulate" a microcontroller
[09:21:53] <Darkwell> um what hinders you from writing your own bootloader/os ??
[09:21:56] <Casper> the only and only place that the avr can execute code is from the internal flash
[09:22:17] <Darkwell> no prossibility to use progmem there ?
[09:22:24] <Casper> none
[09:23:06] <Casper> it's actually what I beleive is the main weakness of avr, but... avr ain't made for that
[09:23:30] <malinus> What I could imagine would be durable, Darkwell, would be to embed your own programming language on the uC. And then have it execute your own code from SD/whatever. It would be limited, depending on what you want to archive.
[09:23:37] <Darkwell> how about having a stub in bootloader to have a "driver" to read executable code ?
[09:24:52] <malinus> with " embed your own programming language" I mean - make your own impretetor, actually
[09:25:12] <Darkwell> i understood that
[09:25:43] <Darkwell> if you program in assembler then its no prob yes ?
[09:26:27] <Darkwell> maybe inline assembler and avr would do som trick
[09:26:44] <Casper> Darkwell: then your main program must know every single instruction that you want to support and use
[09:26:50] <Casper> and do it in software
[09:26:52] <malinus> ^
[09:26:53] <Casper> it will be slow
[09:26:57] <malinus> ^
[09:27:03] <Darkwell> i see
[09:27:10] <Darkwell> its kind of annoying then
[09:27:25] <malinus> Well, all depends on what you want to archive.
[09:27:29] <Casper> yeah, you might want to move to an ARM based board
[09:27:37] <Darkwell> because what i want is to have several executables in microSD and call when needed
[09:27:39] * Casper goes back to work
[09:27:57] <Darkwell> for instance correct the rtc clock sometimes on a long running system having gprs
[09:27:59] <Casper> I have 13 computers that awaits me...
[09:28:16] <Darkwell> have fun Casper
[09:28:46] <malinus> Darkwell, well why would you want to have that on a executable on a SD? Why not just flash it together with the rest of the code. I can't see the advantage.
[09:29:39] <Darkwell> just want to modularize things and have smaller temporal memory footprint
[09:30:41] <Darkwell> for instance ntp isnt run very often compared to rest of the code
[09:30:52] <Darkwell> so why let it leech on the memory ?
[09:31:16] <malinus> Why do you care? It's not like the memory size changes - if it can fit in, it will fit in
[09:31:21] <Fornaxian> the AVR can only execute code from flash. In order to do that you would need to load your program into a section of flash and jump to it.
[09:31:33] <Darkwell> functions that arent run often and have low pruio ..I would like to stor away kn sd
[09:31:52] <Fornaxian> you are thinking PC and not microcontroller there Darkwell
[09:31:54] <malinus> Darkwell, just know - this is not very practical compared to what yo want to archive. It's a more of a hack, no matter how you look at it. But if you could easily make a simple impretetor, that would support some basic functionality.
[09:32:03] <malinus> *you
[09:32:30] <Darkwell> yeah
[09:32:55] <Fornaxian> it is possible to have an AVR use a bootloader to load program from SD card...I have done this before and someone else just got his working yesterday.
[09:33:10] <malinus> Why does the flash footprint matter at all for you? As long as it fits, it fits...
[09:33:14] <Fornaxian> but loading 16K from SD to flash takes my bootloader several seconds.
[09:33:28] <Darkwell> been looking at something like firmata ( protocol over serial to communicate with pc ) and thought of having similar interpreter reading from SDcard
[09:33:43] <malinus> Fornaxian, but that isn't exactly what he wants. I think. He wants to execute code on runtime from the SD.
[09:33:55] <Fornaxian> yeah.
[09:34:17] <Fornaxian> you could, in theory, load an 8K or 4K chunk of code into a segment of flash and jump to that.
[09:34:18] <Darkwell> also being able to add more executables without restarting
[09:34:26] <Fornaxian> but still, loading it up to the flash takes forever.
[09:34:30] <Darkwell> was even looking at adding ram over serial
[09:35:06] <Fornaxian> Darkwell, I tried that once.
[09:35:09] <Fornaxian> serial sram.
[09:35:19] <Darkwell> how did that work ?
[09:35:24] <Fornaxian> adding it into the C compiler so it uses it seamelessly is,,,,painful.
[09:35:32] <Fornaxian> I never got it going right.
[09:35:40] <Darkwell> i see
[09:35:44] <Fornaxian> adding a whole new memory segment to gcc was beyond my ability.
[09:36:07] <Fornaxian> now, I do have some libs that can load data from and save to serial sram and serial eeprom.
[09:36:19] <Darkwell> ok
[09:36:25] <Fornaxian> and am working on porting a good basic interpreter to avr.
[09:36:39] <MrMobius> hmmm, i just used a preprocessor i wrote so i could use serial ram seamlessly
[09:36:46] <Fornaxian> have also looked at porting a C interpreter I found.
[09:37:06] <MrMobius> i just use #pragma to mark off anything that should be in serial ram and the preprocessor replaces all writes and reads to it with functions
[09:37:12] <Fornaxian> MrMobius, so you could set variables in serial sram rather than internal heap?
[09:37:18] <MrMobius> yep
[09:37:21] <Fornaxian> hmmm.
[09:37:27] <Fornaxian> guess I went about it the wrong way then.
[09:37:34] <Fornaxian> will have to look at #pragma.
[09:37:39] <MrMobius> it probably takes close to 100 cycles to read or write though
[09:37:51] <Fornaxian> that still won't solve Darkwell's wanting to execute code from sd or dynamically load sections.
[09:38:15] <MrMobius> #pragma is just a way of marking off code so the preprocessor knows what to do. you could also mark any variables with a // comment just as easily
[09:40:29] <Darkwell> was it the 23K256 SPI ram you tried ?
[09:40:40] <Fornaxian> Darkwell, I've used an 8052 chip to dynamically load executable modules into sram on the fly and jump to them...just wish I could do so with AVR but, alas, no go.
[09:41:11] <Darkwell> hmm
[09:41:51] <Fornaxian> MrMobius, similar...23lc1024 and 23lcv1024
[09:42:06] <Fornaxian> I like the 23lcv1024 as I can put a battery backup on it.
[09:42:21] <MrMobius> whats the difference?
[09:42:26] <MrMobius> between those two
[09:42:43] <Fornaxian> lc is 1,2,or 4 bit read/write
[09:42:54] <Fornaxian> lcv is 1 or 2 bit read/write with optional battery backup.
[09:43:00] <MrMobius> ohhhhhh
[09:43:19] <Fornaxian> the 4 bit parallel read is nifty for generating video signal.
[09:43:23] <MrMobius> i bought a couple of the lc ones specifically for the 4bit r/w
[09:43:36] <MrMobius> yep. thats what i want to do.
[09:43:51] <Fornaxian> lcv is identical only they remove the extra bits and put in a battery backup functionality
[09:44:33] <Fornaxian> I've been playing with interleaving 4 of them to do 800x600 4bit color.
[09:44:47] <MrMobius> 0_o
[09:44:52] <Fornaxian> using a little glue logic and an external 20MHz clock.
[09:45:14] <MrMobius> i got a 320x200 5 inch LCD with no controller i want to get running
[09:45:35] <Fornaxian> that's gonna need LVDS.
[09:45:43] <Fornaxian> I'm just feeding to a regular VGA monitor.
[09:45:50] <Fornaxian> RGBI..
[09:46:07] <Fornaxian> one bit for each.
[09:46:46] <MrMobius> no, its just a cheap monochrome screen. i wanted to mess with it because it was cheap and i was trying to find a monocrhome one though not that big. its basically just 4 lines leading to shift registers and a couple clock lines.
[09:47:39] <Fornaxian> aahh.
[09:48:10] <Fornaxian> I have several monochrome and color LCDs here out of sharp copiers but they require an external LVDS controller.
[09:49:08] <Darkwell> Fornaxian, is this inabiity to "load into ram" a limitation of avr or is it an atmel limitation ?
[09:49:40] <Fornaxian> Darkwell, you mean the variables part or executing code from ram?
[09:50:04] <Darkwell> loading data into ram ( executable) and jump to that memory adress and run
[09:50:23] <Fornaxian> avr can not execute code from ram...only from onboard flash.
[09:50:27] <Darkwell> i thought if you could get hold of some assemblator you could jsut bypass that ?
[09:51:00] <Fornaxian> no clue what an assemblator is.
[09:51:14] <Darkwell> its compiling assembler code
[09:51:21] <Fornaxian> assembler
[09:51:49] <Fornaxian> but still, the avr can only execute code from onboard flash...
[09:52:11] <Fornaxian> not sure about the xmega series but the attiny and atmega series only execute code from onboard flash.
[09:52:17] <MrMobius> you will have to look at another architecture if you want to execute from ram
[09:52:33] <Darkwell> so if the onboard flash had extra routines
[09:52:34] <Fornaxian> 8052, arm, avr32 can all do so.
[09:52:43] <MrMobius> msp430
[09:53:05] <Darkwell> houw about the microchip 18m4550
[09:53:14] <Fornaxian> 18f4550
[09:53:15] <Darkwell> 18f4550
[09:53:16] <Fornaxian> and, no
[09:53:38] <Darkwell> oh ok
[09:53:41] <Fornaxian> 18f4550 is harvard architecture like the avr.
[09:53:57] <Fornaxian> all pic18 and pic16 are the same far as I know.
[09:54:04] <Darkwell> 8052 are cheap ?
[09:54:15] <Fornaxian> 8052 has been around a very long time.
[09:54:22] <Fornaxian> it's an updated 8051 seriesl.
[09:54:35] <Darkwell> ok
[09:55:03] <Darkwell> sounds like one might want 8052 and atmel/microchip depending on functionality
[09:55:07] <Fornaxian> 8051 has been around a very very very long time.
[09:55:12] <MrMobius> lol
[09:55:20] <Fornaxian> I use all three depending on the project.
[09:55:34] <MrMobius> a lot of people dont like 8051s. they make updated versions now though which arent as bad
[09:56:01] <Fornaxian> the ds89c450 is as fast as an avr clock for clock...
[09:56:10] <Fornaxian> 33Mips at 33MHz
[09:56:28] <Darkwell> hehe so maybe one might want to replace the arduino board with 8052 to the shield that I got now
[09:56:40] <Fornaxian> unless executing from external storage, then it slows down to 1/4 that speed.
[09:57:42] <Darkwell> 1/4 th isnt bad for jsut running smoe code sometimes
[09:58:17] <MrMobius> the ds89c450 is pretty expensive though
[09:58:26] <Darkwell> hehe
[09:58:29] <MrMobius> about $20 iirc. you can sample them though.
[09:58:53] <Fornaxian> have only ever gotten them sampled myself.
[09:59:29] <Darkwell> they sample to non sudent hobbyists ?
[09:59:35] <Darkwell> student
[09:59:38] <Fornaxian> sometimes.
[09:59:42] <Darkwell> cool
[09:59:44] <MrMobius> atmel also makes single-cycle 8051s but they arent as impressive since they only load one byte per clock so any instructions that take more than one byte will be slower.
[10:00:24] <MrMobius> pffft, im not a student and i was honest on all the samples forms and abot 10 of the 15 i applied to sent me what i asked for
[10:00:35] <MrMobius> including atmel
[10:00:42] <Darkwell> cool
[10:00:46] <MrMobius> i dont even think its worth it to make up a fake company on sample forms
[10:01:10] <Darkwell> i havent even tried to get samples yet
[10:02:25] <MrMobius> i only did it once. i have more than enough stuff to play with now. i am glad i could sample those 8051s. i definitely would not have paid $20 for one that may or may not be a pain in my ass to use
[10:02:34] <Darkwell> the reason why I started was to build a simple doorbell with a PIR sensor... and it seems to addict me to do more fin projects
[10:02:55] <Darkwell> s/fin/fun/
[10:07:19] <Darkwell> doorbell has become a homebrewn alarm rig with pir and gprs chield .. bought a couple of 18f4550 to, to play with ssoon... curiosity makes this go on.. and you tell me about the 8052.. so now I want to play with those later on =))
[10:11:18] <Darkwell> is 8052.com a good place to peek into that microcontroller ?
[10:11:52] <zmo> hi!
[10:12:59] <Fornaxian> Darkwell, yes.
[10:13:02] <Fornaxian> hi zmo
[10:13:24] <Fornaxian> Darkwell, I'm finding that using an avr with an interpreter is working well for me so far.
[10:13:25] <Darkwell> ty Fornaxian for your info...
[10:13:26] <zmo> I'm working with an electronic engineer to build a PCB with an Atmega2560 for a project, and I've asked him to put ISP/JTAG and PP headers on the board. I mostly wanted him to put PP headers, so I can fsck up the fuses and restore them with HVPP
[10:13:49] <Fornaxian> now, i'm off to make rolls!
[10:13:57] <zmo> but I'm wondering what are the considerations to have for HVPP... Is the High Voltage really only on the reset line?
[10:14:58] <zmo> shall we only add a diode on the reset line to protect the USB driver MCU? Or could the High Voltage happen on other pins as well?
[10:15:34] <zmo> it looks like there's no design guideline to put a HVPP header on a PCB
[10:22:48] <N1njAway> HVPP is kind of a completely last resort for unlocking a bricked device. There's no reason to ever really use it these days for most practical applications.
[10:34:57] <zmo> N1njAway - well, it does not cost a lot to add it to a design
[10:35:14] <zmo> and I know that I'll be messing around with the fuses
[10:35:52] <Fornaxian> you only apply the high voltage to the reset...it does NOT go to any other pins.
[10:36:03] <zmo> Fornaxian - ok, that's what I thought
[10:36:34] <Fornaxian> it doesn't need to be high current either...it just trips a special loader function when the voltage rises above a predefined point.
[10:37:11] <zmo> so basically a diode towards every other end on which the reset line is connected to avoid any potential problem and we're set
[10:37:39] <Fornaxian> why not use a clock source and SPI instead?
[10:37:50] <N1njAway> Or just don't misprogram the fuses in to an unrecoverable state :)
[10:38:18] <N1njAway> Which about the only unresolvable one is disabling the reset pin, with a second of maybe setting the clocks weird.
[10:38:19] <Fornaxian> what you would be screwing up in the fuses that would require HVPP is clock functionality...and, by providing a stable clock source you can get around that if you screw it up.
[10:38:20] <zmo> N1njAway - shit happens :-)
[10:38:43] <Fornaxian> yeah....disabling reset pin is the only thing you really NEED it for that I've ever seen.
[10:38:58] <N1njAway> zmo: True, but in 12 years and 10,000+ AVR devices programmed here I've never needed HVPP to date. :)
[10:39:09] <Fornaxian> same here in 9 years.
[10:39:15] <zmo> N1njAway - well, I'm being a bit too cautious then :-)
[10:39:19] <Fornaxian> did play with it once with my dragon but never needed it.
[10:39:35] <zmo> but I already fucked up a board
[10:40:21] <N1njAway> It's also easy to just replace the micro if it gets bricked up.
[10:40:45] <Fornaxian> N1njAway, well, not always if they are surface mount and soldered on and all that.
[10:41:44] <N1njAway> Yeah, if you don't have SMT rework stuff on hand I suppose that could be a bit more challenging.
[10:41:59] <Fornaxian> on the other hand,,,use the carpenter's method for fuses...a good carpenter measures twice and cuts once...a good microcontroller developer checks them fuses twice, then a third time, then a fourth time, then programs.
[10:42:27] <Fornaxian> fuses change so seldom, however...at least in my world.
[10:42:50] <N1njAway> Or use Atmel's tools, which warn you if you're about to do something potentially stupid.
[10:42:53] <Fornaxian> time to see if truck will start...no yeast and need it for my rolls..and truck battery was dead!
[11:13:19] <v0kehc> Fornaxian: push start
[11:14:15] <Fornaxian> automagic transmission.
[11:14:22] <Fornaxian> wish it was a manual.
[11:45:13] <ROMA> hi all
[11:45:32] <ROMA> anybody knows some small audio2digital converter chip?
[11:45:47] <Guest1921> i want to transfer voice via nRF24L01
[11:48:29] <Guest1921> everybody ignores me or it only seems like that? :D
[11:56:50] <NotKnown> i hear my echo..
[11:57:52] * NotKnown take off closes and dance around the room naked
[13:07:31] <Fornaxian> http://mynews13.com/content/dam/news/images/2013/08/jack-cell-tower-sanford-0821-4.jpg
[13:07:59] <Fornaxian> that's what happens when you feed 12V to a 5V microcontroller.
[13:08:00] <bss36504> I think it's broken
[13:16:03] <malinus> Fornaxian, nah I did that with my attiny with 9V. It didn't work with that voltage, but it still works to this day today
[13:16:28] <malinus> I was like "why doesn't it work?!". And then I realized it was connected to the 9V rail...
[17:16:52] <hetii> Hi :)
[17:17:28] <Fornaxian> hello hetii
[17:17:51] <hetii> I found such site with software automatic mouth from c64: http://simulationcorner.net/index.php?page=sam
[17:18:13] <hetii> Anybody here want to help me to clean those messy code and prepare lib for avr ?
[17:18:22] <Fornaxian> not me.
[17:18:42] <hetii> ;(
[17:19:06] <Fornaxian> I'm already porting a basic interpreter and C interpreter to avr.
[17:19:20] <malinus> hetii, is that a job or "hey let's do this fun project together!"? Also, are you sure it will fit on most avr's?
[17:20:17] <hetii> Just for fun, and so see if it will works on avr and how :)
[17:20:24] <hetii> *to
[17:20:43] <malinus> hetii, interesting actually. hmm.
[17:21:40] <malinus> 39KB :/
[17:21:44] <Fornaxian> might be better to port the original assembly to avr assembly.
[17:21:49] <malinus> ^
[17:22:22] <Fornaxian> as the C version is just a command by command conversion from 6502 assembly to C.
[17:22:24] <hetii> General project can be splited to sam (software that prepare wave and play it) and reciter (software that prepare human readable string to phonetic version)
[17:23:16] <hetii> yep there are a lot of things that i believe can be removed or optimized.
[17:23:40] <malinus> hetii, I've made a .wav player once, just using some old pc-speaker. So if it can spit out the raw wav (it will need to be buffered somehow), it will be easy to make it work.
[17:24:22] <Fornaxian> I've done similar with other commodore programs, converting the assembly to C...not real efficient but running it on a PC was ok.
[17:24:37] <malinus> hetii, but yeah, buffering is necessary....
[17:25:36] <malinus> It could be tricky to get the buffering right, depending on how easy it would be to make "pause" the processes.
[17:26:11] <hetii> Yep i can imagine that, as i said its just for fun and to see how it will work there.
[17:26:12] <Fornaxian> malinus, as for it fitting on an AVR, it fit on a C64 originally, so, it should be able to go on at least an atmega168 or atmega328,,,if it were re-ported properly.
[17:26:35] <Fornaxian> although the C64 did have audio output hardware to make life a little easier.
[17:27:06] <malinus> Fornaxian, playing wav from a buffer is like 3-4 lines to initialize.
[17:27:44] <Fornaxian> using dac or pwm output there malinus ?
[17:28:40] <malinus> Fornaxian, pwm of course. Anything else would be crazy imho. :). 8000bytes/second worked just fine for that
[17:29:12] <Fornaxian> I've seen it done with an r2r dac too..lots more hardware though.
[17:29:46] <malinus> Fornaxian, I've only used a transistor and a pc-speaker
[17:30:46] <Fornaxian> I don't do much in the way of audio thee days...kinda dropped out of the audio world back in the 80s.
[17:31:15] <malinus> Fornaxian, I could have like 2seconds on flash. So I ended up making it play from SD card. Also ended up making it transmit it with AM, because all it took was another transistor and some cabel
[17:31:29] <Fornaxian> hehe.
[17:31:40] <Fornaxian> I have done the AM tansmitter with an attiny45 before.
[17:32:18] <Fornaxian> just for the heck of it I used it to send data to a PC at 4800bits per second.
[17:32:29] <malinus> Fornaxian, well all it takes is a cable. if you want to transmit real "sounds" (more then a single tone). You gonna need two transistors.
[17:32:33] <malinus> Fornaxian, what was your range?
[17:32:36] <Fornaxian> am radio to pick it up and feed it into the serial port.
[17:32:42] <malinus> Fornaxian, lol
[17:32:47] <malinus> cool
[17:33:01] <Fornaxian> 3 to 5 meters line of sight.
[17:34:55] <Fornaxian> wanted to try to make an FM transmitter and receiver but never got around to it....that and I didn't have a chicken to sacrifice to the RF gods.
[17:35:05] <Fornaxian> FM being RF black magic after all.
[17:35:18] <malinus> AM is so nice. I was shocked first time I've made it work. I mean, I connected a small piece of copper. Made a timer turn it on and off at x frequency. Turn that timer on and off. And I was actually sending data
[17:35:28] <malinus> "FM being RF black magic after all." haha exactly
[17:35:46] <malinus> I've never got around to FM either, especially not after realizing how much of a pain compared to AM it is
[17:36:33] <Fornaxian> heck, as a kid I used walkie talkies along with some bandpass filters to make a discriminator....and a 555 timer with several buttons feeding through different resistors to make the tone to feed into the transmitting walkie.
[17:36:41] <Fornaxian> made my own remote control car that way.
[17:37:31] <Fornaxian> bandpass filters being built out of variable caps and lm741 opamps.
[17:40:35] <malinus> hehe that's pretty crazy for a kid
[17:40:47] <Fornaxian> I was,,,14ish.
[17:41:03] <Fornaxian> I started with electronics when I was 8 and fixed a radio that my dad had thrown away.
[17:41:12] <ambro718> probably not the best place to ask, but is anyone familiar with AT91SAM timers? I'm wondering about the precise semantic of the TC interrupts (overflow, RA/B/C compare). Is the interrupt bound to the status flags in TC_SR or based purely on events? For example, if overflow interrupt is *disabled*, and I enable it after an overflow (COVFS status flag set), will the interrupt execute immediately, due to COVFS being set?
[17:41:29] <Fornaxian> shortly after that they got me one of those radio shack 50 in 1 electronics kits and I never stopped.
[17:42:08] <Fornaxian> ambro718, ooooohhh....arm...umm...no clue...still haven't done more than blink a light on my stellaris.
[17:42:24] <ambro718> ARMs are cool :D
[17:43:06] <Fornaxian> I'm still learning things every time I pick up an 8-bit micro.
[17:43:34] <ambro718> it's not really that different, though the toolchain is a bit harder to set up (and vendor specific)
[17:43:51] <Fornaxian> yeah.
[17:43:59] <Fornaxian> that's been my biggest issue.
[17:44:14] <malinus> ^ the greatest thing about avr is almost the toolchain
[17:44:24] <malinus> it also respects my freedom :(
[17:44:26] <malinus> ;)
[17:44:46] <Fornaxian> malinus, between the toolchain and simple interfaced programmer, I switched from pic to avr years ago.
[17:44:52] <Fornaxian> then went kinda back to pic
[17:44:55] <Fornaxian> for some things.
[17:45:11] <ambro718> But it's not hard, just need to invest some hours. For SAM, you basically need to download ASF and compile and link the right parts along with your program
[17:45:21] <ambro718> this is my compile script for example, https://github.com/ambrop72/aprinter/blob/master/compile-rampsfd.sh
[17:45:23] <malinus> Fornaxian, how was the pic for you?
[17:45:51] <Fornaxian> malinus, early on pic upset me with the lack of free C compiler and the fact that the programmer I paid 50 bucks for wouldn't work with new chips.
[17:46:14] <Fornaxian> when I discovered that I could program an AVR with 5 wires from my parallel port I switched in a hurry.
[17:46:32] <malinus> exactly :)
[17:46:48] <Fornaxian> I still maintain a notebook here with a parallel port just for going back to fix things.
[17:47:12] <Fornaxian> now with the xc compilers and the fact that I have a pickit-3, I can work with pic chips almost as easily as avr.
[17:47:25] <Fornaxian> each has its advantages.
[17:47:36] <Tom_itx> xc compilers?
[17:47:52] <Fornaxian> I like some of the pic peripherals over avr...and the fact there is a usb 32bit pic in dip package rocks.
[17:48:11] <Fornaxian> Tom_itx, freeish xc8, xc16, and xc32 compilers that are multiplatform as well.
[17:48:21] <Fornaxian> they go with the new mplax multiplatform IDE.
[17:48:32] <Tom_itx> i started with picbasic pro and ccs c
[17:48:39] <Tom_itx> they're collecting dust
[17:48:49] <Fornaxian> to get the full optimizations you have to pay for them but for most things the free version works...it's not even size limited.
[17:49:33] <Fornaxian> I find avr assembly much easier than pic assembly.
[17:50:42] <Fornaxian> avr assembly reminds me of 6502 assembly,,,kindasorta..
[17:50:56] <Fornaxian> and 6502 is the first assembly I learned many many moons ago.
[17:51:15] <malinus> Fornaxian, avr asm was the first asm I've picked up. And I still like it a lot
[17:51:36] <Fornaxian> like, 390 moons ago even.
[17:51:43] <malinus> hehe
[17:51:53] * malinus divides 390 with 12
[17:51:59] <Fornaxian> not 12.
[17:52:05] <Fornaxian> 13 moons in a year.
[17:52:11] <Fornaxian> 28 days per moon.
[17:52:11] <malinus> oh right, haha
[17:52:32] <Fornaxian> taught myself 6502 assembly on a vic-20 at home and apple-II at school when I was 16.
[17:53:01] <malinus> Fornaxian, that was some years before 8-bit avr came around ;)
[17:53:09] <Fornaxian> yup.
[17:53:33] <Fornaxian> but writing code for a full computer with 8K of program space was awesome.
[17:54:19] <Fornaxian> now I have a single chip sitting beside me with considerably more program space, more ram for variables than the vic-20 had for program and variables, and considerably faster.
[17:54:42] <Fornaxian> atmega1284p has 16K ram and 128K flash...and runs near 20mips.
[17:55:18] <Fornaxian> the 1MHz 6502 ran at about 0.5 mips.
[17:55:42] <Fornaxian> or maybe it was 0.25
[17:56:10] <Fornaxian> and 0.5 on the c-128 in high speed mode.
[17:56:17] <malinus> Yeah, that's why I laugh when people think thats 16K of ram is very much. Pls. when would you even need that much
[17:56:42] <Fornaxian> arrays!
[17:56:47] <Fornaxian> giant 2 dimension arrays!
[17:56:52] <Fornaxian> and arrays of strings!
[17:57:34] <Fornaxian> I use the atmega1284p in little world mapping robots.
[17:58:11] <N1njAway> Hooray after way too much time I got these MSP430's to program. ProTip: Don't use MSP430
[17:58:22] <Fornaxian> am also porting a C interpreter for that chip.
[17:58:30] <malinus> Fornaxian, why not just use a real computer then :)?
[17:58:50] <Fornaxian> malinus, little tiny robot...about the size of a rubiks cube.
[17:58:55] <bsdfox> N1njAway, why don't you like them?
[17:59:27] <N1njAway> Toolchain and programmer are both a colossal pain in the ass :)
[18:00:24] <N1njAway> This is for a client. If it was me I would have used Atmel, but at the time Atmel couldn't hit the same price point.
[18:02:16] <Fornaxian> yanno, at one time atmel beat many others for price..specially pic when comparing price vs performance...but it's gotten to be a much tighter market these days.
[18:02:46] <FoxGT> What do you feel is best?
[18:02:59] <Fornaxian> all depends on the project.
[18:04:25] <Fornaxian> for beginners learning, AVR all the way.
[18:05:30] <Fornaxian> but avoid the whole arduino thing...the hardware is cheap and easy to get your fingers on but avoid the software.
[18:05:53] <FoxGT> I'm just getting into them. I love building electronics, but I've never done anything that requires programming. All of my experience have been with little things like the 555 & counters.
[18:06:27] <Fornaxian> there are a plethora(I love that word) of avr tutorials out there.
[18:06:33] <FoxGT> Everything I've read has pointed me in the direction of avr, but I haven't bought anything yet in terms of programmers
[18:06:40] <FoxGT> So I've seen. :P
[18:06:56] <Fornaxian> see Tom_itx about a programmer...
[18:07:04] <Fornaxian> unless you have a parallel port on your computer.
[18:07:14] <Fornaxian> in which case, a dapa programmer or similar is simple to use.
[18:07:28] <Fornaxian> my first parallel port programmer is here on my bench and still works.
[18:08:24] <N1njAway> Atmel's offerings is really quite broad - AVR his the low end stuff where you don't need a ton of performance, Cortex M0+ is crushing the 32-bit side of things with ARM in the same price points as AVR devices.
[18:08:58] <N1njAway> And of course a single $100 USD programmer will do AVR, XMEGA, AVR32, and SAM. And Atmel Studio unifies the development chain.
[18:09:04] <Valen> I suggest just skipping a tech level and getting something USB programable
[18:09:17] <Valen> some of tom-itx's little dev boards
[18:09:35] <Fornaxian> the programmer that Tom_itx sells is a good price and decent device..and supports our local irc developers.
[18:09:49] <FoxGT> Is it beginner friendly?
[18:10:08] <Fornaxian> it's a programmer...works with avrdude...simple enough to use
[18:10:44] <malinus> FoxGT, if you are using atmel studio it's plug 'n play. But if you are not using atmel studio you gonna need some setting up no matter what :)
[18:11:45] <N1njAway> Atmel Studio is also nice due to having the ASF as well as 20,000+ examples now that excercise every device and peripheral on all of their parts.
[18:12:46] <Fornaxian> N1njAway, sometime I will have to put together a windows machine and play with that...unfortunately it does not work on linux.
[18:14:20] <N1njAway> Just run a VM :)
[18:14:37] <malinus> ^ what I've been doing
[18:15:03] <Fornaxian> still requires I actually acquire and install windows.
[18:15:16] <malinus> well that souldn't really be any issue?
[18:15:28] <Fornaxian> it's a religious objection....
[18:15:33] <Fornaxian> I hate the holy fuck out of windows.
[18:15:47] <malinus> Then don't use it.
[18:15:52] <malinus> :D
[18:15:57] <Fornaxian> exactly.
[18:16:29] <Fornaxian> fortunately I can do everything I need to do on linux..including avr development.
[18:19:02] <N1njAway> I use the tools that get me paid the fastest by happy clients. That's Windows for most everything here. :)
[18:19:37] <Fornaxian> unfortunately I have to deal with windows at work...and don't get to do microcontroller work at work...it's just a hobby.
[18:20:18] <malinus> N1njAway, give me some example? .NET?
[18:20:43] <N1njAway> Unfortunatly I also can't write software that targets Linux users unless it's contained to embedded hardware we deploy, because no one uses it out in the normal world. So it's Win7 or OSX.
[18:21:13] <Fornaxian> I wouldn't say nobody. I have 3 big clients that are 100% linux now.
[18:21:19] <N1njAway> Heh, no .NET. I write everything straight on top of the Windows API. Makes it far easier to abstract for cross-porting on OS's.
[18:21:27] <Fornaxian> which can be interesting trying to get print drivers working right.
[18:22:07] <N1njAway> Well for specialized applications and servers yes, absolutely, but for most of what we sell to, it needs to go on to Win7/OSX stuff, because people are installing on their own machines.
[18:22:17] <malinus> "because no one uses it out in the normal world. So it's Win7 or OSX." what the fuck is the normal world?
[18:22:38] <malinus> apparently I'm not there :/
[18:22:45] <Fornaxian> me either.
[18:23:21] <N1njAway> malinus: I should have clarified that... The end-user world, where the majority of end-users are. Server and specialized applications are one thing, but the majority of the end-user world runs on Windows or OS X.
[18:24:27] <malinus> N1njAway, what kind of software are you developing?
[18:24:54] <N1njAway> We use Linux for a bunch of specialized stuff as well as hosting. Works great. I have a lot of friends who work on rediculously massive Hadoop clusters for everything from DNS to chemical analysis. It does the back end job well, but it generally doesn't serve many end users.
[18:25:33] <N1njAway> malinus: We do a lot in the special effects/lighting realm.
[18:26:13] <malinus> N1njAway, without getting into the discussion why most end users would actually be better of with (GNU ;) )/linux. What do you mean by special effect/lighting? What kind of windows applications need that?
[18:26:17] <N1njAway> The nice part is that it's relatively easy to port our stuff TO Linux, but we've had no compelling reason to do so, because none of our end users run it.
[18:26:21] <malinus> end-user, even
[18:26:49] <N1njAway> Theme-parks, massive lighting control, architectural lighting, real-time image synthesis tools, etc.
[18:27:10] <malinus> N1njAway, and all that is normally run on windows machines? yack
[18:27:24] <N1njAway> I am not telling you what users would be BEST with, I'm telling you what the reality of the market is :)
[18:27:41] <malinus> N1njAway, I figured there would always be a small linux box behind anything like that.
[18:28:24] <N1njAway> Sometimes there is, most times there's not. Or many times the front-end is driving an embedded application like an ARM or AVR, which is where we tend to do a lot of our work.
[18:30:26] <N1njAway> I generally write everything at the API level of the OS on whatever platform is being used, and then we generate wrappers to all OS-specific calls so they can be abstracted out later. For one it makes portability great, second thing is that most applications still easily fit on a single 1.44MB floppy disk because the exectuables are only a few hundred KB, even for a full-blown OpenGL-hosted
[18:30:26] <N1njAway> application :)
[18:30:53] <N1njAway> +abstracted out for modification later if necessary, when porting
[18:31:32] <N1njAway> People keep piling framework on framework on framework and you suddenly get a Hello World program which is like 12MB in size. :)
[18:31:43] <N1njAway> And wondering why they can't get reasonable performance out of stuff.
[18:32:05] <Fornaxian> hehe.
[18:32:58] <Fornaxian> hence the need for a 4GHz machine to browse the web.
[18:33:00] <N1njAway> At least Win7 has proven to be extremely robust in recent years - it's waaaay better than XP (and even XP latter service packs were extremely stable) and things like unified driver architecturs and such have made compatibility issues less of a concern.
[18:34:02] <N1njAway> I can also bang together utilities on Win7/OSX faster than any other architecture when I don't necessarily need the crazy performance, but I DO need an application done in a few hours. And the client doesn't have any idea how to use Linux :)
[18:34:31] <N1njAway> The point is to know your market, and to use the tools that get you there most effectively.
[18:34:40] <Fornaxian> yup yup.
[18:35:14] <Fornaxian> same goes for microcontrollers as well.
[18:35:23] <N1njAway> If you are needing to host websites or to build world-class data storage/retrieval/processing that scales beyond your wildest dreams, use Hadoop on Linux. :)
[18:36:16] <N1njAway> But if the person giving you money barely knows how to deal with email attachments and mostly uses Word, they can PROBABLY be talked through running a simple executable you send them for some kind of application :)
[18:36:36] <N1njAway> The kind of people that don't even know Windows HAS a command line :)
[18:36:56] <N1njAway> Anyhow, sorry... Diatribe over :)
[18:37:48] <N1njAway> Use the tools you can work most easily with. For me that happens to be Atmel Studio on Windows currently. At least it still uses gcc for everything in the background, and it doesn't make me want to gouge my brains out with a fork the way that Eclipse as an IDE consistently does :)
[18:41:00] <N1njAway> I even tried MinGW a while ago. It's fine for little applications. Try shooting projects of hundreds or thousands of source files through MinGW under Eclipse and you change a couple files and wait 20 minutes for the thing to recompile, and MAYBE debuging will work sometimes. Visual Studio does it in a fraction of the time, and debugging always works. I gave in, because it's WAAAAY more efficient
[18:41:00] <N1njAway> for me to work with for developing large applications.
[18:42:22] <N1njAway> So to each his own. But I speak from personal experience in having tried most all of the options, and suffering the ones that piss me off the least. :)
[18:48:35] <N1njAway> Oh yeah, and Linux had ZERO support on any hardware for ASIO streaming multi-channel audio, so we couldn't run our laser image synthesis tools on it (and still can't) until creating custom hardware. So can't even sell that one to the Linux crowd at present. :(
[18:49:18] <N1njAway> Annnnnyhoo :)))
[18:49:33] <N1njAway> Time for long holiday weekend! I'll talk to you fine folks again soon. :D
[18:49:44] <Fornaxian> hehe
[18:49:57] <Fornaxian> my holiday weekend started last friday.
[18:49:59] <N1njAway> Take everything I say with a grain (or pound) of salt. Find what works best for YOU in the end :)
[18:50:01] <Fornaxian> took the whole week off I did.
[18:50:23] <N1njAway> Excellent.
[18:51:08] <Fornaxian> yeah.
[18:51:14] <Fornaxian> I haven't accomplished a dang thing all week.
[21:53:28] <FoxGT> Fornaxian, how do you feel about the dragon?
[21:57:59] <Tom_itx> it's an extinct species
[21:58:13] <Tom_itx> it works but it's slower than the $$$ ones
[21:58:30] <Tom_itx> outputs are unprotected
[22:01:05] <FoxGT> What do you suggest, Tom_itx?
[22:01:20] <Tom_itx> i don't know what you want/need
[22:01:42] <Tom_itx> my programmer will support all the 8bit avrs but doesn't do jtag
[22:01:52] <Tom_itx> dragon does jtag if you need debugging
[22:02:37] <FoxGT> I've built lots of electronics projects, but I'm new to microcontrollers. I'm fairly ignorant to all of the programmers.
[22:03:04] <Casper> tho here is good with smps? I keep forgetting who it was...
[22:03:08] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[22:10:48] <FoxGT> What are the differences between the 1.1 & 2.0?
[22:12:51] <Tom_itx> 1.1c doesn't have a blue box
[22:12:58] <Tom_itx> that's it
[22:13:12] <FoxGT> Who knew. :P
[22:15:09] <Tom_itx> some guys wanted an enclosure so i made one
[22:15:21] <Casper> whhoot a blue box! that deserve a version upgrade! whooot! hhehe
[22:15:40] <Tom_itx> it's also a different board
[22:16:48] <Casper> ok, that's better
[22:17:48] <FoxGT> Do I get a free autograph on it if I order one?
[22:19:23] <FoxGT> It's going to make me sad if I order one with a special blue box & there's no signature on it.
[22:21:49] <Tom_itx> do you feel that special?
[22:22:17] <FoxGT> Some days.
[22:22:22] <Tom_itx> heh
[22:22:30] <Casper> FoxGT: all joke appart, tom's programmers are quite nice
[22:22:43] <Casper> … so much that the chinese stole his design once..
[22:22:56] <FoxGT> Lol
[22:23:15] <FoxGT> Well I hope so, I just ordered one.
[22:23:55] <FoxGT> Said it came with a special, signed, blue box. :/
[22:24:50] <Tom_itx> i won't get a chance to mail it until friday
[22:25:31] <FoxGT> I'm in no hurry. I have been trying to finish my car project for some time. I imagine I'll be busy with that for quite a while.
[22:25:42] <Casper> Tom_itx: just make an ugly signature on the top of it with an old sharpie :D
[22:25:52] <Tom_itx> well the post office isn't open til then :)
[22:25:56] <Casper> oh I know!
[22:25:59] <Tom_itx> heh
[22:26:01] <Casper> use a pink sharpie!
[22:26:08] <Tom_itx> soldering iron
[22:26:16] <FoxGT> Lol. I like that idea ^
[22:26:24] <Tom_itx> gives 'permanent marker' a whole new meaning
[22:27:37] <FoxGT> Speaking of, I think my friend bent the tip of my soldering iron with the fine tip. It's new "J tip" can get into hard to get spots now.
[22:27:59] <Casper> by accident or volountary?
[22:28:38] <FoxGT> I think it was one of those improper tool for the job moments.
[22:29:03] <FoxGT> So we'll say voluntary accident.
[22:30:09] <Casper> to bend a tip... you really have to use it improprelly...
[22:32:40] <FoxGT> You mean like a pry bar to try to separate two pieces of metal?
[22:32:57] <FoxGT> Apparently a small screwdriver could not be found.
[22:33:36] <FoxGT> My soldering iron seemed to be the next best thing.
[22:40:39] <jerkey> http://nooooooooooooooo.com/
[22:41:34] <FoxGT> Is it sad that I have that bookmarked?
[22:42:33] <jerkey> well, when you bend your soldering iron tip doing something you know you shouldn't have, you need to express regret.
[22:47:08] <FoxGT> He did. He bought me alcohol & gave me money. I told him to keep the money.
[22:48:50] <Casper> interresting
[22:49:01] <Casper> I'ld have said keep the alcohol :D
[22:50:48] <jerkey> what?
[22:52:30] * Casper don't drinks
[23:35:14] <megal0maniac_afk> This looks really cool http://www.atmel.com/about/news/release.aspx?utm_campaign=Atmel_Newsletter-November_2013&utm_medium=email&utm_source=Eloqua&reference=tcm:26-51435&elq=b7267f7e2122432d95a5864fc6a5a4e4&elqCampaignId=69
[23:35:58] <megal0maniac_afk> Oh whoops. Shouldn't have included the referrer :D