#avr | Logs for 2012-09-29

Back
[00:51:31] <Richard_Cavell> Amadiro: And by the way we were talking about atmega328p vs atmega168. The pinouts are exactly the same
[02:26:27] <inflex> lo folks
[02:30:36] <OndraSterver> lo inflex
[02:31:04] <inflex> anyone bought/used a samsung galaxy note? (the large phone)
[02:31:07] <inflex> am thinking of getting one
[02:35:42] <OndraSterver> Transilience Thought Unifier Model-11
[02:35:57] <OndraSterver> I am not an android fan myself
[02:36:05] <OndraSterver> too much issues trying to be solved the wrong way
[02:36:21] <specing> heh
[02:36:44] <inflex> well, no great fan of android myself either, looking forward to Firefox OS though
[02:36:48] <specing> my android phone lasts between one day or if I am lucky, 2 1/2 days
[02:37:06] <specing> inflex: will be bloated, trust me
[02:45:16] <inflex> don't see how it'll be worse than Android
[02:51:39] <megal0maniac> In the same way that firefox itself became bloated. I'm with specing on this one
[02:54:03] <megal0maniac> creep: http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[02:54:46] <vsync_> crapdroid and crappiOS
[02:55:39] <megal0maniac> inflex: I can't help but picture it ringing, and having to pick it up with 2 hands :P
[02:57:41] <OndraSterver> lol
[02:58:20] <vsync_> "smartphones" is such a stupid word
[02:58:34] <vsync_> they're more like dumbphones
[02:59:29] <vsync_> most of the people me included, would probably want a phone that does not have a 10 inch display and a 2 hour battery life
[03:00:03] <vsync_> i actually need to make calls and not play fart sounds with the newest "app" and play angry birds
[03:00:15] <vsync_> app here app there... app. lol.
[03:02:19] <Richard_Cavell> Okay, guys, I have a problem. I'm building this circuit involving an atMega168. In fact I'm using atMega328ps, which as far as I can tell have identical pinout to mega168. I'm using DIP packages. Have a look at the schematic for the atmega168 here. The labels don't correspond to the pinout. Any ideas? http://hackaday.com/2010/10/25/avr-programming-02-the-hardware/
[03:09:38] <megal0maniac> Richard_Cavell: They do...
[03:09:59] <Richard_Cavell> is the diagram just wonky?
[03:10:11] <Richard_Cavell> I mean, pin 2 is in the middle block on the right hand side. It should be 2nd from the top left
[03:10:27] <megal0maniac> It's a schematic, not a PCB layout. So there won't be 14 pins on each side. But the pin numbers are correct
[03:10:51] <megal0maniac> For example, the chip isn't that shape, either :)
[03:11:06] <megal0maniac> Nor is a TO220 transistor a triangle
[03:11:28] <megal0maniac> Or a resistor a perfect rectangle. It's symbolic, not literal
[03:12:22] <megal0maniac> This is what you were expecting. Use it as a reference: http://www.sparkfun.com/images/tutorials/BeginningEmbedded/2-MicroProgramming/ATmega168-Pinout.jpg
[03:14:46] <Richard_Cavell> yep
[03:14:49] <Richard_Cavell> okay I'll just do that
[03:14:54] <Richard_Cavell> let you know how it goes
[03:19:22] <megal0maniac> I'll be here all day
[03:19:47] <megal0maniac> Richard_Cavell: DAPA cable?...
[03:24:01] <OndraSterver> why not the stk600 you have?
[03:24:03] <OndraSterver> problem solved!
[03:24:54] <megal0maniac> OndraSterver: Don't be silly :)
[03:25:18] <OndraSterver> haha
[03:25:24] <OndraSterver> I am just realistic
[03:25:46] <OndraSterver> anyway, FRINGE!
[03:26:15] <megal0maniac> OndraSterver: xboard was released by customs on Wednesday. Took 3 days, not too bad
[03:26:40] <megal0maniac> Still not here though. Was let loose into the postal system on Thursday. I'm hoping Monday or Tuesday
[03:28:25] <OndraSterver> :)
[03:29:29] <OndraSterver> I like the no tax at customs
[03:29:35] <OndraSterver> here you would pay :(
[03:30:19] <megal0maniac> Well there is
[03:30:32] <OndraSterver> but for 40€+ or so
[03:30:36] <OndraSterver> here it is 22€
[03:30:44] <megal0maniac> Ooh.
[03:30:53] <megal0maniac> Yeah, ZAR500 minimum
[03:31:16] <OndraSterver> friend from swiss sent me his dead HD2 that died during flash for me to JTAG it
[03:31:24] <OndraSterver> I payed about $20 on customs
[03:31:27] <OndraSterver> for 50CHF package :(
[03:34:00] <megal0maniac> What??
[03:34:07] <megal0maniac> That's rude
[03:35:10] <Steffann> No it's not :P
[03:35:20] <megal0maniac> I sent my Sansa MP3 player to CZ for RMA. They sent it back through UPS. Took 3 days and they used customs brokerage so I didn't have to wait for customs and I didn't pay a cent :)
[03:37:46] <megal0maniac> Steffann: Where's your x?
[03:37:58] <megal0maniac> And why isn't it rude?
[03:38:08] <Steffann> Lost in the connection between me and the freenode server i'm on
[03:44:49] <Richard_Cavell> ok here's a question - my programming leads have a ground lead but my chip has 2 grounds. What do I do?
[03:44:54] <Richard_Cavell> connect 'em both?
[03:45:57] <OndraSterver> think about it
[03:46:25] <Richard_Cavell> connect them both?
[03:46:31] <Richard_Cavell> Are they internally connected inside the chip?
[03:46:35] <Richard_Cavell> I have no way of knowing that
[03:47:17] <OndraSterver> well both grounds on the chip should be connected to your ground in your circuit
[03:47:20] <OndraSterver> now, think again
[03:51:17] <Richard_Cavell> you're trying to say that assuming the chip is already connected up correctly, my programmer will simply take advantage of the fact that the grounds are already connected?
[03:53:37] <OndraSterver> gnd is still gnd, there is only one ground
[03:53:43] <OndraSterver> so it does not matter where you connect it to the ground
[03:53:49] <OndraSterver> 0V is still 0V
[03:53:52] <megal0maniac> Steffann: IMPOSTER!!!
[03:54:45] <megal0maniac> Richard_Cavell: It is also recommended (by Atmel) to connect AVCC to VCC
[03:55:03] <Richard_Cavell> right well I've done that
[03:55:04] <OndraSterver> through an inductor :)
[03:55:06] <megal0maniac> Even if you aren't using ADC
[03:55:40] <megal0maniac> OndraSterver: If you want to get picky, then yes :P
[03:55:52] <OndraSterver> :P
[04:01:52] <OndraSterver> haha "it is always the red wire."
[04:01:55] <OndraSterver> click
[04:01:55] <Richard_Cavell> damn it avrdude can't get access to the parallel port
[04:01:59] <OndraSterver> ".. unless it is the white one"
[04:03:10] <Kevin`> Richard_Cavell: run it as root or write a udev rule so the device is always accessible by users
[04:03:21] <Richard_Cavell> how do I run as root on Windows?
[04:03:24] <OndraSterver> ..
[04:03:37] <OndraSterver> why are you using dapa instead stk600? ...
[04:03:43] <Richard_Cavell> 'cos I just am
[04:03:59] <OndraSterver> that is like using wartburg when you have lambo in your garden
[04:04:12] <Kevin`> Richard_Cavell: windows key, type "run", right click, run as administrator
[04:04:42] <Kevin`> Richard_Cavell: erm
[04:04:46] <Kevin`> Richard_Cavell: "cmd", not run
[04:04:54] <Kevin`> it must be late
[04:05:22] <Richard_Cavell> attaboy
[04:05:23] <Richard_Cavell> that works
[04:05:43] <Richard_Cavell> actually no it doesn't
[04:05:46] <Richard_Cavell> but at least it runs as admin
[04:07:37] <megal0maniac> Richard_Cavell: I've seen this problem before. It's relatively easy to fix
[04:08:03] <Richard_Cavell> It was able to copy giveio.sys to C:\Windows\ but it would not start
[04:08:07] <Richard_Cavell> This driver has been blocked from loading
[04:08:57] <megal0maniac> Richard_Cavell: Your STK600 is calling you
[04:09:01] <Richard_Cavell> he he
[04:09:11] <Richard_Cavell> no, see, this is why I did this
[04:09:14] <Richard_Cavell> you learn stuff this way
[04:09:49] <megal0maniac> The problem is, I don't think anyone here has used a parallel cable with Windows. Let alone Windows 7, and a port which isn't wired directly to the southbridge.
[04:10:00] <megal0maniac> So finding help is going to be difficult.
[04:10:27] <megal0maniac> If you used your expensive, capable STK600, then people can help you, and you'll learn just as much
[04:10:54] <OndraSterver> because you would be doing something actually :P
[04:11:11] <OndraSterver> DAPA will teach you how to swear
[04:11:15] <OndraSterver> there is no point on using that old crap
[04:11:47] <Richard_Cavell> the cable I made is kind of cute though
[04:11:50] <Kevin`> dapa should be pretty fast, aside from requiring attaching a cable to a parallel port and such
[04:12:18] <Kevin`> pics
[04:15:17] <Richard_Cavell> you want pics of my cable?
[04:16:09] <Kevin`> of course
[04:16:19] <Richard_Cavell> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=997335#997335
[04:17:45] <Kevin`> Richard_Cavell: the driver is probably not approved by microsoft. check that, and either set the os to allow unsigned drivers or test-sign it
[04:18:26] <megal0maniac> Was just about to suggest that
[04:18:40] <megal0maniac> Richard_Cavell: Run CMD as admin again
[04:19:08] <megal0maniac> bcdedit.exe -set loadoptions DISABLE_INTEGRITY_CHECKS
[04:19:18] <megal0maniac> bcdedit.exe -set TESTSIGNING ON
[04:19:26] <megal0maniac> Reboot
[04:19:49] <megal0maniac> When you're done, do the same thing, but ENABLE instead of DISABLE and OFF instead of ON
[04:21:10] <Richard_Cavell> hang on I'm still working on Kevin's pic
[04:21:49] <Richard_Cavell> Kevin`: http://imagebin.org/230215
[04:21:51] * Richard_Cavell built it today
[04:22:31] <Kevin`> looks sane enough, although you might find you have problems if that's a long cable
[04:22:45] <Richard_Cavell> 4 metres
[04:22:52] <Kevin`> Good Luck :)
[04:23:00] <Richard_Cavell> well it's programming slowly
[04:23:39] <OndraSterver> bcdedit for disabling unsigned does not work on w7 sp1 x64 anymore I think
[04:23:45] <OndraSterver> for safety reasons
[04:23:56] <megal0maniac> It did for me. I think
[04:23:57] <Kevin`> profit reasons more likely
[04:24:01] * megal0maniac tries again
[04:24:11] <Kevin`> people started changing the setting, can't allow drivers to exist without paying microsoft
[04:24:24] <OndraSterver> you can still install drivers that are signed just fine
[04:24:27] <OndraSterver> signed without WHQL
[04:24:35] <OndraSterver> "fine" = red popup appears
[04:24:39] <OndraSterver> when installing it
[04:24:42] <Richard_Cavell> megal0maniac: Am I supposed to run the install script anywhere among those instructions?
[04:25:15] <Kevin`> OndraSterver: you get a "test mode" thing on your desktop permanently though. not that it matters to me
[04:25:26] <OndraSterver> for safety reasons - imagine that app gets admin access - it can modify bcdedit itself, install unsigned drivers and boom, you are screwed
[04:25:28] <OndraSterver> (virus)
[04:26:21] <Kevin`> OndraSterver: viruses exploit bugs in windows, not simple things like that
[04:26:34] <Kevin`> and bcdedit requires a reboot. AND informs the user
[04:26:50] <OndraSterver> because people read what the OS writes
[04:27:31] <Kevin`> it doesn't make any difference if it still has a way to allow non-approved drivers
[04:27:36] <Richard_Cavell> megal0maniac: I have rebooted and in the bottom-right corner it says "Test Mode". But install_giveio still fails
[04:27:44] <Kevin`> the virus authors, if they need a kernel driver, will just sign it
[04:27:47] <Richard_Cavell> This driver has been blocked from loading
[04:28:06] <megal0maniac> Then I don't know
[04:28:13] <megal0maniac> Test mode means it worked though
[04:28:13] <Kevin`> Richard_Cavell: is the driver signed at all?
[04:28:42] <Richard_Cavell> Nope
[04:28:45] <Kevin`> Richard_Cavell: obviously it won't be approved by microsoft, but it still needs to be signed by somebody to be allowed to run even in test mode
[04:29:06] <megal0maniac> Kevin`: Good point.
[04:29:18] <megal0maniac> Google how to self-sign a driver :)
[04:30:10] <Richard_Cavell> See this is why I don't like buying from this damn computer store
[04:30:11] <Kevin`> as I recall it requires several extra User Friendly tools to be installed, fortunately I haven't had to do it
[04:30:15] <Richard_Cavell> they stock all cheap Chinese brands
[04:30:17] <Richard_Cavell> The drivers suck
[04:30:31] <Kevin`> Richard_Cavell: giveio is a generic driver, it's not specific to that device
[04:30:42] <Richard_Cavell> no but my parallel port is
[04:30:45] <Kevin`> it lets a userland process use io ports
[04:31:06] <megal0maniac> Don't mean to state the obvious, but aren't STK600 drivers signed?
[04:31:21] <megal0maniac> Richard_Cavell: It basically allows bit-banging
[04:31:25] <Kevin`> Richard_Cavell: the parallel port drivers are already loaded and probably whql-approved anyway
[04:31:32] <Richard_Cavell> no they're not
[04:31:39] <Richard_Cavell> My LPT1 driver is a Chinese crappy thing
[04:31:40] <Kevin`> Richard_Cavell: you said you had lpt1
[04:31:45] <Richard_Cavell> I got lpt1 yes
[04:31:52] <OndraSterver> is it PCI card or what?
[04:31:57] <Richard_Cavell> yes
[04:32:11] <Richard_Cavell> A Ritmo CC-T35
[04:32:18] <OndraSterver> and what is bloody wrong on plugging in USB cable from your stk600 to USB and clicking on "RUN" in atmel studio? :(
[04:32:37] <Richard_Cavell> I won't learn about DAPA cables that way
[04:32:54] <OndraSterver> why would you want to learn about DAPA cables?
[04:32:55] <megal0maniac> Nobody will
[04:32:58] <OndraSterver> in the first place
[04:33:02] <megal0maniac> Because nobody uses them
[04:33:18] <Kevin`> i've used it. although in linux, where things a simple =p
[04:33:31] <OndraSterver> Kevin`, ask megal0maniac how he simply started X server :D
[04:33:38] <megal0maniac> linux, where things a simple
[04:33:42] <megal0maniac> Heh.
[04:35:00] <megal0maniac> Actually... I'm going to try a Debian live disc on this iMac :)
[04:35:53] <Kevin`> ppc imac, I assume?
[04:36:11] <megal0maniac> Nope
[04:36:17] <Kevin`> aww, that's no fun
[04:36:36] <Richard_Cavell> I found a way to sign the driver. Give me half an hour to cool off
[04:36:50] <Richard_Cavell> Stupid computer shop sells the cheapest hardware, but the driver problems you get just aren't worth it
[04:37:05] <megal0maniac> Richard_Cavell: Have you been swearing?
[04:37:14] <Richard_Cavell> yep
[04:37:16] <Kevin`> the driver in question isn't specific to this card. you'd have the issue trying to use ANY x86 io
[04:37:20] <megal0maniac> Everyone: Don't mention STK600 for 30 minutes, please
[04:37:40] <Richard_Cavell> Kevin`: I think the problem is that my LPT1 driver was made in China and is not signed, so I need to sign it
[04:37:42] <OndraSterver> okay
[04:37:43] <megal0maniac> Kevin`: I'm at work and bored with OSX :)
[04:37:44] <OndraSterver> what about the dragon! :P
[04:37:59] <megal0maniac> OndraSterver: Yes, that's fine.
[04:38:16] <OndraSterver> I am pretty sure that the board has clone of 8255 or whatever was PIO back in the day
[04:38:28] <OndraSterver> with PCI interface
[04:38:36] <megal0maniac> Yay! I have full resolution even.
[04:53:12] <Richard_Cavell> Kevin`: By the way you didn't comment on my cable
[04:53:39] <Kevin`> sure I did, you even responded
[04:54:03] <Kevin`> I said it looks sane, but is probably too long to work fast
[04:54:39] <Richard_Cavell> it only works when programming slowly
[04:54:44] <Richard_Cavell> if you set fuses it doesn't work any more
[05:06:21] <megal0maniac> 30 minutes are over
[05:06:32] <Richard_Cavell> lol
[05:06:50] <Richard_Cavell> well at least I know the problem is my cheap parallel port hardware
[05:07:12] <megal0maniac> You know what isn't cheap or parallel port, but is a programmer and works?
[05:07:22] <Richard_Cavell> ha ha ha
[05:07:24] <Richard_Cavell> um....
[05:07:27] <megal0maniac> (I did wait 30 minutes)
[05:07:35] <Richard_Cavell> The STK600 that's about 2 feet away from me?
[05:07:46] <Richard_Cavell> But mate this is how you learn
[05:07:47] <Richard_Cavell> seriously
[05:09:59] <Richard_Cavell> I have absolutely had it with buying cheap Chinese brands
[05:10:08] <Richard_Cavell> but for the sake of a driver signature I can't get the damn thing to work at all
[05:10:14] <Richard_Cavell> What's the point of a driver that will not load?
[05:11:07] <Kevin`> giveio is not the driver for the device from china
[05:11:53] <Kevin`> it's a generic driver that doesn't map to any device (part of why it can't be approved, fwiw)
[05:14:20] <Richard_Cavell> Yes I know that
[05:14:40] <Richard_Cavell> What I'm saying is that when I run install_giveio.bat, it says it tries to start giveio and the driver won't start
[05:16:35] <Kevin`> I would look for a newer version of the giveio driver that's designed to work on 64bit vista/7
[05:17:51] <Kevin`> alternately, does avrdude have the ability to use device level access on windows? I dunno if the lpt driver on windows supports anything other than printers, but it's worth looking
[05:18:54] <Richard_Cavell> I reckon I should get a decent parallel port card
[05:18:57] <Richard_Cavell> one with a signed driver
[05:19:12] <Kevin`> how would a signed lpt driver solve this problem
[05:19:39] <Richard_Cavell> well it's the driver that is refusing to start
[05:19:47] <Richard_Cavell> it might be a badly written driver too
[05:19:50] <Kevin`> do you have a paste of that happening?
[05:19:56] <Kevin`> all i've seen is giveio not starting
[05:19:57] <Richard_Cavell> ok hang on
[05:21:50] <Richard_Cavell> http://ideone.com/0s5qr
[05:22:27] <Richard_Cavell> Now, that's with driver signing checks disabled (F8 on Windows boot), UAC turned off completely, a temporary signature given to the driver, cmd running in administrator mode
[05:22:33] <Richard_Cavell> I don't see what else I can do
[05:22:53] <Kevin`> a signature given to giveio.sys?
[05:23:10] <Richard_Cavell> no to the parallel port driver, which is C:\Windows\system32\DRIVERS\parport.sys
[05:23:37] <Kevin`> is the parport driver even necessary?
[05:23:49] <Kevin`> if you are accessing it using io ports it might not be
[05:23:55] <Kevin`> also you said before it's already loaded
[05:24:10] <Richard_Cavell> so what does that error message mean then?
[05:24:30] <Kevin`> what I think it means is loading giveio.sys failed
[05:25:08] <Richard_Cavell> ok so why?
[05:25:47] <Kevin`> probably because it's not signed, although I take it you misunderstood me before and never checked
[05:28:00] <Richard_Cavell> I've been working on the signature issue and it still won't work
[05:28:16] <Richard_Cavell> I've given it a temporary signature, booted into safe mode with driver signature checking disabled, turned UAC off
[05:28:19] <Richard_Cavell> still won't work
[05:29:19] <Kevin`> this is why I run windows in a vm instead of the other way around =p
[05:29:33] <Richard_Cavell> ha ha
[05:37:54] <megal0maniac> Richard_Cavell: Last thing I'm going to say about this, then I'll keep quiet. You'll run into enough problems just by doing things the way they should be done. And you'll deviate from the guides and experiment. THAT'S how you learn - not by creating unnecessary problems for yourself. Right now you're struggling with driver signing issues. What you learn from it, if anything, won't be very valuable to you.
[05:38:13] <Richard_Cavell> Yes I know
[05:38:21] <Richard_Cavell> So I'm going to throw this stupid card away and buy another
[05:38:24] <megal0maniac> And it's really just wasting your time
[05:38:39] * megal0maniac falls over in disbelief
[05:38:44] <Kevin`> learning about windows drivers is useful, just not relevant to avr unless you are making a usb device
[05:38:59] <Kevin`> the card isn't the problem
[05:39:33] <Richard_Cavell> well, the driver
[05:39:36] <Richard_Cavell> they go together
[05:39:51] <Kevin`> but the driver for the card is installed and working
[05:40:10] <Kevin`> although I doubt you'll believe me until you try something completely different, so go ahead =p
[05:40:13] <megal0maniac> Kevin`: In which case you'll probably use CDC or HID or something like that. Only thing to be learnt from this is that using random device classes & drivers is cause for a headache and little else
[05:40:38] <Richard_Cavell> so how do you know the driver for the card is working?
[05:40:51] * megal0maniac stops talking because he's on the floor.
[05:40:55] <Kevin`> why not look at the avrdude or whatever source and see what the error is from
[05:41:01] <Kevin`> Richard_Cavell: because you have an lpt1 in device manager
[05:41:32] <Richard_Cavell> I showed you the output of the install_getio.bat script. What else do you want me to do?
[05:42:09] <Kevin`> you need to either find a giveio equivalent that works on windows 7, or find how to use a device from avrdude instead of io
[05:42:55] <theBear> other people have done this, just find one of their webpages
[05:43:17] <Richard_Cavell> first of all, I need to figure out what the actual problem is
[05:43:18] <Kevin`> not many. google finds entirely problems with parports and windows x64, not solutions
[05:43:25] <Kevin`> if it was easy I would have pasted one of the solutions =p
[05:43:35] <Richard_Cavell> is it crappy parallel port driver? Is it outdated giveio?
[05:44:26] <theBear> look at avrdude and ponyprog sites
[05:46:23] <Richard_Cavell> do the other programmers all use the same leads?
[05:46:32] <Richard_Cavell> As in, the MISO and MOSI and SCK and Reset and GND?
[05:46:42] <Richard_Cavell> So they still plug into the chip the same way?
[05:47:22] <Kevin`> Richard_Cavell: yes, at least if you are using isp
[05:47:33] <Richard_Cavell> well I am using ISP
[05:47:45] <Richard_Cavell> So then there's no benefit to me using DAPA over any other programming method for what I'm doing now
[05:49:18] <theBear> there's a ton of isp (parallel end) pinouts, but most programs have a way of defining/choosing them
[05:53:36] <Richard_Cavell> alright so what do I do? Learn to use the STK600 to do ISP?
[05:53:40] <Richard_Cavell> megal0maniac: here's your cue
[05:53:59] <Kevin`> attach a cable to the isp pins on it
[05:56:34] <Richard_Cavell> I notice that avrdude will bitbang the serial port as well
[05:56:36] <Richard_Cavell> I have one of those!
[05:56:56] <Kevin`> yeah, it will. you have to be careful of the line levels though
[05:57:20] <Kevin`> and don't try it with a usb serial device, usb is so slow it'll take an hour to program
[06:00:24] <Richard_Cavell> alright so the next step is to learn how to do ISP with my STK600. Right?
[06:01:08] * megal0maniac is still on the floor
[06:01:24] <Richard_Cavell> you can get up off the floor
[06:01:38] <megal0maniac> Oh, it's safe :)
[06:02:49] <megal0maniac> DON'T bother with serial. It's slow and unsafe and pointless for those in possession of STK600s :P
[06:03:12] <megal0maniac> You need level conversion
[06:04:10] * megal0maniac wonders if you could use FTDI FT232 chip to program by bit-banging TX and handshaking / flow control lines...
[06:04:46] <megal0maniac> I know you can toggle DTR and RTS manually
[06:05:07] <Kevin`> yes, you can, but it's painfully slow because of the usb latency
[06:05:44] <Kevin`> there are drivers that use the adapter in a synchronous mode (specific to the ftdi chip) that are a bit faster, but there's still some delay from waiting for data
[06:07:12] <creep> OndraSterver<< i'd argue with that, it may matter where you connect the ground
[06:07:58] <creep> sup Kevin` ?
[06:13:59] <megal0maniac> creep: You find yourself a programmer?
[06:15:16] <creep> well i have some parallel port connectors and serialport connectors, and a large stock of cmos ics
[06:15:29] <megal0maniac> Oh no...
[06:15:54] <megal0maniac> Richard_Cavell: How's it going?
[06:16:21] <Richard_Cavell> well I'm reading
[06:16:30] <megal0maniac> Good start, I suppose
[06:22:01] <megal0maniac> Richard_Cavell: What extras did you get? (Socket and routing cards)
[06:22:14] <Richard_Cavell> the ones for mega328p and tiny85
[06:41:39] <megal0maniac> Assuming you're programming the m328?
[06:41:58] <megal0maniac> There's a jumper you need to remove for the t85
[07:03:00] <Richard_Cavell> a jumper on the stk600?
[07:11:41] <Richard_Cavell> So what are the best programmers for ISP?
[07:12:22] <megal0maniac> Richard_Cavell: Yes, on the STK600.
[07:12:23] <megal0maniac> The AREF0 jumper must be removed before programming of devices that have AREF on a pin used by the serial programming interface.
[07:12:36] <Richard_Cavell> ok
[07:12:38] <megal0maniac> In effect, that means t13, t25, t45 and t85
[07:12:45] <Richard_Cavell> Well haven't finished reading the STK600 manual yet
[07:12:54] <megal0maniac> What parts are you reading?
[07:12:59] <Richard_Cavell> Today has been a bloody waste
[07:13:05] <Richard_Cavell> I'm gonna read the whole lot tomorrow
[07:13:21] <Richard_Cavell> spent all day building this dapa cable only to find out my stupid parallel port won't work
[07:13:31] <megal0maniac> The part you need to read is 350 words long
[07:13:45] <megal0maniac> "ISP Programming"
[07:15:10] <megal0maniac> It's a case of attaching the routing board and socket card with the chip attached, removing the AREF0 jumper if using the t85, plugging the STK600 into your computer, click "Tools > Device programming", select STK600 under tools, select the correct uC, select ISP and go.
[07:15:24] <megal0maniac> Just read my last message. You won't even need the manual :)
[07:24:20] <megal0maniac> Richard_Cavell: This can be fun... :)
[07:24:30] <Richard_Cavell> that's good to know
[07:24:54] <Richard_Cavell> I'm too tired now to be of any use
[07:26:27] <megal0maniac> But did you read my 46 word crash-course? :P
[07:26:39] <Richard_Cavell> yes
[07:26:59] <megal0maniac> It's all you need to know
[07:27:07] <megal0maniac> Start with Blink
[07:29:53] <Richard_Cavell> does the stk600 have drivers of any type? I have it plugged in to my puter and it doesn't mount in any way
[07:30:07] <megal0maniac> Fire up Atmel Studio
[07:30:31] <Richard_Cavell> I want to use avrdude
[07:30:44] <megal0maniac> Just to check
[07:30:48] <megal0maniac> Is it installed?
[07:31:39] <Richard_Cavell> not yet
[07:32:34] <megal0maniac> Ah. Then check device manager. Atmel Studio is designed to work nicely with Atmel's programming hardware. So it comes with drivers and updated firmware
[07:32:43] <megal0maniac> brb
[07:33:33] <Richard_Cavell> It's not letting me register on the atmel website
[07:35:21] <Richard_Cavell> Bugger it I'm going to bed
[07:36:48] <OndraSterver> creep, with noisy grounds - yes
[07:39:22] <OndraSterver> you can not use avrdude and as6 "at the same time"
[07:39:24] <OndraSterver> they use different libraries
[07:39:26] <OndraSterver> which are not compatible
[07:39:49] <OndraSterver> I don't see any single reason to use avrdude on windows if you can do it from as6 directly
[07:39:57] <OndraSterver> :P
[07:40:31] <megal0maniac_afk> Richard_Cavell: Check PM
[07:42:11] <Horologium> greetings one and all.
[07:42:18] <OndraSterver> greetings one
[07:42:34] <all> Horologium: Hi
[07:48:14] <RikusW> Oh look. NickServ gives you 30 seconds to troll :)
[07:48:51] * megal0maniac imagines the possibilities...
[07:49:11] <Horologium> hmmmmm.
[07:49:29] <Horologium> interestingly, one of my clients is "Imagine the Possibilities"
[07:49:55] <megal0maniac> I know... -.-
[07:50:48] <Horologium> they work with people with mental disabilities.
[07:51:19] <megal0maniac> I didn't know that. Or that it was the name of one of your clients.
[07:51:26] <megal0maniac> I lied. Ha ha!
[07:51:41] <megal0maniac> Long day at work...
[07:53:32] <megal0maniac> I'm off. Cheers, all
[08:20:58] <Richard_Cavell> So what are AGND and AVCC? As opposed to GND and VCC
[08:21:07] * Tom_itx sometimes wonders why noobs do what noobs do
[08:21:18] * Tom_itx and never take good advice
[08:21:30] <Tom_itx> they are for the adc section of the chip
[08:21:36] <Tom_itx> they need to be connected
[08:22:06] <Tom_itx> analog likes it's own ground and power. it's kinda selfish like that
[08:22:15] <Corwin> :D
[08:24:23] <Richard_Cavell> Tom_itx: Oh, okay, so it's like a reference for the ADC?
[08:24:39] <Richard_Cavell> You should have been on earlier, you could have sold me one of your programmers
[08:27:10] <timemage> Richard_Cavell, like Tom_itx said, it's for powering that part of the chip. you can use it as your reference though, but that doesn't have anything to do with whether or not you need to connect it.
[08:27:31] <Kevin`> Richard_Cavell: avcc is the isolated power supply for the analog stuff. it needs to be the same voltage as vcc
[08:27:47] <Kevin`> Richard_Cavell: there's a seperate analog reference that you should also read about before breaking :)
[08:28:08] <Richard_Cavell> see, this is what I told you would happen
[08:28:15] <Richard_Cavell> I said, I'm just gonna start with one tutorial and just do that
[08:28:21] <Richard_Cavell> otherwise I suddenly open up a can of worms
[08:28:27] <Richard_Cavell> megal0maniac_afk: You should be listening to this
[08:28:32] <Richard_Cavell> Now I have 50 things to learn
[08:29:45] <timemage> Richard_Cavell, only 50? =)
[08:30:05] <Richard_Cavell> I said I was just gonna do that tutorial
[08:30:11] <Richard_Cavell> And now look at what's happened
[08:37:47] <Tom_itx> VREF is reference VCC is adc +voltage
[08:38:38] <Richard_Cavell> Tom_itx: So it's just a separate part of the chip with its own power supply and I just accept that?
[08:38:52] <Tom_itx> you can or you can reject it and have problems
[08:39:04] <Richard_Cavell> I can't fathom why they'd have a separate power supply with identical electrical characteristics
[08:39:21] <Tom_itx> analog isolation
[08:39:30] <Tom_itx> keeps out digital noise
[08:39:33] <Tom_itx> helps anyway
[08:39:47] <Richard_Cavell> thanks
[08:39:53] <Richard_Cavell> I gotta go to sleep now dude
[08:41:21] <OndraSterver> haa, I also saved yesterday four 256MB DDR sticks
[08:41:22] <OndraSterver> and also
[08:41:26] <OndraSterver> PCMCIA 3G card!
[08:41:29] <OndraSterver> Huawei
[08:41:31] <OndraSterver> works on W7 :)
[08:44:10] <OndraTabby> well this is something I won't be taking apart any time soon
[09:14:18] * RikusW would like to know whats actually inside : http://www.badscience.net/2008/08/bill-nelson-wins-the-internet/
[11:00:03] <rue_house> curious, does anyone have code for isolating pins on pin change interrupts
[11:07:19] <rue_house> does anyone know what I'm even talking about?
[11:08:03] <RikusW> yep
[11:08:19] <rue_house> now I cant find my good code for it :)
[11:08:33] <RikusW> you could save the current value each time and compare to the previous value
[11:08:55] <RikusW> or enable only a single pin...
[11:09:05] <rue_house> if (aPORTD & 0x80) if ((tPIND^oPIND) & 0x80) { GetInput(24); USART_printstring("\n\r"); }
[11:09:05] <rue_house> }
[11:09:05] <rue_house> }
[11:09:05] <rue_house> oPIND = tPIND;
[11:09:20] <rue_house> if your doing a lot of tests, you want to snapshot the port
[11:10:06] <rue_house> er aPORTD is a mask
[11:10:37] <rue_house> written so much code I dont know where to find things I'v done
[11:11:20] <rue_house> mmm try not to read PIND on an tiny26...
[11:19:12] <OndraSterver> isn't thee PCIF register?
[11:19:15] <OndraSterver> or PCINTF
[11:19:16] <OndraSterver> or something
[11:19:32] <RikusW> ayes
[11:19:40] <RikusW> somewhere in the docs
[11:43:43] <Amadiro> OSterver, with the xmegas you use on your boards, how does the PC register and other code handling instructions (jumps and such) look like? How large is the address range?
[11:44:20] <rue_house> tPINB = PINB; // always snapshot first
[11:44:20] <rue_house> Change = tPINB ^ oPINB; // find pin changes
[11:44:21] <rue_house> Change &= tPINB; // this will now just be high edges
[11:44:34] <Amadiro> I'm wondering how much hassle it would be to just have a bootloader on the actual chip and then run the rest from an SDcard or so
[11:45:00] <rue_house> can xmegas run code from ram?
[11:45:28] <rue_house> cause otherwise you would have to reflash yourself every time you change programs
[11:45:43] <Amadiro> yeah, that's basically what I want to figure out, reflashing each time would be a hassle
[11:45:47] <rue_house> which would of course, wear the flash out in no time
[11:45:51] <Amadiro> yeah
[11:46:01] <rue_house> why dont you just program te avr for what youwant to do
[11:46:06] <rue_house> or get something arm based?
[11:46:25] <rue_house> if you want it to walk and talk like a PC, get a PC
[11:46:39] <Amadiro> rue_house, if it can't execute from the SDRAM, that'd be what I do
[11:47:20] <rue_house> if you want falling edges you AND Change with oPINB instead
[11:48:25] <Horologium> as I recall from reading docs, xmega chips can execute from SRAM.
[11:50:16] <Amadiro> Horologium, neato.
[11:50:34] <Horologium> the xmega chips are a different world from the early tiny and mega chips.
[11:50:52] <Horologium> problem I have with them is they don't come in dip package so can't easily breadboard them.
[11:51:45] <Horologium> and, would love to continue, but gonna go afk for a while. must go mow.
[11:54:43] <rue_house> I'v not been coding enough, this isn't going togethor fast enough
[11:55:00] <rue_house> heh
[11:56:32] <rue_house> SIGNAL (SIG_INTERRUPT0) { //!!!???!!! PCINT0
[11:56:32] <rue_house> tPINB = PINB; // always snapshot first
[11:56:32] <rue_house> Change = tPINB ^ oPINB; // find pin changes
[11:56:32] <rue_house> Change &= tPINB; // this will now just be high edges
[11:56:32] <rue_house> if (Change & 0x01) stepMotor1(tPINB & 0x10); // filter out rising edges for motor 1
[11:56:32] <rue_house> if (Change & 0x02) stepMotor2(tPINB & 0x20); // filter out rising edges for motor 2
[11:56:34] <rue_house> oPINB = tPINB; // update state tracking.
[11:56:36] <rue_house> }
[11:58:40] <RikusW> Amadiro: AVR32 can execute from RAM
[11:59:15] <Amadiro> RikusW, which RAM, internal SRAM or external SDRAM?
[11:59:56] <RikusW> I think both, not entirely sure
[12:00:06] <RikusW> afaik xmega execute from flash only
[12:01:30] <RikusW> the at32uc3a3256 got 64k of RAM
[12:02:44] <Amadiro> RikusW, well, the AVR32 are kinda over-proportioned for my purposes, I was looking into making a GPIO controller (for lighting purposes) that would accept an SD card with a lighting program on it -- but I guess I'll just go with an atmega that instead of instructions reads commands from the SD card or so
[12:03:16] <Amadiro> Doesn't really matter much, either solution would probably work fine
[12:04:59] <RikusW> commands == bytecode ? ;)
[12:05:38] <Amadiro> RikusW, that was the plan for the former solution, yes
[12:06:03] <Amadiro> but if I can't execute from some somewhat-larger space like external SDRAM, it'd be a tight fit and probably easier to just have it run an interpreter
[12:06:42] <Amadiro> although the audio capabilities some of the AVR32s have seem interesting, I should probably at least have a look at that
[12:11:56] <Amadiro> the datasheet of the AVR32s says it can execute from external SDRAM, so that's good to know.
[12:12:45] <Amadiro> the AT32UC3A0128AU specifically
[14:05:56] <Horologium> should be able to do that with an atmega. just put a file on the sd card that has a script or set of lighting commands...and have a program to read and run that script.
[14:06:21] <Horologium> shouldn't be difficult to write a simple interpreter to read line by line and execute.
[14:06:29] <Horologium> light 1 on
[14:06:34] <Horologium> light 3 off
[14:06:40] <Horologium> wait 500 seconds
[14:06:43] <Horologium> light 3 on
[14:06:48] <Horologium> light 4 on
[14:06:51] <Horologium> that kinda thing.
[14:09:13] <Horologium> heck, there are even a couple of avr based basic interpreters out there that could be used for it, giving you full loop and conditional input control.
[14:27:54] <Amadiro> Horologium, yeh, that'll probably be the solution I'm going with, although auto-generating code from description-files and running that probably would be more fun :)
[15:17:18] <Hotroot> Hello. I'm new to AVR's. The Atmel chips seem neatest to me, but I only have a Parallax Board of Education. Can I still program Atmel chips with it?
[15:18:05] <Hotroot> It's this one, but serial not usb. http://www.robotshop.com/parallax-board-of-education-carrier-board-usb-version.html
[15:30:35] <Amadiro> Hotroot, probably not. What kind of chips were you planning on using?
[15:31:23] <Amadiro> the parallax board looks like it's really just a USB-to-rs232 converter, so you'd need a bootloader on the chip like f.ex. the arduino to use it to program it
[15:32:48] <Hotroot> Amadiro: I was think Attinys
[15:34:10] <Amadiro> Hotroot, then I guess you can either go the "barebones" route and got some or other form of programmer (30$ for the one from Tom_itx) or use something like the digispark that comes with a usb bootloader (a little easier to get started with, and you don't need to make your own circuit, but wastes a lot of space that you can't use)
[15:34:40] <Amadiro> Hotroot, if you're willing to make your own board (like on a breadboard or veroboard) I'd recommend you to just get a programmer and go from there
[15:35:02] <Hotroot> So what is the Parallax board intended for?
[15:35:30] <Amadiro> ...parallax CPUs, presumably?
[15:35:44] <Hotroot> Okay, so it's a per brand thing
[15:35:49] <Amadiro> which have, as far as I know, absolutely nothing in common with AVR chips
[15:36:28] <Hotroot> Ah
[15:36:29] <Amadiro> Hotroot, well, each chip wants to be programmed in a different way, even chips from the same brand (like atmel) don't always use the same protocol -- for instance xmegas use PDI (I think) and attinys use SPI or so
[15:37:16] <Hotroot> Yeah, that makes sense. So what's the simplest way to go for Attinys. Is there a method where I can just attach the chip to something that has a USB cable?
[15:38:09] <Amadiro> Hotroot, the alternative is to have a "bootloader" on your chip, which is run when the chip first starts up (instead of your program being run immediately) and then that bootloader listens for a few seconds for a programmer (like via USB for example). If it then gets sent new code via USB or so, it will program the chip itself, without overwriting itself
[15:39:01] <Amadiro> Hotroot, many of the attinys are extremely small chips and none of them have USB devices, but you can do it (by bitbanging the usb bus), and that's what the digispark does, to my knowledge
[15:39:19] <Amadiro> Hotroot, but the smaller attiny chips will probably be too weak to handle usb at all, so the only way to program them is using a programmer
[15:39:25] <Hotroot> I know they don't have direct USB ports, I meant a chip they attach to
[15:39:40] <Amadiro> Hotroot, well, yeah, that exists too
[15:39:46] <Amadiro> Hotroot, that's basically the programmer
[15:40:11] <Hotroot> I'm new to circuitry, etc. still learning that stuff, but not to programming, so I'd prefer something simple
[15:40:35] <Amadiro> Hotroot, well, do you want to make your own circuits? (they're not particularly complex for an attiny...)
[15:41:35] <Hotroot> Slightly confused. The chips will be used in circuitry projects.
[15:41:56] <Hotroot> I assume you mean the other programming method?
[15:42:21] <Amadiro> Hotroot, I mean, do you want a ready-made solution where the chip is soldered onto some board (like the digispark or the arduino) or do you want to set the chip into your own circuit?
[15:42:58] <Hotroot> Oh, no, my own circuit
[15:43:20] <Hotroot> I just mean for programming methods I'd prefer something simple
[15:43:38] <Amadiro> Hotroot, then I'd recommend you to get a programmer like an avrisp(-clone) or so, like this one for example: http://tom-itx.dyndns.org:81/~webpage/commerce/commerce_index.php
[15:43:55] <Amadiro> Hotroot, you can program them however you like, they're usually programmed in C.
[15:45:08] <Hotroot> Err, you mean the Atmels?
[15:45:26] <Hotroot> Or is custom code required for the USB device?
[15:46:20] <Amadiro> Hotroot, the programmer I linked you is "plug and play", you just connect it, wire it up to the chip correctly, and then you can use it to transfer your code to the device using avrdude.
[15:46:54] <Hotroot> Okay, excellent, that's what I'm looking for
[15:47:36] <Hotroot> Is that about the price range I'm looking at for one? $30 with case?
[15:48:49] <Amadiro> Hotroot, well, that's a self-made clone, the original ones from atmel cost mole like 300$
[15:48:57] <Hotroot> Oh wow
[15:49:49] <Hotroot> This one will do the whole Attiny range? Also, I only see a 6 pin connector. Do the higher pin chips only need that many to program, or is it limited to small pin Atmels?
[15:50:03] <Amadiro> looks like the new JTAGICEmk3 has actually gotten cheaper, it only costs 270$
[15:50:42] <Amadiro> Hotroot, if I'm correct, I believe that one will program all chips from the attiny, atmega and xmega range, but not, say, the AVR32 ones. You can ask Tom_itx for details, he made that one.
[15:51:36] <Hotroot> So everything 8 or 16 bit essentially?
[15:52:04] <Amadiro> Hotroot, yes, anything that is programmed via ISP, PDI or TPI.
[15:52:47] <Hotroot> Excellent
[15:54:04] <Amadiro> Hotroot, bigger chips (MPUs, CPUs, larger MCUs etc) are usually programmed via JTAG, so there kinda is a standard there, but I think only the xmegas and up support that, the attinys are basically too primitive and have too few pins.
[15:54:12] <Hotroot> Thank you very much. I'll probably be in here every so often. I had no idea chips like this existed, it blew my mind last night.
[15:54:42] <Hotroot> I'm not really interested in stuff above an attiny, their inexpensiveness is what intrigues me
[15:54:56] <Hotroot> So this programmer should be fine
[15:55:06] <Amadiro> Hotroot, you can get bigger chips for quite cheap as well, depending on the options, how popular they are and how many you buy
[15:56:35] <Amadiro> Hotroot, I have btw no clue whether the device I linked you supports in-circuit debugging and such (I haven't tried it myself yet), that might be something worth looking into
[15:58:25] <Hotroot> Wow, you weren't kidding, $5 for a single 32 bit 48 pin
[15:59:17] <Amadiro> Hotroot, meh, you can get much larger chips for much cheaper than that too, if you just look hard enough (and don't necessarily limit yourself to atmel ones)
[15:59:21] <Hotroot> I wasn't really expecting debugging features, that's fine
[15:59:40] <Hotroot> Atmel is the preferred brand for most though, right?
[16:00:15] <Amadiro> Hotroot, as far as MCUs go, atmel and pic are usually the chosen ones. I originally started programming MCUs with pics, but the AVR architecture is somewhat prettier IMHO
[16:00:36] <Amadiro> Hotroot, but both have excellent lineups, and if you allow yourself to use both, you'll usually find the right chip for the right occassion for the right price no matter what
[16:01:09] <Amadiro> Hotroot, but there are others too, like for instance TIs MSP430 line, which is traditionally the "low-power" MCU, and then there is the whole gigantic slew of ARM-based ones
[16:01:46] <specing> Amadiro: "somewhat prettier"?
[16:01:49] <specing> LOL
[16:02:16] <Hotroot> Ah
[16:03:25] <Amadiro> Hotroot, if you want to get into low-power ARM MCUs, TI currently has two pretty sweet deals, the https://estore.ti.com/Stellaris-LaunchPad.aspx and the https://estore.ti.com/MSP-EXP430G2-MSP430-LaunchPad-Value-Line-Development-kit-P2031.aspx for instance
[16:03:41] <Amadiro> (the latter one is for MSP430s)
[16:04:11] <specing> ordered two of the first and have one of the second in my drawer
[16:04:16] <Amadiro> for 4.30$ you get the board, two chips, pin headers, extra crystal and a usb wire, so pretty sweet deal -- and the board allows you to do on-board debugging, dumping registers and such.
[16:04:32] <Amadiro> microchip also has a whole slew of dev and evalboards similar to that for their PIC line.
[16:05:09] <Hotroot> I'm just interested in the tiny ones for now =)
[16:06:02] <Amadiro> Hotroot, looks like the AVR Dragon can debug attinys, but I haven't tried it myself
[16:06:21] <specing> dragon costs $50
[16:06:24] <Hotroot> The instruction set for all the attinys is basically the same right, some just have less instructions?
[16:06:37] <specing> the MSPs come with a debugger for 4.3$
[16:06:49] <Amadiro> and the dragon is not in-circuit
[16:06:53] <specing> and I believe the debugger also works on Linux, though I haven't tried
[16:07:05] <Amadiro> specing, the MSP one? it does
[16:07:08] <specing> Amadiro: the debug/prog. unit can be broken off
[16:07:33] <specing> again, haven't tried
[16:07:36] <Amadiro> specing, I know, I have like 1 000 000 of them lying around.
[16:07:39] <specing> :D
[16:08:01] <specing> Over 1 000 000 000 000 000 0000 0000 0000 00000 000000 00000 0000 of cool stuff :)
[16:08:01] <Hotroot> Hmm, debugger is tempting
[16:08:18] <specing> Haven't used a debugger with AVRs yet
[16:08:21] <specing> and don't have one
[16:08:29] <Amadiro> Me neither, I never write incorrect code ;)
[16:08:30] <specing> I rather focus on writting 100% perfect code
[16:08:41] <specing> :D
[16:08:59] <Amadiro> Hotroot, you can also always simulate and such, so meh, it's not entirely essential
[16:09:03] <Hotroot> Yeah
[16:09:09] <Amadiro> but it is neat to have
[16:09:13] <Hotroot> Still, breakpoints are nice
[16:09:27] <Hotroot> I'm so new to this and I don't know how far I'll go that I'll probably just get the cheaper one
[16:09:37] <Amadiro> Hotroot, an alternative is to just connect it to a serial line and then print out stuff for debugging.
[16:10:10] <Hotroot> I assume there are emulators though?
[16:10:16] <Amadiro> Hotroot, sure
[16:10:23] <Hotroot> Then I'm good
[16:10:29] <Amadiro> Hotroot, which os are you on
[16:10:38] <Hotroot> Mint atm
[16:10:43] <specing> Haven't used a simulator yet...
[16:11:20] <Amadiro> Hotroot, atmels official suite only runs on windows
[16:11:29] <Amadiro> Hotroot, so unsure whether there's any emulator you can use
[16:11:37] <specing> theres simavr on Linux
[16:11:50] <specing> I've tried it once, wasn't impressed
[16:11:58] <specing> Its basicaly a gdb server
[16:12:24] <Hotroot> I have 7 installed also
[16:12:44] <Hotroot> This is a really complex instruction set
[16:12:49] <Hotroot> For such a tiny chip
[16:13:00] <Amadiro> Hotroot, hardly
[16:13:04] <specing> nah, its easy
[16:13:34] <specing> just go the GCC route and hand-optimize the necessary functions
[16:13:38] <Hotroot> I don't mean hard to learn
[16:14:07] <Hotroot> I just mean it's quite in depth, lots of "unnecessary" instructions it looks like
[16:14:09] <Amadiro> actually, looks like the jtagice3 is only 200$ from atmel directly
[16:15:46] <Hotroot> Why is there a star next to the cycles the load and store instructions take?
[16:15:55] <Amadiro> which document are you looking at?
[16:16:05] <Hotroot> ATtiny13, ATtiny2313, ATtiny25/45/85, ATtiny24/44/84, ATtiny261/461/861 Instruction Set
[16:16:11] <Amadiro> meh, send link
[16:16:21] <Hotroot> It's pretty long
[16:16:24] <Hotroot> http://support.atmel.no/knowledgebase/avrstudiohelp/mergedprojects/avrasm/Html/ATtiny13_Instruction_Set.htm
[16:16:28] <Hotroot> Oh, nvm
[16:16:57] <Hotroot> I figured it was because of the increment time, but even the plain ST and LD have them
[16:17:40] <Hotroot> Weird, never seen different instructions for direct and indirect
[16:26:20] <Hotroot> And last question for now, I see a guide for programming the attiny45. Is that a good starting place for the attinys? Is that a middleground of the instruction set?
[16:30:21] <megal0maniac_afk> Hi all.
[16:30:34] <megal0maniac> My computer has a parallel port
[16:30:38] <OSterver> my does not
[16:30:41] <megal0maniac> So I want to make a DAPA cable
[16:30:42] <OSterver> my has one serial header
[16:31:03] <OSterver> megal0maniac, lol, "trolling" aka Richard's mode? :D
[16:31:09] <megal0maniac> NO!
[16:31:12] <megal0maniac> I'm serious!
[16:31:15] <OSterver> haha
[16:31:18] <OSterver> I'm Sirius
[16:31:19] <megal0maniac> I'm not.
[16:31:20] <OSterver> Sirius Black!
[16:31:23] <megal0maniac> I'm bored
[16:31:25] <megal0maniac> And tired
[16:31:37] <OSterver> I just came from the pub
[16:31:44] <megal0maniac> Been taking pictures of girls all night. :)
[16:31:58] <megal0maniac> 2414 pictures in total
[16:32:28] <megal0maniac> But if I say it was my old high school's matric fashion show, then it sound boring
[16:32:38] <megal0maniac> *sounds
[16:32:52] <megal0maniac> OSterver: I think I need to go to a pub
[16:33:09] <megal0maniac> But going to the recording studio tomorrow morning
[16:33:14] <OSterver> heh
[16:34:08] <megal0maniac> What's the easiest way to debug an AVR, apart from the dragon?
[16:34:14] <OSterver> jtagice mkii
[16:34:17] <OSterver> or jtagice 3
[16:34:19] <OSterver> or emulator
[16:34:36] <megal0maniac> Eh. Was just about to exclude jtag as well. And I want hardware
[16:34:42] <Horologium> Hotroot, attiny and atmega have the same instruction set with the exception of instructions for the onboard hardware multiplier.
[16:34:49] <OSterver> PDI? :D
[16:34:51] <OSterver> debugWire? :D
[16:34:55] <megal0maniac> debugWire
[16:35:01] <megal0maniac> What else can do that?
[16:35:04] <megal0maniac> Only dragon?
[16:35:09] <OSterver> only JTAG, PDI, dW can do debug
[16:35:17] <Horologium> doesn't the dragon just do jtag?
[16:35:20] <OSterver> only JTAGICE mkII/JTAGICE 3/Dragon
[16:35:23] <megal0maniac> I know. But what else can do debugwire
[16:35:24] <OSterver> can do all of these
[16:35:26] <OSterver> I think
[16:35:27] <specing> Anyone figured out how to get to the "orders" page from the TI login yet?
[16:35:39] <OSterver> specing, no
[16:35:41] <Hotroot> Horologium: So all the attiny's use the exact same instruction set?
[16:35:46] <OSterver> I just search my emails to get direct link
[16:35:47] <Horologium> Hotroot, yes.
[16:35:50] <OSterver> Hotroot, pretty much
[16:35:51] <Hotroot> Ah, cool
[16:35:52] <OSterver> BUT
[16:36:03] <OSterver> there are not some instructions!
[16:36:04] <megal0maniac> waits for xmega rant
[16:36:09] <specing> OSterver: k
[16:36:15] <OSterver> on smaller tinys it lacks long jumps
[16:36:33] <OSterver> also on the tiniest tinies it lacks R0-R15 registers :)
[16:36:40] <OSterver> only the upper register is available
[16:36:43] <OSterver> registers are*
[16:36:53] <Hotroot> Different registers is fine
[16:36:56] <Hotroot> Lacks long jumps?
[16:37:09] <Horologium> long jumps are for making jumps across larger areas of memory.
[16:37:19] <OSterver> yes
[16:37:21] <Horologium> if you don't have the larger memory, long jump is not necessary.
[16:37:23] <OSterver> regular "RJMP" is relative jump
[16:37:26] <OSterver> exactly
[16:37:34] <OSterver> rjmp does +-127 words
[16:37:53] <OSterver> and since the flash can be 256 words or 512 words, it is not worth the extra space on the layout of the chip
[16:37:55] <megal0maniac> Hotroot: http://www.atmel.com/images/doc0856.pdf
[16:38:04] <specing> more
[16:38:16] <specing> rjmp can do +-4096 words afaik
[16:38:20] <Hotroot> Okay, so it's something obvious, a specific jump instruction I wouldn't want to use
[16:38:21] <OSterver> huh?
[16:38:41] <specing> OSterver: 2**12 = 4096
[16:38:45] <megal0maniac> Well not on chips which don't have it
[16:38:47] <specing> still 4 bits left for the opcode
[16:39:09] <specing> OSterver: go check the IS if you do not believe me
[16:39:17] * Horologium pats his trusty atmega1284p and avr-gcc.
[16:39:38] <megal0maniac> Horologium: Finally someone else with a 1284p :P
[16:40:24] <Horologium> couple dozen of them in the box here.
[16:40:32] <Horologium> got them for about 6 USD each.
[16:40:37] <Horologium> love them...lots
[16:40:41] <Horologium> 16K sram!
[16:41:00] <OSterver> specing, could be
[16:41:04] <Horologium> working on a basic interpreter for them. reworking the commodore 64 basic.
[16:41:05] <OSterver> I thought it was only 8bits :)
[16:41:08] <OSterver> also 2**12
[16:41:11] <OSterver> remember that the upper bit is +-
[16:41:20] <OSterver> so you have only 2^11
[16:42:01] <Horologium> 128k flash, 16k sram, and 20+ times faster than the c-64 sitting here on my bench.
[16:42:18] <Horologium> all in a 40 pin dip package.
[16:42:23] <Horologium> what's not to love about it, eh?
[16:42:32] <Hotroot> Amazing to think the cheapest of these chips are faster than the NES
[16:42:37] <Horologium> oh, and they are pin compatible with the older atmega16 and atmega32 chips.
[16:42:37] <specing> OSterver: that still leaves 3 bits for the opcode ;D
[16:42:45] <OSterver> but emulating NES takes very fast CPUs
[16:42:50] <OSterver> specing, mkay
[16:43:07] <Horologium> I had several mega16 and 32 based dev boards and upgraded them.
[16:43:12] <Hotroot> I know, I'm not talking emu
[16:43:13] <megal0maniac> Horologium: What always amazes me is the fact the c64 has a heatsink (iirc) and most of the AVRs generate practically none
[16:43:28] <OSterver> PC-2k+1 and PC+2K
[16:43:29] <Horologium> my c64 doesn't have a heatsink on the cpu.
[16:43:29] <OSterver> words
[16:43:30] <specing> you can run Linux on an AVR now
[16:43:31] <Horologium> does on other chips.
[16:43:32] <OSterver> says instruction set
[16:43:37] <OSterver> specing, you can emulate ARM*
[16:43:39] <Horologium> specing, yeah, saw that....
[16:43:41] <specing> OSterver: close enaugh :D
[16:43:45] <OSterver> enough*
[16:43:45] <Horologium> even considered trying it.
[16:43:47] <OSterver> :P
[16:43:53] <Horologium> but not patient enough to wait for a 4 hour bootup.
[16:43:57] <Hotroot> Just funny thinking that expensive console's CPU is now <$.75
[16:43:58] <OSterver> I will update it to xmega code, it will be much faster
[16:44:02] <megal0maniac> Horologium: Well an AVR can do the job of most of those chips. Except the power stuff, obviously
[16:44:04] <specing> Horologium: Gentoo would boot in 2h
[16:44:07] <specing> Im sure
[16:44:23] <OSterver> with xmega I can do DMA to load data from SD card, external memory is built in
[16:44:24] <specing> Also xmega+ebi would remove the ram refresh and access overhead
[16:44:28] <OSterver> aye
[16:44:31] <OSterver> xboard ultra :)
[16:44:40] <Casper> some avr are able to do power regulation...
[16:44:42] <Casper> ...
[16:44:44] <Casper> ...
[16:44:47] <Casper> hmmm
[16:44:47] <specing> ?
[16:44:48] <Horologium> working on converting c64 basic to the avr...have considered just making a 6502 interpreter for it.
[16:45:01] <megal0maniac> Casper: You talking about 3v3 on the USB chips?
[16:45:06] <Casper> need to find out which one it was, might actually decide to use them...
[16:45:10] <megal0maniac> Because that's like... 50mA or something
[16:45:28] <Casper> megal0maniac: no, some can be used as a SMPS
[16:45:47] <Horologium> Casper, heck, most can...at least the ones with a comparator onboard.
[16:45:53] <Horologium> which is, I think, most atmega chips.
[16:45:54] <Casper> I need to find out which one does
[16:46:01] <Casper> Horologium: no, you need fast PWM
[16:46:03] <Horologium> some of them are made for it though.
[16:46:07] <Casper> so need a PLL
[16:46:08] <megal0maniac> Casper: Or DAC
[16:46:14] <OSterver> http://www.youtube.com/watch?feature=player_embedded&v=0DRZBj_KRwY
[16:46:14] <OSterver> LOL
[16:46:18] <OSterver> because finger is too mainstream
[16:46:21] <Casper> DAC is WAY too slow
[16:46:23] <OSterver> I can't wait for it
[16:46:30] <OSterver> 1MSPS
[16:47:03] <Horologium> so, has the arduino craze pushed through here?
[16:47:12] <OSterver> it is pushed from here
[16:47:15] <OSterver> to ##arduino
[16:47:17] <OSterver> or #arduino
[16:47:31] <Horologium> I know round this area it's all the buzz.....and I've been showing them how to do everything without the ardueeny stuff.
[16:47:40] <megal0maniac> Horologium: Some people here seem to think that they're "above" arduino
[16:47:47] <Horologium> hehe.
[16:47:56] <megal0maniac> And then make arduino compatible dev boards :)
[16:49:10] <OSterver> :P
[16:49:20] <Horologium> I just wish pascal stang had finished his avrlib rather than leaving it hanging.
[16:49:36] <Casper> ow well, back to plan A... avr based smps isn't great (too slow)
[16:49:39] <Horologium> would have been much better than arduino in my opinion.
[16:50:24] <Horologium> just source an smps chip or three from maxim.
[16:50:29] <megal0maniac> Horologium: There's a lot of stuff based on avrlib
[16:50:50] <Horologium> megal0maniac, avrlib, and not avr-libc, yes?
[16:51:04] <megal0maniac> Horologium: Yes.
[16:51:09] <Horologium> I've been kind of out of the scene for a few years. last I saw, avrlib was kind of left hanging.
[16:51:09] <megal0maniac> By Pascal Stang
[16:51:22] <specing> finally found the page
[16:51:29] <specing> still says waiting to ship
[16:51:54] <specing> Casper: tX5
[16:52:00] <Horologium> looks like the procyon version hasn't been updated in a while.
[16:52:10] <specing> Casper: has 64MHz pwm
[16:52:18] <Casper> specing: avr?
[16:52:24] <megal0maniac> specing: December isn't here yet...
[16:52:28] <megal0maniac> Casper: TI :P
[16:52:31] <specing> Casper: tinyX5
[16:52:40] <specing> ah yes, TI stellaris
[16:52:47] <megal0maniac> wait what?
[16:52:51] <specing> $5 bags of endless fun
[16:52:52] <megal0maniac> tinyX5??
[16:52:58] <Casper> hmm will have a look, but I think I found something very interresting here, that might actually be quite good...
[16:53:04] <specing> tinyX5 has builting 64MHz PLL, yes
[16:53:10] <specing> built-in
[16:53:33] <OSterver> too bad you can't run PWM on xmega from fclk2 or fclk4 :(
[16:53:35] <Casper> tinyx5 show no result on digikey, do you mean the 45 and alike?
[16:53:42] <OSterver> yesw
[16:53:43] <OSterver> yes
[16:53:46] <OSterver> 25, 45, 85
[16:53:56] <specing> OSterver: the stellaris is meant for industrial control
[16:53:59] <Casper> I'll check them too
[16:54:03] <specing> 80MHz PWM anyone? :D
[16:54:09] <megal0maniac> Oh!
[16:54:13] <megal0maniac> I understand
[16:54:23] <megal0maniac> I have tiny85 :)
[16:54:25] <OSterver> what is the output bandwidth of any GPIO?
[16:54:31] <Casper> thing is... I'll need a variable buck regulator, so avr based could be good... could
[16:54:32] <OSterver> it used to be awful on older ARMs
[16:54:41] <OSterver> (Except external memory pins of course)
[16:54:42] <megal0maniac> I was thinking tinyX5 as in atxmega, but tiny
[16:54:47] <OSterver> lol
[16:54:49] <OSterver> would be nice tbh
[16:54:57] <OSterver> Casper, same here :P
[16:55:09] <megal0maniac> The die could be small enough...
[16:55:09] <OSterver> but you can go for programmable resistor
[16:55:17] <OSterver> in the fb
[16:55:24] <OSterver> and hook it onto I2C/SPI
[16:55:25] <Casper> http://partsparty.com/use-tl494-to-do-400w-high-power-voltage-regulator-inverter-circuit-diagram-1/ ← is what I found
[16:55:42] <Casper> my main issue is: 10-16Vin, 12V out 5A
[16:55:57] <Casper> once I find that, the buck section will be a piece of cake
[16:56:09] <OSterver> <Casper> my main issue is: 10-16Vin, 12V out 5A
[16:56:13] <OSterver> so you want both buck-boost?
[16:56:17] <Casper> yes
[16:56:33] <megal0maniac> Casper: The writing in that article is horrible
[16:56:54] <OSterver> translator :)
[16:57:03] <OSterver> " the highest oscillation frequency up to 300kHz, both to drive bipolar sexual switch, additional sink current path, but also driven MOS FET switch."
[16:57:04] <Casper> buck-boost IC are only avail in smt, with reference with hard to impossible to hand solder components
[16:57:14] <OSterver> SMT is easy to hand solder
[16:57:16] <OSterver> unless you have BGA
[16:57:24] <Casper> or exposed pad
[16:57:55] <Casper> and in case of a failure, it's close to impossible to fix
[16:58:05] <OSterver> hotair yo
[16:58:40] <megal0maniac> OSterver: What tools did you use for xboard? That's my next investment. Tools for SMT
[16:58:55] <Casper> but this circuit make me think to return to forward or flyback...
[16:59:03] <OSterver> megal0maniac, my soldering station :)
[16:59:13] <OSterver> soldering iron + hotair gun in one
[16:59:17] <Casper> the isolation is interresting
[16:59:20] <megal0maniac> Link?
[16:59:32] <OSterver> it is some chinese stuff I got from some czech ebay-like website from some polish guy
[16:59:39] <OSterver> when I try searching for it I don't get any other results
[16:59:42] <megal0maniac> Haha
[16:59:52] <OSterver> it has got the "compressor" in the base though, not in the handle
[17:00:00] <OSterver> air pump*
[17:00:54] <OSterver> which is IMHO better
[17:01:08] <OSterver> you can hold the hotair gun much better
[17:01:11] <OSterver> and anyhow
[17:01:15] <OSterver> in any way*
[17:01:19] <OSterver> and it is smaller :P
[17:01:33] <OSterver> the soldering iron is 40 or 50W?
[17:01:35] <OSterver> not sure
[17:01:47] <OSterver> I need to modify it to allow it to go to lower air speeds though
[17:01:52] <OSterver> the minimum is still too much
[17:02:36] <megal0maniac> OSterver: http://capetown-westerncape.gumtree.co.za/c-Home-Garden-DIY-tools-Magnum-3004-hot-air-station-W0QQAdIdZ414847101
[17:03:03] <OSterver> where is the hot air? :)
[17:03:09] <megal0maniac> Or even http://www.magnumproducts.co.za/3004.html
[17:03:10] <OSterver> I paid for mine like $100 I think
[17:03:26] <OSterver> yay for vacuum pickup
[17:03:33] <OSterver> hmm that is not a bad idea
[17:03:50] <OSterver> but - I am searchign for some usable motor for a go kart :)
[17:03:58] <OSterver> preferably electro motor
[17:04:16] <Horologium> I do so wish atmel would put out an avr that has sram for the program memory in a dip package chip.
[17:04:29] <OSterver> and how would you bootstrap it?
[17:04:40] <OSterver> simpler would be just execute from RAM
[17:04:56] <OSterver> but it is not possible based on the architecture - the fact, that they are separated allows it to get such great speeds
[17:05:09] <Horologium> from an external flash or eeprom like some of the usb chips do..or did.
[17:05:44] <OSterver> slow
[17:05:47] <Horologium> I have here, somewhere, a usb avr that has sram for program memory with a flash bootloader.
[17:05:49] <Horologium> err.
[17:05:52] <Horologium> with a usb bootloader
[17:06:36] <Horologium> it's an older usb chip...in a tqfp100 package as I recall.
[17:07:07] <OSterver> I can't recall there ever being any AVR MCU with execute from RAM
[17:07:14] <OSterver> just because the core arch is still the same
[17:07:18] <OSterver> and the core idea
[17:07:31] <OSterver> let alone with USB
[17:07:52] <OSterver> I thought about doing .NET VM for AVR :)
[17:07:57] <OSterver> because netduino
[17:08:17] <OSterver> specing, can the cortex m4f execute from ram?
[17:09:03] <specing> no idea
[17:09:03] <OSterver> afk 20 mins
[17:09:05] <specing> probably
[17:09:12] <OSterver> well cortex m* usually does not allow it
[17:09:14] <OSterver> afk!
[17:09:20] <specing> D:
[17:10:50] <Horologium> aahh..wasn't usb avr...it was the avr with the attached fpga on the same die.
[17:10:52] <specing> http://stackoverflow.com/questions/3044010/how-do-i-execute-a-function-from-ram-on-a-cortex-m3-stm32
[17:11:02] <specing> m3 seems to be able to do it
[17:11:10] <specing> I'd expect a M4F monster to do so too
[17:11:46] <megal0maniac> Off to bed :) Bye
[17:14:49] <Sur3> hi, does the ATmega automatically change the polarity of the pins? because i connected a 7seg-display to only the C-Port, even the ground but it lit!?!?
[17:16:26] <Sur3> normally i thought the pins are only positive and i have to use a transistor to connect the 7seg ground to the pin, but it worked just without
[17:19:40] <karlp> of course cortex allows execute from ram.
[17:32:12] <OSterver> karlp, hmm
[17:32:52] <karlp> it's how most flash tools work forstarters.
[18:27:34] <Horologium> Sur3, the atmega pins can either source or sink current.
[18:27:52] <Horologium> meaning, they can either provide 5V output or the pin can connect to GND.
[18:28:06] <Horologium> 5V or 3.3V or whatever you are running the circuit at.
[18:39:43] <Casper> I'm back
[18:40:03] <Casper> OSterver: are you good with smps?
[19:03:11] <Richard_Cavell> megal0maniac_afk: hiya
[19:03:18] * Richard_Cavell has had a good sleep
[19:04:28] * Casper throws back Richard_Cavell to bed
[19:04:36] <Richard_Cavell> lol
[19:07:18] <Casper> trying to use ltspice... part #1... can'T find it...
[19:08:35] <Richard_Cavell> Mate I'm still trying to get my frigging parallel port to work
[19:08:47] <Casper> Richard_Cavell: http://imgur.com/LfLVz ← to maybe wake you up :P
[19:09:11] <Richard_Cavell> that is just gross
[19:10:07] <Casper> yeah... but the story is that the person wasn'T even feeling it...
[19:10:12] <Casper> which is hard to beleive
[19:13:37] <Richard_Cavell> might be a diabetic
[19:34:26] <Sur3> ah thx Horologium
[19:35:17] <Sur3> but it seems the ATmega chooses itself if it is sink or source? can i also tell it not to??
[19:40:33] <Sur3> ahhh wait, you meen its an xor, so if it is not on, then it is automatically ground and not completely cutted, did i understand it now?
[19:50:39] <Horologium> Sur3, on the avr, pins are either GND or VCC if they are set as output.
[19:55:41] <Sur3> k, thanks. so that means the avr can't cut the connection of a pin completely?
[19:57:03] <Horologium> if you set the pin as input then it effectively floats.
[19:57:14] <Horologium> more or less.
[19:57:27] <Sur3> ah ok thanks
[19:57:59] <Horologium> if you need a real disconnect I would use a FET.
[19:59:11] <Sur3> ah ok already thought about a transistor, think thats waht i'll do then, thx
[20:00:15] <Horologium> what are you trying to control with it?
[20:00:58] <Horologium> nevermind...7 seg displays..
[20:01:23] <Horologium> you can just drive them with the output pins easily enough...
[20:02:18] <Horologium> long as you just drive one segment per pin.
[20:04:39] <Horologium> just remember the 20mA per pin and 100mA total per port.
[20:08:37] <Hotroot> "Self Program Memory:YES" What is this?
[20:08:41] <Richard_Cavell> megal0maniac_afk: well I guess my DAPA cable is useless to me
[20:09:34] <Horologium> Hotroot, it means the chip can write to its own flash.
[20:10:19] <Hotroot> So I can read program memory?
[20:10:22] <Hotroot> Write too?
[20:10:55] <Horologium> there are some gotchas for writing to program memory from within a program on the chip, but, yes, it can be done.
[20:11:02] <Horologium> and reading program memory is doable as well.
[20:11:12] <Hotroot> I doubt I'll ever need to
[20:11:29] <Horologium> self programming is usually just done in bootloaders.
[20:11:32] <Hotroot> How do you figure out the output power of each pin?
[20:11:46] <Horologium> which, as I recall, it can only be done from bootloader section of memory.
[20:11:56] <Horologium> you figure the current draw of the circuit connected to the pin.
[20:12:11] <Horologium> P=IE...power = current times voltage.
[20:12:11] <Hotroot> Sorry, still learning EE. Not sure if I'm phrasing it right.
[20:12:39] <Horologium> first week electronics 101.
[20:13:09] <Hotroot> Yes, I'm very new to circuits.
[20:14:07] <Hotroot> Okay, nevermind, I see what you mean now. Still trying to wrap my head around some things.
[20:15:17] <Horologium> in practice, without doing the math, it is possible to drive 8 LEDs on a port(8 pins) through 330ohm resistors.
[20:16:05] <Horologium> this is a standard setup I use for testing.
[20:16:16] <Horologium> it draws more current than is generally needed but it works.
[20:17:07] <Hfuy> Hello.
[20:17:15] <Horologium> hi Hfuy
[20:17:43] <Hfuy> I have here an ATtiny13A which I suspect has had its fuse bits, well, corrupted. It won't connect to the programmer, and by its behaviour it seems as if the clock/8 bit is set.
[20:17:55] <Hfuy> I understand there's some sort of procedure for recovering them when they're in this state; any suggestions?
[20:18:12] <Horologium> hmm...tiny13....
[20:18:16] <Horologium> let me google that.
[20:19:00] <Horologium> yes, use high voltage programming mode.
[20:19:17] <Horologium> http://www.pe0fko.nl/Fuse-restore/
[20:19:23] <Hfuy> I don't think the programmer I have supports that.
[20:19:39] <Horologium> that link shows how to make one.
[20:19:45] <Horologium> and the software to run it.
[20:19:51] <Hfuy> I see.
[20:20:01] <Horologium> do you have an avrdragon?
[20:20:48] <Hfuy> No. I'd probably prefer to buy a programmer capable of doing this.
[20:21:21] <Horologium> avrdragon is a programmer capable of it.
[20:22:24] <Hotroot> What exactly is the broken state he's talking about, because I'm considering getting the dragon instead of a cheaper programmer
[20:22:44] <Hfuy> I suspect it's got corrupted fuse bits.
[20:22:52] <Horologium> Hotroot, it is possible to program the fuses in several different ways as to make the chip unprogrammable.
[20:23:05] <Horologium> at least, unprogrammable via standard LVSP mode....
[20:23:15] <Hfuy> I base this suspicion on the fact that it's visibly running at one-eighth normal speed, and doesn't respond to the programmer.
[20:23:22] <Hfuy> But I don't absolutely know.
[20:23:33] <Horologium> HVSP bypasses the fuse settings and puts the chip into a mode where the fuses can be reset.
[20:23:41] <Hotroot> So certain of the pins aren't accepting input?
[20:23:56] <Hotroot> Bah, I need to know this better.
[20:24:13] <Horologium> Hotroot, with the avr, you need a clock source for programming.
[20:24:27] <Hotroot> Right
[20:24:28] <Horologium> from the factory they are programmed to 1MHz internal clock.
[20:24:30] <Horologium> which works fine.
[20:24:32] <Sur3> 10mA per Port, ahh thats why its not that bright if i light all leds together, already wondered xD
[20:24:37] <Sur3> *100mA
[20:24:40] <Horologium> it is possible to screw that setting up so you can't program it.
[20:25:00] <CapnKernel> Sur3: Max of 40mA per pin, max of 100mA per port, max of 200mA for the whole chip
[20:25:18] <Horologium> HVSP mode is similar to the PIC programming system that requires a higher voltage on the reset line to put the chip into a special programming mode.
[20:25:21] <Hotroot> So basically the processor / clock isn't correctly doing what it should when power is applied, as it normally would
[20:25:28] <Sur3> k, so i really need transistors ^^
[20:25:34] <Horologium> Hotroot, yes.
[20:26:06] <Hotroot> So you hit it with a higher amount of power, and this somehow gets the CPU/clock back to normal?
[20:26:17] <Horologium> if done properly, yes.
[20:26:47] <creep> somebody tried atmega8 with a 16.00MHz quartz crystal?
[20:27:02] <Horologium> creep, yeah, should work fine at 5V.
[20:27:04] <creep> datasheet says it only supports resonator above 8MHz
[20:27:13] <creep> ;/
[20:27:15] <Hotroot> Gotcha. I thought I was good on low level stuff after the amount I learned about CPU/RAM, but with these chips, I'm terribly underknowledgable
[20:27:19] <Horologium> resonator or crystal?
[20:27:31] <creep> eramic resonator
[20:27:35] <creep> *ceramic
[20:28:03] <Horologium> ceramic resonator is different from crystal, so, yeah...very possible 8MHz is top on ceramic resonator.
[20:28:04] <creep> but i don't really see a reason why it shouldn't work with a quartz crystal
[20:28:12] <Horologium> but 16MHz crystal works.
[20:28:16] <creep> ok thanks
[20:28:22] <creep> then its error in ds
[20:28:29] <Horologium> I've run them at 16MHz with crystal many times.
[20:28:53] <creep> atmega48 is the next version, and ds is different
[20:29:18] <Horologium> I prefer the newer chips when I can get them...go faster.
[20:29:28] <Horologium> I run atmega88 and atmega1284p at 20MHz.
[20:29:55] <Horologium> http://support.atmel.no/knowledgebase/avrstudiohelp/mergedProjects/AVRDragon/AVRDragon_HVSP_Description.htm for Hotroot
[20:29:57] <creep> yeah, i just have 2 atmega8 from old ESC, and i'm making hid device with them with analog inputs and buttons
[20:30:31] <Horologium> should run fine with a good crystal.
[20:30:44] <Horologium> I've used them for VUSB before.
[20:30:53] <creep> thinking the same ;)
[20:30:55] <Horologium> many times in fact.
[20:31:04] <Hotroot> Horologium: Thanks. I have so much to read now, haha.
[20:31:14] <Horologium> dragon is a fun tool.
[20:31:21] <Horologium> I don't play with mine enough.
[20:31:22] <creep> i'm tired of these USB joysticks, they are useless, the deadzone is so large
[20:31:54] <Horologium> creep, ayup...is why I built my own flightsim controls with VUSB and AVR chips.
[20:32:03] <creep> cool
[20:32:12] <Horologium> digital positioning with dials from car radios.
[20:32:16] <creep> hehe
[20:32:31] <Horologium> those dials that spin and spin and spin....are just digital rotary encoders.
[20:32:40] <creep> i am building hall potentiometers for it
[20:32:55] <Horologium> that works too...
[20:33:09] <creep> with 10 bit adc i can have 10 bit resolution
[20:33:12] <Horologium> I like dig-ital.
[20:34:19] <creep> holyou can have digital, but you have to reset/calibrate at poweron, and optical sensors get dirty, digital hall rotary encoders sound nice
[20:34:38] <creep> -hol
[20:35:05] <Horologium> joystick is self centering....self calibrate.
[20:35:24] <Horologium> but, yeah, have to have everything in a known position for calibration.
[20:35:40] <creep> for playing, definitely good
[20:35:53] <creep> what is your resolution?
[20:36:23] <Hfuy> Thanks folks, later
[20:36:46] <Horologium> 10 bit currently....I use gearing between the stick and the encoders.
[20:36:56] <Horologium> which gives a bit of "feel" to the stick too.
[20:37:10] * Tom_itx wonders why so many are still stuck on using atmega8
[20:37:21] <Horologium> Tom_itx, because they have it on hand.
[20:37:29] <Horologium> I know, atmega88 is nicer in many ways.
[20:37:37] <Tom_itx> same thing only better
[20:37:41] <creep> Tom_itx<< because i don't want to order 100 atmega48 now
[20:37:46] <Tom_itx> and probably cheaper
[20:38:05] <Horologium> I am stuck on the atmega1284p myself until they hit me with something better.
[20:38:10] <Tom_itx> you have 100 mega 8's?
[20:38:22] <Horologium> that and this 32bit pic(don't hit me) that I've been playing with.
[20:38:37] <creep> Tom_itx<< no, i took apart 2 old esc and they had atmeg8
[20:38:45] <Tom_itx> i tried the midrange pics and switched to avr
[20:38:54] <Tom_itx> fair nuf
[20:39:10] <Tom_itx> did you find a programmer?
[20:39:11] <Horologium> I've been with AVR for a long time after starting with PIC, like 8 years ago.
[20:39:15] <creep> i started with 89c2051 and failed to program it
[20:39:28] <Hotroot> What does "AVR" cover exactly?
[20:39:29] <Horologium> I love the ds89c450 chips here...
[20:39:47] <Hotroot> So far I've just been looking at the Attiny range, which is what brought me here.
[20:39:49] <Tom_itx> Hotroot, generally here refers to 8 bit avrs
[20:39:52] <Horologium> Hotroot, technically, at90s, attiny, atmega, xmega, avr32...
[20:39:56] <Tom_itx> including attiny and mega
[20:39:59] <creep> i suspected it was because of the tight tolerances of the programming pulse times... that i couldn't achieve under a windows os
[20:40:02] <Horologium> but most people stick with the at90s, attiny, and atmega.
[20:40:10] <Tom_itx> but there are others like 32 bit
[20:40:18] <Tom_itx> or of late the xmegas
[20:40:25] <Tom_itx> like OSterver
[20:40:25] <Hotroot> Okay
[20:40:52] <Horologium> creep, the ds89c450 just uses a serial port for programming...rs232 autobaud...nice little 8052 high speed core chip.
[20:41:41] <creep> Horologium<< i have no problems with atmega8, and alike, 2051 wa in the old times 10 years ago
[20:42:05] <creep> i made my first qp running lights with it
[20:42:09] <creep> *up
[20:42:44] <Tom_itx> i got no real problems with mega8 if you have them however i wouldn't go outta my way to buy any
[20:43:11] <creep> sure, atmega48 is superior
[20:43:39] <Tom_itx> i got a couple 2560's i wish i had a board for
[20:43:56] <Sur3> whats a qp running light? something like in knight rider?
[20:45:45] <Hotroot> So when are the bigger chips much more use than the smaller ones? At what point to you just go to a little ARM mobile computer?
[20:46:04] <Tom_itx> when 8 bit isn't fast enough
[20:46:15] <Hotroot> Is it often just for more pins / RAM?
[20:46:19] <Horologium> Hotroot, I like the bigger chips for robotics.
[20:46:24] <Horologium> more program space.
[20:46:26] <Horologium> more i/o
[20:46:28] <Hotroot> Ah, yeah, robotics makes sense
[20:46:32] <Richard_Cavell> megal0maniac_afk: are you there?
[20:46:42] <Hotroot> I'm just looking at the CPU speeds and not really seeing where you would need that much
[20:46:51] <Hotroot> I suppose it's more likely everything /but/ the spee
[20:46:52] <Hotroot> *d
[20:46:57] <Horologium> and the atmega1284p has a lot of data space,,,16K of SRAM...which makes it great for interpreters.
[20:46:59] <Tom_itx> avr is pretty efficient with clocks
[20:47:24] <Horologium> avr approaches 1MIPS per 1MHZ which is pretty dang good...beats 8bit PIC chips out of the water.
[20:47:33] <Hotroot> I mean because at $30 you hit stuff like the raspberrypi, so I'm just trying to see where this range is
[20:47:33] <creep> where can i find 16MHz xtal? pendrive?
[20:47:50] <Hotroot> Yeah, 1/1 is pretty amazing
[20:47:52] <creep> motherboards have 14.3, 18.432 and things like this
[20:48:05] <Horologium> Hotroot, you look at other things, like power consumption and such.
[20:48:07] <Hotroot> Although looking at the instruction set a lot seem to be 2
[20:48:12] <Tom_itx> creep you are new here, where do you hail from?
[20:48:15] <Horologium> creep, radio shack? (ducks)
[20:48:35] <Horologium> Hotroot, branches and such are 2 or more depending.
[20:48:39] <creep> EU-Hungary
[20:48:44] <Tom_itx> cool
[20:48:45] <Hotroot> I suppose I'm just too new to this to see the full range of applications, because the attiny45 looks pretty ideal to me
[20:48:49] <Horologium> where avr is 2 cycles a pic is 8.
[20:48:52] <creep> you are probably mostly from USA
[20:48:52] <Tom_itx> so is Hotroot
[20:49:01] <Tom_itx> not necessarily
[20:49:04] <Horologium> Iowa, USA here.
[20:49:07] <Horologium> and I'm new here too.
[20:49:10] <Tom_itx> i am but others are located all over
[20:49:10] <Hotroot> I'm from Hungary? 0.o
[20:49:16] * Horologium is just hungry.
[20:49:18] <Hotroot> Is my VPN on?
[20:49:39] <Hotroot> Last I checked I resided in California
[20:49:41] <creep> Hotroot<< yeah that is a british joke
[20:50:27] <creep> i have just eaten ;>>
[20:50:33] <creep> (mission impossible)
[20:50:33] <Hotroot> Is the attiny45 pretty middle of the line in the tiny series?
[20:50:38] <Horologium> Hotroot, for "production" systems I use just enough processor for the job. for playing I use what I have handy which is usually overkill.
[20:51:01] <Horologium> yeah, it's a nice little 8 pin chip...kinda limited for i/o though.
[20:51:24] <Hotroot> Ah. Just trying to find a "standard", it's the way my weird mind works.
[20:51:51] <Horologium> standard is whatever works for the project.
[20:51:57] <Hotroot> Yeah, I see where for what, I was just wondering where you really need more processor.
[20:52:12] <Horologium> more processor, not usually necessarily.
[20:52:14] <Hotroot> And I know nothing is "standard", as I said, it's just how I work.
[20:52:22] <Horologium> but more i/o in one package, or more program or data space.
[20:52:49] <Hotroot> The 45's RAM does kind of blow.
[20:52:59] <Horologium> look at the 85.
[20:53:20] <Hotroot> But it seems like a nice middle of the line
[20:53:22] <creep> who likes xilinx?
[20:53:45] <Tom_itx> they're ok but i haven't done much with em
[20:54:08] <Tom_itx> just messed with a little board for a bit
[20:54:12] <Hotroot> Horologium: Is the 85 just double the ram?
[20:54:23] <Hotroot> sram/eeprom
[20:54:41] <Horologium> Hotroot, yeah.
[20:54:52] <creep> Horologium<< how many axes, what limits do you send to usb?
[20:54:58] <Hotroot> Ah, neat
[20:55:04] <creep> linux does +-32767 scaled
[20:55:39] <Hotroot> Horologium: It's like double the price though =/
[20:56:13] <creep> i'm concerned about latency, but if i send 16 bits for each axis i could apply exponential curve in controller
[20:56:16] <Horologium> creep, the one I just sold had 4 throttles, pedals for rudder, regular stick, and 4 knobs for other things....with 10 bits of resolution.
[20:56:49] <creep> Horologium<< but you have much latency if you send much data ;/
[20:56:49] <Hotroot> So each chip can end with PU, MU, SU, XU, etc. What is that indicating?
[20:56:59] <Horologium> I use 4 AVRs for it.
[20:57:08] <Horologium> one for throttle, one for rudder, one for stick, one for knobs.
[20:57:17] <creep> Horologium<< hmm, and 4 usb connectors?
[20:57:20] <Horologium> so I end up with 4 USB connections through a little 4-port hub.
[20:57:49] <creep> Horologium<< and how do you specify the HID stuff for a pedal to be recognized for example?
[20:57:57] <Richard_Cavell> Anyone here know about the STK600? I turn it on and put on the supplied ATMEGA2560 board, and an LED starts flashing. Is that normal?
[20:58:26] <Horologium> different IDs...and just set it up in x-plane, mapping each axis.
[20:59:06] <Tom_itx> Richard_Cavell i suspect it comes with a pdf or data sheet
[20:59:18] <Richard_Cavell> yes it does but I don't understand most of it (yet)
[20:59:19] <creep> Horologium<< so you send 10 bit limits and physical mapping? or send 16 bits?
[20:59:40] <Richard_Cavell> this is why I said I wanted to do things one step at a time
[20:59:43] <Horologium> sending 16 bits but only using lower 10...
[20:59:45] <creep> hmm, i read that data must be 8 bits
[20:59:54] <creep> ;/
[21:00:21] <Richard_Cavell> does anyone know how to do in system programming with the stk600?
[21:00:39] <Richard_Cavell> I have an STK600 and I have an AVR in a circuit and I want to use the STK600 to program the damn thing
[21:00:43] <Horologium> Hotroot, looking those up..
[21:00:45] <creep> Horologium<< so, if you'd apply scaling then you'd have the +-32767 naturally
[21:00:56] <Horologium> probably creep
[21:01:18] <creep> Horologium<< have you been thinking about adding some exponential functin to your axis?
[21:01:27] <Horologium> nope.
[21:01:33] <Horologium> it would be more realistic if I did.
[21:02:04] <creep> it'd be smoother in the middle allowing much more precise control
[21:02:07] <Hotroot> Horologium: I just mean the extensions under ordering codes here -> http://www.atmel.com/devices/ATTINY45.aspx
[21:02:28] <Tom_itx> Richard_Cavell do you have studio?
[21:02:29] <Hotroot> Speeds and power supply also seem to change
[21:02:40] <Hotroot> I assume the speed is MhZ
[21:02:41] <Horologium> Hotroot, oh, it's package.
[21:02:47] <Hotroot> Err, MHz
[21:02:50] <Tom_itx> Richard_Cavell, it clearly shows it in the Avr Tools help section
[21:02:54] <Horologium> PU is pdip.
[21:03:01] <Horologium> SU is soic
[21:03:06] <Horologium> SUR is soic too.
[21:03:15] <Hfuy> 'ello again.
[21:03:18] <Hotroot> What's the difference to a newbie. Those just companies?
[21:03:33] <Horologium> no...package.
[21:03:42] <Horologium> like, pdip, tssop, soic, mlf.
[21:03:47] <Horologium> not company.
[21:03:51] <Horologium> physical package.
[21:04:08] <Hotroot> Ohh, okay
[21:04:14] <creep> Hotroot<< i prefer tssop, but if you hand solder and you are new, maybe you'd like the pdip more
[21:04:15] <Xark> Horologium: Somebody told me the U means "picopower" (e.g., diff between 328P and 328PU).
[21:04:33] <Hfuy> I've set several pins of PORTB to be inputs (the only reference to DDRB is "DDRB = 1 << PB3"), and also set PORTB = (1 << PB4). I'd expect this to activate the pullup on PB4, but it doesn't seem to work that way.
[21:04:42] <Hfuy> Is there anything else I have to set to get the pullups to work?
[21:05:31] <Hfuy> Or conversely is there anything else I could have inadvertently set that would cause them not to work?
[21:05:55] <Hfuy> I presume I should be able to read the fact that the pin is being pulled high with my scope, but it seems low.
[21:06:55] <Richard_Cavell> Tom_itx: I want to use avrdude
[21:07:19] <Tom_itx> can't help you
[21:07:29] <Xark> Hfuy: I think your DDR is backwards, from datasheet "The DDxn bit in the DDRx Register selects the direction of this pin. If DDxn is written logic one, Pxn is configured as an output pin. If DDxn is written logic zero, Pxn is configured as an input pin."
[21:07:46] <Richard_Cavell> Tom_itx: Don't worry, I'm working on it
[21:08:54] <Hfuy> Yes, I'm setting PB3 to be an output, which should leave all else as inputs, including PB4, which is the one I set the pullup on. Or tried to.
[21:09:28] <Hotroot> The varying package types will all be compatible with the programmers, right? It's just pin length, casing, etc.?
[21:09:37] <Xark> Hfuy: OK. How are you "testing" for pull up enabled? Make sure the pin floats to HIGH?
[21:09:39] <Horologium> Hotroot, correct.
[21:09:49] <Hotroot> Okay, cool
[21:10:08] <Hotroot> So much to learn...
[21:10:16] <Horologium> unless you like soldering surface mount chips, go with the pdip package.
[21:10:35] <Hfuy> Well, I discovered it didn't seem to be properly high by removing my external pullup and noticing that it misbehaves.
[21:10:41] <Hfuy> But then I tried scoping it, and it's low.
[21:10:44] <Hotroot> That will be "PU" right?
[21:10:48] <Horologium> correct
[21:11:33] <Hotroot> I should learn more about EE before getting into this, but unfortunately it's hard to battle enthusiasm
[21:11:35] <Horologium> Hfuy, if it is set to input then it should either be pulled high or tri-stated(effectively), not pulled low.
[21:12:11] <Richard_Cavell> Tom_itx: Can your programmers do ISP?
[21:12:18] <Horologium> Hotroot, datasheet, starting on page 212...
[21:12:25] <Hfuy> Horologium: that's what I'm expecting.
[21:12:27] <Horologium> gives you all the package information.
[21:12:28] <Hfuy> It's a pullup, after all.
[21:14:35] <Hfuy> is this valid, to set bits 2 and 4? PORTB = (1 << PB4) & (1 << PB2);
[21:14:52] <karlp> you probably want | not &
[21:14:57] <Hfuy> d'oh
[21:15:04] <Hfuy> I was in the process of apologising for the stupid question
[21:15:08] <Horologium> that can cause problems.
[21:15:09] <Hfuy> but apparently it wasn't a stupid question.
[21:15:24] <Hfuy> moral of the story: there are no stupid questions, only stupid people who try to write binary logic at 3am.
[21:15:58] <Horologium> Hotroot, that MLF package is a royal pain.
[21:16:23] <Horologium> also known as a QFN or quad flat nolead.
[21:16:26] <Hfuy> Thanks guys
[21:16:58] <Horologium> 4mm square little bitty thingie with no leads..just pads on the bottom.
[21:17:49] <Horologium-afk> bedtime.
[21:20:14] <karlp> what's with all the H names today?
[21:20:22] <karlp> these nicks come in waves
[21:20:31] <karlp> one day it's all C names, one day all Z names.
[21:21:52] <Hotroot> (H)ey
[21:36:50] <NovceGuru> Hello, quick stab in the dark...I'm running the latest version of AVR Studio, I have some code that I (helped) write, that compiles, and runs fine on an atxmega32d4, I changed to the atxmega128d4 in AVR Studio, and now I get all kinds of type errors etc, they are related to the provided port_driver.c/h I think. I'm failing at providing useful details I think
[21:38:57] <Tom_itx> did you change your makefile or target chip?
[21:39:17] <Tom_itx> and change any register names that may be different
[21:40:19] <NovceGuru> I think you change the chip by selecting it with the icon in AVR Studio (could easily be wrong) I think the registers are the same, i'll double check
[21:40:30] <Tom_itx> memory offsets will be different on the 128 so if you didn't change the target chip that may be it
[21:40:50] <Tom_itx> so which are you? novice or guru?
[21:41:12] <NovceGuru> Alright i'll see if it needs change somewhere else
[21:41:16] <NovceGuru> isn't that becoming quite obvious :P
[21:42:35] <Tom_itx> i'm not that familiar with xmega yet
[21:44:59] <Tom_itx> and i don't have studio 6 loaded on this pc
[21:52:09] <NovceGuru> hmm
[22:10:44] <Hotroot> I'm looking at the parameter page for an attiny, but I don't see anything about current or power consumption
[22:12:55] <Richard_Cavell> So am I to take it that AREF is like the reference for +5V, and the AVCC is just to power the analog circuit thingy?
[22:54:01] <CapnKernel> The values that you get out of the ADC are relative to AREF.
[22:55:37] <CapnKernel> If you're powering the AVR at 3.3V and AREF is 3V, then an analog input voltage of 1.5V will give you a reading of 512 (which is half of 1024, as it's a 10-bit ADC)
[22:56:44] <CapnKernel> AVcc exists in order to get higher precision from the ADC. If you tie AVCC to VCC, then noise from the AVR on VCC will create error in the ADC result (bottom 1 or 2 bits)
[22:56:44] <CapnKernel> There's an Atmel design note that shows you how to add filtering so that AVCC doesn't see this noise, so you'll get more accurate conversion.
[22:57:12] <CapnKernel> It's a good idea to have a really good read of this: http://www.atmel.com/images/doc2521.pdf
[23:04:04] <Richard_Cavell> ok thanks
[23:04:17] <Richard_Cavell> If I'm not doing any analogue to digital conversion, do I need to power AVCC/AGND/AREF at all?
[23:05:52] <Casper> AVCC and AGND yes
[23:05:56] <Xark> Richard_Cavell: Yes, I believe you do need to hook it to VCC (at least the "minimal circuits" do so).
[23:06:07] <Casper> but the filter do not need to be there, aref can be left floating
[23:06:16] <Richard_Cavell> ok so I'll power that part of the chip just for completeness
[23:07:04] <Richard_Cavell> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=125414
[23:11:46] <Casper> I want ice cream
[23:37:06] <Hotroot> Does Atmel use 1024 bytes as a kb or 1000?
[23:38:10] <Casper> I'ld say they use 1024
[23:39:49] <Hotroot> They say "Kbyte" so that could mean KB or KiB
[23:41:38] <Casper> check the address range
[23:42:01] <Casper> last time I checked, it ended up on 2^x address
[23:47:34] <Hotroot> Also, I asked this before and nobody answered, but where does it mention current needed?
[23:47:47] <Hotroot> I only see voltage
[23:48:08] <Hotroot> Any power information besides voltage I mean
[23:51:07] <Casper> there is
[23:51:12] <Casper> in the graps somewhere
[23:52:14] <Hotroot> Looking on the parameters page