#avr | Logs for 2014-11-11

Back
[03:46:33] <Tom_itx> Jordan_U did you get your command line figured out?
[04:41:33] <STS_Patrik> in Eagle design rules, is the restring % a hard limit or just a default size and the "Min" value is the manufacturer limit?
[04:55:00] <LeoNerd> So I think I worked out why I was having trouble with my soldering last night... Someone tell me if I'm going crazy here, or if this sounds plausible
[04:55:36] <LeoNerd> The solder I have doesn't seem to have flux in it, because no amount of melting it ever produces any white smoke. However, if I cut through it with a sharp knife I do still see what I think is an inner core that looks "different" - still grey, but less shiney than the outside
[04:56:22] <LeoNerd> I also observe that I need to get the iron quite hot on the temp. control in order to melt new solder off the reel, but having melted it once and let it cool into a ball, I can remelt that at a much lower temperature; even at a temperature which /will not/ melt fresh stuff.
[04:57:02] <LeoNerd> I think therefore, that what I have is 63/37 solder comprised of a solid core of 37% lead, surrounded by a jacket of 63% tin - needing, therefore, to be hot enough to melt each on their own the first time, at which point they mix and alloy themselves together into the actual eutectic mixture
[05:12:06] <twnqx> did any of you ever play with pl9823 type LEDs and encounter issues, like getting the wrong data in every now and then?
[06:08:40] <autrilla_> Can I salvage an old arduino and program it with plain AVR C?
[06:08:58] <autrilla_> Or C++, doesn't matetr
[06:09:09] <LeoNerd> Sure... it has an ICSP header for that purpose
[06:09:33] <LeoNerd> At that point it just becomes an ATmega dev board with power reg and clock onboard
[06:09:35] <autrilla_> LeoNerd, I don't have a programmer though
[06:09:57] <LeoNerd> Ah, well.. Obtain one.. Or just continue to use the Arduino bootloader. avrdude understands it
[06:10:03] <LeoNerd> I just do that really
[06:10:29] <autrilla_> LeoNerd, well, I can even use the arduino IDE and just not use arduino libraries
[06:11:14] <LeoNerd> You could if you wanted; I don't even do that
[06:11:40] <LeoNerd> I write plain C files in vim, using plain avr-gcc to make the image file, then upload it using avrdude to an Arduino Nano board using their bootloadre
[06:11:43] <LeoNerd> er
[06:12:07] <LeoNerd> Mostly just because it's easier thne to use a single USB cable for program upload and serial monitor, than to have two separate ones
[06:12:22] <autrilla_> I can not get used to vim
[06:12:32] <LeoNerd> Well, then use whatever other editor you want
[06:12:40] <LeoNerd> My point being: all the parts of the toolchain are separate and swappable
[06:13:02] <autrilla_> I want to get used to vim though, it seems faster once you've learnt. I still have to finish my python simulation though
[06:13:21] <autrilla_> I asked just if I needed to get something shipped, I wouldn't lose as much tim
[06:13:22] <autrilla_> time
[06:33:17] <Tom_itx> STS_Patrik it's a percent and you can edit it
[06:34:02] <Tom_itx> LeoNerd, i told you to use LOTS of FLUX!
[06:35:16] <Tom_itx> i use the same type solder with rosin core flux and add flux to the board with a flux pen
[06:37:15] <Tom_itx> autrilla_ yes it began life as a regular avr then someone screwed it up
[06:37:53] <Tom_itx> autrilla_ i've got good programmers if you want one
[06:38:12] <autrilla_> Tom_itx, I don't need one for now
[06:38:22] <autrilla_> Still a long way until production :P
[06:38:52] <autrilla_> I first have to test my algorithms against every possible situation, make sure it's fail-safe
[06:39:50] <Lambda_Aurigae> will never happen.
[06:39:59] <Lambda_Aurigae> make it foolproof and we will make a better fool.
[06:40:10] <Tom_itx> http://tom-itx.ddns01.com:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[06:40:15] <Tom_itx> autrilla_ ^^
[06:41:24] <autrilla_> Lambda_Aurigae, my networking algorith HAS to be fail-safe, the same way TCP/IP is.
[06:41:38] <Lambda_Aurigae> tcp/ip isn't failsafe.
[06:41:51] <Lambda_Aurigae> I can hork up tcp/ip in seconds.
[06:41:53] <autrilla_> Lambda_Aurigae, when isn't it?
[06:42:10] <Lambda_Aurigae> two devices on the network with the same IP.
[06:42:20] <autrilla_> Tom_itx, nice, but why 3 ICSPs?
[06:42:22] <Lambda_Aurigae> comms comes to a stop to both devices.
[06:42:31] <Tom_itx> 3 different protocols
[06:42:46] <Tom_itx> for atmega attiny10 etc and xmega
[06:42:47] <autrilla_> Lambda_Aurigae, oh, didn't think about that. Well, that's one of the things I have to avoid
[06:43:02] <Lambda_Aurigae> like I said, make it foolproof and we will make a better fool.
[06:53:59] <LeoNerd> Tom_itx: Yeah.. I know. turns out this stuff doesn't have any in it :(
[06:54:11] <LeoNerd> And it doesn't melt right. In summary: it sucks. I should buy some more better
[06:54:24] <LeoNerd> Am also pondering one of those USB microscopes... if any are Linuxable
[06:55:05] <Lambda_Aurigae> I'm working on turning an old android phone into an inspection scope.
[06:55:26] <LeoNerd> Yeah.. I'm quite impressed at the camera on my phone for that actually
[06:59:55] <Lambda_Aurigae> I use ip camera software on the phone to feed to the computer for a bigger screen.
[07:00:06] <Lambda_Aurigae> need to make an adjustable mount.
[07:00:46] <LeoNerd> http://www.adafruit.com/blog/2012/06/28/adafruit-usb-microscope-work-with-linux-yes/ I've seen people use things like this to great effect
[07:02:04] <Tom_itx> LeoNerd, i got this one (no USB): http://tom-itx.ddns01.com:81/~webpage/scope/scope1.jpg
[07:02:17] <Tom_itx> 7x45 zoom
[07:02:33] <Tom_itx> and i'm out.
[07:06:19] <jadew> Tom_itx, your server is not working
[07:07:25] <LeoNerd> WFM
[07:07:37] <LeoNerd> It's on a nonstandard port; maybe you have local firewalling issues
[08:07:43] <CluelessPerson> Tom_itx, So apparently Atmel's packed USB drivers with Atmel Studio, their Certificate expired
[08:07:58] <CluelessPerson> so apparently that' why the drivers weren't installing
[08:12:10] <twnqx> so the claim that pl9823 LEDs being compatible with ws2812s is wrong
[08:12:21] <twnqx> however nothing a bit asm can't fix
[08:12:34] <twnqx> also the claim of "no external components needed" is wrong
[08:12:53] <twnqx> soldering 0402 capacitors between the vcc/gnd pins of a LED with 1.27mm pin pitch is fun
[08:13:01] <twnqx> and solves the remaining problems
[08:45:20] <snax> hi
[08:45:43] <snax> Does the bootloader go on the avr that runs the ISP or the target AVR that is being flashed?
[08:45:57] <LeoNerd> The target
[08:46:09] <LeoNerd> ICSP doesn't need a bootloader of course; that's for using -other- methods like serial ports or USB
[08:46:26] <snax> ICSP = ISP. Correct?
[08:46:52] <LeoNerd> Uh, yah. "in-circuit serial programming". Form an acroynm however you want :P
[08:47:06] <snax> just checking.
[08:47:26] <snax> So it sounds like boot loader is a requirement. When is it ok to remove it?
[08:47:51] <snax> Folks overwrite it for the extra space, but then how do you upload your code?
[08:48:08] <LeoNerd> Directly via ICSP
[08:48:34] <LeoNerd> A bootloader could, for example, accept a new program over serial or USB and program it into the chip. That's a program already on the chip in the bootloader section
[08:48:42] <LeoNerd> ICSP is always available implemented directly in hardware
[08:49:47] <snax> Correct me if I'm wrong. The bootloader is needed to have a program on the chip. Is that not it's sole purpose? Or am I missing something
[08:50:12] <LeoNerd> Incorrect
[08:50:25] <LeoNerd> ICSP can _AWLAYS_ write a program on the chip, regardless of what program is on the chip.
[08:50:29] <LeoNerd> That is implemented in base hardware.
[08:50:42] <snax> ok. So what's the purpose of the bootloader?
[08:50:58] <LeoNerd> One program you could put onto the chip is a "bootloader", a program to accept another program via some OTHER source, like UART serial or USB or carrier pigeon or whatever you want
[08:51:08] <snax> And what is the arduino uno shield missing that its chips needs a bootloader?
[08:51:25] <LeoNerd> What that's missing is that most beginner users don't own an AVR burner
[08:51:39] <LeoNerd> So the bootloader is there to allow the chip to accept a program over the plain USB connection to their computer
[08:51:57] <LeoNerd> -if- you have an ICSP burner, you can feel safe to remove that bootloader and program the chip directly over ICSP
[08:52:04] <snax> ahh. ok.
[08:52:23] <LeoNerd> I have an ICSP burner and for Arduino boards I -still- find it useful to just use that bootloader anyway, because it's all just over USB where I'll have my serial monitor anyway.
[08:52:33] <snax> I thought the shield was the burner
[08:52:45] <LeoNerd> Shield?
[08:52:49] <snax> the blue uno
[08:53:01] <snax> the uno has the avr dip package on it.
[08:53:19] <LeoNerd> The Arduino Uno has a DIP AVR chip on it, yes... I'm not sure I see the relevance
[08:53:25] <LeoNerd> I believe it does also have an ICSP header on
[08:54:49] <snax> on the uno you mean. right?
[08:55:22] <LeoNerd> Maybe..? I admit I'm not really familiar with it; I don't have one.
[08:55:27] <LeoNerd> My nano has such a header though
[09:10:50] <megal0maniac> So it looks like there's a new generation of AVR MEGAs coming out
[09:11:12] <megal0maniac> Only real changes: Internal oscillator and band-gap voltage reference are more accurate
[09:12:17] <snax> you mean the 16Mhz clock is INSIDE the dip ?
[09:12:48] <megal0maniac> No, the 8mhz clock is more accurate
[09:15:15] <megal0maniac> And only in QFN or QFP packages
[12:05:54] <umquant> Is there a standard software serial library option for atmega series avrs? Or do most people implement it themselves?
[12:06:30] <LeoNerd> I've sofar managed to avoid needing to do that
[12:07:39] <umquant> LeoNerd: I am communicating with a module via AT commands and was wanting to add another serial stream for debugging
[12:07:59] <LeoNerd> Just Tx, or Rx as well? Tx-only is much simpler
[12:09:13] <umquant> To the module is TX/RX and I just need TX out to see debug stuff
[12:15:56] <LeoNerd> Then it might be easiest to put the real hardware UART on the AT-talking module, and have a separate soft-serial debug output-only console
[12:16:25] <umquant> Right! I was wondering if you had recommendations for a soft serial library. of if I should just implement it myself
[12:18:54] <LeoNerd> I've never looked into it - see above :)
[12:24:12] <Tom_itx> CluelessPerson did you make any progress with it then?
[12:24:37] <Tom_itx> that's an odd one
[14:35:26] <Jordan_U> Tom_itx: No, and I haven't found any good documentation for atprogram either :(
[14:40:05] <Tom_itx> well i posted a line for you to try a couple days ago
[14:40:30] <Tom_itx> i got it to work fine with my programmer
[14:40:49] <Jordan_U> Tom_itx: My scrollback buffer wasn't large enough so I missed it (though irssi did tell me that I had been highlighted).
[14:41:00] <Tom_itx> wanna try it now?
[14:41:05] <Jordan_U> Tom_itx: Yes please :)
[14:41:37] <Tom_itx> fwiw, it works great with my programmer and i see no reason why it wouldn't work with the atmega64m1 chip
[14:42:10] <Tom_L> Jordan_U:
[14:42:11] <Tom_L> atprogram -t jtagice3 -p usb -i isp -cl 250khz -d atmega64m1 program -f X:\Path\to\file.hex
[14:42:22] <Tom_L> ERASE:
[14:42:22] <Tom_L> atprogram -t jtagice3 -p usb -i isp -d atmega64m1 chiperase
[14:42:51] <Tom_itx> you may want the erase line ahead of the program line in a batch file with a pause between just to be safe
[14:43:19] <Tom_L> following is the line i used on my programmer: atprogram -t avrispmk2 -p usb -i isp -cl 2mhz -d atmega128 program -f C:\avrtest\atmega128\blink_led.hex
[14:43:44] <Tom_itx> -cl will speed up the programming but must be 1/4 the clock rate or less
[14:44:07] <Tom_L> is the jtagice3 usb?
[14:44:44] <Jordan_U> Tom_L: Yes.
[14:44:52] <Tom_L> i based your cmd line on what worked on my programmer since i don't have a jtagice3 or a tmega64m1
[14:45:17] <Tom_L> i would think the line should work then
[14:47:48] <malinus> Did someone have trouble with emulated serial interfacing with linux in here?
[14:47:52] <malinus> Or was that a dream?
[14:48:08] <twnqx> no, he asked for a lib for that
[14:48:25] <Jordan_U> Tom_L: "programming completed", but the screen on my board isn't lighting up. I didn't do the chip erase first though, so I'm guessing that's the problem. Trying that now.
[14:48:44] <malinus> did he figure it out twnqx ?
[14:49:03] <twnqx> umquant: did you? :>
[14:50:02] <Jordan_U> Tom_L: Still no screen lighting up, even with chiperase first, but this is pretty clearly still progress.
[14:51:36] <Tom_L> what screen is supposed to light up?
[14:52:44] <Jordan_U> Tom_L: There is a 128x64 OLED screen attached to the board.
[14:53:42] <Tom_L> i wouldn't base my programming success on an OLED lighting up
[14:53:50] <Tom_L> maybe the program is bunk too
[14:53:54] <Tom_L> or something else
[14:54:09] <Tom_L> blink an led with it or something to test the programming part
[14:54:36] <Tom_L> or watch the cmd window for activity
[14:58:46] <Jordan_U> Tom_L: Well, with -cl 8khz the screen does light up :)
[14:58:57] <Jordan_U> Success!
[14:59:08] <Tom_L> hah
[14:59:18] <Tom_L> what's the system clock speed?
[14:59:22] <Tom_L> 1Mhz?
[14:59:25] <Jordan_U> Tom_L: Yes.
[14:59:44] <Tom_L> it should still work at -cl 250Khz then
[14:59:55] <Tom_L> try 125khz and see
[14:59:59] <Tom_L> then 250
[15:01:44] <Jordan_U> Tom_L: 125 works (screen lights, though it would be nice to be able to check what's on the chip against the .hex to be sure that there aren't any errant bits).
[15:01:56] <Tom_L> use verify
[15:02:09] <Tom_L> lemme look that up here in a bit.. i'm in the middle of something
[15:02:21] <Tom_L> you would use the chiperase line but verify instead
[15:03:27] <Tom_L> yes.. exatly that..
[15:03:56] <Jordan_U> Tom_L: 240khz works.
[15:04:04] <Tom_L> atprogram -t jtagice3 -p usb -i isp -d atmega64m1 verify (filename)
[15:04:08] <Tom_L> untested^^
[15:04:15] <Tom_L> i can test it in a bit
[15:04:31] <Tom_L> 240?
[15:04:34] <Tom_L> not 50?
[15:04:39] <Tom_L> 250...
[15:05:00] <Tom_L> at 1Mhz the spi clock rate must be 250Khz or less
[15:05:11] <Jordan_U> Tom_L: 250 has failed every time. 240 worked, 249 failed, 245 worked.
[15:05:19] <Tom_L> if you increase the clock rate you can also increase the spi rate
[15:05:29] <Tom_L> just use 240
[15:05:40] <Tom_L> bit of a margin there
[15:06:02] <Tom_L> maybe some noise on the spi lines.. who knows
[15:06:30] <Jordan_U> Tom_L: For our purposes even 125khz is more than fast enough, so I'll keep it at that.
[15:06:51] <Tom_L> test the verify line ^^
[15:07:02] <Tom_L> now you need to make a batch file
[15:07:25] <Tom_L> you can either put the filename in the file or use mybat.bat myhex.hex
[15:07:37] <Tom_L> and use the % in the bat file for the filename
[15:07:50] <Tom_L> then you can pass the hex file on the cmd line with the batch file
[15:07:59] <Tom_L> err %1
[15:08:15] <Jordan_U> Tom_L: For verify, "[ERROR] the specified address range does not fit in the specified memory context".
[15:08:29] <Tom_L> i'm not sure about verify yet
[15:09:07] <Tom_L> but it's a start
[15:09:27] <Jordan_U> Tom_L: Thank you so much, this has been plagueing me for a long time (and Atmel's support has been unfortunately useless). I owe you a beer :)
[15:10:13] <Tom_L> atprogram -t jtagice3 -p usb -i isp -cl 125khz -d atmega64m1 verify -f X:\Path\to\file.hex
[15:10:14] <Tom_L> try that
[15:11:29] <Tom_L> also add -l logfile.txt if you want a log of the transactions
[15:15:03] <Jordan_U> Tom_L: Same error message.
[15:15:13] <Tom_L> i'll work on it
[15:15:17] <Tom_L> i can test that here
[15:15:24] <Tom_L> on my programmer / chips
[15:18:23] <Tom_L> ok lemme grab my programmer...
[15:36:02] <Tom_L> http://www.cnblogs.com/shangdawei/p/3617031.html
[15:44:21] <Duality> hi
[15:44:30] <Duality> i can't figure out why the next character isn't displayed
[15:44:44] <Duality> i am using an isr to display it on a 8x8 ledmatrix display.
[15:44:57] <Duality> and it seems the for loop doesn't run
[15:45:05] <Duality> with a _delay_ms() in it
[15:45:12] <Duality> and if i remove it everything flashes by
[15:45:19] <Duality> with it doesn't work
[15:45:22] <Duality> without it works
[15:46:01] <Duality> here is the code http://pastebin.com/8iqPtB5x
[15:46:06] <Duality> any ideas anyone ?
[15:47:45] <malinus> Duality: so it works with the loop?
[15:48:19] <Duality> malinus: don't understand, but it works without the _delay_ms()
[15:48:31] <Duality> but with out the delay the leters just flash by .. :)
[15:48:45] <malinus> that makes perfect sense
[15:49:15] <Duality> but it doesn't work if i put the _delay_ms() in, because that it seems to "hang" on the first leter in the character array with "Robert"
[15:49:25] <Duality> malinus: sorry if it doesn't make sense :)
[15:50:26] <malinus> I would suggest actually using the timer to time the scrolling of the letters
[15:51:52] <Duality> malinus: i see
[15:52:25] <Tom_L> Jordan_U you still here??
[15:54:54] <Tom_L> Jordan_U this will program and verify the chip: atprogram -t jtagice3 -p usb -i isp -cl 125khz -d atmega64m1 program --verify -f X:\Path\to\file.hex
[15:56:41] <Tom_L> http://www.cnblogs.com/shangdawei/p/3617031.html
[15:56:48] <Tom_L> might also help you in the future
[15:58:33] <Tom_L> http://atmel.force.com/support/articles/en_US/FAQ/atprogram-standalone-utility
[15:58:36] <Tom_L> also that one
[15:59:25] <Tom_L> http://atmel.force.com/support/articles/en_US/FAQ/Command-Line-Programming/?l=en_US&fs=RelatedArticle
[15:59:29] <Tom_L> possibly that one too
[16:01:29] <Tom_itx> that wasn't so difficult...
[16:03:00] <Jordan_U> Tom_itx: "Programming and verification completed successfully." for 240khz and below. Thank you again.
[16:05:31] <Tom_itx> now add the chiperase line in a batch file above that and you should be set
[16:05:53] <Tom_itx> i'd put a pause inbetween the two if it were me...
[16:07:37] <Tom_itx> one of those links shows how to set fuses from the cmd line too
[16:08:24] <Duality> malinus: seems i put a 20MHZ crystal where a 8MHz should be
[16:08:35] <malinus> hehe
[18:08:51] <Duality> malinus: thanks for suggesting the keeping track with timer aproache that seems to work better :)
[22:21:37] <malinus> Duality: happy to hear. Does it work fully now?
[23:31:35] <rue_house> it was running a bit fast was it?