#avr | Logs for 2014-10-17

Back
[09:45:20] <MarkX> Jartza: ping?
[09:55:22] <Limb> Does anyone have experience with USB on AVR's? I'm using the ATMega16u2 and want it to appear as a device to the PC Host. I can't seem to find examples, so I'm not sure if it's a hard thing to do, or if I'd be better off using the LUFA library?
[09:55:49] <Limb> I'd like to learn to do the actual AVR code, but if it means I'm going to spend a large amount of time figuring it out, I suppose I'd be better off with LIFA
[09:55:52] <Limb> LUFA*
[10:04:33] <malinus> Limb: start by reading about the USB standards, it's about 300 pages (the summary version). After that, you read the atmega16u2 datasheet, especially the part about how its usb-peripheral works. Now, a few days/weeks/months have passed, and you are read to realize that you don't want to work with usb, and you compile the LUFA example in 2min.
[10:05:03] <Limb> haha, that's what I figured. Thanks malinus
[10:05:17] <Limb> 300 pages though? so some light bathroom reading is all.. not bad
[10:06:25] <malinus> it's not stupid to learn something about the very common protocol that we will probably use for a long time. But it's a lot of work if you just want your atmega16u2 to do some simple tasks over it.
[10:07:06] <malinus> TL;DR thank you for LUFA abcminuser
[10:07:23] <MarkX> hey Limb
[10:07:27] <MarkX> i hav experience
[10:07:28] <MarkX> one sec
[10:07:56] <MarkX> how does this channel feel about linking ebooks?
[10:08:16] <malinus> MarkX: it's not up to this channel, read the freenode rules
[10:08:23] <MarkX> ah
[10:08:24] <MarkX> gotcha
[10:08:25] <malinus> (if you are talking about piracy)
[10:08:30] <MarkX> yep
[10:08:32] <MarkX> never mind
[10:08:48] <malinus> or prvtmsg, this way at least you won't bring the channel in trouble
[10:08:59] <MarkX> anyways Limb what I did was take the code provided by PJRC (people don't like talking about that here)
[10:09:09] <MarkX> and i commented each line to figure out what it does
[10:09:27] <Limb> Ah. That's a good way to approach it as well
[10:09:31] <MarkX> split up his code to an organized lot that can be reused over and over
[10:09:32] <MarkX> BUT
[10:09:37] <malinus> MarkX: is that the HID-device example of his?
[10:09:51] <malinus> MarkX: or which code?
[10:09:55] <MarkX> malinus: he has a bunch, HID, simple hello world, etc
[10:10:00] <malinus> yeah
[10:10:06] <MarkX> sorry i'm trying to get all the links
[10:10:08] <MarkX> give me one second
[10:13:49] <MarkX> okay first
[10:13:56] <MarkX> https://www.pjrc.com/teensy/usb_debug_only.html << take that code, comment every single line
[10:13:59] <MarkX> EVERY line
[10:14:56] <MarkX> next look up USB Complete: The Developer's Guide 4th Edition. its a phenomenal that will tell you all about the USB standard without putting you to sleep
[10:15:10] <MarkX> use it as a reference to figure out whats going on in the "library" that PJRC has supplied
[10:16:45] <MarkX> and of course find the datasheet for the 16u2
[10:17:01] <MarkX> its actually very simple if you use PJRC's code as a starting point
[10:17:21] <MarkX> the standard is daunting but it'll click after a little bit of reading
[10:18:27] <MarkX> also look at the code here >> https://cnlohr.net/pubsvn/electrical/ << he uses an atmega32u2 (it's almost the same thing as 16u2)
[10:18:39] <MarkX> but there he actually puts it to use to interact with his computer
[10:21:07] <MarkX> after all the device side is done, you can look into libUSB for computer side programming
[10:21:16] <MarkX> i think there is a usb channel too that is back to life recently
[10:35:52] <Jartza> MarkX: pong!
[10:36:13] <MarkX> Jartza: can you send me a link again to that blue board you posted yesterday?
[10:36:39] <Jartza> MarkX: http://tagsu.io/
[10:36:41] <Jartza> this one?
[10:36:43] <Jartza> or the pic?
[10:36:45] <MarkX> I'm getting started with Eagle and want to see how you place your tNames and tValues
[10:37:18] <MarkX> the pics please
[10:37:27] <twnqx> normally
[10:37:33] <Jartza> https://slack-files.com/files-pub/T02FEAMUS-F02Q2PKCX-49aa5b/20141016_004.jpg
[10:37:36] <twnqx> you arrange them after routing anyway
[10:37:46] <Jartza> https://slack-files.com/files-pub/T02FEAMUS-F02Q35ULN-4ea51a/20141016_002.jpg
[10:37:50] <twnqx> i normally remove tvalues anyway
[10:37:56] <Jartza> me too
[10:38:19] <Jartza> tNames I placed inside components, tValues aren't shown at all
[10:38:56] <MarkX> ah
[10:38:59] <MarkX> excellent
[10:39:40] <Jartza> that way the final product looks quite "clean"
[10:39:45] <MarkX> right right
[10:40:06] <MarkX> now how about all those thru-holes you have. most of the tutorials i found are for SMD footprints.
[10:40:14] <MarkX> do you know anywhere to learn about that?
[11:02:01] <N1njaneer> MarkX: Look at other boards, learn, and do. It's kind of just a process that takes a lot of boards under your belt to refine. It's a bit more of an art than a hard science :)
[11:02:45] <twnqx> does it matter
[11:03:10] <MarkX> hehe
[11:03:11] <MarkX> cool
[11:03:17] <twnqx> i do personally think it's only at high frequencies where you have to start being careful
[11:03:21] <twnqx> e.g. a few hundred mhz
[11:03:32] <twnqx> and of course highly sensitive analog stuff
[11:03:32] <N1njaneer> That really depends.
[11:04:02] <MarkX> i liked altium when I used it back in the day
[11:04:06] <N1njaneer> Generally RF effects start any time the trace lengh on the board becomes longer than 1/10th the wavelength traversing it.
[11:04:08] <MarkX> but apparently everyone uses eagle >_>
[11:04:20] <N1njaneer> MarkX: I use Altium exclusively :)
[11:04:22] <aandrew> well I'm a >10y eagle user thinking really hard about moving over to alitum
[11:04:33] <MarkX> ya?
[11:04:36] <twnqx> i know quite a lot of people who hate altium for all of its failoures
[11:04:54] <N1njaneer> Altium is definately an end-all be-all solution to board layout, but it has a bit of an intensive learning curve.
[11:04:59] <aandrew> altium's failures being...? the biggest one I have is windows-only and a shitty subscription model
[11:05:17] <MarkX> i liked it better
[11:05:20] <MarkX> dont know why
[11:05:23] <N1njaneer> That being said, there pretty much isn't anything you can't do with it.
[11:05:23] <MarkX> seemed easier to me :S
[11:05:30] <N1njaneer> And it also supports a SpaceMouse :)
[11:05:33] <twnqx> let me see if i can find the log
[11:05:42] <MarkX> i liked the 3d feature of it
[11:06:04] <N1njaneer> Subscription model? Only if you want maintenance AFAIK, which is standard with pretty much any significant software package. Solidworks is similar.
[11:06:16] <MarkX> oooohhh i remember why i switched over, cause the suppliers weren't providing library files
[11:06:20] <MarkX> turns out its the same for eagle XD
[11:06:22] <aandrew> I mean yeah it's totally different from eagle which is why I'm not keen on jumping ship but eagle's just been doing less and less with each release and falling farther and farther behind
[11:06:40] <N1njaneer> MarkX: I pretty much build all of my own footprints anyhow - far better to have control.
[11:06:46] <MarkX> gotta make my own footprints and what ever no matter waht
[11:06:53] <aandrew> kicad is something I wish would hurry the hell up but they are hell-bent on doing things in a way which prevents regular people like me from using it before it's "done"
[11:07:23] <twnqx> the friend who dislikes altium loves pulsonix
[11:08:22] <MarkX> see, i remember from highschool. there was a program we used and it just listed basic components. resistor, caps, etc. the sizing wasn't dead on but the foot print worked
[11:10:34] <N1njaneer> Altium is great, but you really need to be able to justify the need for it. Take the simplest path. ANY good software has a reasonable learning curve to become proficient at it.
[11:10:36] <brabo> evening all
[11:11:47] <N1njaneer> The people that annoy me are the ones who expect that some magical and powerful software exists out there that they can just pick up and do anything with WITHOUT having to spend time becoming proficient at it. That's not how it works. I will agree some software is a bit more intuitive than others, but ANYTHING complex requires a time investment to master :)
[11:12:41] <MarkX> INTUITIVE
[11:12:44] <MarkX> thats the word i was looking for
[11:13:00] <MarkX> i felt altium was more intuitive than eagle
[11:13:41] <N1njaneer> Things like Altium and Solidworks are also not cheap, but if you actually need them, chances are you are then dependent on them for making money, and so the maintenance costs per year are absolutely worth it, since you can simply pick up the phone and talk to the local VAR for tech support who can get you unstuck.
[11:14:19] <MarkX> oh man
[11:14:22] <MarkX> <3 solidworks
[11:14:50] <N1njaneer> We use it for a lot here :)
[11:15:13] <N1njaneer> Sucks that the CAM software is generally 2x the cost of a basic Solidworks seat X.x
[11:15:21] <Jartza> MarkX: yes, that's through-hole, just because I had shitload of through-hole components I wanted to get rid of :)
[11:15:43] <Jartza> but I'm already into designing a smd version
[11:15:58] <MarkX> N1njaneer: i use it too, can't talk about prices though...if you catch my drift
[11:16:05] <Jartza> because I've sold so many already that I'm actually running out of TH ones
[11:16:37] <MarkX> Jartza: the pads you have are very nicely shaped. the ones i'm trying are just plain old square :(
[11:17:11] <twnqx> that's just a click in eagle
[11:17:41] <MarkX> yea, thats what I want to learn!
[11:17:48] <twnqx> reminds me
[11:17:59] <MarkX> i mean if im designing a footprint. better learn now how to design is to be all pretty
[11:18:02] <twnqx> i should check prices for an upgrade to 7
[11:18:15] <MarkX> why not just run as freeware?
[11:18:26] <twnqx> i am used to my pro license
[11:18:58] <twnqx> also i commonly uses multiple schematic sheets
[11:18:59] <MarkX> ah
[11:26:37] <Jartza> MarkX: yes, I did the components for eagle myself, because I wanted to learn how.
[11:26:50] <MarkX> k cool
[11:26:54] <Jartza> and also, because there wasn't good quality components in library
[11:27:15] <Jartza> for LCD there was none, for the phono plug there was few that were a bit off
[11:28:34] <Jartza> and the phone plug now actually fits at least 3 different ones
[11:29:40] <Jartza> what I forgot, was to add a layer for the factory customer & board identification number (that 595-173472)
[11:29:57] <Jartza> I would've wanted that somewhere where it doesn't show after placing components, but oh well, next board then ;)
[11:30:15] <Jartza> but other than that, that board turned out to be pretty perfect
[11:31:32] <LoRez> Tom_itx: you around?
[11:32:00] <LoRez> Tom_itx: nm
[11:33:26] <MarkX> argh
[11:33:35] <MarkX> well i just made my first device
[11:34:00] <MarkX> threw it into a schematic and its massive compared to a device from the library
[11:34:01] <MarkX> XD
[11:34:14] <Jartza> that happens
[11:34:20] <Jartza> basically Tagsu is also my first device
[11:34:28] <Jartza> although, that's already it's fifth "incarnation" ;)
[11:34:50] <Jartza> first version was made on protoboard, next 2 were home-etched
[11:35:08] <Jartza> rev 4 and rev 5 I ordered from factory
[11:35:17] <MarkX> nice, expensive?
[11:35:21] <Jartza> no
[11:35:27] <Jartza> talk to hackvana :)
[11:35:30] <Jartza> or join #hackvana
[11:35:39] <Jartza> but he's also on this channel
[11:35:49] <MarkX> cool!
[11:36:06] <Jartza> I got a lot of invaluable help both from this channel, and from #hackvana
[11:36:31] <Jartza> really appreciate everything, I'm also new to making electronic devices myself
[11:36:41] <MarkX> gonna have to favorite that site
[11:36:48] <MarkX> ah yea, for sure
[11:36:53] <MarkX> everyone here is very helpful
[11:37:15] <N1njaneer> We try to help!
[11:37:31] <Jartza> N1njaneer: you succeed! :)
[11:41:14] <N1njaneer> Hi megal0maniac!
[11:41:31] <N1njaneer> Mmm, speaking of Solidworks... Time to fire it up!
[11:43:24] <MarkX> N1njaneer: ever used any of the simulation features on it?
[11:44:16] <N1njaneer> In Solidworks? Not much need as of yet - need to play with more of it. :)
[11:44:29] <N1njaneer> Mostly use it for making stuff that then runs out to the CNC mill :)
[11:45:04] <MarkX> ah nice
[11:49:49] <N1njaneer> Did this last week -- https://www.dropbox.com/s/22eacmx8vmhfxm0/enclosure.jpg?dl=0 :D
[11:50:34] <N1njaneer> Stopped on that piece (contour and floor aren't finished) because there was an error in some dimensions, but the result came out nice, then hit it with an 80-grit bead blast.
[11:56:36] <Tom_itx> LoRez yes
[11:57:35] <MarkX> very nice
[11:59:50] <Tom_itx> N1njaneer, aluminum?
[12:35:34] <brabo> yay.. dhcp address assigned on enc28j60 :)
[12:36:20] <N1njaneer> Woo!
[12:36:25] <aandrew> brabo: congrats :-)
[12:36:59] <N1njaneer> I still need to add DHCP support to my Ethernet stack on SAM4E16
[12:42:06] <brabo> yeah, i've been banging my head against the wall trying to make atmega code work for the xmega.. then it turned out i was incorrectly using .DIRSET and .OUTSET instead of .DIR and .OUT...
[12:47:55] <N1njaneer> Doh!
[12:49:08] <Getty> and i am the project manager and wait since 2 days of a success of him ;)
[12:49:12] <Getty> i was a BIT worried ;-)
[12:49:28] <Getty> electronics development is NOT good for my heart
[13:07:23] <Tom_itx> fire him
[13:32:25] <awozniak> is there an irc channel for microchip PC mcus?
[13:32:30] <awozniak> is there an irc channel for microchip PIC mcus?
[13:35:38] <jadew> I always wondered about that
[13:40:58] <Jartza> awozniak: /join ##pic
[13:41:30] <awozniak> Jartza: thx. Why the double hash? I tried #pic and no-one was there.
[13:42:14] <Jartza> awozniak: https://freenode.net/policy.shtml#topicalchannels
[13:46:11] <MarkX> is there a general hole diameter used for components like thru-hole ceramic caps and thru-hole resistors?
[13:59:41] <RikusW> MarkX: 0.8 or 0.9 should be safe
[14:00:09] <RikusW> mm
[14:00:22] <Jartza> I did use 0.8 for all the components I didn't know
[14:00:40] <RikusW> MarkX: try asking in #hackvana
[14:00:48] <Jartza> like, I seem to have all sort of resistors with leg thickness between 0.4 - 0.7mm
[14:01:21] <Jartza> most of them seem to be 0.6mm
[14:01:44] <RikusW> iirc pinheaders is 0.9
[14:02:13] <RikusW> err the holes I used for it was 0.9
[14:02:18] <RikusW> quite a tight fit
[14:04:05] <Jartza> my lcd has 0.5mm pins, but I made the holes 0.7 because it was easier to fit into place
[14:04:21] <Jartza> first pcb had 0.6mm and it was quite tight fit too
[14:13:07] <MarkX> cool
[15:03:17] <N1njaneer> And keep in mind that depending on the board house and type of over, they may round your hole sizes by as much as 5 mils
[15:03:49] <N1njaneer> Always better to just slightly oversize, especially since there can be a bit of variation from the plating and HASL processes.
[15:05:02] <MarkX> kk
[15:15:33] <N1njaneer> MarkX: Oh, Recent Altium board that's now sitting running on my desk now! https://www.dropbox.com/s/z26rcv4lxehfbr8/SAM16E-board.jpg?dl=0
[15:16:03] <N1njaneer> Only one trace incorrect on the prototype.
[15:16:42] * MarkX puts his un-pixilizer to use
[15:16:58] <MarkX> thats badass though
[15:17:18] <MarkX> looks like one giant communication board though
[15:17:58] <N1njaneer> Thanks! SAM4E16 and Xilinx Spartan 3 FPGA.
[15:18:32] <MarkX> dev board?
[15:18:44] <N1njaneer> Was too lazy to punch in all the chip heights, so not much of the component bodies render.
[15:19:16] <N1njaneer> Essentially yes, until the customer figures out what form factor and features the final version should have. This was a VERY quick one-day layout just to get something out to fab.
[15:20:10] <N1njaneer> But it works great and allowed them to do their demos on time!
[15:20:12] <MarkX> damn
[15:20:28] <MarkX> its taken me 5 hours to get an xtal and 2 caps put in
[15:20:29] <MarkX> XD
[15:22:12] <N1njaneer> Things get a lot fasters as you build up libraries :)
[15:22:16] <N1njaneer> +faster
[15:22:41] <MarkX> i hope
[15:22:46] <MarkX> i still think i messed up though
[15:22:54] <N1njaneer> I've also gotten pretty fast at hand-routing. For these 2-4 layer boards it's just far better than attempting to let the autorouter make a massive mess out of it all and/or not route to completion.
[15:23:19] <MarkX> put the atmega32u4 in instead of a 44 pin socket...
[15:23:25] <N1njaneer> I also tend to do a lot of micro-miniature integration and super small boards which no autorouter would be able to even tackle in 2-4 layers :)
[15:27:31] <MarkX> so heres a question
[15:27:37] <MarkX> how do you hunt for parts
[15:28:01] <N1njaneer> DigiKey first and foremost as the parametric search is one of the best.
[15:28:30] <N1njaneer> And then there are certain vendors I use exclusively for other particular parts series like Atmel, Xilinx, TI, etc.
[15:28:58] <N1njaneer> Usually because I'm reusing a part that has already been successfully integrated in to other designs.
[15:28:58] <MarkX> for example, right now i need a usb connection, mini b or micro b
[15:29:03] <MarkX> i cant decide which one first of all
[15:29:22] <MarkX> second if i go with mini b for example, i was just going to find the cheapest one
[15:29:23] <N1njaneer> Go either full-size USB-B or Micro. Mini has been actively phased out.
[15:29:33] <MarkX> ah
[15:29:35] <MarkX> k
[15:29:55] <N1njaneer> They are still avaliable and sometimes needed for certain application, but EVERYTHING has moved to micro as a preference.
[15:30:02] <MarkX> cool
[15:30:07] <N1njaneer> A hint with micro, though --
[15:30:49] <N1njaneer> Unless the connector will be mechanically reliefed with a chassis or similar, consider adding anchor vias in to the corners of the strain relief pads for the SMT versions of the micro-USB, or any similar connector.
[15:31:49] <N1njaneer> This will significantly improve mechanical stability, else the entire force of plugging/unplugging the device is tranferred to the bond between the copper and the FR4. It's very easy to pull pads off otherwise. The vias add an incredible amount of additional stability.
[15:32:08] <MarkX> lmao!
[15:32:14] <MarkX> you lost me after "consider adding"
[15:32:33] <N1njaneer> You have created SMT pads before/
[15:32:33] <N1njaneer> ?
[15:32:35] <MarkX> i was with you till then, then BAM
[15:33:00] <MarkX> i read a tutorial about it
[15:33:10] <MarkX> except i applied it to thru hole instead
[15:33:12] <MarkX> going to try now
[15:33:17] <MarkX> i found a nice cheap connector
[15:33:19] <MarkX> gonna make the device now
[15:33:24] <N1njaneer> Micro USB in thru-hole?
[15:33:58] <MarkX> no no, the crystal
[15:34:35] <MarkX> going part by part, the tutorial i found was "how to make a device in eagle", they used an SMD chip in the example
[15:34:44] <MarkX> i just followed it but did it for a thru-hole component
[15:34:45] <N1njaneer> Ahh, okay. I was talkign about strain-reliefing the micro-USB connector when you get there :)
[15:35:08] <MarkX> yep going to make the basics now, then go to strain relief after
[15:40:35] <Jartza> I would like to know more about strain-reliefing the connectors too ;)
[15:40:51] <N1njaneer> Jartza: Did my explanation make sense?
[15:42:05] <Jartza> it did, except I have no idea what is anchor via ;)
[15:43:24] <Jartza> my first impression is something like "through-hole", except without component :)
[15:43:55] <Jartza> but I'm pretty sure anchoring any connector is a good idea
[15:44:24] <Jartza> if the connector is just connected to traces, they will surely end up ripping off
[15:44:58] <N1njaneer> Basically I'll do small 12-15 mil vias through the corners of key strain-relief pads on connectors which do not have built in strain relief pegs or pins.
[15:45:34] <N1njaneer> Ideally you want to find connectors that at LEAST have plastic pegs that sit in board holes to take up some of the strain.
[15:45:52] <N1njaneer> But they often tend to be trickier to automatically place.
[15:46:23] <Jartza> I even have those pegs on my audio jack, even it's trough-hole
[15:47:56] <Jartza> N1njaneer: so the via is through the board, and not ... blind?
[15:49:23] <Jartza> well, of course on 2-layer board there will be no blinds, but anyway
[15:50:15] <Jartza> N1njaneer: anyway, good tip, thanks!
[15:50:16] <N1njaneer> Correct. Using 12-15 mil via on a large pad you can either (ideally) place them in the corners under soldermask, or if there's no room to expand the pad under the mask, place them in to the corners of the actual pad. The diameter is small enough (and generally plugged on the opposite side) that you will get little to no solder robbing down them.
[15:51:30] <Jartza> I have to remember that as I'm designing smd version already
[15:51:54] <Jartza> although the display will stay through-hole, as it's not available as "flex" version
[15:52:04] <Jartza> and I guess the battery connector too
[15:52:39] <Jartza> but I was wondering about the audio jack, that might be smd
[16:13:39] <RikusW> N1njaneer: how about leaving out the thermal relief on those pads ?
[16:14:03] <RikusW> like having a solid ground plane
[16:15:32] <RikusW> if those vias get solder filled it might be even stronger...
[16:16:49] <N1njaneer> RikusW:You could, but the pads still lift easily - once they start peeling they just keep going, hence the strategy of adding the anchor vias :)
[16:17:24] <RikusW> if its solid ground, there are no pads...
[16:18:06] <RikusW> I repaired a USB HD once with a ripped off usb mini connector....
[16:18:07] <N1njaneer> The whole thing is still a copper pad.
[16:18:17] <N1njaneer> Once it starts delaminating, it's done.
[16:18:24] <RikusW> had to repair one of the data traces...
[16:18:25] <RikusW> yep
[16:18:55] <N1njaneer> The better way is to strain-relief to the chassis, or at very lease use a part with built-in strain-relief pegs or pins :)
[16:19:15] <N1njaneer> BUT, in the case where the don't have this, the anchor vias can be very useful.
[16:19:24] <RikusW> indeed
[16:19:40] <RikusW> somehow only one pad and another trace pad lifted...
[16:19:57] <N1njaneer> Also useful for securing pads that wires will be soldered to, or intended to potentially be replaced numerous times, etc. The anchor vias basically help mechanically keep pads from lifting.
[16:20:33] * RikusW thinks microvias :)
[16:22:43] <RikusW> maybe the usb connectors should be made th again, at least the casing
[16:33:48] <N1njaneer> I use really expensive $10 USD cast ones from Amphenol for super-ruggedized stuff we do. Strain-reliefs to the chassis with two 4-40 screws. Gonna be hard-pressed to man-handle enough to break.
[16:45:15] <Cykey> is VDD the same as VCC?
[16:45:22] <N1njaneer> Often times, yes.
[16:46:58] <LeoNerd> Vdd == voltage on the drain of FETs; Vcc == voltage on the collector of bipolars
[16:46:58] <LeoNerd> Usually FET-based chips (so, likely CMOS devices) use Vdd and Vss; bipolar ones (i.e. TTL) will be Vcc and Vee, or more likely just Vcc and Gnd
[18:06:12] <Cykey> OK, I can't get anything to work (SPI, UART, LED, anything) with this ATmega328p on a breadboard. Avrdude says that the write operation was successful, so I assume that my programmer -> chip wiring is correct. I have a 10K resistor from RST to +5.0V and a 16MHz crystal (with 2 22pf caps) installed
[18:07:32] <Lambda_Aurigae> Cykey, and what are your fuses set to?
[18:07:46] <Cykey> Lambda_Aurigae: Yeah, that's kind of the problem. I get this stuff: https://ghostbin.com/paste/jjbnn
[18:08:15] <Cykey> If I enter "y", it just freezes there and nothing happens. If I type "n", it says "avrdude: safemode: Fuses OK (H:FF, E:D9, L:62)"
[18:09:06] <Lambda_Aurigae> is this the chip you had the power backwards to?
[18:09:48] <Lambda_Aurigae> you have l-62, h-d9, e-ff on your avrdude command..
[18:09:49] <Cykey> Lambda_Aurigae: Yeah. I tried another brand-new one but I got the exact same results
[18:10:27] <Lambda_Aurigae> which is correct...
[18:10:52] <Cykey> Hm
[18:11:00] <Lambda_Aurigae> but it is correct for default values...so the crystal is useless.
[18:11:22] <Cykey> On http://www.engbedded.com/fusecalc/, which one would be correct for a 16MHz crystal?
[18:11:37] <Lambda_Aurigae> those settings are the default values for the chip which has it running on internal rc oscillator at 8mhz with a div by 8 on...so at 1mhz.
[18:11:39] <Cykey> (Which "Feature", that is)
[18:11:54] <Tom_itx> 16Mhz full swing
[18:12:02] <Tom_itx> max startup delay 64
[18:13:16] <Lambda_Aurigae> cksel = 0111 sut=00
[18:13:44] <Tom_itx> china took so long i forgot i ordered it
[18:13:53] <Lambda_Aurigae> oh?
[18:14:02] <Lambda_Aurigae> did you order a cheap chinese girl too?
[18:14:13] <Tom_itx> musta got left out
[18:14:42] <Tom_itx> well it wasn't _that_ long but i did forget
[18:17:28] <Cykey> Hm, nope, still can't get anything to work
[18:19:22] <Lambda_Aurigae> umm.
[18:19:31] <Lambda_Aurigae> you didn't read that page for the fusecalc very well did you?
[18:19:36] <Lambda_Aurigae> read the red at the bottom.
[18:19:46] <Lambda_Aurigae> Note that some numerical values refer to fuses containing undefined bits (set to '1' here). Depending on the target device these fuse bits will be read either as '0' or '1'. Verification errors will occur if the values are read back with undefined bits set to '0'. Everything is fine if the values read from the device are either the same as programmed, or the following values (undefined set to '0'): Extended: 0x07.
[18:20:36] <Lambda_Aurigae> only the lower 3 bits in the extended fuse are read back with valid data..the rest of the bits read as zero on the verify.
[18:20:41] <Lambda_Aurigae> that's why you get the verify error.
[18:20:48] <Cykey> Ah, gotcha
[18:20:50] <Lambda_Aurigae> change your efuse to 0x07 and it will verify right.
[18:21:03] <Lambda_Aurigae> again, reason to read the datasheet on the chip you are using.
[18:21:26] <Lambda_Aurigae> or read the entire webpage you are using as a reference for something..
[18:22:18] <Cykey> mhm
[19:05:12] <Jordan_U> I have a completed avr project that we've shipped, and I'm trying to develop a procedure for programming future boards with two major requirements. 1: It should not be difficult to modify accidentally, we don't want the Atmel Studio project in our "Manufacturing" directories because we want all changes to be made in "Engineering", so having only the compiled image in "Engineering" is ideal. 2: It should be easy to walk a non-deve
[19:07:04] <Jordan_U> ...Fogot splitlong.pl 2: It should be easy to walk a non-developer through programming the chip. Unfortunately these goals currently conflict because the Atmel Studio project contains all of the infomation about the exact chip and programmer we have, meaning those things don't need to be specified in the steps for programming. Finally, while I wish I could just make a script to automate this using ardude instead of Atmel ...
[19:07:10] <Jordan_U> ... Studio, avrdude doesn't support the Atmega 64M1 that we're using. Any suggestions?
[19:11:52] <Tom_itx> what about avrdude?
[19:12:10] <Tom_itx> you can add it to the avrdude.conf if you know what it needs
[19:12:22] <Tom_itx> the latest studio doesn't support it?
[19:13:03] <Tom_itx> so give them just the .hex file to program
[19:13:21] <Tom_itx> what's the full part number?
[19:20:43] <Tom_itx> Jordan_U, the Atmega64M1 is in the device list in studio...
[19:21:14] <Jordan_U> Tom_itx: Exactly, that's why I'm using Atmel Studio. It's not supported by avrdude last I checked though.
[19:21:24] <Tom_itx> you can add it
[19:21:31] <Tom_itx> if you know the parameters
[19:21:42] <Tom_itx> take one that's in the conf and modify it
[19:21:46] <Tom_itx> for the M1
[19:22:12] <Jordan_U> Tom_itx: I don't feel competant to do that, and it's pretty important that these be programmed correctly.
[19:22:47] <Jordan_U> I'd be willing to pay avrdude developers to add support for it upstream, then use that.
[19:22:56] <Tom_itx> what's different about it over the regular 64, the 64A, the 64C, the 64HVE2, the 64RFR2?
[19:23:09] <Tom_itx> did you google for a config for it?
[19:24:28] <Tom_L> http://lists.nongnu.org/archive/html/avrdude-dev/2010-02/txtNzYHxIZIvm.txt
[19:24:33] <Tom_L> there you go
[19:26:25] <Jordan_U> Tom_itx: I've already found that, tried to use it, and failed. I don't want to use my own hacked together support for programming production chips. I'll wait for, and help to get, official support but I do not think I'll be willing to use avrdude unless this chip is supported by upstream and has had someone more competant than myself check the configuration.
[19:27:28] <Tom_L> i don't have an M1 to test
[19:27:41] <Tom_L> i have added configs to the file though
[19:28:01] <Tom_L> what errors did you get?
[19:33:21] <Tom_L> Jordan_U, i don't remember for sure but studio may have a cmd line interface for programming
[19:34:07] <Tom_L> the one i'd ask about that isn't here right now
[19:35:35] <Tom_L> Jordan_U, http://www.atmel.com/webdoc/atmelstudio/atmelstudio.ChapterCommnadLineUtility.html
[19:36:19] <Tom_L> atprogram.exe
[19:37:15] <Jordan_U> Tom_L: Thanks, looking into it now. Sounds like the ticket though :)
[19:37:25] <Tom_L> found in C:\Program Files\Atmel\Studio 6.2\atbackend
[19:38:16] <Tom_L> then you could run a batch file probably
[19:39:33] <Tom_L> The ELF production file format can hold the contents of both Flash, EEPROM and User Signatures (XMEGA devices only) as well as the Fuse- Lockbit configuration in one single file. The format is based on the Executable and Linkable Format (ELF).
[19:40:23] <Tom_L> http://www.atmel.com/webdoc/atmelstudio/atmelstudio.Projects.GccWithOtherMemoryTypes.html
[19:43:20] <Tom_L> i should try that once
[19:43:55] <Tom_L> atprogram has a whole slew of options
[21:06:52] <cmtptr> am I correct for believing that an attiny25 out of the box and using the internet oscillator (so 8MHz with the clk/8 fuse bit set) should be able to handle spi rates up to 500MHz?
[21:07:05] <cmtptr> s/internet/internal/
[21:08:03] <Tom_itx> what's the internal osc freq?
[21:08:33] <cmtptr> 8MHz
[21:08:57] <Tom_itx> so it would be 1 Mhz with ckdiv8 set
[21:09:04] <cmtptr> er
[21:09:05] <Tom_itx> so the max rate would be 250Khz
[21:09:09] <cmtptr> I meant to say 500KHz
[21:09:12] <Tom_itx> which is default for most
[21:09:26] <Tom_itx> it must be 1/4 the clock rate
[21:09:31] <Tom_itx> or it will fail
[21:10:38] <cmtptr> how am I misreading this? "Maximum frequency for SCL and SCK is fCK / 2. This is also the maximum data transmit and receive rate in both
[21:10:41] <cmtptr> two- and three-wire mode."
[21:11:30] <Tom_itx> i dunno, i'm speaking from experience
[21:11:38] <cmtptr> ah
[21:11:55] <cmtptr> well, either way 250KHz is still well above what I'm clocking it at, but it seems like the lsb is flakey
[21:12:10] <learath> that's what I've been told as well. clock/4 is the maximum safe speed
[21:12:26] <Tom_itx> 500Khz > 250Khz last i checked
[21:12:49] <cmtptr> I didn't say I was actually clocking it at 500KHz
[21:13:01] <Tom_itx> should be able to handle spi rates up to 500MHz?
[21:13:02] <Tom_itx> NO!
[21:13:15] <cmtptr> and as I mentioned, that was a typo
[21:13:22] <Tom_itx> i realize that
[21:13:26] <Tom_itx> i pasted it
[21:13:40] <Tom_itx> I meant to say 500KHz
[21:13:47] <Tom_itx> 500Khz > 250Khz last i checked
[21:14:05] <cmtptr> ... you said 500KHz both times
[21:14:15] <learath> I like the idea of 500mhz SPI
[21:14:31] <Tom_itx> a 1Mhz clock can be programmed via ISP with a spi clock of 250Khz
[21:14:56] <Tom_itx> 8mhz internal osc with ckdiv8 set = 1Mhz
[21:15:05] <cmtptr> that's the weird part: ISP is working fine
[21:15:31] <Tom_itx> is it programming without errors?
[21:15:40] <cmtptr> yes, that's why I said "is working fine"
[21:15:51] <Tom_itx> count yourself lucky
[21:16:00] <cmtptr> why?
[21:16:01] <Tom_itx> or figure out that ckdiv8 is not set :D
[21:17:35] <cmtptr> you seem to have a reading comprehension problem. at no point have I said that I'm actually clocking my spi at 500KHz, 500MHz, or 250KHz. I was verifying that I understood the rated maximum correctly
[21:18:01] <cmtptr> 76.8KHz is well below all of these
[21:35:07] <Tom_itx> <cmtptr> am I correct for believing that an attiny25 out of the box and using the internet oscillator (so 8MHz with the clk/8 fuse bit set) should be able to handle spi rates up to 500KHz?
[21:35:15] <Tom_itx> you are incorrect in that assumptinon.
[21:36:12] <cmtptr> wasn't an assumption
[21:36:15] <Tom_itx> i can read just fine
[21:36:21] <cmtptr> but thanks anyway
[21:36:22] <Tom_itx> and i'd like to see an internet oscillator
[21:36:23] <Tom_itx> :D
[21:36:39] <learath> Another good idea :)
[21:36:43] <Tom_itx> heh
[21:36:57] <Tom_itx> gawd we're just trying to help. don't take it personally