#avr | Logs for 2014-06-09

Back
[00:43:17] <akoimeexx> Anyone have any recommendations on building a simple mousewheel-like USB HID device with an attiny? Or good references/guides? I've been pouring through V-USB and USBtiny, but I keep getting hung up on just the device report stuff (vendor id, etc).
[00:43:39] <umquant> akoimeexx: What do you mean by "hung up"?
[00:43:56] <umquant> Code problems? Or just uncertain on how to proceed?
[00:45:06] <akoimeexx> More uncertain how to proceed. If I use the usb-if prototyping vendor id (6666), will I have to come up with my own drivers for the device before it works (if reporting as a HID device)?
[00:45:38] <umquant> akoimeexx: check out this: https://github.com/obdev/v-usb/tree/master/examples/hid-mouse
[00:45:58] <umquant> they take a report descriptor from an actual mouse
[00:47:34] <umquant> does that help?
[00:47:36] <N1njaneer> akoimeexx: Try to catch abcminiuser on here, as it's Dean Camera who wrote all of the AVR LUFA libraries. He is your go-to guy for all USB AVR things if you ask nicely :)
[00:49:51] <akoimeexx> umquant: A little, looks like they're emulating a logitech mouse in that as well so I wonder what happens if the vid/pid changes. But it's a step further than before.
[00:49:53] <abcminiuser> Spreading lies about me?
[00:50:06] <N1njaneer> Only the best lies, sir.
[00:50:12] <abcminiuser> heh
[00:51:14] <abcminiuser> Mousewheel functionality is built into all modern OSes
[00:51:19] <akoimeexx> As soon as I started looking at the USB stuff my heart sank a bit from the usb.org site.
[00:51:30] <abcminiuser> So the VID/PID doesn't matter - the OS generic HID driver will bind to it and will work
[00:51:49] <akoimeexx> So it shouldn't be an issue regardless of the [vp]id?
[00:51:51] <akoimeexx> Awesome.
[00:53:13] * akoimeexx is currently poking around the LUFA stuff; he had just run across it on Google prior to hopping on irc.
[05:44:35] <abcminiuser> Always scary to hit the "yes, securely erase my disk" button when you have two identical laptops next to each other :S
[05:52:44] <malinus> abcminiuser, is that from an atmel datasheet?
[05:57:35] <abcminiuser> Wha?
[05:57:46] <abcminiuser> Actual laptops, the main disk
[06:04:41] <antto> abcminiuser but.. but.. quantum entanglement..
[06:08:39] <abcminiuser> I triple checked that the work laptop wasn't being wiped :S
[06:11:27] <abcminiuser> Man, with all the cameras around it's probably for the best Dave's lab doesn'
[06:11:33] <abcminiuser> *doesn't have a black couch
[06:14:14] <t4nk796> Hi
[13:17:15] <ivanshmakov> I wonder what free software TWI (I²C) library I could use? Is there anything similar to the interrupt-driven Peter Fleury’s UART one, for instance?
[13:57:38] <cyber37> hi
[13:58:13] <cyber37> The atmega8 datasheet is not precise, what fuse did we have to do for run with crystal 12Mhz ..?
[13:58:55] <cyber37> http://www.engbedded.com/fusecalc --> 12mhz is it medium, low or high freq ?
[14:01:51] <ivanshmakov> cyber37: The ATmega8 datasheet was quite precise the last time I’ve checked. ISTR that it required a “rail to rail” oscillator setting.
[14:05:09] <Tom_itx> :D
[14:08:00] <cyber37> page 27
[14:08:11] <cyber37> Frequency Range
[14:08:22] <cyber37> (MHz)0.4 - 0.9
[14:08:33] <cyber37> 0.9 - 3.0
[14:08:36] <Tom_itx> full swing crystal
[14:08:40] <cyber37> 3.0 - 8.0
[14:08:46] <cyber37> 1.0
[14:08:58] <cyber37> so afther 8mhz ..?
[14:09:39] <Tom_itx> maybe it's only rated for 8Mhz?
[14:09:45] <Tom_itx> if not, set it for full swing crystal
[14:11:12] <cyber37> full swing crystal?
[14:11:41] <ivanshmakov> cyber37: After 8 MHz CKOPT has to be zero, as per that table.
[14:12:17] <ivanshmakov> cyber37: As it seems, CKSEL3…1 could be set to either 101, 110, or 111.
[14:13:50] <cyber37> avr fuses sucks a bit
[14:13:59] <cyber37> http://www.engbedded.com/fusecalc with that
[14:14:12] <cyber37> 12Mhz is it "medium, low or high" frequency
[14:15:02] <ivanshmakov> cyber37: Don’t never use no “Web calculators” for anything. Even more so when you have access to the datasheet.
[14:15:53] <ivanshmakov> FWIW, I use 7.3728 MHz crystals for my own ATmega8 experiments, – as that’s friendly to both low-power consumption /and/ the usual UART rates.
[14:18:51] <N1njan33r> Also unless you have a compelling reason to do so (low power needs) I've found it best to ALWAYS set CKOPT for full-swing. I have seen too many instances where, due to differences in silicon between devices, clocks won't always correctly perform without CKOPT set.
[14:19:39] <N1njan33r> There was a non-documented issue (at least at the time) we absolutely saw between ATMEGA128's and ATMEGA128A's which were supposed to be perfectly identical. They weren't.
[14:19:41] <ivanshmakov> N1njan33r: Specifically?
[14:19:59] <N1njan33r> The ATMEGA128A's required CKOPT to be set in order to 100% reliably drive an 8Mhz clock crystal.
[14:21:36] <N1njan33r> Normally you should be able to probe a clock crystal with a 10x scope probe. On the 128's without CKOPT set this worked just fine, device continued to run, no problems. On the 128A's *UNLESS* the CKOPT was set, using the same board and same crystals, probing the crystal on one side would result in a very weak waveform, and probing on the other size caused the crystal to completely stop oscillating.
[14:21:37] <N1njan33r> Setting CKOPT on the 128A made it behave as it should, like a 128 without CKOPT.
[14:21:38] <ivanshmakov> N1njan33r: That seems strange, though I’m hardly familiar with AVRs other than ATmega8 (48, 88, 168, 328, and their letter-varieties.) and the tinies.
[14:22:05] <N1njan33r> From that point on we ALWAYS set CKOPT on any device that has it, unless we are doing super low-level consumption like battery powered applications.
[14:22:27] <N1njan33r> I had alerted Atmel to this when we ran in to the problem. Our Atmel FAE takes extremely good care of us.
[14:23:03] <cyber37> if i put -U lfuse:w:0xdc:m -U hfuse:w:0xd9:m is it OK ?
[14:24:38] <N1njan33r> About to program 40 ATMEGA328's here shortly that need to ship today, and another 45 behind those. :)
[14:24:41] <Tom_itx> cyber37, have a look at this: http://www.engbedded.com/fusecalc/
[14:25:43] <RikusW> I'd say lfuse FF is safer
[14:25:55] <RikusW> hfuse default is already D9
[14:25:56] <Tom_itx> N1njan33r do you have a gang programmer?
[14:26:48] <Tom_itx> u guys in SA sure use alot of atmel chips
[14:27:19] <cyber37> tom yes xD
[14:27:31] <cyber37> 20:56 < cyber37> avr fuses sucks a bit
[14:27:31] <cyber37> 20:56 < cyber37> http://www.engbedded.com/fusecalc with that
[14:27:52] <cyber37> so : 21:05 < cyber37> if i put -U lfuse:w:0xdc:m -U hfuse:w:0xd9:m is it OK ?
[14:28:10] <RikusW> cyber37: I use lfuse FF with 16MHz, it should work with 12
[14:29:01] <N1njan33r> Tom_itx: Nope, just ISP dump.
[14:29:36] <Tom_itx> N1njan33r where are you located?
[14:29:41] <RikusW> cyber37: you may need hfuse C9 to set CKOPT
[14:29:59] <Tom_itx> some guy in SA bought a gang programmer for is business per my suggestion
[14:30:03] <N1njan33r> Easy for production, though, as I have a set of batch files written for each different product, so someone just runs the script and whacks spacebar and waits for it to complete. Makes it simple so people don't have to launc AVR Studio
[14:30:15] <N1njan33r> Tom_itx: Cleveland, OH
[14:31:05] <Tom_itx> he wanted a standalone programmer
[14:31:10] <N1njan33r> We don't have any use for a gang programmer since every board had to go through the test jigs individually anyhow. And it's easy to just run multiple ISP programmers simultaneously if you need - just plug more in to the USB ports and address them via serial #
[14:31:53] <Tom_itx> iirc he's got 3 or 4 of mine but also got a standalone one
[14:33:09] <N1njan33r> ISP programmers also seem to randomly give up the ghost after 2-3 years of use. I've had probably 4 fail in the last 13 years
[14:33:18] <N1njan33r> But they're cheap, so you just replace 'em
[14:33:43] <Tom_itx> by that time they've more than paid for themselves
[15:26:08] <N1njan33r> Yay 1 of 40 tested and done
[16:10:57] <N1njan33r> Wow, notifcation from DigiKey just now that the Atmel AVR ISPMK2 is apparently going EOL -- last buy is Dec 6th
[16:11:59] <johnwalkr> oh well there’s like 50 programmers
[16:12:08] <johnwalkr> i’ve never evn heard of that one to be honest
[16:12:25] <N1njan33r> It's the defacto one from Atmel that has been around for 10 years now.
[16:12:31] <N1njan33r> Only thing we use.
[16:13:03] <johnwalkr> yeah no doubt it’s a standard one, just never came across it
[16:13:05] <malinus> what are you talking about N1njan33r. Everyone uses Tom_itx-programmer ;)
[16:13:33] <N1njan33r> Emailing our Atmel FAE for clarification.
[16:17:54] <N1njan33r> These are the things that give me heart palpitations
[16:19:53] <Kev> you'll get over it
[16:34:16] <N1njan33r> Once they tell me what the official replacement is, yes :)
[16:36:05] <N1njan33r> That or I shall buy up a whole bunch that can stay on the shelf.
[16:36:13] <N1njan33r> I shall horde them like gollum'
[17:05:58] <Jartza> d'oh
[17:07:21] <Jartza> I think I'm done with the modem
[17:07:43] <Jartza> or at least with the receiving part
[17:07:45] <Jartza> Program: 332 bytes (4.1% Full)
[17:08:18] <Jartza> and another test which prints text received from modem to LCD (16x2 char :D) is Program: 582 bytes (7.1% Full)
[17:08:39] <Jartza> I guess if I want to optimize it, I need to learn avr-asm :)
[17:08:53] <Jartza> luckily I have 8k of flash
[18:26:39] <N1njan33r> 22 of 40
[18:33:50] <Tom_itx> they wouldn't kill it without having something to replace it
[19:12:18] <malinus> Tom_itx, they do have somethin to replace it with - your superior programmer :)
[19:20:12] <N1njan33r> Tom_itx: Can yours be run from inside of AVRStudio6 and do full JTAG debugging?
[19:20:27] <Tom_itx> mine is not jtag
[19:20:35] <Tom_itx> but it does run in studio
[19:20:50] <N1njan33r> USB?
[19:20:54] <Tom_itx> yes
[19:20:59] <N1njan33r> Link?
[19:21:05] <malinus> :D
[19:21:27] <Tom_itx> no
[19:21:34] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[19:22:18] <N1njan33r> Nice!
[19:22:30] <Tom_itx> a few agree with you
[19:22:38] <N1njan33r> Price?
[19:22:53] <Tom_itx> my commerce page isn't there now
[19:23:07] <N1njan33r> Who's assembling them for you?
[19:23:11] <Tom_itx> i changed dyndns
[19:23:14] <Tom_itx> i am!
[19:23:17] <Tom_itx> wtf :)
[19:23:21] <malinus> hehe
[19:23:33] <N1njan33r> By hand I mean, or pick and place?
[19:23:46] <Tom_itx> by hand with a manual pick
[19:23:47] <malinus> why haven't you hired any cute chinese girls to help you out Tom_itx ?
[19:23:55] <Tom_itx> then toaster oven baked to a crisp
[19:24:11] <N1njan33r> Ahh.
[19:24:27] <N1njan33r> You should let us assemble them for you - we could crank out a few hundred a day :)
[19:25:20] <N1njan33r> https://www.dropbox.com/s/yq6ymvsw0o9nlzc/ProductionHelper.jpg -- Taji would help
[19:25:50] <Tom_itx> the open one is 23 the blue one is 30 and 7 to ship
[19:25:55] <N1njan33r> But I'll keep your programmer in mind depending on what Atmel comes back with :)
[19:26:04] <N1njan33r> Are you in the US?
[19:26:06] <Tom_itx> yes
[19:26:07] <Tom_itx> ks
[19:26:14] <N1njan33r> Gotcha, Cleveland here.
[19:26:15] <Tom_itx> i have a handfull made up
[19:26:25] <Tom_itx> haven't run a batch in a while
[19:27:28] <Tom_itx> i bet they're dropping the MKII so they can make a new one that locks clones out
[19:28:24] <Tom_itx> it's also got a recovery clock pad just in case
[19:29:10] <N1njan33r> That's handy!]
[19:29:29] <Tom_itx> a bit harder to get to on the blue one but it's there
[19:29:43] <Tom_itx> not something you normally need
[19:30:01] <N1njan33r> Handy for the hobbiests I'm sure.
[20:36:17] <clixxIO> morning