#avr | Logs for 2013-10-31

Back
[00:48:37] <Enma_Hinobara> What do you call the architecture of a uC that has separate code and data memories that are connected through a common bus (and thus have the von Neumann bottleneck)?
[01:14:40] <N2TOH> not harvard
[01:16:06] <N2TOH> the Harvard architecture has the separate buses but the AVR is a modified subset that allows a one way cross over from the instruction side into the data space
[01:17:26] <N2TOH> Enma_Hinobara, I am interested in a interpretative emulator that will allow the AVR to "run code" from the data space.
[01:19:02] <N2TOH> the performance penalty incurred would be worth the extra storage space from disk drives and block devices.
[03:06:32] <Xark> N2TOH: IOW interpreting data from flash with a "more compact" encoding than normal opcodes, or from SRAM? On AVR the SRAM (data space) is typically small.
[07:41:32] <weilawei> Hullo, so I don't have virtually any experience using an ADC, but I've written code that fires it up in free-running mode. What's the best way to handle data where you can't control how fast youll be getting it?
[07:41:43] <weilawei> Should I read it into SRAM in my interrupt handler and process it later?
[07:58:50] <w|zzy> Roklobsta: join #hackvana
[07:59:10] <w|zzy> Its the "cheap" pcb place tom was talking about
[07:59:35] <w|zzy> Great community and they will actively give you help with design reviews if you askl
[08:01:55] <hackvana> Roklobsta: Hi
[08:02:17] <hackvana> Plus if you don't join, I come haunt you here :-)
[08:10:15] <w|zzy> Yeah!
[08:10:38] <w|zzy> Seriously though i have 10 boards under 50mmx50mm delivered for $21
[08:21:22] <megal0maniac_afk> Samples :D
[08:21:43] <megal0maniac_afk> I finally own a TPI tiny
[08:25:01] <megal0maniac_afk> hackvana: The time for PCBs is drawing near ;)
[08:25:13] <megal0maniac_afk> I seem to be favouring SMT over DIP lately
[08:25:19] <megal0maniac_afk> Natural progression, I suppose
[08:25:37] <N2TOH> solders faster too
[08:25:42] <w|zzy> megal0maniac_afk: Join #hackvana then :p
[08:25:45] <hackvana> SMT: Nothing not to like.
[08:25:46] <w|zzy> It helped me quite a bit.
[08:25:59] <hackvana> We're a friendly bunch.
[08:26:14] <w|zzy> Just don't troll clix
[08:26:25] <hackvana> No challenge, too easy.
[08:26:36] <hackvana> You know, I haven't kicked him once.
[08:26:42] <hackvana> But I've kicked people for trolling him.
[08:26:45] <w|zzy> Self control :p
[08:27:24] <megal0maniac_afk> Don't worry, I know where to find you ;)
[08:27:54] <hackvana> I think you'll get a lot out of my guide: http://tinyurl.com/hvpcbfaq
[08:28:20] <hackvana> Bad news: I don't have web ordering: Good news: You and I will get to know each other real well :-)
[08:31:04] <w|zzy> Or just ask me megal0maniac_afk :p
[08:31:22] <megal0maniac_afk> You made a personal introduction last year. I've even recommended you to other people here
[08:32:27] <megal0maniac_afk> I think I now own Atmels biggest and smallest chips
[08:32:41] <megal0maniac_afk> DIP40 and SOT23-6
[08:33:17] <RikusW> megal0maniac_afk: I have tqfp64 too ;)
[08:33:32] <RikusW> the biggest is m2560 at tqfp100
[08:34:05] <RikusW> megal0maniac_afk: seems you can type without touching the keyboard ? :-D
[08:35:00] <megal0maniac_afk> RikusW: Don't you have an Aery32 as well?
[08:35:14] <RikusW> yep
[08:35:24] <megal0maniac> That's tqfp100
[08:35:31] <RikusW> and uc3a3
[08:35:34] <megal0maniac> And i don't understand the keyboard thing >.<
[08:35:37] <RikusW> thats AVR32
[08:35:52] <megal0maniac> Fair enough
[08:35:58] <RikusW> you frequently talk as _afk ;)
[08:36:15] <megal0maniac> RikusW: That usually means I'm procrastinating...
[08:36:22] <RikusW> lol
[08:36:30] <megal0maniac> If I go /nafk it means I'm admitting to it
[08:37:42] <megal0maniac> I got a tiny10 (SOT23-6), tiny85 (SOIC)
[08:37:52] <megal0maniac> And I'm waiting for 2 SAM D20s
[08:38:06] <megal0maniac> One is tqfp64 and the other tqfp32
[08:39:47] <RikusW> you'll have to make PCBs for those
[08:46:27] <megal0maniac> Protoboard :D
[08:54:04] <megal0maniac> I've got a breakout board for SOT23-6, and I'll cut the squares on protoboard in half for SOIC
[08:56:41] <RikusW> I've done that too
[08:56:52] <RikusW> be prepared to spend a lot of time doing it...
[09:03:09] <megal0maniac> RikusW: This one? http://imgur.com/X3etn
[09:10:31] <RikusW> yep that took a while
[09:18:10] <Valen> 'sup gents
[10:08:17] <hackvana> Tom_itx: Thanks for the mention :-)
[10:37:18] <beaky> hello
[10:37:40] <beaky> how do i switch on an enhancement mode p-channel metal oxide semiconductor field effect transistor with my ATtiny85
[10:40:34] <megal0maniac_afk> beaky: How does a MOSFET work?
[10:41:05] <beaky> a mosfet works when Vgs > Vth
[10:41:12] <beaky> then it starts conducting
[10:41:49] <beaky> i wish there was an appnote for this :(
[10:43:53] <megal0maniac_afk> beaky: http://bit.ly/1ixzxQV
[10:44:45] <beaky> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=136309&start=0 ah there we go! thanks
[11:36:11] <beaky> hello
[11:36:24] <beaky> what does the dead time generator on the tinyavr do
[11:36:38] <specing> rtfm
[11:38:42] <beaky> ah
[11:40:25] <beaky> so it does radio transmission frequency modulation?
[11:42:57] <specing> If that is what the docs say, then yes.
[11:43:26] <beaky> wow the attiny has a lot of features
[11:43:31] <beaky> I thought it only had GPIO
[11:45:35] <specing> feels good to read the docs, huh?
[11:48:12] <beaky> I love my tiny
[11:48:26] <beaky> how do i switch a pmos wit it
[11:57:30] <bsdfox> don't feed the trolls
[11:58:25] <beaky> ?
[12:01:46] <megal0maniac_afk> beaky: rtfm means read the.. datasheet
[12:03:05] <megal0maniac_afk> And to switch pmos, you'll actually have to read the stuff that comes up on Google
[12:03:29] <beaky> I read them
[12:03:38] <beaky> I read all of them yet I can't get my pmos to switch :(
[12:07:29] <megal0maniac_afk> Perhaps you have the wrong kind of mosfet
[12:09:02] <beaky> http://www.irf.com/product-info/datasheets/data/irlib9343.pdf this is the one i have
[12:15:04] <megal0maniac_afk> Digital Audio Mosfet
[12:15:34] * megal0maniac_afk leaves
[12:18:25] <beaky> why whats wrong with a digital audio fet?
[12:20:47] <specing> nothing.... nothing at all
[12:42:06] <RikusW> beaky: dead time is when both the push and pull transistor is off
[12:42:15] <RikusW> it is to prevent a short
[12:43:04] <RikusW> beaky: also rtfm -> read the fine manual (or f......)
[12:43:22] <RikusW> depending on mood :-P
[12:43:59] <Tom_itx> :O
[12:44:28] <RikusW> beaky: also p channel mosfet works the opposite way of n channel
[12:44:42] <Tom_itx> and are harder to drive with logic
[12:44:58] <RikusW> Vcc -> S D -> device and pull down gate to turn it on
[12:45:39] <RikusW> Tom_itx: unless you have PMV65XP
[12:45:54] <RikusW> or PMV56XN
[12:46:02] <RikusW> a bit pricy though
[12:47:57] <RikusW> beaky: still there ?..
[12:48:03] <beaky> hello
[12:48:14] <beaky> so I just invert the polarities
[12:48:19] <beaky> and my pfet works?
[12:48:22] <beaky> pmos*
[12:48:48] <beaky> ok... -5V at drain, GND at source, and -5V-0 to gate
[12:49:06] <RikusW> Vcc at source Gnd at gate
[12:49:21] <RikusW> and led+resistor at drain
[12:49:59] <beaky> ah
[12:50:15] <RikusW> much like a pnp transistor
[12:50:54] <RikusW> now it should work, unless you blew the fet :-P
[12:51:17] <RikusW> and the gate is static sensitive btw
[12:51:45] <RikusW> so its a good idea to occasionally touch some ground point
[12:51:53] <tzanger> I don't find the P-channel and N-channel to be the difficult part. I keep forgetting about the enhancement-mode vs depletion-mode :-)
[12:52:23] <RikusW> ah and theres that too
[12:52:36] <RikusW> I've only used enhancement so far
[12:52:53] <RikusW> depletion is on by defaut afaik
[12:52:56] <beaky> yay it works
[12:53:25] <beaky> when i put 0 at gate my led lights
[12:53:34] <beaky> and 5V at gate makes it off
[12:53:37] <RikusW> good :)
[12:54:10] <beaky> wow this is easy i couldn't sleep all night thinking why my pmos wont work
[12:54:17] <beaky> then you showed me howt o do it :D
[14:35:14] <megal0maniac_afk> http://xkcd.com/293/
[14:44:50] <Casper> megal0maniac_afk: LIAR!
[14:44:57] <Casper> you ain't afk!
[14:46:46] <kdehl> Sooo... a noob question about crystals and stuff. I'd how do I know what capacitors to use?
[14:47:00] <kdehl> I've never used an external clock before...
[14:47:12] <RikusW> look in the datasheet
[14:47:20] <RikusW> 10 to 20pF for AVRs in general
[14:47:23] <kdehl> Hah. Good point.
[14:47:24] <RikusW> *18 to 20
[14:47:25] <kdehl> Oh. Okay.
[14:48:45] <RikusW> _afk -> alternate funny name
[14:49:14] <kdehl> Hm. Says 12-22. For all frequences listed. So I guess it doesn't really matter.
[14:49:45] <RikusW> there is an appnote on that too
[14:50:05] <beaky> theres an appnote for everything
[14:50:05] <RikusW> higher values got longer startup time but is more stable
[14:50:32] <kdehl> Aha.
[14:50:49] <RikusW> I used 18pF with 16MHz and it works fine
[14:50:58] <RikusW> I'd use 20pF with 8MHz
[14:51:14] <beaky> if only there were appnotes to help me be more succesufl with women. "Atmel A666 - Dating for users with a tinyAVR"
[14:51:30] <RikusW> heh
[14:53:56] <megal0maniac_afk> "With a tiny WHAT?"
[14:54:49] <megal0maniac_afk> Casper: Rule of thumb. If my nick says afk but my behaviour suggests otherwise, I'm procrastinating :)
[14:55:23] <megal0maniac_afk> And I generally use 22pF for crystals without thinking about it. And set my start-up time to 65ms
[14:58:17] <beaky> oh the wikipedia is backwrds
[14:58:20] <beaky> oops wrong channel
[15:38:55] <megal0maniac_afk> attiny programming arrangement: http://i.imgur.com/XADPM1X.jpg
[15:39:52] <megal0maniac_afk> (Maths in background)
[15:41:26] <antto> waat
[15:41:33] <antto> is that a chip in the middle?
[15:41:51] <megal0maniac_afk> Yip. Atmel's smallest uC if I'm not mistaken
[15:41:59] <megal0maniac_afk> SOT23-6 attiny10
[15:42:18] <w|zzy> pro
[15:42:36] <megal0maniac_afk> Until I find that breakout board :P
[15:42:38] <antto> x_x
[15:44:27] <antto> stupid question: if i have a 1ms interrupt, and lets assume the crystal and all happens to be quite accurate so that it really happens 1000 times per second.. if i put some long-ish code within the interrupt - will the interrupt be slowed down?
[15:45:17] <megal0maniac_afk> Only if the interrupt runs over 1mS or messes with the interrupt source
[15:46:21] <megal0maniac_afk> The timer will continue while the interrupt runs, but interupts will be disabled while it is running. So if it takes 1.1mS to run the code in the interrupt, then it will only trigger every 2mS
[15:46:44] <megal0maniac_afk> Otherwise you'd have nested interrupts and stack overflows and other nasty stuff
[15:48:00] <beaky> wow i thought attiny85 was smallest attiny
[15:48:10] <beaky> that is as tiny as that PIC
[15:48:29] <megal0maniac_afk> I actually got the SOIC85 as well and it's huge in comparison
[15:48:33] <beaky> how do you even program a thing like that
[15:49:16] <antto> beaky once you attach these, you shout "NOBODY MOVE!"
[15:50:01] <antto> hm, that reminds me of how i solder stuff together ;]
[15:50:24] <megal0maniac_afk> They're surprisingly stable. Can move the whole assembly by just picking up two probes
[15:50:46] <beaky> wow
[15:51:02] <beaky> how do you even solder those things
[15:51:19] <megal0maniac_afk> Like this :) http://i.imgur.com/T5qYIOh.jpg
[15:51:43] <beaky> I am guarantteed to bridge everything. also those things are so tiny i could just breath on it and it would get lost in my rug
[15:51:46] <megal0maniac_afk> The chip on the left is the same package as the attiny10
[15:51:58] <beaky> wow
[15:52:15] <RikusW> megal0maniac_afk: I used a 2x3 piece of protoboard with 2x3 headers soldered to it to mount my t10
[15:52:32] <RikusW> like in my tiny level converter
[15:52:39] <RikusW> same kind of board
[15:53:07] <megal0maniac_afk> RikusW: I've got 2 more of those breakouts, but my friend has them at the moment.
[15:53:26] <megal0maniac_afk> My veroboard has strips instead of sqares :/
[15:54:06] <megal0maniac_afk> *squares
[15:54:13] <RikusW> make it square ;)
[15:54:27] <beaky> my veroboard has circles
[15:54:31] <RikusW> iirc I soldered the center 2 pins directly
[15:54:54] <RikusW> and used tiny pieces of wire to solder the header pins to the other 4
[15:56:09] <beaky> what is the cheapest avr
[15:56:16] <beaky> is it the attiny4
[15:56:23] <megal0maniac_afk> beaky: You've asked that question like 7 times
[16:00:27] <megal0maniac_afk> Oh I lied
[16:00:40] <megal0maniac_afk> The one on the right is SOT23-6. Left is SC70
[16:02:21] <beaky> i love sot-23
[16:04:12] <megal0maniac_afk> >.<
[16:05:34] <beaky> if only they made pills as small as sot-23, then i could easily swalow
[16:06:45] <megal0maniac_afk> You should always take your pills
[16:16:35] <w|zzy> lots of flux
[17:11:26] <beaky> ok i declare my attiny-based smps a failure. i just cant figure out why its not working
[17:11:35] <beaky> what is an easier project for the attiny
[17:17:28] <beaky> hey i found someone else designed the exact same thing i was going for! http://www.youtube.com/watch?v=6LkGvBIWuog
[17:17:57] <beaky> I feel emboldened enough to keep trying
[17:21:20] <Casper> beaky: why was your smps a failure?
[17:21:36] <Casper> too little ADC differential gain?
[17:21:44] <beaky> no my pmos wont turn on
[17:22:00] <beaky> i have no idea why it wont turn on I connected it exactly like the dude did on his design
[17:22:28] <beaky> source to Vss, drain to GND, and gate to my attiny's oc1a noninverting
[17:23:01] <beaky> through a bjt
[17:23:20] <Casper> nchan?
[17:23:30] <Casper> boost?
[17:23:56] <beaky> buck
[17:24:34] <Casper> so pchan?
[17:25:00] <beaky> yes
[17:25:04] <Casper> but I'm sure you actually put the fet in reverse....
[17:25:15] <Casper> and pchan suck :(
[17:25:50] <beaky> yes i put the source to the power suply
[17:26:00] <beaky> or should that be drain... hmm
[17:26:11] <Casper> weirdly, buck isn't the easiest smps to do
[17:26:17] <Casper> due to the high side switch
[17:26:41] <beaky> i thought buck was easiest until i thoght "how do i implement that switch"
[17:26:52] <Casper> exactly
[17:27:00] <beaky> http://i.imgur.com/uWyT9oG.png this is my desing
[17:27:10] <Casper> then, you'll have fun when you'll go with high speed
[17:27:23] <Casper> and realise that you need to feed like 1A into your fet gate :D
[17:27:41] <Casper> and go rail to rail within 200ns :D
[17:28:15] <beaky> wow that sounds tough to do with attiny
[17:31:18] <Casper> which is why smps with tiny suck :D
[17:32:47] <beaky> lol
[17:32:56] <beaky> but i thought tiny was designed to do smps
[17:39:04] <Casper> some model yes, not all
[17:39:11] <Casper> those have a PLL too
[17:43:15] <beaky> whats a pll
[17:43:22] <beaky> i am using attiny85v
[17:43:36] <specing> get out
[22:16:53] <TechIsCool> hey everyone I am trying to get an xmega to output the clock on portc and I can't seem to get it working. Can I get a little help? http://pastebin.com/TVCj96B7
[22:22:52] <TechIsCool> nevermind found it