#avr | Logs for 2014-10-02

Back
[05:38:06] <LeoNerd> Well, balls. I wanted to use the USI as an SPI, and Timer1 as a PWM controller at the same time. They both share pins on an ATtiny84. :(
[05:39:03] <LeoNerd> I guess I could use Timer0 for PWM; less accurate, and use Timer1 for my internal timekeeping interrupts
[07:22:37] <ecilop> LeoNerd: Can you directly control another pin from INT1 handler?
[07:23:04] <ecilop> LeoNerd: *TIM1 handler
[07:23:04] <LeoNerd> Er... sure... why wouldn't you? There's no restrictions on what instructions or operations you can perform from inside interrupt handlers
[07:23:39] <ecilop> use direct out for PWM from handler
[07:24:10] <LeoNerd> Oh, hrm. I cooould, but it's not that important. I only want PWM to control a little piezo sounder; the frequency isn't that important. I'll use TIM0 for that instead
[07:24:52] <ecilop> ok
[07:25:29] <LeoNerd> Actually using the 16bit TIM1 for my internal timing logic might be nicer anyway, so then I can stop with my silly IDDA-style cheating to get an accurate 5msec
[07:27:08] <ecilop> don't forget about interrupts priority
[07:27:56] <ecilop> Sorry for my poor english language
[07:27:58] <LeoNerd> Mhmm.. well, my architecture should make that largely a non-issue
[07:28:18] <LeoNerd> I'm building a little structure analogous to epoll_pwait().. my sleep wrapper basically just waits for an interrupt to happen
[07:30:46] <ecilop> May be there nested interrupts
[07:31:45] <LeoNerd> There won't be in my case; all my interrupt handlers are nicely short things, and all run with GIE off
[07:31:54] <LeoNerd> Basically: just adjust flags and exit
[07:32:11] <LeoNerd> Or perform really minimal IO, like fetching/refilling hardware buffer registers
[07:32:38] <ecilop> If first occurs TIM0 -> during T0 handler occurs T1 -> your 5msec from T1 will not be accurate
[07:33:35] <ecilop> T0 must be nested in my opinion
[09:51:10] <flasher> hello
[09:51:23] <LeoNerd> A'ernoon
[09:51:26] <flasher> can someone please clear to me?
[09:52:01] <flasher> How can i know atmega8 smd chip RSTDISBL bit programmed?
[09:52:19] <LeoNerd> You'll need an HVPP programmer; SPI-based ISP cannot do it
[09:52:35] <flasher> Ok
[09:53:01] <LeoNerd> I tend not to bother fiddling with RSTDISBL on any but the smallest of the ATtiny chips (8 and 14-pin), because it's a right faff to have to use HV programming on it
[09:53:29] <flasher> I want to know if i cannot reset it means its disabled doesn't it?
[09:53:29] <LeoNerd> The difference between 5/6 GPIO pins or 11/12 can make a difference, but by the time you get to the size of an ATmega8, I don't think it worth the bother
[09:53:58] <LeoNerd> Ah; well if you already -have- a chip that's no longer paying attention to RESET, then yes you might have that fuse gone
[09:54:08] <flasher> ok
[09:54:36] <flasher> And If its disabled i cant program it with external clock source righT?
[09:54:43] <flasher> i need HVPP programmer?
[09:55:12] <LeoNerd> It's not about the clock source; it's about the fact that since the RESET line no longer functions as a reset control, the chip cannot be put into ISP mode using it
[09:55:26] <LeoNerd> So your only option is the HVPP, which puts +12V on the RESET pin as a signal to it to do so
[09:55:40] <flasher> Ok thank you
[09:56:00] <flasher> There are many examples
[09:56:30] <flasher> I am confused, they use different pins on Parallel port
[09:56:38] <LeoNerd> If all you need to do is re-enable the RESET line you can probably find an HVPP version of the Fuse Doctor idea
[09:56:49] <LeoNerd> Hrm? HVPP is all about how you talk to the AVR chip
[09:57:05] <LeoNerd> I'm sure many people have invented many different ways to do that; some of them involving simple bitbanging from a PC parallel port
[09:57:19] <flasher> Can i build myself?
[09:57:51] <LeoNerd> I don't know... /I/ could build one but I don't know your level of skill
[09:58:01] <LeoNerd> So I can't truthfully answer that
[09:58:38] <flasher> Sorry
[09:59:08] <flasher> I am skilled enough i think
[09:59:43] <flasher> But i don't know what to build?
[10:00:09] <LeoNerd> Personally, I think I'd build this by sticking a +12V control front-end circuit onto an Arduino of some kind (I have a spare Nano for such projects), and emulate enough of the STK500 HVPP protocol to allow avrdude to talk to it
[10:00:36] <LeoNerd> STK500 is simple enough; it's a not-very-complex binary protocol over 115.2kBaud serial; so the FDTI USB conversion on the Nano makes that easy
[10:14:34] <flasher> I think working on SMD will be hard
[10:14:39] <flasher> Thank you
[10:21:03] <flasher> Do you think HVSP possible?
[10:22:32] <LeoNerd> HVSP is a feature of the 8- and 14-pin ATtiny chips
[10:22:35] <LeoNerd> Not the ATmega8
[10:22:44] <LeoNerd> For that you'll want HVPP
[10:23:17] <LeoNerd> (in practice the two are closely related; I suspect I know how the hardware works for HVSP to turn it into HVPP ;) )
[10:25:30] <flasher> OMG I just wanted to upload a SimonK Firmware to ESC that i bought.
[10:25:32] <twnqx`> what, shift register-- ?
[10:25:37] <Valen> smt isn't bad really
[10:25:45] <Valen> one of my friends learnt on smt
[10:25:48] <flasher> Why they disabled RESET
[10:25:49] <Valen> he sucks at throughhole
[10:25:51] <twnqx`> depends on the smt...
[10:26:10] <twnqx`> 0.4mm pitch was annoying
[10:26:24] <twnqx`> exposed pads were annoying
[10:26:51] <flasher> I can do that but ı have 5 ESC
[10:27:02] <LeoNerd> twnqx`: Basically, yeah. If you carefully study the HVSP protocol, then trivially the SDI line corresponds with the parellel data input, and various bit patterns on SII correspond with all the other input handshaking lines
[10:27:52] <LeoNerd> Usually about the only reason to disable RESET is to get that extra GPIO line back; which is why I said I generally only bother with that on the smaller ATtiny chips
[10:28:52] <flasher> How can I really sure that RESET disabled?
[10:29:13] <LeoNerd> Get an HVPP programmer to read the fuse bytes, and check
[10:29:56] <flasher> Is there any HVPP programmer for atmega8a-au?
[10:30:15] <LeoNerd> Hrm? HVPP is just a thing
[10:30:19] <LeoNerd> all HVPP chips work the same way
[10:30:33] <LeoNerd> There's no "for ATmega8"-ness about it
[10:32:05] <vsync> http://imgur.com/sWBbB6J Bollocks. Looks like I won't be cutting this card down
[10:32:22] <flasher> no no I mean since my atmega is SMT i did not see any ?
[10:32:32] <LeoNerd> Huhm?
[10:32:38] <LeoNerd> you're not really making sense
[10:32:51] <LeoNerd> HVPP is a design, a specification, an idea.. a way of talking to AVR chips
[10:33:14] <LeoNerd> Whether or not you can attach connections to your PHYSICAL chip depends only on what physical connectors you happen to have
[10:33:45] <LeoNerd> Since you can't (safely) HVPP in-circuit you'll have to remove the chip from wherever it currently is, to connect it soley to the HVPP proframmer
[10:33:49] <LeoNerd> *programmer
[10:33:56] <vsync> l2diodes
[10:34:05] <flasher> Yeah exactly i am trying to understand if there is any available
[10:34:29] <LeoNerd> Whoknows? *shrug* The STK500 can probably do it but I'm not sure if that has SMT adapters.. it might
[10:34:37] <LeoNerd> Failing that you'll have to find some kind of SMT adapter for your chip
[10:40:05] <twnqx`> i used one of the cheap ebay smt to dip adapters
[10:40:19] <twnqx`> for an 8bit tiny to program in the stk500's DIP kit
[10:41:46] <flasher> Thank you i am going to get TQFP adapter and a HVPP
[10:48:32] <twnqx`> tqfp... ouch
[10:48:55] <twnqx`> good luck :)
[10:49:08] <LeoNerd> Eh.. could be worse. At least it's not a BGA ;)
[10:53:42] <Daghdha> hi, ni Atmel Studio i have a .elf and .hex generated. It always chooses the .elf to program to the flash. Is there a way to make it select the hex? I think the .elf doesn't work on my chip
[10:54:13] <LeoNerd> Er...
[10:54:21] <LeoNerd> The format of the file used to upload shouldn't be visible to the chip
[11:01:50] <Daghdha> ok so (i folleed tutorial earlier that made me use the .hex) so i could probably just use the elf? Hmm i wil just try
[11:03:04] <Daghdha> works.
[11:03:15] <Daghdha> hehe, been manually selecting .hex file last hour or so
[11:06:16] <LeoNerd> I generally use .hex because that's what avrdude likes
[11:06:24] <LeoNerd> And also my avr_hvsp program
[11:06:48] <Daghdha> yes demo used avrdude, but i am now using the built in one in atmel studio
[11:18:56] <twnqx`> LeoNerd: 100$ for a tqfp144...
[11:19:00] <twnqx`> http://www.wvshare.com/column/Adapter.htm
[11:19:27] <twnqx`> or 90 for a naked socket... http://www.wvshare.com/product/IC51-1444-1354-7.htm
[11:19:31] <LeoNerd> Ouch
[11:20:00] <twnqx`> and i never found a shop outside these chinese where i could even order special sockets
[11:20:35] <LeoNerd> Yah - certainly a lot cheaper just to buy a new ATmega chip, if all you're doing is resetting fuses
[11:26:25] <flasher> Oh yeah
[11:26:35] <flasher> this will be nicer
[11:26:40] <flasher> thank you guys
[11:27:08] <flasher> 10 SMD atmega8 for 9 USD + free shipping
[11:27:43] <twnqx`> mega 8 don't come in tqfp144, do they...
[11:30:59] <flasher> They should'nt
[11:33:36] * twnqx` looks at a dip-28 mega 8 to his left
[11:34:43] <flasher> What you are thinking?
[12:09:47] <vsync> how hard is it to strip flat flex for soldering
[12:10:35] <N1njaneer> Depends on what tools you have and your technique I suppose :)
[12:10:56] <N1njaneer> Usually FFC goes in to connectors on the ends, though.
[12:11:49] <vsync> i know, but i need to cut it
[12:14:48] <N1njaneer> I would use a very sharp razor blade and a steady hand
[12:15:18] <N1njaneer> Press hard enough to cut the cladding but not unduely cut in to the conductors.
[12:16:18] <N1njaneer> Had to do that semi-regularly for the old Atmel JTAG ICE with the stupid white FFC until I found the part number to order replacements of just the cable from DigiKey. Glad to not be dealing with that anymore - such a poor design choice.
[12:16:33] <vsync> yeah, i need to break it out with 30 awg
[12:26:56] <vsync> this card is retarded though, usually the sd cards are on a circuit board with the mem chips attached
[12:27:28] <vsync> so you can cut it down in size. This 256 GB card has the mem chips baked into plastic
[12:31:41] <N1njaneer> I've had to solder break-outs with 38-gauge wire numerous times - I feel your pain. At least 30-gauge Kynar is nice to work with if you have good strippers.
[12:31:55] <LeoNerd> Kynar doesn't need stripper
[12:32:00] <LeoNerd> That's the entire point of it
[12:32:39] <mheld> anybody here poke around with a broadcom 43340?
[12:32:45] <N1njaneer> It's more controlled and neater if you do, however. It really depends on what you are needing to solder, and how.
[12:33:32] <LeoNerd> I usually just "strip" kynar by holding it against the soldering iron tip and spinning it around; the kynar comes off on the iron, then I clean that with the sponge
[12:34:00] <N1njaneer> Ick. Not the best for your tip.
[12:34:03] <LeoNerd> The trick to doing it efficiently is batches; do a few wires, then solder them, then a few wires, etc... otherwise you're constantly swapping modes with the iron
[12:34:48] <N1njaneer> Ideally you try not to have to use the Kynar at all, though. It usually means I made an error on a PCB layout. :D
[12:35:08] <vsync> it's an adapter, not pcb
[12:35:20] <N1njaneer> vsync: I mean to LeoNerd :)
[12:35:25] <LeoNerd> I don't have a PCB fab plant so I use stripboard + kynar for most of my layouts
[12:35:29] <N1njaneer> I know you have special application :)
[12:35:35] <LeoNerd> Or 0.7/1 for larger power lines
[12:39:00] <vsync> I don't have a microscope. I have a magnifying class and I have no idea of its magnitude
[12:39:05] <vsync> glass*
[12:39:16] <N1njaneer> If it works, that's what matters!
[12:39:20] <vsync> Yes
[12:39:43] <vsync> Any luck with just trying to melt the plastic layer off
[12:39:53] <vsync> or must you actually try to separate it with an exacto
[12:40:05] <vsync> off a flat flex
[12:44:58] <N1njaneer> I would suggest the razor, else you're likely to just make a big mess with the heat.
[12:45:53] <N1njaneer> Holy crap, this devkit a client just loaned us is like $5500 on DigiKey. Spendy. X.x
[12:46:13] <vsync> It might get lost
[12:46:13] <learath> what does it do?
[12:46:22] <vsync> And it might pop up somewhere to be sold
[12:46:25] <vsync> ...Right?
[12:46:41] <N1njaneer> Devkit and IAR toolchain for Ember processors.
[12:47:39] <N1njaneer> But comes with like three network/USB JTAG debuggers, and a Silicon Labs stress-ball squeezy thing, just because there was extra room in the kitspace. I hope the stress-ball isn't fortelling!
[12:47:57] <learath> three jtag debuggers?
[12:48:03] <learath> at the same time? :P
[12:48:13] <N1njaneer> Yep. Because it has three dev boards in it.
[12:48:31] <N1njaneer> Ember has a nice embedded Zigbee stack in the hardware, so you kind of need multiple to do anything effective with.
[12:49:47] <LeoNerd> https://en.wikipedia.org/wiki/File:Half-completed_manual_soldering_of_surface_mount_MQFP_integrated_circuit.jpg *twitch*
[12:50:48] <learath> 1/10
[12:51:04] <N1njaneer> Leo: I did that with some VQFPs back in college - broke out a CS8900 Ethernet controller to a perf board. It worked!!
[12:51:40] <LeoNerd> Crazy people
[12:56:53] <learath> http://mms.businesswire.com/bwapps/mediaserver/ViewMedia?mgid=286263&vid=5&download=1
[12:57:12] <Tefad> "16 pins have been soldered with wire wrap wire, which will later be fixed into a DIP chip holder."
[12:57:23] <learath> the other chip is too small, I can't find a mu-chip picture
[12:57:25] <learath> it's even smaller.
[12:58:09] <learath> there we go. http://www.paulmcguire.org/media/Worlds%20Smallest%20RFID%20Chip_Mu%20Chip%20Data%20Sheet.pdf
[12:58:21] <vsync> this is not happening. All of the sd card readers I have, none seems to support hc/xc
[12:58:56] <vsync> if usb wasn't such a pain in the a-hole i'd make one faster than waiting for tomorrow to get one
[12:59:36] <twnqx`> https://img.eternallybored.org/image/i/z/IZ6DwY31g31wxwO-ie3Luc28dsYARhzzSAfzDSIihGY.jpeg try bga.
[13:00:16] <Bright> no
[13:00:28] <twnqx`> do it :P
[13:01:30] <twnqx`> LeoNerd: that link was for you :P
[13:01:59] <LeoNerd> twnqx`: Waaaaaah
[13:05:29] <twnqx`> https://img.eternallybored.org/image/l/r/LRtT1w7KqYrdM5JhdGA7Dvh0tUKfOx2Cs1BDOtPjzho.jpeg it may or may not have been part of a project to hack some nintendo console.
[13:06:32] <twnqx`> can't exactly remember the original context, and the flickr stream those are from is gone now
[13:07:57] <twnqx`> https://img.eternallybored.org/image/e/k/EkJxJhRMVIMuuI25eFkxaBr7iGnsY6kNH091JyZRPOE.jpeg they didn't even stop on buried vias.
[13:13:09] <Jartza> 'allo
[13:21:30] <N1njaneer> twnqx: I've actually had to do repair work exactly like that before :)
[13:25:59] <N1njaneer> I have to dig up the pictures, but I've had to use 38-gauge wire to connect to all 32 pads on a 5x5 QFN ATMEGA, lace through a small 6x6 laser-cut piece of FR4 with 32 holes, and bond all said wires down to all 32 pads on the land before. Did several of those while waiting for some small 5x5 deus boards to arrive that ultimately fixed the problem. It was tedious, but it worked!
[13:29:10] <N1njaneer> https://www.dropbox.com/s/ffiwom3ge7fcwiz/diebond1.jpg?dl=0 -- this is gold bonding wire I soldered to a raw LED die, encapsulated in the blob of cyanoacrylate in the middle of the picture. The lands on the die are about 75u in size. Salt crystals and mechanical pencil graphite shown for scale :)
[13:31:26] <N1njaneer> Also https://www.dropbox.com/s/vklhmvya4a8wvj5/diebond2.jpg?dl=0 shows an actual die running. This is with magnet wire, before I had the gold bonding wire on hand. Edge of a US dime shown for scale in picture. :)
[13:32:01] <N1njaneer> The die in the pictures is roughly 100 microns cubed, or about half the size of an average grain of table-salt.
[13:32:24] <N1njaneer> Anyhow. Yes, you can solder tiny things by hand )
[13:32:25] <N1njaneer> :)
[13:33:09] <Tefad> some people do not have steady hands
[13:33:25] <Tefad> i'd probably be down if i'm not loaded with caffeine : D
[13:33:47] <N1njaneer> Yeah, I've noticed caffiene makes me micro-jittery sometimes, which I only realize when working under the scope :D
[13:34:17] <Tefad> some meds and OTC things do it too
[13:38:03] <Jartza> yah
[13:38:07] <Jartza> http://tagsu.io/
[13:38:08] <Jartza> :D
[15:04:03] <Bushman> heh... get a diazepan
[15:04:24] <Bushman> you'll be able to solder tinies tinies things....
[15:04:45] <Bushman> ...before you die from oxygen deprivation XD
[15:05:42] <Jartza> whoa
[15:05:55] <Jartza> I heard from my boss that some people would also love to have Tags
[15:05:58] <Jartza> Tagsu
[15:06:04] <Jartza> so we made that website
[15:06:23] <Jartza> so far, 115 sold (in like what, 3 hours)
[15:06:50] <learath> "tagsu"?
[15:07:35] <Jartza> http://tagsu.io
[15:08:53] <Bushman> o_O
[15:09:16] <Jartza> indeed
[15:10:24] <Bushman> i can't even see a proper picture of what i'm buying ;/
[15:10:58] <Bushman> tho i like the shell website
[15:10:59] <Bushman> :D
[15:11:55] <Bushman> even tho it's insanely inconvenient
[15:11:56] <Bushman> :D
[15:18:37] <Jartza> it's basically small LCD display displaying text
[15:18:48] <Jartza> it fits 42 screenful, with some effects
[15:19:01] <Jartza> quite retro, it has space invaders, pacman etc :D
[15:19:07] <Jartza> we were going to add videos and pics to site
[15:19:12] <Jartza> unfortunately not today
[15:19:23] <Jartza> and it's size of an "standard ID-badge"
[16:22:58] <twnqx`> Jartza: lol at the c64 reset
[16:50:32] <Jartza> twnqx`: yeah! the "load" is also neat :)
[18:32:13] <scooty_puff> if i use a pin change external interrupt, will a change on any pin on that port trigger an interrupt or can i set it to only trigger for that pin?
[18:36:36] <N1njaneer> scooty_puff: You can mask it
[18:37:38] <scooty_puff> i am assuming that will filter out certain pins from triggering interrupts
[18:37:54] <scooty_puff> or at least pcint
[18:38:40] <N1njaneer> Look at the datasheet - it tells you exactly how to do this, so you know what limitations you get with Pin Change interrupts if you aren't using one of the dedicated interrupts
[18:44:24] <LeoNerd> Eh.. not sure why I bother with RS Components sometimes. I couldn't actually -find- a 2x5 PCB female header. In about 5 mouse clicks I'd found and bought a pack of 10 from eBay
[18:52:05] <LeoNerd> Ooooh.. I think I've just discovered that Seeed studio do cheap PCB fab
[19:45:21] <Lambda_Aurigae> LeoNerd, dirty cheap pcbs
[19:45:25] <Lambda_Aurigae> they look awesome.
[19:45:40] <Lambda_Aurigae> the silkscreen is sometimes off a bit but the actual circuits look solid.
[19:45:45] <Lambda_Aurigae> and they are super cheap.
[19:45:48] <N1njaneer> Cheap is good if you don't need traceability :)
[20:04:14] <bezoka> Hello, do you know good compilator for asm for linux?
[20:09:55] <jacekowski> bezoka: gas