#avr | Logs for 2012-10-02

Back
[00:00:23] <Mr_Sheesh> it has a 3.3V LDO reg IIRC?
[00:00:39] <edboogie2011> I know I am thinking of using rasberry pi and maybe Nordic rF chips.. but there are a lot of options now.. it is hard to choose, generic rf 2.4ghz, blue tooth, and wifi..
[00:01:19] <edboogie2011> I would want whatever is lowest power/highest range/lowest cost, in that order of importance.
[00:06:19] <edboogie2011> its hard to justify using an ARM11 if you aren't making a multimedia app.. what other reason would you need all that horsepower.
[00:07:50] <Mr_Sheesh> For the heck of it?
[00:09:11] <edboogie2011> I like the power usage 3.5 watts is pretty low. but I am wondering how much my cortex m3 running at 100mhz uses?
[03:13:17] <megal0maniac_afk> RAGE!
[03:26:45] <Sefid_Par> What are the steps to use microcontroller as a hardware connecting to computer
[03:26:46] <Sefid_Par> ?
[03:30:20] <OSterver> Sefid_Par, USB or serial
[03:30:24] <megal0maniac> Sefid_Par: That's a horribly vague question.
[03:30:47] <CapnKernel> I remember Sefid_Par. Interesting character.
[03:30:48] <megal0maniac> What do you want to connect it to a computer for?
[03:30:49] <Sefid_Par> OSterver: USB
[03:30:56] <CapnKernel> Asks stupid questions.
[03:30:58] <Sefid_Par> CapnKernel: :D
[03:31:04] <megal0maniac> Lol
[03:31:10] <OSterver> home from school
[03:31:24] <Sefid_Par> I wannna make a scanner and controll it from computer
[03:31:24] <CapnKernel> Barely understands the question, so it's uncertain what he'd ever make of the answer.
[03:31:48] <CapnKernel> Sefid_Par: Have you made some simpler devices that WORK?
[03:31:59] <megal0maniac> OSterver: Finished my level translator. Used a craft knife with sticky stuff on the end :)
[03:32:01] <Sefid_Par> CapnKernel: Not at all
[03:32:38] <CapnKernel> Seems to me you're the kind of guy who wants to know how to build a word processor, but hasn't ever written "hello world".
[03:32:41] <megal0maniac> Sefid_Par: You need a chip which has USB (usually a U in the name) and then you need to write a USB stack. Or use LUFA as a starting point to get what you want
[03:32:46] <CapnKernel> Just based on last time, that's all.
[03:32:50] <Sefid_Par> But I thought microcontroller is not very hard to program and controll, my friends did many devices
[03:32:52] <CapnKernel> Can I suggest working on something simpler?
[03:33:08] <CapnKernel> Electronics is incremental, lots of small steps over a long time
[03:33:10] <OSterver> working with uc is not. interfacing bloody scanner is
[03:33:17] <OSterver> hard
[03:33:21] <CapnKernel> There's no magic spell that will change that
[03:33:33] <Sefid_Par> megal0maniac: Thank you very much
[03:33:39] <Sefid_Par> CapnKernel: Yes please
[03:34:46] <OSterver> blink a led first
[03:34:50] <OSterver> then two
[03:34:53] <Sefid_Par> OSterver: Why is it hard? I can make a scanner by avr and interface it to PC by another one i.e
[03:34:53] <OSterver> then 4096 leds
[03:35:09] <OSterver> yeah, in theory
[03:35:16] <Sefid_Par> OSterver: 4096 leds for what?
[03:35:16] <OSterver> do you have the scanner chip?
[03:35:18] <CapnKernel> Sefid_Par: I'm not trying to spoil your day. I just want to help you be realistic about what you can achieve
[03:35:38] <CapnKernel> Sefid_Par: Follow OSterver's advice: Blink a LED first
[03:35:49] <CapnKernel> May seem simple, but it's a hugely important first step
[03:36:11] <Sefid_Par> OSterver: No, I just thought about this project; I am searching about it. And the hardest part I think is interfacing and controlling from the computer
[03:36:25] <CapnKernel> OSterver: Hi!
[03:36:32] <OSterver> hihihi
[03:36:42] <OSterver> eating ice cream :D
[03:37:22] <Sefid_Par> Ok, I need to know the steps untill achive the controlable scanner
[03:37:31] <CapnKernel> Step 1: Blink an LED
[03:37:37] <CapnKernel> You've been told.
[03:37:41] <CapnKernel> When you can do that, come back for step 2.
[03:37:55] <Sefid_Par> I thought about mechanical system, and detection. but not the controlling and interfacing
[03:38:11] <megal0maniac> OSterver: http://i.imgur.com/p4jfK.png
[03:38:15] <megal0maniac> Looks like a thing :)
[03:38:39] <CapnKernel> megal0maniac: Nice... thing! :-)
[03:38:53] <megal0maniac> Signal is noisier than I expected, but it's good enough for digital I'd imagine
[03:39:23] <megal0maniac> http://i.imgur.com/4MTgA.jpg
[03:39:27] <OSterver> megal0maniac, what's that?
[03:39:36] <megal0maniac> Level translator
[03:39:47] <OSterver> oh
[03:39:47] <megal0maniac> First attempt at SMT stuff.
[03:39:49] <OSterver> nice
[03:40:04] <OSterver> what scope is that?
[03:40:18] <OSterver> considering the bandwidth I'd say your sound card
[03:40:36] <megal0maniac> http://www.pololu.com/catalog/product/1300
[03:41:00] <OSterver> ah
[03:41:13] <CapnKernel> Looks very digital! :-)
[03:41:13] <megal0maniac> First programmer I got. It's slow, but often useful
[03:41:14] <OSterver> no signs of xboard yet?
[03:41:26] <megal0maniac> Na. Will go to the post office today
[03:41:55] <megal0maniac> Will need this for PDI :)
[03:42:23] <megal0maniac> And any other logic, if I want 5V. I made it 4ch which should be fine for most things
[03:44:33] <megal0maniac> OSterver: Might make an isolated one though. If 3v3 disappears from the xboard but the 5v is still there, it pushes about 3.8V back
[03:44:51] <megal0maniac> Although 3.8 isn't too bad... Don't think it would be a problem
[03:45:52] <megal0maniac> Hey, could I make a level shifter (12V/5V RS232 to 5/3v3 TTL) using a level translator like this, and diodes?
[03:58:22] <megal0maniac> Ah, but it can't be bidirectional
[03:58:32] <megal0maniac> Because I can't get -12V from anywhere
[03:59:19] <OSterver> SMPS :)
[03:59:24] <OSterver> 3.8 is just on the edge
[03:59:28] <OSterver> the pins are vcc+0.6
[03:59:32] <OSterver> aka diode drop
[03:59:35] <OSterver> then it is clamped
[03:59:57] <OSterver> which is not something I should suggest allowing to be happening
[04:00:11] <megal0maniac> If the chip isn't powered, the rating should be higher, no?
[04:00:21] <OSterver> if the chip isn't powered it is exactly 0.6V :P
[04:00:26] <megal0maniac> Oh :)
[04:00:29] <OSterver> but it gets powered since it would clamp
[04:01:54] <megal0maniac> Considering making another one of these with 3v3 ldo vreg. Then you only apply 5V and if the one goes, they all go. Also means you can provide target power
[04:02:19] <megal0maniac> Also the switching is done by the transistors, so you don't have to worry about caps on the vreg etc
[04:03:14] <megal0maniac> OSterver: Can you power xboard through the PDI header?
[04:04:02] <Kevin`> is there a standard usb interface for security tokens?
[04:04:22] <megal0maniac> I'd guess generic HID
[04:05:04] <Kevin`> I mean something that will work with windows/linux out of the box, similar to ccid for readers
[04:06:18] <OSterver> megal0maniac, in theory, yes
[04:06:25] <OSterver> not sure what will do the LDO though
[04:07:39] <megal0maniac> The programmer is giving 5V on vtg pin
[04:10:17] <megal0maniac> OSterver: The U2S has a jumper to switch between VUSB and the 3V3 output from the 32u2. I know that I should use a level translator and power the target seperately, but I still don't get why I can't just switch the U2S to 3v3 and use it just like that. The logic level will be 3v3, and the target will still be self-powered
[04:24:54] <OSterver> 5V on Vtg pin?!
[04:25:09] <OSterver> programmer should never power the target :)
[04:26:04] <megal0maniac> But it does :)
[04:26:09] <OSterver> then it is a fail :P
[04:26:15] <megal0maniac> So that's what I'm working with
[04:27:40] <OSterver> the programmer should have sense pin to adjust the output transistors
[04:27:57] <OSterver> any way (transistors, powering buffer, ..)
[04:28:42] <megal0maniac> Hmmm...
[04:29:43] <megal0maniac> Was going to make a board which provided 3v3 through the LDO and level translated the two data lines of PDI
[04:29:54] <megal0maniac> With 6pin ISP connectors for either end
[04:31:21] <megal0maniac> Suppose i could, but then if I connected vtg the way it should be, then a programmer which provides power would send 5V down that line and kill the chip (maybe)
[04:31:30] <OSterver> it will
[04:31:45] <megal0maniac> Again, though. What's wrong with just operating the programmer at 3v3 if it's happy that way? Why level translation?
[04:31:58] <OSterver> because the target might be 2v7, 1v6
[04:32:00] <OSterver> anything
[04:32:05] <OSterver> the programmer doesn't know the target voltage levels
[04:32:14] <OSterver> the designer of the programmer*
[04:32:14] <megal0maniac> Ah. But if it IS 3v3?
[04:32:29] <OSterver> it might not be 3v3, but 3v25
[04:32:36] <OSterver> and there is already 50mV difference
[04:32:57] <megal0maniac> It's logic. Why would 50mV matter?
[04:33:05] <OSterver> logic? I thought you ment the power
[04:33:27] <megal0maniac> Well, assuming the target is self-powered
[04:33:33] <megal0maniac> (Because that's the right way :P)
[04:33:40] <OSterver> yes
[04:33:50] <OSterver> xmega takes logic high from 1v6 or so I think
[04:34:04] <OSterver> so anything that operates from that to vcc+0,6 is fine
[04:34:17] <megal0maniac> So then I shouldn't need level translation?
[04:34:31] <OSterver> if the programmer outputs 3v3 logic - no
[04:34:38] * megal0maniac facepalm
[04:34:51] <OSterver> also, what is wrong on using the burned bootloader? :P
[04:35:04] <OSterver> you can integrate some atmel tool that on clicking LAUNCH it will upload the app
[04:35:10] <OSterver> not self reset though
[04:35:13] <megal0maniac> I was up until 01:30 this morning making a level translator :)
[04:35:18] <megal0maniac> For PDI
[04:35:35] <OSterver> huh?
[04:35:39] <megal0maniac> I don't _need_ to use PDI, the bootloader will be fine. But I want to try it just because
[04:35:39] <OSterver> from to what?
[04:36:44] <megal0maniac> It's got pins, vcc and 4xdata on the high and low side
[04:36:48] <megal0maniac> So for anything
[04:37:05] <megal0maniac> But inteded for use between the U2S and the xboard
[04:40:31] <megal0maniac> OSterver: My masterpiece http://i.imgur.com/Z1DEV.jpg
[04:40:48] <OSterver> hehe
[04:41:18] <megal0maniac> Which has been rendered useless
[04:43:38] <OSterver> http://clip2net.com/s/2m6uf
[04:43:39] <OSterver> I love robot chicken
[05:07:57] <megal0maniac> The LVDS cable arrived from the US. But the local company (+-1200km away) sent the wrong bloody screen :(
[05:08:47] <megal0maniac> Backlight lights up when you'd expect it to (switching off and on again on display mode changes) but no picture. Thought GPU was bust but apparently the wrong display is a more likely reason
[05:40:52] <OSterver> mm if something won't work on xboards, I will say "you are holding it wrong"
[05:40:53] <OSterver> http://gizmodo.com/5947972/apple-acknowledges-iphone-5-camera-problem-says-youre-holding-it-wrong
[05:40:56] <OSterver> since apple can get away with it
[05:40:57] <OSterver> I CAN TOO!
[05:42:42] <megal0maniac_afk> AGAIN??
[05:42:50] <megal0maniac_afk> Dem apple.
[05:53:44] <Steffanx> Some people care way too much about Apple
[05:54:04] <Steffanx> Ignore them and move on
[05:54:30] <Horologium> I like apples...crunchy and good with cinnamon.
[05:55:21] <Steffanx> Like they sell them in Rollercoaster tycoon Horologium? :)
[05:56:00] <Horologium> dunno. Never played it.
[05:56:15] <Steffanx> Whoa, you really missed something
[05:56:23] <Horologium> one of them thar winders games.
[05:58:06] <Horologium> I played sim city when it was new, back in the win3.1 days as I recall.
[05:58:21] <Horologium> but never got into the later ones.
[05:58:31] <creep> h
[05:58:51] <Roklobsta> hmmm Avrstudio6 is pretty nice
[05:58:59] <creep> is it free?
[05:59:01] <Horologium> sim city kept my attention about an hour before I went back to blasting aliens and germans.
[05:59:12] <Horologium> creep, it is, and another of them thar winders programs.
[05:59:14] <Roklobsta> i am getting over my awkward feelings towards M$
[05:59:22] <OSterver> as6 is awesome
[05:59:31] <OSterver> it is visual studi o 2010 after all :)
[05:59:40] <Roklobsta> OSterver: That's what she said.
[05:59:41] <creep> but its probably not available for linux
[05:59:47] <OSterver> no
[05:59:50] <OSterver> it is not
[05:59:53] <Roklobsta> no which is ARSE
[05:59:53] <Horologium> Roklobsta, I tried. A whole month away from linux, on just windows, and the withdrawls were almost as horrid as the windows experience for me.
[06:00:08] <Roklobsta> i can flit between Win7 and Debian just fine and do
[06:00:28] <Roklobsta> Win7 is just fine most of the time.
[06:00:34] <creep> too much lame using win
[06:00:39] <OSterver> whenever i try using linux i want to murder somebody
[06:00:40] <Roklobsta> i think M$ got something right after 30 years
[06:01:06] <Roklobsta> Win7 does show up the arsedness of KDE and GNOME
[06:01:15] <creep> i like neither
[06:01:23] <creep> XFCE
[06:01:24] <Roklobsta> and FVWM
[06:01:32] <Horologium> Roklobsta, that's ok. It's not gonna last. Windows 8 has proven their colors once again.
[06:02:02] <Roklobsta> heh heh. SP1 will make Win8 more like Win7 once more
[06:02:13] <Roklobsta> always wait for SP1
[06:02:34] <creep> Horologium, Roklobsta you like to pay for something junk?
[06:02:36] <Roklobsta> i have to learn powershell tonight to get some interaction with AVR over serial port.
[06:02:52] <Horologium> creep, not me. I don't buy OSs.
[06:03:35] <Roklobsta> you got your Win7 from bittorrent
[06:03:45] <Roklobsta> I think Debian is the schnitz
[06:03:50] <Horologium> corporate license from work.
[06:03:56] <Kevin`> stealing windows is worse than buying it
[06:04:05] <Horologium> with permission.
[06:04:43] <Horologium> last windows I bought was xp on my netbook. I wiped it before I even booted it up the first time.
[06:04:49] <creep> i don't see anything good in it
[06:04:51] <Roklobsta> Finally with Debian testing/stable reo combo I will never have to 'upgrade' ever again. one smooth continuous ride with minor updates every other day
[06:05:09] <Roklobsta> KDE's netbook UI is nice on EEPC
[06:05:24] <OSterver> we have got Gentoo at school
[06:05:25] <OSterver> with KDE
[06:05:27] <OSterver> it is unusable
[06:05:29] <creep> when you get bored try out some gentoo, or lunar linux wih xfce
[06:05:48] <Roklobsta> i am over 6 mothn upgrade cycles. just went with debian
[06:06:01] <Roklobsta> i am not a ricer
[06:06:52] <Roklobsta> -O4 -funroll-loops-rollthemupagain-and-unrollwithasteamroller doesn't do it for me
[06:07:12] <OSterver> :P
[06:07:19] <OSterver> <Roklobsta> i am over 6 mothn upgrade cycles.
[06:07:25] <OSterver> every 6 months recompiling whole system on gentoo? :P
[06:07:47] <Roklobsta> i'd shoot myself . what is your electricity bill like with all that compiling?
[06:07:57] <OSterver> I don't use gentoo
[06:08:05] <OSterver> I AM WINDOWS USER
[06:09:03] <Kevin`> eww
[06:09:26] <OSterver> ..
[06:09:30] <Horologium> the first step is admitting you have a problem.
[06:09:33] <OSterver> I am happy with my AS6
[06:09:34] <OSterver> lol
[06:09:50] <Kevin`> that's what virtual machines are for
[06:10:04] <Kevin`> although on avr it's nto too much of an issue, I normally just use a text editor
[06:10:26] <OSterver> because pressing F5 for starting debug is too mainstream
[06:10:42] <Horologium> hey, if I can't run windows on an AVR I won't run it!
[06:10:50] <OSterver> lol
[06:11:16] <Kevin`> I CAN run as6, in my win7 vm, it's just not worth it for many projects
[06:11:34] <OSterver> I DO run AS6 in my native Win7 :P
[06:11:36] <Horologium> just because linux takes 4 hours to boot on an avr is no big deal. Gives me time to build another couple of computers.
[06:11:59] <Kevin`> avr emulating a dram controller and emulating a cpu with an mmu
[06:12:02] <Kevin`> should be great fun
[06:12:05] <OSterver> aye
[06:12:14] <Horologium> hmm. How about a cluster of them?
[06:12:17] <Kevin`> native windows is far too limiting
[06:12:33] <Roklobsta> that guy writing the AVR linux emulator has aspergers for sure
[06:12:33] <OSterver> I will be doing 80286 emu for xmega... but I am thinking about some 300MHz ARM stuff instead to get more perf
[06:12:39] <OSterver> assburgers?
[06:13:01] <Roklobsta> and no wife or children
[06:13:06] <Kevin`> you can already run linux on a 300mhz arm, the emulator has limited fun if you do that IMO :/
[06:13:07] <Horologium> Roklobsta, but it is some seriously interesting code.
[06:13:17] <OSterver> who said anything about linux
[06:13:20] <OSterver> I said 80286 emu
[06:13:22] <OSterver> which is not ARM.
[06:13:48] <Roklobsta> i can't imagine the time and dedication needed - which means ignoring everything but eat, sleep and maybe bathe. Forget other human interaction.
[06:14:05] <Horologium> Roklobsta, human,,,,,,interaction?
[06:14:12] <Horologium> people actually DO THAT?!
[06:14:15] <Roklobsta> yes
[06:14:19] <OSterver> what is a human interaction
[06:14:21] <OSterver> in real life
[06:14:22] <Horologium> eeww
[06:14:23] <OSterver> never heard of it
[06:14:30] <Roklobsta> we're not all computers vying for the turing test you know
[06:14:45] <OSterver> lol
[06:14:46] <Horologium> yes, some are failing at that miserably.
[06:14:55] <OSterver> I gave up on turing
[06:15:00] <OSterver> I am simple brainfuck interpreter
[06:15:08] <OSterver> (actually BF is more than turing)
[06:15:20] <creep> what AVR do you recommend for XFCE ?
[06:15:26] <creep> and LCD ?
[06:15:35] <OSterver> lol none
[06:15:37] <Horologium> creep, atmega1284p all the way
[06:15:46] <OSterver> no AVR can run linux natively
[06:15:51] <OSterver> atxmega
[06:15:51] <Kevin`> OSterver: avr32 can
[06:15:53] <OSterver> twice the speed
[06:15:55] <OSterver> avr32 yes
[06:16:10] <OSterver> but who actually uses avr32?
[06:16:23] <Horologium> I would if I could afford a dev board for it.
[06:17:28] <OSterver> xboard32 anyone? :P
[06:17:45] <Horologium> isn't that like 30 dollars or something?!
[06:17:57] <OSterver> there is no 32bit xboard
[06:22:58] <Horologium> http://www.atmel.com/tools/UC3-A3XPLAINED.aspx
[06:23:24] <Horologium> might have to buy one of those.
[06:24:20] <OSterver> do you know what would good guy specing say?
[06:24:23] <OSterver> OHH HE IS NOT HERE!
[06:24:26] <Kevin`> looks cheap enough IMO
[06:24:26] <OSterver> gooooood
[06:24:29] <OSterver> aye
[06:24:33] <OSterver> these boards are all $30
[06:24:35] <OSterver> or $29
[06:39:26] <Roklobsta> i sold my avr32 board when i got wind of CortexM[0-4]
[06:39:49] <Horologium> I want that high end avr32 with the built in java bytecode interpreter.
[06:39:57] <Steffanx> It's useless
[06:40:05] <Tom_itx> ja
[06:40:07] <Tom_itx> useless
[06:40:12] <Roklobsta> it's going to be a Cortex world
[06:40:14] <Horologium> I can still want!
[06:40:31] <Steffanx> Waste of money
[06:40:40] <Tom_itx> ja
[06:40:41] <Roklobsta> i don't think even ARM chips in Android phones use hardware java, they still use this Dalvik thing
[06:40:43] <Tom_itx> waste of money
[06:40:44] <Richard_Cavell> hi all
[06:40:49] <Roklobsta> wate of money?
[06:40:52] <Roklobsta> what is?
[06:41:02] <Tom_itx> that useless thing
[06:41:08] <Roklobsta> AVR32?
[06:41:12] <Tom_itx> yeah
[06:41:12] <Roklobsta> or Cortex?
[06:41:16] <Tom_itx> it has no home
[06:41:16] <Steffanx> "I want that high end avr32 with the built in java bytecode interpreter." <= that
[06:41:17] <Richard_Cavell> Hey I'm thinking about paying $800 for a 68000-based dev board. If it's wanted, it's needed
[06:41:20] <Tom_itx> it has no market
[06:41:33] <Roklobsta> just use a Coldfire if you want 68000
[06:41:45] <Tom_itx> well Richard_Cavell you're rich so go ahead
[06:41:56] <Tom_itx> i like 68000
[06:42:04] <Roklobsta> i think an old A500 would be a cheaper 68000 devkit
[06:42:07] <Horologium> me too.
[06:42:11] <Richard_Cavell> coldfire ain't 68000
[06:42:13] <Horologium> I have a pile of them here.
[06:42:24] <Horologium> 68000 dev boards that is.
[06:42:24] <Tom_itx> Richard_Cavell your stuff will ship this am
[06:42:41] <Richard_Cavell> Horologium: Serious? I'll buy some off you if you are serious.
[06:42:44] <Richard_Cavell> Tom_itx: good, thanks
[06:42:58] <Tom_itx> i got 3 68332 boards
[06:43:01] <Horologium> dunno if they are any good. got them from a sale at the local university.
[06:43:06] <Tom_itx> 512k sram
[06:43:11] <Tom_itx> maybe 1024
[06:43:13] <Tom_itx> i forget
[06:43:15] <Horologium> old dip package 68k processors.
[06:43:21] <Richard_Cavell> Tom_itx: Is that the CPU32?
[06:43:25] <Richard_Cavell> Horologium: sounds good
[06:43:40] <Horologium> will dig them out in the next day or three.
[06:44:08] <Horologium> might be worth 5 bucks each plus shipping.
[06:44:16] <Tom_itx> http://www.robominds.com/
[06:44:18] <Tom_itx> 2 of those
[06:45:26] <Horologium> when I got them I even found manual online for them.
[06:45:37] <Tom_itx> i got the books on them
[06:45:48] <Tom_itx> and the pink ones on the 68hc11
[06:45:58] <Richard_Cavell> Horologium: well I might be interested in them mate
[06:46:34] <Horologium> next time I get to the basement I'll find them.
[06:47:21] <Tom_itx> Steffanx you've been awfully quiet lately
[06:47:40] <Steffanx> I've been busy lately and AVR isn't my thing anymore :P
[06:47:45] <Tom_itx> you gonna turn into a lazy lurker?
[06:47:50] <Tom_itx> no?
[06:47:51] <Richard_Cavell> what is your thing Steffanx ?
[06:47:53] <Tom_itx> what is then?
[06:48:03] <Steffanx> My secret
[06:48:23] <Tom_itx> don't let some girl wreck your life :D
[06:48:28] <Steffanx> No that's not it :P
[06:48:44] <Horologium> heterosexual monogamy is a sick killer!
[06:48:46] <Steffanx> I haven't done much anyway lately, but if it's something uc related then it's ##stm32 :P
[06:49:17] <Tom_itx> what about atmel arm?
[06:49:59] <Steffanx> Compare then and see which one looks better :)
[06:50:11] <Steffanx> *them
[06:50:20] <Tom_itx> i just said that cause reprap are using em
[06:50:28] <Tom_itx> some anyway
[08:23:25] <edmont> hi
[08:25:08] <edmont> i'm using Contiki OS with an Atmel128RFA1
[08:25:40] <edmont> i'm having an issue with a delay function
[08:26:39] <edmont> void delay(int del) { int i = 0; for (i=0;i<del;i++) { printf("%d,", i); }}
[08:27:26] <edmont> for del>1500 the MCU restarts and keeps rebooting all the time
[08:27:53] <edmont> any idea of what could be causing this?
[08:27:58] <Amadiro> edmont, I have no clue how contiki os works or what your printf() function even does, but presumably that's because you have a WDT running
[08:29:39] <edmont> Amadiro: i understand that if the watchdog makes the mcu reset, it should reboot the same program, not reset continously
[08:30:13] <Amadiro> edmont, if your program does not reset the WDT as it first starts up, it might end up in an endless loop, not sure.
[08:31:36] <edmont> Amadiro: anyway, i tried WDTCSR = 0x00;
[08:31:36] <Steffanx> You should disable it or reset it all the time ( or just often enough so it doesn't reset your avr )
[08:31:38] <edmont> no success
[08:31:58] <Amadiro> edmont, your operating system presumably activates it
[08:33:04] <OSterver> <edmont> Amadiro: anyway, i tried WDTCSR = 0x00;
[08:33:05] <OSterver> not enough
[08:33:06] <OSterver> :)
[08:33:12] <OSterver> read datasheet how to disable WD
[08:33:22] <edmont> Amadiro: contiki$ grep WDTCSR * -R
[08:33:25] <edmont> no results
[08:34:19] <Amadiro> edmont, then why would it be running in the first place? Perhaps you are not getting reset by the WDT after all.
[08:35:49] <edmont> Amadiro: maybe, but i don't know what other cause could be
[08:36:16] <edmont> OSterver: i found, page 185. let's see if i understand it :)
[08:36:41] <Amadiro> edmont, if a reset was triggered, perhaps there is a way to read out afterwards what triggered it. Maybe you're getting shut down due to BOT
[08:37:17] <OSterver> MCUCR or some similar register contains reset reason
[08:37:24] <edmont> Amadiro: dont think so, it only happens when i change the delay value
[08:38:10] <Amadiro> edmont, I don't know what your setup looks like, but perhaps the longer delay prevents the chip from doing something else in your circuit that prevents the BOT from happening
[08:38:12] <edmont> OSterver: the problem is i dont get a normal reboot, it's not even possible to program the mcu unless i remove the power first
[08:38:55] <edmont> Amadiro: BOT means brown-out?
[08:39:00] <edmont> or smth else?
[08:39:29] <Amadiro> brown-out detection yeh
[08:39:34] <Amadiro> BOD it should be
[08:39:39] <Amadiro> I didn't have my coffee yet
[08:39:52] <edmont> :)
[08:40:27] <edmont> no, power is constant
[08:43:27] <Amadiro> edmont, second thing I'd look into is whether the OS mazbe registers some funky interrupts/timers that emulate some sort of WDT or so, or in general make something crash
[08:43:36] <Amadiro> edmont, perhaps there is a timer going off during your delay
[08:44:13] <edmont> Amadiro: and how could that reset the mcu?
[08:45:05] <Amadiro> edmont, I don't know your particular MCU, but perhaps it can be reset from software (AFAIR at least the xmegas can by executing f.ex. the watchdog-reset-instruction)
[08:46:50] <edmont> OSterver: "To disable an enabled watchdog timer, the following procedure must be followed: 1. In the same operation, write a logical one to WDTOE and WDE. "
[08:47:05] <edmont> there is no other reference to WDTOE in the whole datasheet
[08:47:24] <edmont> how am i supposed to write a 1 to it? :)
[08:48:05] <OSterver> WDTCR = (1 << WDTOE) | (1 << WDE)
[08:49:13] <Amadiro> OSterver, don't you mean &?
[08:49:14] <edmont> OSterver: thanks, but that doesn't work for my compiler
[08:49:26] <OSterver> Amadiro, no
[08:49:36] <OSterver> edmont, your compiler?
[08:49:57] <edmont> error: ā€˜WDTOEā€™ undeclared (first use in this function)
[08:50:23] <Amadiro> OSterver, oops, brainfart. Yeah, coffee.
[08:50:42] <OSterver> check the datasheet for the bit then
[08:50:45] <OSterver> might be a typo
[08:53:24] <Amadiro> Alternatively you can also include avr/wdth.h and call wdt_disable()
[08:54:31] <Amadiro> *wdt.h
[08:57:47] <edmont> thanks Amadiro!
[08:57:54] <edmont> it seems that it works now
[08:58:52] <edmont> btw OSterver, i had an out of date datasheet, there is a new one that explains the WD disabling in a better way
[08:59:04] <edmont> anyway i prefer the wdt_disable() :)
[09:23:34] <Richard_Cavell> 'evening all
[12:04:17] <jdiez> hello, has someone managed to make i2c work using an attiny84?
[12:04:29] <jdiez> i've seen lots of tutorials for the 85, but no love for the 84
[12:04:42] <jdiez> I would really appreciate a t84 i2c example
[12:04:50] <megal0maniac> I've done it with tiny85. It shouldn't be any different. Just pin assignments
[12:05:15] <megal0maniac> Look in the datasheet for the t84 at where the USI pins are. Those are what you use for I2C
[12:05:35] <jdiez> yep, I have got the pins
[12:05:46] <jdiez> can you point me to a t85 example?
[12:07:17] <megal0maniac> I thought you had many?
[12:07:22] <jdiez> for arduino
[12:07:29] <jdiez> and it's kind of a pain to edit TinyWireM
[12:08:06] <Richard_Cavell> megal0maniac: how's it going?
[12:08:07] <jdiez> oh nevermind, I found some definitions that may help me
[12:08:08] <megal0maniac> SDA is on PA6 and SCL is on PA4. I'm afraid I don't know of any examples
[12:08:22] <Richard_Cavell> I went to the local hackerspace today and showed them my AVR breadboard with the flashing LEDs. They liked it.
[12:08:57] <megal0maniac> jdiez: t85 has SDA on PB0 and SCK on PB2
[12:09:08] <megal0maniac> That's should be the only difference
[12:09:11] <megal0maniac> Richard_Cavell: That's good
[12:09:26] <megal0maniac> I heard you bought Tom's programmer?
[12:09:34] <jdiez> yeah, I think I may have found the solution
[12:09:34] <Richard_Cavell> yep
[12:09:39] <Richard_Cavell> and I wanted his cable too
[12:09:51] <megal0maniac> Richard_Cavell: And his plastic box
[12:10:04] <Richard_Cavell> his programmer sometimes comes in a plastic box but he's out of them
[12:10:17] <Richard_Cavell> My STK600 isn't very portable
[12:10:20] <megal0maniac> I know. megal0maniac_afk was logging :)
[12:10:48] <megal0maniac> Richard_Cavell: Tom's programmer is plug and play. No driver issues, no set-up, it just works
[12:10:54] <Richard_Cavell> good
[12:11:08] <Richard_Cavell> does it work in OS X as well as Windows 7?
[12:11:08] <megal0maniac> I only know because I put the same firmware onto RikusW's board
[12:11:16] <megal0maniac> It should
[12:11:30] <Richard_Cavell> he told me to program as though it were an avrrisp
[12:11:33] <Richard_Cavell> avrisp I mean
[12:11:35] <megal0maniac> Haven't tested myself. My OSX hard drive is dying so I'm reluctant to boot it
[12:11:49] <megal0maniac> Yeah, it's a AVRISP MKII clone
[12:13:12] <megal0maniac> Just a heads-up, you know how you were having issues with -P usb?
[12:13:51] <megal0maniac> I just read a suggestion that says use "serial" instead of "usb" for the AVRISP MKII
[12:14:01] <megal0maniac> Richard_Cavell: Might work for the STK600 as well
[12:15:06] <Richard_Cavell> ok
[12:15:11] <Richard_Cavell> actually I figured out what it was
[12:15:30] <Richard_Cavell> On Windows 7, you have to use something called libusb to give avrdude access to your STK600 (or whatever programmer you're using over usb)
[12:15:41] <Richard_Cavell> but then if you install libusb, it prevents Atmel Studio from accessing it
[12:15:48] <Richard_Cavell> So you have to commit to avrdude or else never use it
[12:16:41] <megal0maniac> I wonder if the same is true for AVRISP MKII?
[12:16:50] <megal0maniac> Tom_itx: You there?
[12:22:23] <Richard_Cavell> megal0maniac: read this http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=125452
[12:22:35] <Richard_Cavell> looks like I'm wrong about having to choose one or the other, but you do need to install libusb
[12:24:14] <megal0maniac> So just install the filter driver
[12:24:21] <megal0maniac> Boom. Problem solved
[12:24:41] <Richard_Cavell> Yes I thinks o
[12:24:59] <megal0maniac> clawson knows his stuff :)
[12:26:54] <Richard_Cavell> yes
[12:27:59] <Richard_Cavell> well as I said I just want to have different methods of programming
[12:28:07] <Richard_Cavell> you learn by fixing mistakes
[12:28:19] <Richard_Cavell> not by finding a way that works and just accepting it
[12:35:18] <megal0maniac> Richard_Cavell: http://i.imgur.com/Z1DEV.jpg
[12:37:02] <Richard_Cavell> what the hell is that?
[12:37:45] <megal0maniac> Level translator. First attempt at surface mount soldering
[12:38:03] <megal0maniac> It's veroboard, so the tracks are 2.54mm apart
[12:38:13] <megal0maniac> Which gives you an idea of the scale
[12:38:16] <Amadiro> megal0maniac, wow, you suck :P
[12:38:25] <megal0maniac> Amadiro: Why thank you :)
[12:38:52] <Amadiro> megal0maniac, more seriously: Use some (preferrably metal) device to clamp the components down, it will both fix it while you solder (no components standing up) and help conduct heat away
[12:39:06] <Amadiro> megal0maniac, secondly, use a lot of flux and very very thin tin wire
[12:39:06] <megal0maniac> Amadiro: This doesn't suck, so it's okay: http://i.imgur.com/p4jfK.png
[12:39:34] <megal0maniac> I don't have thin wire or flux or anything to clamp with :(
[12:39:41] <Richard_Cavell> why does it look like it's covered in icing sugar?
[12:40:02] <Amadiro> megal0maniac, well, you can't solder properly without flux
[12:40:47] <megal0maniac> Amadiro: So considering I used a craft knife with sticky putty to hold the components down and no flux and thick solder, does it still suck? :P
[12:40:54] <megal0maniac> I've ordered a flux pen though
[12:40:55] <GuShH> no-clean flux leaves such residues
[12:41:17] <megal0maniac> Richard_Cavell: Probably filings from the breadboard when I filed the edges down
[12:41:23] <Amadiro> megal0maniac, well, your components are still pretty mis-aligned...
[12:41:30] <GuShH> it's actually deposited from the smoke
[12:41:41] <GuShH> make your own flux, store-bought stuff is a ripoff unless it's proper no-clean rohs shit
[12:41:54] <Amadiro> and you seriously used too much tin :P
[12:42:15] <megal0maniac> Amadiro: I used my very own "flood and bury" technique :P
[12:44:18] <megal0maniac> I've ordered the flux pen, solder wick and tweezers. I need to buy thinner solder now, think that's it...
[12:45:03] <Blecha> I got regular flux paste and some thin solder the other day
[12:45:21] <Amadiro> megal0maniac, solderwick is indeed very handy to have. For the really small components, it can also sometimes be easier to use solder paste & a hot air gun
[12:45:22] <Blecha> to go wtih my new Weller station and magnified headset thing
[12:46:02] <megal0maniac> I've never actually worked with SMT anything before, so I'm buying things that seem to make sense. Ordered 1.5mm and 2.5mm wick
[12:46:13] <megal0maniac> But I don't really know what I'm doing
[12:46:38] <Amadiro> megal0maniac, just get the smallest you can get, really, I don't think there is such a thing as having it too small -- you'll only end up using a little more
[12:46:48] <Amadiro> (And I don't think you can get it that small anyway)
[12:47:11] <Blecha> make sure your tip is proper too, the standard tip on my new iron is pretty beefy for the smt stuff I dorked around on
[12:47:22] <Amadiro> I don't know what the smallest type is I have at our lab, but 1.5mm sounds really thick
[12:47:28] <Blecha> I have 2 spools of surface mount leds, that are now tested working :D
[12:47:48] <Amadiro> in fact, 1.5mm seems like one of the thicker types
[12:47:52] <megal0maniac> Amadiro: 1.5mm was the smallest I saw. How should I have done the jumpers? it took longer than anything else
[12:48:30] <megal0maniac> Blecha: Yeah, the tip is quite fine. RikusW uses the edge of a chisel tip for his smt stuff
[12:48:51] <Amadiro> megal0maniac, I think I have some pics of where I did some jumpers, one sec...
[12:49:44] <Blecha> I need to get that and some tweezers to get this ball really going
[12:50:17] <Blecha> surface mount resitors and a propter surface mount atmega, then I can make a tiny led matrix business card!
[12:50:41] <Blecha> that I will never give to anyone lol
[12:54:37] <megal0maniac> GuShH: How do you make flux? There seem to be a few ways to go about it
[12:55:17] <RikusW> disolve rosin in propanol
[12:55:33] <RikusW> but I don't know where to get rosin...
[12:55:36] <megal0maniac> Ah, but the rosin :)
[12:55:39] <megal0maniac> Exactly
[12:55:45] <megal0maniac> Pinecones, apparently
[12:55:59] <megal0maniac> It's also used for violins...
[12:57:45] <RikusW> so I see you completed the translator :)
[12:58:10] <GuShH> RikusW: megal0maniac: google my name + flux and you'll find the info you need, including where to get it
[12:58:31] <Amadiro> megal0maniac, http://dl.dropbox.com/u/21559589/veroshield.jpg here's some pin headers on a veroboard-shield for an arduino project I made a while ago. When I need them to connect individually, I usually just use a very-thin solid-core copper wire that I wind around the pinheaders pins first, so that it will end up in the solder blob as well, being tightly fixed
[12:58:42] <GuShH> I can't browse, I'm on a GPRS connection at the moment...
[12:59:14] <RikusW> GuShH: GPRS can be used to browse :-P
[12:59:20] <RikusW> slowly....
[12:59:21] <Steffanx> RikusW knows it
[12:59:38] <megal0maniac> Amadiro: That's extremely neat :P
[12:59:59] <Amadiro> megal0maniac, nah, those are made with a shitty 10$-soldering iron I have at home
[13:00:12] <Amadiro> but it works okay, I guess
[13:00:16] <megal0maniac> I think I need a shitty $10 soldering iron :)
[13:00:35] <megal0maniac> Found a chinese one for the equivalent of $2, and it had a wooden handle
[13:00:41] <Amadiro> megal0maniac, I think I have some boards where I did SMT as well, lemme check
[13:00:51] <megal0maniac> Was tempted to get it
[13:01:20] <megal0maniac> I think I need to start writing stuff down that I hear in #avr
[13:02:26] <megal0maniac> GuShH: No luck
[13:02:26] <GuShH> RikusW: not when you are downloading a weeks worth of emails and sending a weeks worth of answers :p
[13:02:42] <GuShH> megal0maniac: you suck
[13:02:46] <GuShH> http://gushh.net/ << search for flux
[13:03:12] * GuShH is allowed to be mean in situations where he doesn't have internet
[13:03:45] <RikusW> http://gushh.net/blog/diy-flux/
[13:04:33] <RikusW> the flux I have is 2%
[13:05:01] <Amadiro> megal0maniac, http://dl.dropbox.com/u/21559589/smt.jpg most of these are pretty shit too, but I think that one resistor to the left is decent... don't attempt to solder a resistor over the gap between two holes like I did in the middle, either route it between two traces, or (if its big enough) over a hole
[13:05:31] <Amadiro> It's been a while since I made these, so I don't really remember what they were for though
[13:05:56] <megal0maniac> GuShH: Nice. It's on hackaday too
[13:06:17] <RikusW> GuShH: I use a syringe + needle to apply the flux
[13:07:28] <megal0maniac> Amadiro: I learnt that too http://i.imgur.com/4MTgA.jpg
[13:08:24] <megal0maniac> RikusW: It works quite nicely http://i.imgur.com/p4jfK.png
[13:09:01] <megal0maniac> Still don't see the point if I'm giving the target its own power and running the U2S at 3v3. The logic level is the same then...
[13:11:00] <RikusW> run U2S at 5V since the LUFA AVRISP needs that....
[13:11:15] <RikusW> my dW disabling needs 16MHz too, so 5V
[13:11:20] <megal0maniac> Ah, I see.
[13:11:27] <megal0maniac> Okay. Now it makes sense :P
[13:11:58] <megal0maniac> But if I was running at 3v3, then I wouldn't need level translation, right?
[13:12:02] <RikusW> and using that you should be able to go down to 1v8
[13:12:07] <megal0maniac> The level would be the same...
[13:12:30] <RikusW> it you power the target seperately always use level translation....
[13:12:40] <RikusW> its just the better/safer thing to do
[13:13:10] <RikusW> and remember the Source is on the LV side...
[13:13:23] <RikusW> as is the Gate
[13:13:38] <megal0maniac> Hmmm...
[13:13:45] <megal0maniac> Okay
[13:14:08] <RikusW> seems Pine gum will work for making flux too :)
[13:14:14] * RikusW is going to try that
[13:14:26] <megal0maniac> Do you have pine trees nearby?
[13:15:11] <Tom_itx> that's basically what rosin is anyway
[13:17:09] <RikusW> megal0maniac: I have one pine tree close by
[13:17:24] <megal0maniac> Tom_itx: Does the LUFA firmware require installation of libusb?
[13:17:34] <megal0maniac> (avrispmkii)
[13:17:51] <Tom_itx> not that i'm aware of
[13:17:58] <Tom_itx> if you use avrdude it might
[13:18:01] <megal0maniac> Good enough for me
[13:18:11] <megal0maniac> The stk600 does, apparently
[13:18:34] <megal0maniac> But there's a filter driver which looks quite nice. Basically redirects libusb calls to Jungo
[13:18:36] <Tom_itx> i never did when i compiled the programmer program
[13:18:48] <Tom_itx> the filter sucks
[13:18:56] <megal0maniac> Oh yeah?
[13:19:15] <Tom_itx> i had one helluva time uninstalling it when i wanted to go back to jungo
[13:19:31] <Tom_itx> the older one worked ok
[13:19:38] <Tom_itx> with the separate filter thing
[13:19:48] <Tom_itx> once they combined it i had trouble
[13:19:51] <Tom_itx> gotta run...
[13:20:04] <Tom_itx> maybe they've fixed it since
[13:20:19] <megal0maniac> I'll check it out with LUFA. Cheers
[14:38:20] <megal0maniac> Cheers all
[14:39:26] <OSterver> cheers
[14:40:04] * megal0maniac goes walking outside, in the streets, calling for xboard to come home...
[14:48:32] <JyZyXEL> http://pastebin.com/X8yXTirK
[14:48:36] <JyZyXEL> what the heck am i doing wrong?
[14:49:20] <Amadiro> It might help if you told us what is *going* wrong
[14:49:25] <JyZyXEL> if (adc_result < 781) FET_PORT = 255; that is triggering even when im feeding over 1V to the ADC
[14:50:07] <Amadiro> JyZyXEL, is your analog reference set up correctly
[14:50:48] <JyZyXEL> its internal
[14:51:09] <JyZyXEL> shouldn't it always be set up correctly?
[14:51:53] <Amadiro> JyZyXEL, unsure, check the datasheet. Perhaps you need to tie it to Vcc or so.
[14:51:59] <Amadiro> also, which chip are you using
[14:53:28] <Blecha> I assume you are clearing out adc_result?
[14:53:40] <JyZyXEL> at the top
[14:53:43] <JyZyXEL> attiny85
[14:58:07] <JyZyXEL> and then theres the whoe blinking stuff
[14:58:14] <JyZyXEL> at certain voltages the led starts to blink
[14:59:40] <JyZyXEL> at 10.1V led starts to blink
[15:00:06] <JyZyXEL> at around 8V it stops
[15:00:17] <JyZyXEL> thats 2 volts
[15:00:27] <JyZyXEL> there is no way there can be 2 volts of noise?
[15:01:28] <JyZyXEL> i can measure voltage more accurate with my tongue than this thing
[15:07:40] <JyZyXEL> maybe its a defective chip?
[15:09:15] <JyZyXEL> im gonna try with another chio
[15:12:59] <JyZyXEL> nope that didn't help either
[15:15:17] <JyZyXEL> this is like the hello world of ADC's how the hell can it fail this spectacularly?
[15:18:10] <JyZyXEL> iƤve looked at 5 different tutorials for ADCs and looked at the datasheet and it all looks correct
[15:18:20] <JyZyXEL> can it be that i have a batch that has multiple failed chips?
[15:20:34] <Amadiro> JyZyXEL, seems unlikely, seems more likely that your circuit is set up wrong
[15:20:54] <JyZyXEL> it can't be wrong its so simple
[15:24:40] <megal0maniac> OSterver!
[15:24:45] <megal0maniac> It is here :D
[15:26:01] <megal0maniac> And it is blinking
[15:26:15] <JyZyXEL> sadly it is
[15:26:25] <JyZyXEL> and im starting to get so pissed of im gonna soon smash it to pieces
[15:26:37] * megal0maniac reviews log
[15:28:01] <megal0maniac> JyZyXEL: Try Arduino, maybe?
[15:28:29] <JyZyXEL> i don't have one small enough
[15:28:51] <JyZyXEL> and it is absolutely bloated for this
[15:29:11] <megal0maniac> I've used Arduino with a t85, worked well enough
[15:29:24] <megal0maniac> Then at least you can check that everything works as it should
[15:29:31] <JyZyXEL> you can burn arduino on a t85?
[15:29:37] * megal0maniac knods
[15:30:05] <megal0maniac> http://hlt.media.mit.edu/?p=1695
[15:30:11] <megal0maniac> Tiny patch and you're good
[15:30:43] <JyZyXEL> oh well thats something worth a try
[15:33:15] <JyZyXEL> im guessing i need to get the avr dragon with debugwire capability
[15:33:34] <JyZyXEL> losing my sanity without having a serial connection for debug output
[15:33:38] <megal0maniac> Heh :)
[15:36:18] <megal0maniac> JyZyXEL: Well, software serial works on the tiny, and it's as easy as setting up hardware serial in Arduino
[15:52:25] <OSterver> megal0maniac, nice :)
[15:52:34] <megal0maniac> Eh... What do I short out for DFU? :P
[15:52:40] <megal0maniac> Think it's pins 5 and 6
[15:52:41] <OSterver> PF5 or PE5...
[15:52:44] <OSterver> not sure atm
[15:52:46] <megal0maniac> But I'd rather not try
[15:52:57] <Amadiro> megal0maniac, depends on which revision of the uno you have, I believe
[15:53:03] <Amadiro> i.e. the DIP or SMT version etc
[15:53:11] <megal0maniac> Amadiro: And xboard? :P
[15:53:23] <megal0maniac> I think I'm one of two people in the universe who own one
[15:53:28] <OSterver> yep :D
[15:53:30] <Amadiro> megal0maniac, just connect Vcc to GND and you're all set
[15:53:36] <OSterver> haha
[15:53:36] <megal0maniac> ...
[15:53:41] <OSterver> the LDO is current protected
[15:53:43] <OSterver> just as the USB is
[15:53:50] <OSterver> so the USB will shut it down :P
[15:53:51] <Amadiro> oh, yeah, you need to solder out the LDO first
[15:53:55] <Amadiro> and replace it with a copper wire
[15:53:59] <OSterver> thick one!
[15:54:04] <OSterver> still, USB will cut it
[15:54:10] <OSterver> hardware feature
[15:54:11] <OSterver> believe me :D
[15:54:14] <OSterver> at least my motherboard did
[15:54:16] <Amadiro> oh, yeah, and you will need to mod the USB plug to fit into your mains socket
[15:54:34] <OSterver> megal0maniac, http://myxboard.net/beginning.html#flash
[15:54:43] <OSterver> :P
[15:55:00] <megal0maniac> GOt it
[15:55:34] <OSterver> future bootloaders will have virtual serial port which will have autoreset feature of course
[15:56:48] <JyZyXEL> megal0maniac: it doesn't support analogReference(INTERNAL1V1);
[15:56:53] <megal0maniac> And for that I'll need PDI
[15:57:00] <megal0maniac> JyZyXEL: RAGE!
[15:58:02] <JyZyXEL> why would the claim support for analogRead() if there was no way to set the reference
[15:58:11] <Amadiro> OSterver, can you use dfu-programmer instead of flip? I'd assume they are compatible or something...
[15:58:20] <OSterver> FLIP is the application
[15:58:27] <OSterver> it should be compatible with regular DFU
[15:58:57] <megal0maniac> Apparently all USB AVRs come pre-loaded with DFU
[15:59:05] <OSterver> xmegas don't
[15:59:07] <OSterver> :P
[15:59:08] <Amadiro> OSterver, right
[16:00:08] <megal0maniac> Lol
[16:00:28] <megal0maniac> This xboard only goes into breadboards. Doesn't come out :)
[16:01:17] <OSterver> haha
[16:01:35] <JyZyXEL> maybe i can define INTERNAL1V1 myself?
[16:02:01] <OSterver> megal0maniac, I have got two breadboards - into one it goes easily, into the other one I have to use The Force (tm) (c)
[16:02:13] <JyZyXEL> oh wait, its just INTERNAL
[16:04:26] <megal0maniac> OSterver: On my one, it's difficult to "extract". The other one I have, I'm not even going to attempt :P
[16:04:38] <OSterver> heh
[16:06:44] <megal0maniac> It can float :)
[16:07:04] <OSterver> it can double!
[16:07:07] <OSterver> let alone long!
[16:07:10] <OSterver> unsigned long!!!!!
[16:13:20] <JyZyXEL> even with arduino firmware the comparison is off by 1 volt
[16:13:25] <JyZyXEL> is that normal?
[16:18:59] <megal0maniac> OSterver: Going to somehow have to spoof vtg in the lufa firmware
[16:19:05] <OSterver> spoof?
[16:19:09] <megal0maniac> It isn't implemented on U2S
[16:19:19] <OSterver> what does u2s do with vtg?
[16:19:25] <megal0maniac> Which is why is _supplies_ instead of reads :)
[16:19:39] <OSterver> just cut it :)
[16:19:59] <OSterver> or do it as me - I am using 4 female wires that I got with some serial adaptor
[16:20:07] <OSterver> in your case just 3
[16:20:13] <OSterver> pdi/reset/gnd
[16:20:29] <megal0maniac> Well I'm not using it, and I'm level translating DATA and CLK (on a breadboard)
[16:20:38] <OSterver> U2S does not like 3v3?
[16:20:42] <megal0maniac> And AS is "waiting for an operation to complete"
[16:21:06] <megal0maniac> The LUFA firmware is set up to run at 16mhz, and that isn't stable at 3v3
[16:21:07] <OSterver> you might need to add 20 - 25pF capacitor between reset and ground
[16:21:29] <OSterver> it might have the same issue as Dragons do
[16:21:53] <megal0maniac> PDI has no reset
[16:21:57] <OSterver> it has
[16:21:59] <OSterver> RESET line = clock
[16:22:02] <OSterver> :P
[16:22:09] <OSterver> and PDI = actual data
[16:22:20] <OSterver> PDI_CLK = RESET, PDI_DATA = PDI
[16:23:25] <megal0maniac> 22pf in
[16:23:57] <megal0maniac> NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
[16:24:09] <OSterver> what did you burn
[16:24:11] <megal0maniac> "New firmware is available. You must upgrade it to continue"
[16:24:16] <OSterver> haha
[16:24:41] <megal0maniac> Can I just say go?
[16:24:45] <megal0maniac> No screw it
[16:24:47] <OSterver> doubt it
[16:24:50] <megal0maniac> I'm removing internet
[16:24:54] <OSterver> it won't help
[16:24:59] <OSterver> it is installed with AS :P
[16:25:25] <megal0maniac> :(
[16:25:33] <megal0maniac> Tom_itx: You hear that?
[16:26:23] <megal0maniac> Oh
[16:26:48] <megal0maniac> I had to force quit AS. Think it left avrisp in a state it wasn't happy with
[16:26:54] <megal0maniac> Reconnected and it's fine
[16:27:03] <OSterver> eh
[16:27:18] <megal0maniac> But still can't enter programming mode
[16:27:36] <megal0maniac> It's spoofing the vtg though
[16:27:42] <megal0maniac> Which is good
[16:27:44] <OSterver> hmm
[16:27:51] <OSterver> try device programming in the tools
[16:28:04] <megal0maniac> That's where I'm at
[16:28:14] <OSterver> what does it fail with?
[16:28:36] <JyZyXEL> is the 1V1 reference on t85 really supposed to be so shitty?
[16:28:47] <OSterver> JyZyXEL, datasheet, eletrical specs :)
[16:28:49] <megal0maniac> DOH
[16:29:11] <JyZyXEL> the calculated value for 11V was 781 but i tested and its more like 860
[16:29:24] <OSterver> how are you getting the 11V?
[16:29:30] <JyZyXEL> 1:12 divider
[16:29:38] <OSterver> how good resistors?
[16:30:16] <JyZyXEL> the metal kind
[16:30:23] <OSterver> precision
[16:30:28] <JyZyXEL> yeah
[16:30:35] <JyZyXEL> 4 band?
[16:30:48] <JyZyXEL> you know the blue colored ones you get these days
[16:30:55] <OSterver> what precision are they!
[16:30:59] <JyZyXEL> theres one extra band compared to the old school color codes
[16:31:16] <megal0maniac> Metal film resistors
[16:31:19] <JyZyXEL> yeah those
[16:31:25] <OSterver> <megal0maniac> DOH
[16:31:26] <JyZyXEL> 5%?
[16:31:28] <OSterver> what did that mean?
[16:31:29] <OSterver> 5%
[16:31:33] <OSterver> and another one another 5%
[16:31:44] <OSterver> I think that 10% from 780 is 78
[16:31:46] <OSterver> and you are on the 860
[16:32:20] <megal0maniac> I hadn't connected xboard's vcc to the level translator. So the transistors weren't switching anything. But I fixed that and it still doesn't work
[16:32:22] <JyZyXEL> hmm
[16:32:40] <JyZyXEL> so i gotta up the voltage!
[16:33:34] <JyZyXEL> guess ill go with the 5V reference then
[16:34:08] <OSterver> megal0maniac, scope it?
[16:34:26] <OSterver> JyZyXEL, better resistors maybe?
[16:34:32] <OSterver> 1% or 0.1% are no problem nowadays
[16:34:42] <OSterver> last time I had issues with programmer I solved it by getting a Dragon, megal0maniac :P
[16:34:42] <megal0maniac> 1% SMD :)
[16:34:51] <OSterver> 0.5% SMD are often cheaper than 1% even
[16:34:58] <RikusW> megal0maniac: Are you sure you connected the Gate to the Source LV side ?
[16:34:58] <JyZyXEL> what about using a trimmer and just calibrating the whole thing manually? :p
[16:35:04] <megal0maniac> Meh. Iffy.
[16:35:16] <megal0maniac> Gate is on U2S side
[16:35:24] <OSterver> :D
[16:35:31] <RikusW> megal0maniac: the gate and source is on the same side of the 2n7002....
[16:35:34] <JyZyXEL> temperature and resistor value drift are gonna totally goof this thing up anyways
[16:35:58] <megal0maniac> But it's bidirectional. It should work as long as there's vcc from both sides
[16:35:58] <RikusW> megal0maniac: seems like you'll be cutting some more tracks ?
[16:36:03] <RikusW> and patching others...
[16:36:13] <RikusW> no the gate needs to be on the LV side
[16:36:21] <JyZyXEL> here i was thinking battery voltage monitoring was gonna be a piece of cake u_u
[16:36:33] <megal0maniac> Oh. Then I'll just reverse this :)
[16:36:58] <RikusW> else the LV side won't be able to send a high through....
[16:37:16] <RikusW> fortunate for you its simply patching some tracks....
[16:37:19] <megal0maniac> It's pulled up, though
[16:38:06] <RikusW> S and D needs to be pulled up
[16:38:11] <RikusW> and G directly to LV
[16:39:01] <megal0maniac> That's what I did
[16:39:09] <RikusW> anotherthing just double check the resistor in the lower left, make sure there is no shorts there
[16:39:23] <megal0maniac> I've tested everything, all 100%
[16:39:26] <RikusW> S to LV pullup and D to HV pullup
[16:40:56] <RikusW> according to my 2n7002 ds
[16:41:02] <RikusW> D
[16:41:06] <RikusW> G S
[16:41:25] <RikusW> on the sot23
[16:41:28] <megal0maniac> Yip. That's why they're angled funny. G is on its own track
[16:41:48] <RikusW> G should be connected to the S pullup
[16:43:07] <RikusW> seems like most mosfets are GDS
[16:43:13] <RikusW> unlike bipolar....
[16:43:53] <RikusW> though its easy to detect EBC using only a diode tester
[16:44:12] <RikusW> Vbc is slightly lower than Vbe
[16:45:33] <RikusW> megal0maniac: afaik Gate should be on the AVR/target side...
[16:46:25] <megal0maniac> Okay, set it up like that. Still no success
[16:46:32] <megal0maniac> Ima scope it
[16:47:44] <RikusW> and both LV and HV should have power
[16:49:00] <megal0maniac> CLK and PDI are just staying high on the target side
[16:50:18] <megal0maniac> Nope, nothing
[16:50:34] <RikusW> I actually built a translator using C9014..... but it don't work below LV=3V...
[16:50:38] <megal0maniac> Firmware issue then. Perhaps different pin definitions for PDI...
[16:50:49] <RikusW> test without connecting U2S
[16:50:56] <RikusW> using only a DMM
[16:51:10] <megal0maniac> Test what?..
[16:51:14] <megal0maniac> U2S is my programmer
[16:51:59] <RikusW> seems like we're not talking about the same thing....
[16:52:05] <RikusW> zlog
[16:53:35] <megal0maniac> I'm trying to program the xboard with the LUFA firmware on your U2S :)
[16:53:39] <megal0maniac> using PDI
[16:54:49] <megal0maniac> Yip. Definitely nothing happening on those pins
[16:55:16] <OSterver> on the U2S neither?
[16:55:38] <megal0maniac> That's what I checked
[16:55:58] <megal0maniac> scope connected directly to PDI and CLK (supposedly) pins on U2S
[16:56:10] <OSterver> and GND hopefuly too
[16:56:16] <megal0maniac> Yes
[16:56:20] <megal0maniac> Both pins were low
[16:56:21] <OSterver> mk
[16:56:26] <OSterver> ay
[16:56:48] <megal0maniac> Clicked fuses, nothing changed while it tried to read
[16:57:01] <RikusW> megal0maniac: I would have tested the translator circuit seperately first, did you ?
[16:57:09] * megal0maniac nods
[16:57:34] <megal0maniac> http://i.imgur.com/p4jfK.png
[16:57:49] <OSterver> how does that relate?
[16:57:59] <OSterver> oh
[16:58:00] <OSterver> nvm
[16:58:02] <megal0maniac> That's me testing :P
[16:58:05] <megal0maniac> lol
[16:58:20] <megal0maniac> Pulled low from both sides and same result
[17:03:05] <RikusW> megal0maniac: so did you test all 4 by pulling low each side and checking that the other side goes low ?
[17:03:22] * RikusW double checks everything
[17:03:25] * megal0maniac nods
[17:03:39] <RikusW> even triple checks sometimes if its prototype stuff ;)
[17:03:53] <megal0maniac> There are seperate pin definitions for PDI. Sigh.
[17:04:41] <RikusW> so its the fw ? ....
[17:04:52] <megal0maniac> Looks like it
[17:05:09] <RikusW> looking for a hw bug thats actually fw or sw can get annoying :-P
[17:09:44] <OSterver> megal0maniac, I am not sure that 10kHz sampling of few MHz signal will be worth it :P
[17:10:24] <megal0maniac> OSterver: Could you check this out please? I'm tired and don't understand http://pastebin.com/2B1xwx5d
[17:10:42] <megal0maniac> Are the pin definitions for PDI programming mode here?
[17:11:00] <megal0maniac> data=PB3 and reset=PB0
[17:11:57] <OSterver> PD5 = clk, PD3 = data
[17:12:12] <megal0maniac> lines?
[17:12:23] <megal0maniac> Although...
[17:12:33] <megal0maniac> Let's just try it as is
[17:12:59] <OSterver> it is using hardware UART on PortD
[17:13:00] <OSterver> I presume
[17:13:08] <OSterver> where tx and rx are connected together
[17:13:19] <megal0maniac> Hm.
[17:13:29] <megal0maniac> Hardware uart is on PB2 and 3
[17:13:38] <OSterver> hmm
[17:13:46] <megal0maniac> Where is that defined?
[17:14:14] <OSterver> I went by this
[17:14:15] <OSterver> DDRD |= (1 << 5) | (1 << 3);
[17:14:15] <OSterver> DDRD &= ~(1 << 2);
[17:15:11] <megal0maniac> That's only setting DDR though, not specifically setting up those pins for programming
[17:15:19] <OSterver> XCK5 = PD5
[17:15:27] <OSterver> RXD1 = PD2
[17:15:29] <OSterver> TXD1 = PD3
[17:15:39] <OSterver> PB2/3 = MOSI/MISO
[17:15:51] * megal0maniac nods
[17:17:05] <OSterver> I do wonder, how precise would be freq meter now from the end of 80s/beginning of 90s with internal 10MHz xtal?
[17:17:13] <OSterver> no specs for the xtal that I know of
[17:17:18] <megal0maniac> Are you taking that from somewhere?
[17:17:21] <OSterver> yes
[17:17:24] <OSterver> atmega32u4 datasheet
[17:17:26] <megal0maniac> What do I do now? :P
[17:17:34] <megal0maniac> it's 32u2 but you're still right
[17:17:51] <OSterver> well you should be using PortD and not PortB
[17:17:58] <OSterver> since it is using UART and not SPI
[17:18:26] <megal0maniac> I will. But I need to change the pins to 2 and 3...
[17:19:30] <OSterver> I have got no idea what you are talking about -- but do whatever you think is necessary :)
[17:19:43] <megal0maniac> I have no idea...
[17:19:48] <megal0maniac> I want this to work on 32u2
[17:20:01] <megal0maniac> But can't figure out how to make that happen
[17:20:11] <megal0maniac> And my magic is finished
[17:21:55] <OSterver> now I want some warm food
[17:25:13] <megal0maniac> OSterver: PB2, 3 and 5 are all doing something. Which is which?
[17:25:22] <megal0maniac> (PDI & RESET)
[17:26:04] <OSterver> how should I know?
[17:26:06] <OSterver> neither of them is UART
[17:26:19] <megal0maniac> PB2 & 3 is UART
[17:26:27] <OSterver> hm
[17:26:34] <OSterver> datasheet said PB2 and PB3 are UART
[17:26:54] <megal0maniac> But you read 32u4 datasheet
[17:27:23] <megal0maniac> PB2/3 are MOSI/MISO
[17:28:39] <OSterver> yes
[17:28:45] <OSterver> but MOSI/MISO is SPI
[17:28:49] <OSterver> PDI is UART based
[17:28:59] <OSterver> synchronous UART
[17:29:07] <OSterver> you can even read it in the code you sent me!
[17:29:16] <OSterver> it also messes with PortD stuff
[17:29:18] <megal0maniac> Which is why I'm using PORTD
[17:29:28] <megal0maniac> It's where the UART is
[17:29:29] <OSterver> you just kept saying that you are using PB2&3
[17:29:49] <megal0maniac> I'm sorry
[17:29:58] <megal0maniac> I see the error of my ways now :/
[17:30:06] <OSterver> sleep maybe? :D
[17:30:09] <megal0maniac> I _meant_ PD :P
[17:30:11] <OSterver> :D
[17:30:12] <megal0maniac> Soon soon.
[17:30:17] <OSterver> PD2 and PD3 should be tied together
[17:30:20] <megal0maniac> Just want to read fuses and I'll be happy
[17:30:24] <OSterver> and PD5 is XCK = reset
[17:30:26] <OSterver> = clock
[17:30:36] <megal0maniac> Good. That's what I guessed
[17:31:54] <OSterver> is a worm food?
[17:31:58] <OSterver> would you eat a worm?
[17:33:25] <megal0maniac> !!!
[17:33:29] <megal0maniac> Still nothing
[17:33:38] <OndraSter> omg
[17:34:01] <OndraSter> don't you smell anything funny by now? :D
[17:34:27] <megal0maniac> I was seriously worried that I might
[17:34:34] <megal0maniac> K. 22pf time
[17:34:41] <OndraSter> but you are not now anymore? :D
[17:34:45] <OndraSter> what does it crap out with?
[17:35:39] <megal0maniac> Failed to enter programming mode
[17:35:56] <OndraSter> hm
[17:36:01] <megal0maniac> Result received is 0x03
[17:36:18] <OndraSter> scope time?
[17:36:21] <megal0maniac> Which, interestingly, isn't an error I've had before
[17:36:27] <megal0maniac> Run out of jumpers :)
[17:38:12] <OndraSter> it is bloody late
[17:38:12] <OndraSter> I am off
[17:38:12] <OndraSter> nn
[17:38:41] <megal0maniac> Meh. Night
[17:42:07] <megal0maniac> RESET isn't pulling low...
[17:57:36] <megal0maniac> Stuff it. Tomorrow's problem
[22:42:03] <Richard_Cavell> 'afternoon all!
[22:44:40] <creep> h
[23:01:27] <Casper> o/
[23:01:55] <Richard_Cavell> What's a good AVR project?
[23:02:11] <Richard_Cavell> I've made some LEDs blink, I've accepted some input from switches. What now?
[23:02:22] <Tom_itx> follow my tutorial
[23:02:35] <Tom_itx> make it talk to a terminal
[23:02:41] <Tom_itx> accept input
[23:02:46] <Tom_itx> return a reply
[23:02:53] <Richard_Cavell> what I want to do is to handshake 2 avrs
[23:03:13] <Richard_Cavell> I want to have two AVRs communicate back and forth to synchronously light LEDs or something
[23:03:13] <Tom_itx> then why did you ask if you knew already?
[23:03:21] <Richard_Cavell> Well I didn't know already
[23:03:25] <Richard_Cavell> talking to a terminal is kind of boring
[23:03:40] <Casper> Richard_Cavell: make them talk on a bus
[23:03:56] <Richard_Cavell> but their own private bus
[23:04:03] <Tom_itx> implement a CAN bus
[23:05:14] <creep> rici have one named usb HID device (joystick and pedals)
[23:05:26] <creep> Richard_Cavell**
[23:06:28] <creep> if you want some communication project you can make security system/alarm for example
[23:06:51] <creep> they might even pay you for it
[23:07:43] <Richard_Cavell> Also I think a good project is to drive an LCD screen
[23:07:57] <Casper> HD44780
[23:08:19] <Casper> but beware of the real initialisation sequence, sadly, most fail to notice the true sequence
[23:08:27] <creep> Richard_Cavell<< then a frequency meter, combination lock, remote mepmerature sensor...
[23:08:41] <creep> *temp
[23:08:48] * Casper wonders what a mepmerature mesure...
[23:09:02] <creep> :)
[23:09:10] * creep searching for buttons
[23:10:15] <Casper> Richard_Cavell: hd44780 need to be initialised in a slightly weird way, like init 8 bits, init 8 bits, init 8 bits. then set 4 bits if you want or continue the rest of the init sequence
[23:10:23] <Casper> yes, init 3 times the 8 bits
[23:10:40] <Casper> this ensure that it does init to 8 bits
[23:11:23] <Richard_Cavell> mate I'm going for it
[23:16:29] <Casper> want a tiny extra challenge? go 4 bits
[23:52:43] <w|zzy> hardly much of a challenge.
[23:53:07] <w|zzy> Dave from EEVBlog tried to give me some hd44780 screens.
[23:53:51] <creep> go write a Brushless Sensorless ESC
[23:54:27] <CapnKernel> That's the lamest insult I've heard all day.
[23:54:30] <creep> 20MHz will be enough in ASM