#avr | Logs for 2014-11-21

Back
[06:11:14] <Dumle29_> Hey there. I'm a bit pusseled with an AVR project here
[06:12:38] <malinus> It's a boring project if you ain't
[06:12:42] <Dumle29_> I have an ATTiny flashed with micronucleous (A V-USB based USB uploader firmware) and that enumerates just fine on windows, however when the bootloader exits and runs the main project code, using V-USB, that seems to fail. Even when I flash a tutorial folder to it.
[06:13:20] <Dumle29_> It just enoumerates as 0x0000 0x0000 (VID/PID)
[06:17:41] <Tachyon`> good morning
[06:18:00] <Lambda_Aurigae> have you contacted the person who wrote the software Dumle29_ ?
[06:18:12] <Dumle29_> I'm sitting here thinking "I should give more information. I've given nothing to go on" but I really should get to bed :/
[06:18:22] <Lambda_Aurigae> yup.
[06:18:26] <Dumle29_> Lambda_Aurigae: Not yet. It seems like it should work
[06:18:35] <Lambda_Aurigae> with that much information I can definitely say,,,,no flippin clue here.
[06:18:42] <Lambda_Aurigae> however
[06:18:50] <Lambda_Aurigae> I can also say, with much experience with v-usb,,,
[06:18:52] <Dumle29_> Nobody complains in the comments of said tutorial
[06:18:54] <Lambda_Aurigae> it doesn't always work.
[06:19:11] <Lambda_Aurigae> I have one computer where v-usb works on one usb port and not on another.
[06:19:18] <Dumle29_> wow :P
[06:19:22] <Lambda_Aurigae> and I've had v-usb devices work one plugin and not another.
[06:19:40] <Lambda_Aurigae> v-usb, while well engineered, is still a hack that just barely fits the usb specs.
[06:19:49] <Dumle29_> This is the same chip tho, same usb plug, same position. Nothing changed. It just switched to running some different code in flash
[06:20:00] <Lambda_Aurigae> I find that about 1 in 3 computers won't work with it reliably or at all.
[06:20:12] <Lambda_Aurigae> then there is something wrong with the code.
[06:20:19] <Dumle29_> What I thought :/
[06:20:33] <Dumle29_> I will strangle it once again tomorrow :/
[06:20:39] <Dumle29_> night! :)
[06:23:56] <malinus> "It seems like it should work"
[06:23:58] <malinus> Oh boy
[06:24:07] <Lambda_Aurigae> that fits v-usb well.
[06:40:05] <nn7> ack! My PCB's just arrived today. I went to program my microcontroller and discover that I need to use TPI to program this thing. I've only ever used SPI, and put an SPI header on the board.
[06:40:20] <nn7> So far my research hasn't really told me whether this will work or not.
[06:43:08] <Lambda_Aurigae> well, physically, a 6 pin header is a 6 pins header...TPI and ISP use the same header.
[06:43:11] <twnqx> v-usb worked for me... the one time i used it
[06:43:17] <Lambda_Aurigae> however, they don't connect to the same pins.
[06:43:30] <Lambda_Aurigae> twnqx, it worked for me the first time I used it too.
[06:43:58] <Lambda_Aurigae> but as I started experimenting, I found a lot of inconsistencies with how it functioned on various computers, specially notebook usb ports.
[06:44:06] <twnqx> yeah... i have no intention of using it more :P
[06:44:25] <twnqx> and it's pretty obvious that any time you run with interrupts off it might get disconnected
[06:44:56] <nn7> crap, the pins are differnt
[06:45:10] <twnqx> so wh do you have to use TPI?
[06:45:26] <nn7> looks like that's the only thing the attiny20 supports
[06:46:40] <twnqx> fun, having an SPI interface but not ISP...
[06:46:46] <twnqx> that's unexpected indeed
[06:50:35] <nn7> Well, this was not how I expected to start my day. Time for surgery.
[06:52:46] <Lambda_Aurigae> time for a chip clip!
[06:52:55] <twnqx> http://media.digikey.com/Renders/Atmel%20Renders/12-XFBGA,-CSPBGA%28AVR%C2%AE-ATtiny-Series%29.jpg
[06:53:00] <twnqx> one of these? (cuuuuute)
[06:53:29] * twnqx puts in digikey shopping basket for collection
[06:53:31] <Lambda_Aurigae> http://www.mcmelectronics.com/product/22-660?scode=GS401&catargetid=530004080000291549&cadevice=c&gclid=CM7pw7fai8ICFYkBaQod8jkANA
[06:53:34] <Lambda_Aurigae> chip clips!
[06:53:50] <twnqx> can't clip the attiny from above :D
[06:54:06] <Lambda_Aurigae> not dip, eh?
[06:54:18] <twnqx> not quite :3
[06:54:38] <twnqx> i wonder if there's anyway to escape route that baby but via-in-pad
[06:54:50] <Lambda_Aurigae> no clue.
[06:55:11] <Lambda_Aurigae> ok..time for going to worky stuff.
[06:57:42] <twnqx> 1.555 x 1.403mm body, 0.4mm bga ball pitch
[06:58:10] <twnqx> that thing's about the size of a 0402
[06:58:22] <twnqx> or is it...
[07:18:28] <nn7> where can I download atmel studio without creating an account?
[07:20:03] <twnqx> i remember der was a site providing the deeplink
[07:20:10] <twnqx> but you have to ask google :P
[07:20:16] <twnqx> there*
[07:20:21] <twnqx> my mind is a bit fuzzy
[07:30:27] <nn7> It says they'll email me a link but it's not working. This is ridiculous.
[07:30:37] <nn7> google isn't giving me anything
[07:31:14] <malinus> you could try apt-cache search avr-gcc
[07:31:16] <twnqx> http://www.mikrocontroller.net/articles/Atmel_Studio#Direktlinks_Installer
[07:31:22] <twnqx> not that took like 10s of google
[07:31:26] <twnqx> now*
[07:31:38] <nn7> I'm so confused. All I'm finding is russian torrent sites
[07:31:45] <twnqx> ohne = without
[07:31:49] <twnqx> enjoy your links
[07:31:49] <nn7> and I'm only finding that by searching for the build number "atmel 1502"
[07:32:08] <nn7> thank you very much!
[07:32:27] <nn7> probably because google doesn't normally give me german websites
[07:32:38] <twnqx> bash: apt-cache: command not found
[07:32:40] <twnqx> :X
[08:12:51] <nn7> "A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file." - what the hell
[08:26:36] <nn7> God damnit Atmel you're really trying to get on my nerves.
[08:28:26] <twnqx> stop using winblows and
[08:28:43] <twnqx> also, i think it's atmel's code signing certificate for the drivers that is expired
[08:28:46] <twnqx> heard something like that
[08:28:52] <nn7> yeah
[08:29:04] <nn7> I could download a new version of the installer.... but I need a username and password to do so
[11:22:53] <hypermagic> hello my friends
[11:24:07] <nn7> ok, quick question. I want to do a level sense on an external interrupt but the only pins I have left are PCINT. I have an interrupt that fires when the state changes and an IF statement determines whether the level is low or high.
[11:24:49] <nn7> It seems that occasionally during startup the system can get into a state where the line goes low but the interrupt never fires. Is there a way I can force that interrupt to fire?
[11:26:03] <LeoNerd> There's minimum timing requirements on PCINT interrupts
[11:26:14] <LeoNerd> I seem to recall the number "4 clock cycles" from somewhere
[11:26:33] <nn7> that's not the problem. This pin swings low and stays there waiting for me.
[11:26:50] <nn7> It will only go high after I address the device.
[11:28:22] <malinus> nn7: yes you can call the ISR routine from the software. Just jump to it
[11:28:29] <nn7> how do I do that?
[11:28:55] <malinus> just "jmp" to the address of the routine
[11:29:01] <malinus> I think it should work at least ;P
[11:31:30] <nn7> I still don't know how to do that
[11:36:20] <malinus> nn7: find the vector address of the interrupt in the defines for your chip. Then just do "jmp address"
[11:36:46] <malinus> hmm
[11:37:11] <rfreeman_w> hi, how do you simulate things like ATTINY-45 on linux? to quickly test my program
[11:37:39] <LeoNerd> Simulating a microcontroller is surely only a small part of the problem - what about the rest of the circuit
[11:38:14] <nn7> he didn't say he wants to test the circuit. He said he wants to test the program
[11:38:39] <LeoNerd> But the program will need to interact with the outer circuit in order to work, no?
[11:38:58] <LeoNerd> Not much good just wiggling those IO pins if nobody's there to watch
[11:38:59] <nn7> sure. That might be already tested.
[11:39:11] <nn7> Or he might just have it wired to an oscope.
[11:39:15] <nn7> or or or
[11:39:47] <nn7> he might not even HAVE the hardware, he's just writing software
[11:40:41] <rfreeman_w> LeoNerd, I would like to just see what pins are rised by the controller, and I would need to have option to pull up/down some pins
[11:47:46] <rfreeman_w> for simple "hello led" programs
[11:48:25] <LeoNerd> Well, OK it might work for those tiny trivial little hello-world programs
[11:48:42] <LeoNerd> It would stop being useful the moment you were talking I2C or SPI or anything fancy to some logic chips or anything else
[11:48:54] <LeoNerd> So it's unlikely anyone would make such a thing /just/ for that
[11:55:46] <rfreeman_w> ok, so then any bigger tools to be used on linux?
[11:56:45] <twnqx> just use the real thing and a jtag debugger
[11:57:09] <twnqx> otherwise you'll always have to emulate the IO targets as well
[11:59:19] <LeoNerd> Yah.. This is what JTAG boundary scan is for
[11:59:25] <LeoNerd> That, or use a -real- ATtiny45 inplace and use debugWire
[11:59:36] <LeoNerd> However, I can't yet suggest any tools for debugWire'ing, mostly because I haven't written any of them yet ;)
[11:59:42] <LeoNerd> It's on my TODO list after I've finished this HVSP board
[11:59:58] <hypermagic> do you have a stepper motor lamp yet? :P http://madscientisthut.com/wordpress/tag/stepper-motor-generator/
[13:50:53] <malinus> rfreeman_w: you could write a avr8 emulator yourself. I promise you, when you are done, you won't need one anymore :)
[14:06:39] <rfreeman_w> malinus, =)
[14:07:07] <malinus> nn7: did you figure it out?
[14:40:59] <malinus> nn7: I want to know :(
[15:14:52] <twnqx> malinus: i think there are cycle-accurate avr emulators
[15:15:07] <twnqx> i am pretty sure i came across one recently when i wasn't really searching for it
[15:29:38] <malinus> twnqx: other than the one distributed with atmel studio?
[15:29:58] <nn7> no. I restructured the program instead
[15:30:01] <malinus> twnqx: also, just because it exsist, doesn't mean he shouldn't make one himself
[15:30:02] <nn7> malinus,
[15:31:06] <malinus> nn7: what did you do instead?
[15:33:07] <nn7> Took the whole routine out of the interrupt. I had streamlined the rest of the code so I didn't have to worry about it not firing frequently enough.
[15:52:49] <hypermagic> do you have a stepper motor lamp yet? :P http://madscientisthut.com/wordpress/tag/stepper-motor-generator/
[15:56:45] <twnqx> malinus: yes
[16:35:10] <hypermagic> nah finally found my schottky diodes, took only an hour