#avr | Logs for 2012-09-28

Back
[00:00:00] <Eartaker> reason I was saying 20 was this... Runs up to 20MHz with external crystal
[00:00:05] <Eartaker> the mcu itself
[00:00:05] <Casper> other speeds may work, but maybe not at all baud rate, and never exactly
[00:00:35] <Casper> http://www.wormfood.net/avrbaudcalc.php ← look there, you'll see the error you get for what xtal you choose
[00:02:40] <Eartaker> ahh the 18.432 looks like a better choice if im going to use a 4800 baud
[00:02:46] <Eartaker> and I plan to for a RF link
[00:04:01] <WormFood> 18.432 is a great frequency ;)
[00:05:20] <Casper> yes it is
[00:05:24] <Eartaker> well the 18.432 is not sold on sparkfun but the 14.7456 is im not looking for something crazy so i guess that would work
[00:05:36] <WormFood> by the way, that page for my baudrate calculator will be moved, but I'll put in a redirect so you can continue to use the short url ;) actually the redirection is already in place, but the new site isn't up yet.
[00:06:09] <WormFood> there is a good chance you have an 18.432 mhz xtal in your junk pile
[00:06:22] <WormFood> it is a very common xtal
[00:06:25] <Eartaker> WormFood: i just noticed it was on your site lol, nice
[00:06:50] <Eartaker> not in my junk pile... im new to this and my junk pile is limited
[00:07:28] <WormFood> that's the most popular page on my site, and there isn't even a link to it on any of my pages. I just posted the link in this channel twice, and I guess it was good enough, that people shared it, and it got put on a bunch of blogs and web pages (even sparkfun links to it)
[00:08:11] <Eartaker> WormFood: are you signed up with google analytics and webmaster?
[00:08:28] <WormFood> I wrote that page for one specific purpose. And that was to figure out what xtal would give me a given serial bitrate, so I could find one close enough in my junk pile
[00:08:44] <WormFood> no, not for that site. I'll do google analytics and webmaster on my new site
[00:09:16] <Eartaker> you should put this page in the new site, and if it get the hits you get now then google will add a site link for it
[00:09:22] <WormFood> I *never* did find an xtal with the right frequency for my project, and went about doing it different ways.
[00:09:40] <WormFood> this page is already on the new site.
[00:10:00] <WormFood> and it has a project page now too, where people can leave comments about it, or whatever
[00:10:16] <WormFood> but I'm still tweaking a few things on my new site, and haven't put it online yet.
[00:10:58] <WormFood> actually, there is only 1 thing that is stopping me from putting it online.
[00:11:40] <WormFood> anyways, it is almost 1pm here, and I need to leave the house at 1:30, and I have other things I need to do before I go, so I'm gonna step out. Ya'll have a good day/evening/whatever ;)
[00:14:46] <rue_bed> WormFood, damn dude, dont take down the baud rate calculator the world will sieze up
[00:15:35] <WormFood> its not being taken down, it is just being moved
[00:15:55] <WormFood> but, like I said, a redirect will be in place, so all the old links will still work ;)
[00:18:04] <Casper> ARRRGGG
[00:18:07] <Casper> I need to sleep
[00:18:15] <Casper> but this series is too good
[00:18:20] <Casper> and I want to know the next one
[02:37:58] <Richard_Cavell> megal0maniac: How are you doing?
[05:57:05] <Richard_Cavell> megal0maniac: are you there?
[07:26:03] <Richard_Cavell> Okay, everyone. I'm ready to start learning AVR. I own a STK600 and the relevant boards, and I have some mega328ps and some tiny85s. I know 68000 assembly and C. Now where do I start?
[07:26:11] <Richard_Cavell> I'm a studyholic but I'm time poor
[07:30:30] <|Marco|> Richard_Cavell: Might be good to start with a few avr books
[07:30:37] <|Marco|> take a look on amazon
[07:32:33] <Richard_Cavell> That AVR beginners website linked in the topic was last updated in 2004
[07:32:46] <|Marco|> ouch
[07:33:54] <|Marco|> http://hackaday.com/2010/10/23/avr-programming-introduction/
[07:34:03] <|Marco|> give that a shot
[07:35:48] <Richard_Cavell> yeah that looks pretty good actually
[07:35:54] <Richard_Cavell> I'll probably have to buy some mega168s
[07:38:04] <|Marco|> well, since you have the 328's they have a lot in common with the 168's, so it shoulden't be a problem
[07:38:42] <Richard_Cavell> well I'll just start reading and see how I go
[07:39:30] <|Marco|> okay, good luck
[08:09:12] <Richard_Cavell> good stuff
[08:09:16] <Richard_Cavell> looks really promising
[08:09:24] <Richard_Cavell> I'm going to need to build a DAPA cable
[08:09:26] <Richard_Cavell> but I can do that
[08:09:33] <Richard_Cavell> Go to Jaycar tomorrow and buy the parts
[08:09:56] <|Marco|> :) good luck
[08:10:15] <Richard_Cavell> Do I have to buy some mega168s?
[08:10:28] <Richard_Cavell> I probably should if I want to follow the tutorial precisely
[08:10:38] <|Marco|> ah, true
[08:11:09] <|Marco|> even if the 328 and the 168 are only different in ram/flash and some perepherales
[08:11:15] <Richard_Cavell> they'll only be a few dollars
[08:11:24] <Richard_Cavell> I'm sure the 328 will function as a drop in replacement
[08:11:31] <|Marco|> right
[08:11:40] <Richard_Cavell> But one thing I like about that tutorial is that it uses the tools I wasn't intending on using
[08:11:45] <Richard_Cavell> I was intending to use AVR studio, not avrdude
[08:11:53] <Richard_Cavell> and a STK600, not a DAPA cable
[08:12:06] <Richard_Cavell> but if I follow this tutorial I'll learn the other methods
[08:12:09] <Richard_Cavell> the free/cheap methods
[08:15:36] <Amadiro> Richard_Cavell, I've mostly learned from the datasheet/user guides from atmel, avrfreaks, looking at the header files and experimenting
[08:15:53] <Amadiro> Richard_Cavell, the documentation from atmel is pretty good if you need some details
[08:16:12] <|Marco|> true
[08:16:33] <Richard_Cavell> Well I'm going to do these tutorials to start with
[08:17:04] <Amadiro> Richard_Cavell, it's really all very straightforward (assuming you know C) once you have seen some basic examples. You can then typically stipulate the rest
[08:17:19] <Amadiro> And then the datasheet/user guides will fill in the details for every individual chip
[08:17:20] <Richard_Cavell> yep
[08:17:23] <Richard_Cavell> I'm sure
[08:17:25] <Richard_Cavell> Well I know C
[08:18:00] <Richard_Cavell> there are many mega168s. Which do I want?
[08:18:37] <Amadiro> Richard_Cavell, what do you want it for?
[08:18:38] <Richard_Cavell> What's the difference between the 168 and 168p?
[08:18:50] <Richard_Cavell> I want it for the tutorial
[08:19:02] <Richard_Cavell> I'm going to get a DIP version because I just find DIP packages easier to use
[08:21:38] <Amadiro> Richard_Cavell, looks like the 168A and P has a temp sensor, the 168 does not. The P has picopower, the 168 and 168A do not
[08:21:57] <Richard_Cavell> well I'm not using temp sensor or picopower
[08:22:13] <Richard_Cavell> So I'll just get the plain 168, slower version
[08:22:16] <Richard_Cavell> which is actually more expensive
[08:22:30] <Amadiro> Richard_Cavell, they should all be rated for 20MHy
[08:22:31] <Amadiro> MHz
[08:22:39] <Richard_Cavell> these ones are 10 mhz
[08:22:47] <Richard_Cavell> there are 20s available too but I don't need them
[08:22:52] <Amadiro> Just get whichever is most convenient and cheapest to you
[08:23:32] <Amadiro> personally I'd start with an attiny, since they're even more minimal (less things to worry about, you'll learn 100% of the features of the chip in no time), but if you want to follow the tutorial, its probably good to stick to what they use
[08:23:48] <Richard_Cavell> yeah I'm a complete newb so I'll just do it exactly like in the tutorial
[08:23:55] <Richard_Cavell> I'll make a DAPA cable too
[08:24:01] <Richard_Cavell> since I have the ability to do that and I'll probably learn more
[08:24:34] <Amadiro> from the programming POV the different models will be exactly the same, so it doesn't matter whether you get, say a 168AP-10MUR or a 168V-20MQ
[08:25:21] <Richard_Cavell> yep
[08:25:29] <Richard_Cavell> although I want a DIP package
[08:25:40] <Richard_Cavell> my silly clumsy fingers can't handle the tinier legs on other thingies
[08:25:58] <Richard_Cavell> so, gotta wait a few days for them to arrive, then go to Jaycar tomorrow to build my cable
[08:26:30] <Amadiro> Richard_Cavell, don't you have a local hackerspace somewhere in the vicinity? They usually have all of these things already, as well as a huge assortment of various chips
[08:26:57] <Richard_Cavell> There is one nearby
[08:27:01] <Richard_Cavell> I'm in Queensland Australia
[08:27:45] <Amadiro> my hackerspace has an stk500, jtagicemk2 and various other programmers lying around, as well as at least 50 different types of 8-bit avrs or so
[08:27:54] <Amadiro> so check them out, you might get everything you need there
[08:27:55] <Richard_Cavell> looks like the latest version of winavr is from 2012-01-20. Does that sound right?
[08:28:11] <Richard_Cavell> I mean 2010-01-20
[08:30:50] <Amadiro> I don't use winavr, but my avr-gcc version is from 2012-07-21
[08:32:10] <Richard_Cavell> yeah I googled it and the winavr website has an old version. You need to go to slashdot for the current version
[08:33:18] <Amadiro> ...slashdot?
[08:33:41] <Richard_Cavell> I mean sourceforge
[08:33:43] <Richard_Cavell> sorry I'm tired
[08:33:46] <megal0maniac> Richard_Cavell: I am now. Forgot to set AFK..
[08:33:51] <Richard_Cavell> ha ha
[08:33:57] <Richard_Cavell> megal0maniac: Mate I was going to make a big announcement
[08:34:05] <Richard_Cavell> I've completed the study I was doing and I'm now studying AVRs
[08:34:12] <megal0maniac> That you've started with AVR?
[08:34:18] <Richard_Cavell> Tomorrow I build a DAPA cable.
[08:34:19] <megal0maniac> Yes. Good. :)
[08:34:22] <megal0maniac> DAPA?
[08:34:28] <Richard_Cavell> yep
[08:34:35] <Richard_Cavell> parallel-port direct-programmy thingy
[08:34:35] <megal0maniac> Which is...?
[08:34:48] <megal0maniac> ...why? You have STK600
[08:35:01] <Richard_Cavell> I know but I think I might learn something by starting with the simplest techniques
[08:35:13] <megal0maniac> Hmmm...
[08:35:18] <Richard_Cavell> I just find it amazing that you can still use a parallel port with Windows 7
[08:35:18] <Amadiro> Richard_Cavell, do you have a parport?
[08:35:25] <Richard_Cavell> yes, on my desktop
[08:35:45] <megal0maniac> Amadiro: I build PCs, and almost all of them still seem to have parports
[08:35:54] <megal0maniac> serial not so much anymore
[08:36:02] <Amadiro> Richard_Cavell, well, good luck then, I guess. Not sure whether you'll learn anything in particular, though, unless you actually look at the protocol used
[08:36:08] <Amadiro> megal0maniac, my laptop has both
[08:36:35] <megal0maniac> Amadiro: Likewise, but my laptop is old :) My desktop, however, has the parallel port above the USB3 ports
[08:36:58] <megal0maniac> Richard_Cavell: You'd learn a lot more by programming the chips. Regardless of how that gets done :)
[08:38:17] <megal0maniac> Amadiro: Any suggestions for nvidia drivers on debian-based system?...
[08:38:58] <Amadiro> megal0maniac, the official nvidia driver worked very well for me so far. I don't know how far along nouveau is.
[08:39:18] <Amadiro> give nouveau a try if you feel adventurous, and report back how it works
[08:39:22] <megal0maniac> It's installed by default, but isn't working well enough
[08:39:25] <Amadiro> it probably works well already
[08:39:41] <Amadiro> megal0maniac, sure that the default isn't "vesa" or "nv"?
[08:39:52] <megal0maniac> Where do I check?
[08:40:20] <Amadiro> megal0maniac, easiest way would probably be to just check whether the nouveau package is installed at all
[08:40:38] <megal0maniac> It is...
[08:41:23] <megal0maniac> The NVidia one is 13mins away from being downloaded. Was just wondering if that was the right way to about it :)
[08:41:36] <megal0maniac> I'll take your word for it
[08:41:53] <Amadiro> megal0maniac, then check out your /var/log/Xorg.0.log, that should say which driver is in use
[08:42:11] <Amadiro> megal0maniac, note that debian has repositories that you can install the nvidia driver from, installing it directly from nvidia.com is a lot of hassle
[08:42:36] <megal0maniac> I didn't see it in synapric...
[08:42:44] <megal0maniac> *synaptic
[08:42:49] <Amadiro> i.e. you circumvent your package manager which is not ideal, you'll have to build the kernel modules yourself, you'll pollute your filesystem etc
[08:43:05] <Amadiro> megal0maniac, yes, debian has a very strong focus on "free software only", you'll have to add external repos
[08:43:08] <Richard_Cavell> Now that I've installed WinAVR, how do I tell what version of GCC I have installed?
[08:43:20] <Amadiro> Richard_Cavell, gcc -V
[08:43:26] <Amadiro> -v
[08:43:29] <Richard_Cavell> gcc doesn't work
[08:43:37] <Amadiro> Richard_Cavell, try avr-gcc -v
[08:43:54] <Richard_Cavell> okay, that worked. It's 4.3.3
[08:44:10] <Amadiro> thats pretty old
[08:44:11] <Richard_Cavell> I think my WinAVR is out of date
[08:44:19] <Amadiro> I run 4.7.1
[08:44:26] <megal0maniac> WinAVR has been out of development since 2010
[08:44:35] <megal0maniac> The developer got snatched up my Atmel
[08:44:55] <Richard_Cavell> ok
[08:45:11] <Richard_Cavell> well this tutorial is from 2010 and it tells me to use it, so I'll just use it and deal with the rest later
[08:45:26] <megal0maniac> Thus, the Atmel toolchain is remarkably similar. But also seems to be out of date, despite being released in April this year... (Judging by avrdude.conf not including 32u2)
[08:45:45] <megal0maniac> Richard_Cavell: Yeah, stick with it for now. It works well enough
[08:45:49] <Richard_Cavell> The tutorial's just gonna blink an LED
[08:45:58] <Richard_Cavell> and it's already been tested in this configuration
[08:46:14] <Richard_Cavell> So I won't fuss over the gcc version
[08:46:26] <megal0maniac> Good. It isn't worth the hassle
[08:46:35] <Richard_Cavell> especially on my Windows machine
[08:46:41] <Richard_Cavell> I'm only using it because it has a parallel port
[08:46:49] <megal0maniac> :/
[08:47:31] <Richard_Cavell> once I start programming properly, I'll use USB so I can use my laptop or any machine
[08:47:36] <Richard_Cavell> USB really is universal
[08:48:44] <Amadiro> megal0maniac, check out http://wiki.debian.org/NvidiaGraphicsDrivers
[08:48:58] <Amadiro> the section "non-free drivers" and "why use a debian-specific method?" in particular
[08:49:39] <Amadiro> megal0maniac, the main drawback with installing nvidias version directly is that whenever you get a kernel update, there's a chance the driver will break and require you to recompile the interface
[08:49:57] <Amadiro> while the debian package does not have that problem
[08:50:46] <megal0maniac> Richard_Cavell: Programming with parallel or USB is one in the same, really. All you'll learn from building the parallel programmer is one or two things about building circuits
[08:51:09] <Richard_Cavell> yeah well that suits me
[08:51:23] <Richard_Cavell> problem is I just looked at the back of my machine and it doesn't have parallel port after all <facepalm>
[08:51:40] <megal0maniac> Richard_Cavell: Then you may as well build a circuit with the chip. Kill 2 birds with 1 stone.
[08:51:53] <megal0maniac> Amadiro: Thanks, I'm checking it out now..
[08:52:20] <megal0maniac> Amadiro: With the debian way, you have to re-install kernel modules each time, but I suppose that's less of a pain
[08:55:15] <Amadiro> megal0maniac, you have to basically do that either way, but with the debian way, the maintainer will pre-compile them for you before he updates the kernel
[08:55:32] <Amadiro> so it'll always happen automatically for you, no intervention required
[08:55:47] <Amadiro> and it won't happen that you boot up your system and suddenly your graphics card isn't working properly
[08:56:26] <megal0maniac> I thought I'd give the stock ones a try first, and it tells me that I can't be running X. I remember this :P
[09:00:09] <Richard_Cavell> alright what do I do? I have no parallel port. Learning how to use my STK600 is going to take time. Shall I buy a USBtinyISP?
[09:00:52] <megal0maniac> NO!
[09:00:59] <megal0maniac> Learn how to use the STK600
[09:01:17] <Richard_Cavell> this is just supposed to be an intro tutorial that takes like 3 days
[09:01:22] <megal0maniac> It is your everything. The whole point of buying the STK600 is that you don't have to buy anything else
[09:01:26] <Richard_Cavell> learning how to use the STK600 is gonna take me 3 weeks
[09:01:59] <megal0maniac> Just learn the ISP programming part for mow
[09:02:30] <megal0maniac> No need for JTAG or HVPP or PDI or TPI or any of the other stuff that board will do, yet.
[09:04:06] <Amadiro> kan the stk600 run & debug your code?
[09:04:42] <megal0maniac> It can program and debug
[09:04:57] <Amadiro> maybe I should have a look at it, we have one lying around here (as mentioned earlier)
[09:05:19] <Amadiro> Although the capability to do things in-circuit is nice too
[09:07:01] <Richard_Cavell> megal0maniac: so shall I abandon this tutorial and start learning the STK600?
[09:07:24] <Amadiro> Richard_Cavell, no need to abandon the tutorial, it'll be just a minor change in how you transfer the code to the chip
[09:07:31] <megal0maniac> Richard_Cavell: Which tutorial? Do you have a link?
[09:07:41] <Richard_Cavell> http://hackaday.com/2010/10/23/avr-programming-introduction/
[09:08:49] <Richard_Cavell> alright so I'll go and learn the STK600? Can I still use avrdude with it?
[09:09:16] <Amadiro> Richard_Cavell, there is nothing to "learn", really, you just need to look up where to push the chip into, and which options to use when invoking avrdude
[09:09:41] <Richard_Cavell> well let's assume that I suck at electronics and know nothing about AVR
[09:09:42] <Amadiro> Richard_Cavell, in fact, it looks like the tutorial is programmer-agnostic and lists using the stk as one of the possible ways to program the chip
[09:10:07] <Richard_Cavell> Amadiro: yeah but look at page 2 and it provides only the DAPA and Arduino programming methods
[09:10:22] <Richard_Cavell> I'd be happy to solder that cable but I got no parport
[09:11:33] <Amadiro> Richard_Cavell, well, as I said, using the stk shouldn't be any hassle.
[09:12:11] <Amadiro> presumably the only thing you have to do is something like "avrdude -P usb -c stk600 -p m168 -U flash:w:main.hex"
[09:13:59] <Richard_Cavell> well see I don't understand that
[09:14:56] <Richard_Cavell> and also I'll need to get the little daughter board thingies for the mega168
[09:15:02] <Richard_Cavell> this is why I want to follow the tutorial to the letter
[09:15:50] <Amadiro> Richard_Cavell, avrdude is basically just a tool that can interface with various programmers. It sends your code to the programmer (in whichever way the programmer is connected to your computer).
[09:15:59] <Richard_Cavell> right
[09:16:08] <Amadiro> Richard_Cavell, you can also use it to set fuses, read data back out from the chip (to verify your code was transmitted correctly) etc
[09:16:20] <Richard_Cavell> yep
[09:16:28] <Richard_Cavell> But the thing is I need to get started
[09:17:22] <Amadiro> Richard_Cavell, you could also get a chip/board that has a bootloader pre-programmed such as an arduino or teensy. You get a little less flexibility/flash-space, but you can program them conveniently directly via usb using avrdude.
[09:17:58] <Amadiro> (and you can still program them in assembly or pure C without any 3rd party libraries, if you want to)
[09:18:00] <Richard_Cavell> well this tutorial also tells you how to program via arduino
[09:18:15] <Richard_Cavell> frankly it might be worth buying a cheap machine with a parallel port
[09:18:25] <Amadiro> Richard_Cavell, yeah, but don't do that, skimping on the programmer is not the best idea.
[09:18:37] <Richard_Cavell> it's a learning experience for me
[09:18:44] <Amadiro> You'll only end up with really-hard-to-debug-spurious-problems
[09:19:07] <Richard_Cavell> Alright, so what do I do? Here are my options: 1) Learn the STK600 and abandon this tutorial. 2) Buy a machine with a parallel port. 3) Buy a USB programmer
[09:19:24] <karlp> don't buy a computer just to get a parallel port
[09:19:28] <karlp> that's a terrible idea.
[09:19:54] <karlp> the stk600 can be used as a usb programmer
[09:19:58] <Amadiro> Richard_Cavell, 1) you don't need to abandon the tutorial 2) you can get usb-to-parport converters et cetera 3) a usb programmer? what usb programmer?
[09:20:03] <megal0maniac> Richard_Cavell: You can learn the STK600 without abandoning the tutoria
[09:20:18] <megal0maniac> l. It doesn't even specify which programmer should be used
[09:20:30] <Richard_Cavell> I don't think the USB to parport converters will work well since we're essentially bitbanging it. Those things need their own drivers
[09:21:00] <karlp> when it talks about the different programmers on page 2, it even emntions the stk500
[09:21:01] <Amadiro> Richard_Cavell, your computer is also just bitbanging it
[09:21:07] <karlp> just pretend that it says stk600 whenever you see that.
[09:21:31] <Richard_Cavell> Or I could buy a parallel port for my desktop. (I'd have to remove something cos my slots are full)
[09:21:47] <karlp> nono nonono
[09:21:49] <karlp> you have an stk600!
[09:21:54] <karlp> you're good to go!
[09:21:56] <megal0maniac> Richard_Cavell: Forget about parallel port. Trust us.
[09:24:26] <Richard_Cavell> I found another option. I can add a parallel port to my computer through a PCI card for 13 bucks
[09:24:43] <megal0maniac> ...
[09:24:50] <Richard_Cavell> seriously this is a learning exercise for me
[09:26:02] <megal0maniac> I strongly suggest you spend your energy making circuits _with_ microcontrollers. Get the basics first. ISP programming on an t85 to get an LED blinking
[09:28:00] <megal0maniac> Get the datasheet for the t85 (or m328) and write the blink example and program it. The datasheet will tell you which pins are what for ISP and where to connect the LED to.
[09:30:02] <megal0maniac> Amadiro: Done. Rebooting. Hoping for the best :P
[09:30:11] <Amadiro> megal0maniac, good luck
[09:30:40] <megal0maniac> Heh...
[09:30:49] <megal0maniac> X didn't start :P
[09:32:28] <megal0maniac> Amadiro: Deleted xorg.conf (didn't have one to begin with) and still nothing. Resolution didn't even change like it usually does :/
[09:32:48] <OndraSterver> use windows :)
[09:32:59] <Amadiro> megal0maniac, are you using the debian driver or the nvidia driver?
[09:33:06] <megal0maniac> debian
[09:33:19] <Amadiro> try running nvconf or whatever it was called to configure the driver
[09:33:28] <Amadiro> nvidia-config it was called, I believe
[09:33:31] <megal0maniac> Think now might be a good time to install the nvidia one, since X isn't running XD
[09:33:44] <Amadiro> megal0maniac, no, you've probably just made some trivial configuration mistake.
[09:33:59] <Amadiro> nvidia-config will fix that for you.
[09:34:59] <megal0maniac> Only thing which starts with "nv" is nvidia-bug-report.sh
[09:35:04] <megal0maniac> Should I run that? :P
[09:35:49] <Amadiro> megal0maniac, try "apt-cache search nvidia" and see whether it shows up as separate package
[09:37:45] <megal0maniac> Nope. I refer to http://wiki.debian.org/NvidiaGraphicsDrivers#X_doesn.27t_start
[09:39:00] <Amadiro> megal0maniac, have you done http://wiki.debian.org/NvidiaGraphicsDrivers#Configure_X_to_use_the_nvidia_driver ?
[09:39:17] * megal0maniac nods
[09:39:23] <megal0maniac> That's when I created xorg.conf
[09:39:40] <Amadiro> megal0maniac, how have you done it? manually?
[09:39:40] <OndraSterver> mmm loooooniks!
[09:39:48] * Richard_Cavell is off to bed and thanks everyone for their help
[09:40:00] <megal0maniac> Richard_Cavell: Why give up so soon? :)
[09:40:10] <megal0maniac> Amadiro: "Create an xorg.conf"
[09:40:23] <Amadiro> megal0maniac, yes, so what have you written into it?
[09:40:27] <Amadiro> or have you auto-generated it
[09:40:41] <Richard_Cavell> I'm not giving up. I just bought a parallel port for my computer (PCI-based) and I'm gonna build the DAPA cable tomorrow. I can't buy the parts right now cost it's midnight
[09:40:59] <karlp> unsaveable.
[09:41:02] <OndraSterver> ..
[09:41:03] * karlp cries
[09:41:04] <OndraSterver> parallel port
[09:41:06] <OndraSterver> omg
[09:41:07] * megal0maniac facepalms
[09:41:10] * OndraSterver cries and facepalms
[09:41:11] <karlp> you had a stk600!
[09:41:17] <Richard_Cavell> I still do
[09:41:28] <karlp> you don't need a bloody paralell port and a dapa cable!
[09:41:29] <Richard_Cavell> I told you, I'm here to learn stuff
[09:41:36] <karlp> learn what?
[09:41:39] <karlp> how to build a dapa cable?
[09:41:41] <megal0maniac> What karlp said
[09:41:43] <karlp> because you'
[09:41:48] <karlp> re just adding that step
[09:42:00] <Amadiro> megal0maniac, what's in your xorg.conf
[09:42:17] <megal0maniac> Again, you'll get circuit building experience, which you should rather be getting by making circuits with microcontrollers in them
[09:42:26] <megal0maniac> Which are programmed
[09:43:11] <megal0maniac> Amadiro: Well I deleted it, but nothing has changed. It had the sample content from that page. I'm recreating it, will restart and see what the log has to say
[09:43:46] <Amadiro> megal0maniac, it needs to contain the proper configuration for your video card/system
[09:44:12] <Amadiro> megal0maniac, you might want to try an easier distribution like ubuntu which does all of these things automatically for you, debian is for more experienced users
[09:46:40] <megal0maniac> Amadiro: Working :P
[09:47:24] <megal0maniac> Must've just copy-paste botched the xorg.conf. But the card has shut up (fans spin faster if it isn't happy with drivers, i.e. in POST)
[09:48:37] <Amadiro> Yes, first things the drivers do is typically to spin down the fans
[09:49:28] <megal0maniac> Amadiro: Are you being facetious or is that really the case? :P
[09:49:39] <Amadiro> megal0maniac, that is really the case.
[09:49:54] <megal0maniac> Haven't seen it with any card other than mine, and it's by a cheap chinese vendor...
[09:50:00] <megal0maniac> Which is what I attribute this to
[09:50:28] <Amadiro> megal0maniac, I have an MSI nvidia card or so in my workstation at work, and when I turn the PC on, the fans go to 100% immediately, until the driver tells them to chill out.
[09:50:30] <megal0maniac> Good grief this is nice. Happiest I've been with Linux in... 6 years at least
[09:50:48] <megal0maniac> crunchbang
[09:51:06] <megal0maniac> Latest beta based on Debian testing
[09:51:17] <Amadiro> I assume the vendor doesn't matter, since nvidia graphics cards are basically "one huge control ship that does everything, the rest is just power supply, routing and peripherals"
[09:52:55] <megal0maniac> Amadiro: Have you tried Crunchbang?
[09:53:01] <Amadiro> I have not.
[09:54:54] <megal0maniac> First Linux dist which hasn't irritated me in years. And I've even tried Gentoo. Got it running, but X refused to start. I don't play nicely with X
[09:55:50] <karlp> you're saying that a linux distro that couldn't start X is the first one that hasn't irritated you inyears?
[09:55:50] <Amadiro> I'm mostly using archlinux
[09:55:57] <specing> Gentoo rules
[09:55:59] <karlp> what on earth do you call an irritation?
[09:56:13] <specing> X didn't run? haven't you run nvidia-xconfig?
[09:56:23] <specing> I always had problems with Xorg
[09:56:29] <specing> BUT NEVER ON GENTOO!
[09:56:37] <specing> debian just plain refused to work
[09:56:44] <specing> fedora -- forget it
[09:56:57] <OndraSterver> <specing> BUT NEVER ON GENTOO!
[09:57:01] <OndraSterver> <troll mode>
[09:57:04] <OndraSterver> because it is still compiling?
[09:57:05] <megal0maniac> karlp specing: I was saying that I've tried a bunch of things, including Gentoo (on which X wouldn't start) and Crunchbang is the first one which hasn't irritated me with something
[09:57:06] <OndraSterver> </troll mode>
[09:57:17] <specing> the nvidia drivers were compiled in under 30s
[09:57:22] <Amadiro> nvidias drivers generally play nice with everything, I've never managed to not get them to work on any distribution
[09:57:26] <specing> and linked with the running kernel
[09:57:27] <megal0maniac> OndraSterver: Hi five!
[09:57:31] <OndraSterver> haha
[09:57:32] <Amadiro> the ATi drivers on the other hand...
[09:57:51] <specing> ATI is a joke
[09:58:00] <OndraSterver> lolati
[09:58:02] <Amadiro> well, the new open-source ATi/AMD drivers are quite good
[09:58:20] <Amadiro> but they don't yet support all the features fglrx/catalyst has
[09:58:27] <specing> 10 fps on glxgears @ HD3xxx is quite good?
[09:59:03] <Amadiro> specing, I get like 100 fps with my HD card on nexuiz using full details, dynamic lighting, bloom, blurring, HDR et cetera enabled on 1900x1200.
[09:59:17] <Amadiro> s/nexuiz/xonotic/
[09:59:31] <Amadiro> but the driver doesn't support opencl yet, which is the important part for me
[10:00:03] <Amadiro> but as far as performance goes, it's not far behind fglrx/catalyst
[10:01:48] <megal0maniac> specing: bash: glxgears: command not found
[10:01:56] <megal0maniac> Since when has that not come standard?
[10:02:01] <Amadiro> megal0maniac, it's in the mesa-utils package or so
[10:02:24] <megal0maniac> Hmpf
[10:02:25] <specing> yup
[10:04:22] <OndraSterver> megal0maniac, isn't it enough to run looniks in vm? :)
[10:05:31] <megal0maniac> OndraSterver: No, because VM was on my laptop, which is slow. But I liked Crunchbang so much that I overwrote OpenSUSE with it. :)
[10:05:40] <megal0maniac> So dualboot on my i5 desktop
[10:05:54] <OndraSterver> yo dawg, I ran gentoo on 900MHz P III laptop
[10:05:58] <OndraSterver> with 2565MB RAM
[10:05:59] <OndraSterver> 256
[10:06:03] <OndraSterver> no distcc
[10:06:05] <OndraSterver> no binpkgs :P
[10:06:12] <OndraSterver> took me few nights to compile whole KDE
[10:06:17] <megal0maniac> I ran winxp on 160mhz 82mb RAM
[10:06:23] <OndraSterver> then formatted it and used the drive for something else :D
[10:06:27] <Amadiro> OndraSterver, back when I was using gentoo, 900MHz was pretty much the hot shit
[10:06:35] <OndraSterver> well this was half a year ago
[10:06:35] <megal0maniac> Then threw away the laptop :P
[10:06:36] <OndraSterver> :P
[10:07:12] <OndraSterver> I have got here 286 lappy
[10:07:16] <OndraSterver> and two 386
[10:07:18] <OndraSterver> and one or two 486
[10:07:26] <OndraSterver> 286 should work, 386s work, 486 doe snot work
[10:08:35] <megal0maniac> OndraSterver: xboard still not here :(
[10:08:40] <megal0maniac> Did get my LVDS cable, though
[10:08:43] <megal0maniac> But that's boring
[10:08:45] <megal0maniac> And not for
[10:08:47] <megal0maniac> me
[10:08:52] <OndraSterver> heh
[10:08:53] <OndraSterver> poor luck
[10:14:33] <OndraSterver> we were today moving one company - I was there for the IT stuff
[10:14:48] <OndraSterver> I didn't manage to salvage old UPS for bigass transformer and no phones for parts :(
[10:15:00] <OndraSterver> but I salvaged four 256MB DDR sticks :P
[10:15:05] <OndraSterver> and HSDPA PCMCIA card :P
[10:16:03] <megal0maniac> I bought two HSDPA USB modems for around EUR20, but have hardly used them
[10:16:16] * megal0maniac should send one to abcminiuser
[10:16:21] <megal0maniac> I did actually offer :P
[10:18:10] <OndraSterver> also I have rescued some edimax printserver (eth->usb)
[10:18:22] <OndraSterver> it freezes within 20 secs after plugging in the printer
[10:18:24] <OndraSterver> (+ adapter for it)
[10:18:29] <OndraSterver> will try hacking it :P
[10:18:34] <OndraSterver> it surely runs looniks
[10:22:00] <OndraSterver> well this was unexpected!
[10:22:45] <OndraSterver> rdc r2880-x
[10:22:50] <OndraSterver> (probably, hard to read)
[10:22:54] <OndraSterver> probably some ARM MCU
[10:23:10] <OndraSterver> 29lv040ctc - 4Mbit flash I think
[10:23:36] <OndraSterver> etrontech em636165ts - probably 16MByte? SDRAM
[10:23:38] <OndraSterver> maybe 16Mbit
[10:23:51] <OndraSterver> BUT
[10:23:55] <OndraSterver> the "weirdest" part
[10:23:58] <OndraSterver> nvidia chip!
[10:24:07] <OndraSterver> g801b003
[10:26:32] <OndraSterver> http://www.edimax.co.uk/en/produce_detail.php?pd_id=203&pl1_id=7&pl2_id=34
[10:26:36] <OndraSterver> HOW COME THAT LINUX SOURCE CODE HAS NO LINK!
[10:26:39] <OndraSterver> it is against gpl!
[10:27:00] <megal0maniac> So it is Linux?
[10:27:10] <OndraSterver> I am pretty sure it runs linux
[10:27:53] <OndraSterver> it is some "Fast Ethernet RISC processor"
[10:28:12] <OndraSterver> wow, it has even two MIIs
[10:28:14] <OndraSterver> that looks nice
[10:28:19] <OndraSterver> but only one is connected obviously
[10:29:07] <megal0maniac> RISC is good
[10:29:21] <OndraSterver> but what is it good for if you don't have linux source for it :P
[10:30:04] <OndraSterver> the documentation tells a lot about the arch
[10:30:25] <OndraSterver> every single register :P
[10:30:56] <OndraSterver> hmm it is 16Mbit SDRAM
[10:30:59] <OndraSterver> aka 2MByte only :(
[10:33:45] <karlp> OndraSterver: no, it's not against gpl to not provide alink automatically.
[10:34:03] <karlp> they're only required to provide source on demand, to people they distribute to.
[10:34:30] <OndraSterver> oh
[10:34:37] <OndraSterver> so can I send them an email asking for it?
[10:35:09] <megal0maniac> Yes. Do that :)
[10:35:10] <OndraSterver> http://www.nvidia.com/page/uli_m5273.html
[10:35:12] <OndraSterver> this is the nvidia chip
[10:35:19] <megal0maniac> What is it?
[10:35:22] <megal0maniac> I'm lazy
[10:39:44] <OndraSterver> USB 2.0 to PCI
[10:39:49] <OndraSterver> (or vice versa)
[10:43:46] <megal0maniac> I like bidirectional things :)
[10:44:02] <OndraSterver> then go study USB specs :P
[10:45:06] <megal0maniac> I would. But I won't. Because no.
[10:45:19] * megal0maniac goes off to clean room instead
[10:47:03] <OndraSterver> megal0maniac_afk, don't you want to clean my room as well? :P
[10:56:50] <OndraSterver> http://www.apple.com/letter-from-tim-cook-on-maps/
[10:56:51] <OndraSterver> ololo
[11:33:32] <Richard_Cavell> Okay guys, so I can't sleep
[11:34:16] <OndraSterver> http://pastebin.com/dYFQq4b4
[11:34:19] <OndraSterver> does this remind anyone linux?
[11:34:37] <OndraSterver> serial line stuff
[11:35:22] <karlp> does it what what?
[11:35:28] <Kevin`> OndraSterver: not particularlyt
[11:35:52] <karlp> does it look like a linux serial console bootup message?
[11:36:01] <OndraSterver> it does not :)
[11:36:14] <karlp> I was sking if that was your question :)
[11:36:27] <Richard_Cavell> Is the STK500 actually superior to the STK600 in some ways?
[11:36:37] <Richard_Cavell> I mean, since it doesn't need complicated daughter boards
[11:37:04] <Kevin`> you said that device had 2MB of ram, right? it's doubtful it's running linux with that. uclinux MAY be capable of running, but it's not something that would be worthwhile to develop for normally
[11:37:11] <OndraSterver> karlp, yes
[11:37:35] <karlp> 2meg ram or 2meg flash?
[11:43:39] <OndraSterver> 2M RAM, 0.5M flash
[11:43:44] <OndraSterver> not sure if that would fit linux :P
[11:49:05] <Tom_itx> OndraSterver, did you get the link i posted?
[11:49:10] <OndraSterver> which one?
[11:49:16] <Tom_itx> avrgcc
[11:49:29] <OndraSterver> that on atmel's website?
[11:49:34] <Tom_itx> yes
[11:49:42] <OndraSterver> I said thanks for that one - yes :)
[11:49:47] <Tom_itx> oh
[11:49:53] <Tom_itx> i haven't read the log
[11:49:57] <Tom_itx> just got here
[11:50:12] <OndraSterver> ah
[11:50:20] <Tom_itx> probably won't
[11:50:42] <OndraSterver> damn, it won't be running linux after all :(
[11:51:06] <OndraSterver> "The R2880 is a high perfomance and high integration network processor. It includes RDC's proprietary RISC processor core, "
[11:51:06] <Tom_itx> why?
[11:51:07] <OndraSterver> yada yada
[11:52:01] <OndraSterver> so they wrote all the networking stacks and USB stacks on their own! :o
[11:52:02] <OndraSterver> crazies
[11:53:30] <karlp> hardly. you can license that stuff from all sorts of people
[11:53:37] <karlp> there's more networking options in the world than windows and linux
[11:53:47] <OndraSterver> of course
[11:54:10] <OndraSterver> it looks VERY close to x86 in terms of registers
[11:54:36] <OndraSterver> AX/BX/CX/DX, SP/BP/SI/DI general registers
[11:54:41] <OndraSterver> (also AH/AL... splitting)
[11:54:45] <OndraSterver> and CS/DS/SS/ES segments
[11:55:01] <OndraSterver> it looks like 286 but RISC?!
[11:56:17] <OndraSterver> well
[11:56:22] <OndraSterver> instructions look EXACTLY like x86
[11:57:04] <OndraSterver> with few extras
[11:58:25] <OndraSterver> nope
[11:58:30] <OndraSterver> exactly like 8086
[12:02:40] <RikusW> I thought 8086 was CISC....
[12:03:05] <jacekowski> x86 is CISC
[12:03:47] <jacekowski> internally x86 were RISC around p2/p3 where they translated x86 instructions into internal RISC instructions
[12:04:06] <jacekowski> now, it's a weird thing that is nowhere
[12:04:30] <RikusW> HISC ? :0
[12:04:37] <OndraSterver> could be
[12:04:59] <RikusW> or DISC ? :-P
[12:05:17] <OndraSterver> D?
[12:05:30] <RikusW> need you ask :-P
[12:05:34] <RikusW> amn
[12:07:17] <RikusW> and i5 is BISC (big)
[12:07:41] <RikusW> (joking)
[12:09:46] <OndraSterver> even the starting position for CS:IP is the same as for the 8086 :P
[12:10:15] <karlp> don't forget that RISC is just a word, and for a while it was associated with specialised processors,
[12:10:25] <karlp> so they may have just called it RISC to make it look special
[12:10:29] <OndraSterver> hehe
[12:10:45] <OndraSterver> but make it compatible for it to be easy to compile for
[12:15:13] <OndraSterver> there we go
[12:15:30] <OndraSterver> jump farptr to FFFC:0
[12:15:35] <OndraSterver> at physical position 7FF00
[12:15:56] <OndraSterver> the FFFC:0 is actually at 7FC00
[12:16:12] <OndraSterver> so the flash is in the upper megabyte of the memory map
[12:16:13] <Richard_Cavell> RISC was at one stage a marketing term
[12:16:24] <Richard_Cavell> I think that x86 is RISC, as in Ridiculous Instruction Set Computing
[12:16:34] <OndraSterver> it is
[12:27:47] <RikusW> Richard_Cavell: using the STK600 with AVR Studio is really easy
[12:27:58] <Richard_Cavell> RikusW: I'll take your word for it
[12:28:14] <RikusW> you can even use an offboard target, eliminating the need for routing boards etc
[12:28:31] <Richard_Cavell> So I have heard
[12:28:31] <RikusW> just connect the ISP header directly to a breadbord
[12:28:51] <RikusW> I have used a stk500 and then built a clone
[12:28:52] <Richard_Cavell> Well I'm gonna do the DAPA cable thing because I feel like I'd learn something that way
[12:29:05] <Richard_Cavell> I have a shopping list to go through tomorrow
[12:29:14] <RikusW> imho I'd just use the stk....
[12:29:48] <RikusW> and AS won't work with DAPA... only avrdude
[12:30:31] <RikusW> megal0maniac_afk: the STK600 can only program NOT debug....
[12:30:44] <RikusW> although atmel could easily have added debugging.....
[12:30:47] <OndraSterver> DAPA is useless
[12:30:51] <OndraSterver> and won't teach you anything
[12:31:51] <karlp> it will teach him how to build a dapa cable, nothing more.
[12:32:07] <RikusW> and DAPA is SLOOOOOW
[12:32:08] <karlp> and it will teach him how to buy a parallel port io card and install it.
[12:32:31] <OndraSterver> lol
[12:32:34] <OndraSterver> aye
[12:32:59] <Hfuy> Hello.
[12:33:08] <RikusW> Richard_Cavell: read about offboard targets in the stk docs
[12:33:17] <Hfuy> Is there a way I can arbitrarily execute an ISR without that interrupt firing?
[12:33:19] <OndraSterver> eloooooo Hfuy
[12:33:25] <OndraSterver> huh?
[12:33:28] <OndraSterver> yes
[12:33:31] <OndraSterver> put it into another method
[12:33:33] <RikusW> then you don't even have to have the routing/avr cards
[12:33:35] <OndraSterver> function*
[12:33:40] <OndraSterver> and just call it :P
[12:33:42] <Hfuy> Presumably if all else fails in C, I could simply include a snippet of assembler directing execution to the right address.
[12:33:44] <Hfuy> Or that, yes.
[12:33:52] <OndraSterver> no, you can not jump to ISR address
[12:33:58] <Hfuy> Oh. That's a pity/
[12:33:58] <OndraSterver> well
[12:34:07] <RikusW> iret might be a problem....
[12:34:10] <OndraSterver> you could CALL it
[12:34:19] <OndraSterver> since that pushes address to the stack
[12:34:54] <OndraSterver> the only difference between RET and IRET is that IRET sets back I flag..
[12:34:55] <OndraSterver> I think
[12:42:05] <Hfuy> I think I may finally have killed an AVR. It refuses to program.
[12:42:18] <Hfuy> "Entering programming mode... FAILED!"
[12:43:22] <Hfuy> Oh well. I have another.
[12:44:59] <OndraSterver> ..
[12:45:00] <OndraSterver> fuses?
[12:45:36] <Hfuy> Possibly. I mistakenly left another part of the circuit connected and got a failed program on the previous attempt.
[12:45:41] <Hfuy> Possibly it erroneously set some fuses.
[12:50:10] <RikusW> does it become hot ?
[12:50:33] <RikusW> maybe its just bricked
[12:51:02] <Hfuy> No heat. I suspect it may have become a cuboid ceramic construction material, yes.
[12:55:23] <RikusW> maybe fuses
[12:55:32] <RikusW> or measure how much current it consumes
[12:55:38] <RikusW> should be around 10mA or so
[12:57:04] <Hfuy> Haven't got time right now.
[12:57:06] <Hfuy> Maybe some other time.
[12:57:16] <Hfuy> It's not really worth spending a lot of time on, after all.
[12:57:42] <RikusW> for repairing fuses you'll need to use HVPP
[12:58:22] <Hfuy> I'm aware. That's why I don't really care if it's that, since I don't have the ability to fix it with the equipment at hand.
[12:59:28] <RikusW> keep it, maybe you'll get HVPP capability someday
[12:59:57] <OndraSterver> mmm, I could fix up DOS 6.2 to work on this print server
[13:00:01] <OndraSterver> sounds exciting! lmao
[13:00:06] <OndraSterver> half meg flash is not much though
[13:00:22] <OndraSterver> would have to bring up USB stack and mount flash :/
[13:00:54] <OndraSterver> OR via serial :P
[13:05:07] <Hfuy> Why would the compiler complain about ISR(PCINT4_vect) on a tiny13A?
[13:05:15] <Hfuy> Claims it's misspelled.
[13:05:41] <OndraSterver> because
[13:05:45] <OndraSterver> there is only one PCINT vector
[13:05:54] <Hfuy> Eh?
[13:06:02] <OndraSterver> aye
[13:06:04] <Hfuy> Then why is the first one called PCINT0_vect?
[13:06:10] <OndraSterver> because there is only one
[13:06:26] <OndraSterver> you have got 6 GPIO pins = no reason to have more, than one interrupt :P
[13:06:27] <Hfuy> Sorry for the elementary question, but you'll agree that's a bit counterintuitive.
[13:06:39] <OndraSterver> eh
[13:06:42] <OndraSterver> no
[13:06:45] <OndraSterver> it is for compatibility with other chip
[13:06:46] <OndraSterver> s
[13:06:49] <OndraSterver> which have more than one PCINT
[13:07:00] <Hfuy> Oh, I see.
[13:07:06] <OndraSterver> mega/tiny is one mess of a registers
[13:07:22] <Hfuy> I assume I have to check some register to see whether this interrupt was caused by a change event on the pin in which I'm specifically interested?
[13:07:32] <OndraSterver> yes
[13:07:38] <OndraSterver> or you know
[13:07:46] <OndraSterver> don't enable it for the pins you are not interested in for the first place
[13:08:29] <Hfuy> Oh, right. Actually, I can do that in my situation.
[13:10:08] <OndraSterver> too bad that the CPU is BGA, I can not solder on it the MS Duo or whatever card it is pins... and bootstrap code from that :(
[13:10:23] <Hfuy> Which CPU?
[13:10:30] <OndraSterver> the one in this printserver
[13:10:48] <OndraSterver> they call it "Proprietary RDC's RISC core", but it is fully 8086 compatible, but with peripherals onboard
[13:11:45] <Hfuy> I struggle slightly with the description of an 8086 as RISC, unless you're willing to allow it as a historical term in that context!
[13:11:58] <OndraSterver> nobody cares about RISC/CISC
[13:11:59] <OndraSterver> except marketing
[13:12:05] <Hfuy> Perhaps not now, no.
[13:12:23] <specing> marketing are the last one to care
[13:12:43] <Hfuy> Back when the PPC 600 series came out and things largely weren't microcoded, or at least weren't microcoded to allow a RISC core to emulate something else, it was quite significant.
[13:20:44] * Hfuy grimaces
[13:20:51] <Hfuy> Do switches bounce open, as well as bouncing closed?
[13:21:30] <RikusW> OndraSterver: isn'te that perhaps a 80188 ?
[13:22:04] <RikusW> Hfuy: afaik yes
[13:22:21] <Hfuy> RikusW, my results suggest that they do. In short: nutballs.
[13:22:33] <Hfuy> Fixes to this involve intricate shenanigans with timers.
[13:23:29] <OndraSterver> RikusW, 80186? not sure
[13:23:36] <OndraSterver> did 80186 had PCI controller, two UARTs
[13:23:39] <OndraSterver> two DMA channels
[13:23:49] <OndraSterver> 3 timers..
[13:24:50] <RikusW> no PCI.... just PIC
[13:24:59] <RikusW> Programmable Interrupt Controller..
[13:25:43] <RikusW> aka 8259
[13:26:21] <Hfuy> does the delay_ms utility code use the timer?
[13:35:29] <RikusW> Hfuy: maybe a loop
[13:35:31] <RikusW> not sure
[13:38:23] <Hfuy> Loops would be interruptible, though, which is fine.
[13:58:53] <OndraSterver> RikusW, so no, it is not 80186 clone :P
[15:05:12] <Tom_itx> inflex, on your tiny10's how much load can you put on the program pins before they start giving you grief?
[15:05:34] <Tom_itx> iirc it was around 10k but i wanted to check
[15:13:36] <TechIsCool> can anyone clear this up I can't get this code to work it runs every loop not every 10000 millis http://pastebin.com/F3gJPaPK
[15:23:13] <timemage> TechIsCool, you expected something different from >= 0 ?
[15:23:44] <TechIsCool> it seems to run every loop but math wise I thought I got it correct
[15:23:49] <TechIsCool> timemage:
[15:24:26] <TechIsCool> timemage: the if statement is evaluating as true when it should be false
[15:24:36] <timemage> TechIsCool, >= 0 would mean if they differered by 1 or more, which happens pretty much instantly.
[15:26:04] <TechIsCool> if we start with 10k worth of time on the clock and millis is below that 5k - 10k is a negative correct -5k or does that not work?
[15:26:08] <timemage> TechIsCool, what you're saying is: if the difference betwene the last record time and the current time is greater or equal to 0 (which is always the case), then run the code.
[15:27:08] <TechIsCool> timemage: I get what you are saying but I thought it would return a negative and that would make it false until it passed into the positive
[15:29:37] <timemage> TechIsCool, i sort of see what you're doing. different from how i'd typically do it.
[15:30:03] <TechIsCool> I am a noob so if there is a better way of doing it I am open to hearing it
[15:31:33] <timemage> TechIsCool, it may not be better at all. usually i just assign the variable the current time. in the if statement subtract the variable from the current time an compare greater than the interval size.
[15:32:40] <timemage> TechIsCool, that is, in setup: oldtime=current_time(); in the loop something like: current_time() - oldtime > duration
[15:38:29] <TechIsCool> timemage: yah but how do you account for roll over?
[15:40:19] <timemage> TechIsCool, usually when i'm doing this it's in standard C using time(). and if that rolls over it's 2038 or so and we have bigger problems. as far as delays on something like the avr go, i'm using using timers or delay loops.
[15:40:56] <TechIsCool> timemage: alright well thanks for the help let see if I can make it fly
[15:41:15] <timemage> TechIsCool, if you want, you could just check that millis() > WaitTemperature rather than doing the subtraction.
[15:42:14] <TechIsCool> timemage: The problem or so I have heard is after the rollover happens you have to know it happened to put WaitTemperature back down
[15:42:29] <TechIsCool> which is 40 days or so on the avr
[15:46:22] <timemage> TechIsCool, you'd need to compare the last checked time against the current and see if it's now less than it was. i'm a bit out of it, so maybe i missed where that's handled in the code you posted. or is the question unrelated?
[16:17:28] <inflex> Tom_itx: yes, 10k was about it
[16:17:38] <inflex> Tom_itx: you could try 5k
[17:41:07] <Tom_itx> inflex, i forget how the programmer signals it to enter TPI mode.. does it raise the reset line?
[17:54:01] <Sur3> Hi i've got an ATmega644P-20PU and connected a dual 7-Segment-LED-Display to it, now i wonder why some LED very lighty light on Pin C2-C5 even if they should be off, other Pins like C0-1,C6 or D1-2 are perfectly off...
[17:54:36] <OndraSterver> :)
[17:54:38] <OndraSterver> I know wh
[17:54:38] <OndraSterver> y
[17:54:41] <OndraSterver> JTAG :P
[17:54:52] <OndraSterver> write 1<<JTD into MCUCR twice after each other
[17:55:13] <OndraSterver> or disable JTAG in fuses, but I prefer it the JTD way, since it is nonvolatile on reset
[17:55:28] <OndraSterver> it is volatile*
[17:56:26] <Sur3> ahh great, will try it now, thanks
[17:56:30] <OndraSterver> np
[17:56:40] <OndraSterver> make sure that it is MCUCR register - some megas have it in different one
[17:56:46] <OndraSterver> but it is JTD bit
[17:57:54] <OndraSterver> also check notes for it - as I mentioned, it has to be written TWICE immediatily after each other
[17:57:55] <OndraSterver> (four clocks)
[17:58:22] <Tom_itx> yeah you gotta be quick
[17:59:06] <Tom_itx> ldi r16, (1<<JTD) ; disable jtag.
[17:59:06] <Tom_itx> out MCUCR, r16 ; this bit must be written twice within 4 cycles
[17:59:06] <Tom_itx> out MCUCR, r16
[18:01:23] <OndraSterver> <Tom_itx> yeah you gotta be quick
[18:01:28] <OndraSterver> that's what she didn't say
[18:01:29] <OndraSterver> :P
[18:01:56] <Sur3> Ah thx tom, i'm still on C, but will change to Asm this year i think ^^
[18:02:43] <Tom_itx> MCUCR = (1 << JTD); // disable jtag MCUCR = (1 << JTD); // disable jtag
[18:03:03] <Sur3> i thought about |= for not changing the other bits?!?
[18:04:29] <Sur3> wow it worked, thanks alot ^^
[18:05:06] <Sur3> anyway, what would be the equivalent for |= in asm?
[18:05:34] <Tom_itx> or
[18:05:41] <jadew> or if you're setting a bit sbi
[18:05:55] <Sur3> ahh yeah sbi great thx
[18:06:26] <Tom_itx> or _BS() wasn't it?
[18:06:34] <Tom_itx> i don't keep up with all the new fancy macros
[18:06:44] <jadew> I don't know that one either
[18:07:09] <Tom_itx> sbi cbi were supposedly obsoleted
[18:07:26] <Tom_itx> in flavor of the new ones
[18:09:36] <OndraSterver> well sbi/cbi are hardware instructions that work only on the bottom 64? registers
[18:09:46] <OndraSterver> which became useless on newer chips
[18:11:05] <jadew> what are you supposed to use now?
[18:11:18] <OndraSterver> LAT/LAS
[18:11:24] <OndraSterver> but only on xmega
[18:11:34] <OndraSterver> on mega the GPIOs still fit into the 64 bytes
[18:11:54] <OndraSterver> there was one more instruction..
[18:11:56] <OndraSterver> or two
[18:11:59] <OndraSterver> one for set/one for clear
[18:12:05] <OndraSterver> and I don't remember it again
[18:13:36] <OndraSterver> hmm
[18:13:41] <OndraSterver> I can't find it :(
[18:13:45] <Tom_itx> showertime
[18:13:57] <OndraSterver> it's raining again?
[18:14:05] <jadew> lol
[18:14:45] <OndraSterver> nvidia! Y U NO DATASHEET FOR THE PUBLIC!
[18:14:50] <OndraSterver> for your USB - PCI chip :(
[18:20:02] <jadew> man... I run into such unforseen issues with this little project
[18:20:15] <jadew> I spent most of the time on the freaking UI and the troubles it caused
[18:20:32] <OndraSterver> unforeseen consequences <3
[18:21:04] <jadew> I basically got the UI to a close to perfect stage, when I realized it crapps out when you zoom in a lot, at the end of the stream of captured samples
[18:21:28] <jadew> because the virutal size of the window was getting too large and windows was overflowing the clipping rect (what you have to draw)
[18:21:50] <OndraSterver> "Prepare for unforeseen consequences, Mr. Vance!"
[18:22:12] <jadew> so I had to implement scrolling from scratch to support huge sizes
[18:22:28] <Sur3> yay evrything cabled, so i can finally start programming the digits for my 7-seg-display ^^
[18:22:38] <jadew> that was not a problem, the problem was the whole code was written with something else in mind so I introduced a shitload of bugs
[18:22:40] <OndraSterver> yeah, but still better than doing it in Qt and any other linux-comatible stuff
[18:22:50] <OndraSterver> I presume that you are doing it in C#?
[18:22:58] <jadew> c++
[18:23:18] <OndraSterver> oh
[18:24:13] <jadew> I want to get the UI right, before I advance, otherwise I won't get back to all the small things
[18:24:45] <jadew> but it's wearing me down, especially since I got it right once and then had to butcher the entire code
[18:26:00] <Sur3> ah forget the digits, PORTC = v++; is looking freaking enaugh xD
[18:27:44] <Sur3> by the way, how often can i programm the atmega before the EEPROM is broken?
[18:28:00] <jadew> many times
[18:28:31] <jadew> it should say in the documentation
[18:28:50] <OndraSterver> 100k is MTBF for EEPROM I think
[18:29:04] <jadew> yeah, and 10k for flash or something similar
[18:29:10] <OndraSterver> ay
[18:29:42] <Sur3> ah k thx, so i should better not programm some self-reprogramming atmegas xD
[18:31:37] <jadew> just put the info in the eeprom and don't abuse it
[18:31:50] <OndraSterver> doing wear leveling on eeprom is easy as a pie
[18:31:54] <jadew> like if you turn a knob, don't store the settings every time the knob is turned
[18:32:54] <Sur3> just because i bought 5 atmega and i'm thinking about how to combine them best ^^
[18:33:18] <jadew> in a blender :D
[18:33:23] <OndraSterver> LOL
[18:33:24] <Sur3> xD
[18:33:25] <OndraSterver> good one
[18:33:29] <OndraSterver> "let's interface"
[18:33:44] <OndraSterver> I do wonder how good would be multi-master i2c
[18:33:53] <OndraSterver> a bit modified multi master
[18:34:04] <OndraSterver> every device would have its address and when not sending it would go into slave mode
[18:34:37] <OndraSterver> that would give the bus option to work anybody to anybod
[18:34:38] <OndraSterver> y
[18:34:48] <OndraSterver> ... nasty!
[18:34:58] <Sur3> i thought about soldering kind of a pc, by asigning one atmega for input one for video one for audio, one for master and, one for external memory control
[18:35:19] <OndraSterver> haha
[18:35:32] <OndraSterver> it is much better to get at(x)mega with built in xmem/ebi
[18:35:37] <OndraSterver> saves you a lot of trouble
[18:35:50] <OndraSterver> doing (S)DRAM in software is possible, but reading/writing is painfuly slow
[18:36:02] <Sur3> ah ok
[18:36:28] <OndraSterver> also building PC out of megas - meh
[18:36:31] <OndraSterver> too slow really
[18:36:43] <Sur3> but low power ^^
[18:36:45] <OndraSterver> you can't get any usable resolution nowadays from atmega
[18:36:48] <OndraSterver> no
[18:36:58] <OndraSterver> you need few atmegas blasting at full speed
[18:37:04] <OndraSterver> we are talking tens - maybe hundred of mA
[18:37:08] <OndraSterver> (S)DRAM take a lot
[18:37:37] <Sur3> also i have this hackvision so i think some resolution is possible, for it drive an old television
[18:37:47] <OndraSterver> 320x240 resolution
[18:38:17] <OndraSterver> I have got this plan for when I build my xboard ultra - it has got two 2channel DACs
[18:38:33] <OndraSterver> each gets 500ksps then (aka 4 channels at 500ksps or 2 channels at 1MSPS each)
[18:38:59] <OndraSterver> /60Hz
[18:39:13] <OndraSterver> you are down to 8333 pixels
[18:39:31] <OndraSterver> with R2R DAC you could be doing much higher samples though
[18:40:00] <OndraSterver> but I am going towards VGA rather TV
[18:40:08] <Tom_itx> Sur3, you should use a BCD chip
[18:40:42] <Tom_itx> i was gonna make one of those but it's still sitting in a box somewhere
[18:41:00] <Sur3> bcd whatfor? for the 7-seg-display?
[18:41:09] <Tom_itx> yessir
[18:41:37] <Sur3> ah ok, jeah but then i couldnt write letters such as HALLO
[18:41:55] <Sur3> just the O as it is the same as 0 xD
[18:44:07] <Sur3> so couldnt an atmega drive a VGA-Connector, probably with external video memory somehow?
[18:44:26] <OndraSterver> it could, but at what speeds...
[18:44:31] <OndraSterver> no DMA..
[18:44:51] <OndraSterver> I will try to do something with my xboard coco :)
[18:45:05] <Sur3> ah ok so i probably need to split the display in 4 quandrants and drive each by an own atmega
[18:45:18] <Tom_itx> mux them
[18:45:23] <OndraSterver> but how? 90° phase shifted clock? :P
[18:45:32] <Tom_itx> BCD has 2 fold advantage
[18:45:36] <Tom_itx> also acts as driver
[18:46:30] <OndraSterver> I think I could do the VGA with external R2R quite fast on the xmega
[18:46:40] <OndraSterver> and purely in hardware
[18:46:46] <OndraSterver> DMA to be dumping new data to the R2R DAC
[18:46:58] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/temp/led/7segtop.jpg
[18:47:00] <OndraSterver> once it finishes line or whatever it does event, which will trigger another output
[18:47:08] <OndraSterver> and that triggers another DMA etc
[18:47:09] <Tom_itx> was what i was gonna use
[18:47:13] <Sur3> probably i should lokk for a dedicated videochip to be controlled by the atmegas
[18:47:19] <Sur3> *look
[18:47:20] <OndraSterver> yes :)
[18:47:38] <OndraSterver> Tom_itx, I have got something VERY similar, from old test gear
[18:47:48] <OndraSterver> it was some 3 1/2 DMM or something, no idea what was it for
[18:47:53] <OndraSterver> it had like 6 power rails...
[18:48:00] <OndraSterver> just the VM inside!
[18:48:11] <Sur3> uhan advanced 7seg that can display + *envy* i have just an http://www.pollin.de/shop/dt/NjU0OTc4OTk-/Bauelemente_Bauteile/Aktive_Bauelemente/Displays/LED_Anzeige_BVN_7572SR4.html
[18:48:20] <OndraSterver> wait
[18:48:25] <OndraSterver> are we talking 7segm or VGA?
[18:48:34] <Sur3> we talking vga
[18:48:35] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/temp/led/amd_bot.jpg
[18:48:36] <Tom_itx> heh
[18:48:41] <Sur3> with tom i talk 7seg
[18:48:47] <Tom_itx> someone left the plastic on the heatsink on that one
[18:49:02] <OndraSterver> thunderbird 750MHz? :P
[18:49:35] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/temp/led/amd_top.jpg
[18:49:59] <OndraSterver> do I get a cookie for the correct answer? :D
[18:51:05] <Sur3> @OndraSterver: can u recommend some easy programmable svga-chips?
[18:51:18] <OndraSterver> duh, no idea
[18:51:28] <OndraSterver> I want to interface my xboard ultra (once it will be done) to old ISA VGA cards :P
[18:51:44] <Sur3> ah ok, well anyway i'm looking for 1024x768x24
[18:52:01] <OndraSterver> heh
[18:52:21] <OndraSterver> that is over 2MB of RAM required
[18:52:28] <Sur3> its 4 ^^
[18:53:03] <OndraSterver> and over 50MHz of analog transmission
[18:53:09] <Sur3> ohh no wait sry its not 4 xD
[18:53:20] <OndraSterver> 1024*768*3 = 2.3MB or so
[18:54:26] <Sur3> 50MHz by what framerate?
[18:55:01] <OndraSterver> 60Hz
[18:55:23] <OndraSterver> not sure how would LCD monitor feel about 30Hz signal
[18:56:05] <Sur3> i'm looking for 25Hz or 20Hz, than probably my 20MHz ATmega is fast enaugh for the transmission
[18:56:33] <OndraSterver> no
[18:56:46] <OndraSterver> also, where is your RAM?
[18:57:18] <Sur3> yeah thought about external ram, but you said its slow?
[18:57:30] <OndraSterver> that depends - does your chip natively support it?
[18:58:25] <OndraSterver> external SRAM = usable speed... but a lot of pins
[18:58:35] <OndraSterver> external DRAM = awful speed without native support for it but less pins
[18:58:48] <OndraSterver> regular mega just won't do it
[18:58:54] <OndraSterver> without any external circuitry
[18:59:00] <OndraSterver> ad723 is in my mind for some unknown reason
[18:59:07] <Sur3> i've some old ddr2 but i think they would be too difficould to connect?
[18:59:15] <OndraSterver> lol
[18:59:18] <OndraSterver> forget about ddr
[18:59:21] <Sur3> k
[18:59:26] <OndraSterver> without any glue fpga in the middle of it
[18:59:43] <OndraSterver> you could use 4MB SIMMs from 386
[18:59:54] <OndraSterver> I have got highly optimized code for it somewhere
[18:59:58] <OndraSterver> takes 3 ports
[19:00:06] <OndraSterver> two for addr + signal, one for data
[19:00:21] <Sur3> that would be fine
[19:00:26] <OndraSterver> but reading is awfuly slow
[19:00:29] <Sur3> but just 4MB?
[19:00:41] <OndraSterver> there were supposedly upto 16MB models
[19:00:46] <OndraSterver> but I have got at home only 4MB
[19:00:54] <OndraSterver> the more addressing lines = the more pain
[19:01:13] <OndraSterver> I am moving to xmega and once xboard ultra becomes available I will work on VGA signal generator
[19:01:22] <Sur3> ah, k i started with 486 before i used an amiga 500 so i dont know about 386 ^^
[19:01:38] <OndraSterver> 486s had the same 30pin SIMMs
[19:01:57] <Tom_itx> OndraSterver are you gonna try that avr gcc?
[19:02:02] <OndraSterver> maybe
[19:02:09] <Tom_itx> i dl it and am thinking about it
[19:02:13] <OndraSterver> they distribute all the stuff as patches though
[19:02:21] <Tom_itx> i noticed
[19:02:22] <OndraSterver> so if I upgrade gcc, who knows if the patches will work
[19:02:23] <OndraSterver> and patch
[19:02:37] <OndraSterver> I am not linux geeky enough to know that
[19:02:46] <Tom_itx> there's a readme
[19:02:48] <OndraSterver> I will try that tomorrow (today)
[19:02:51] <OndraSterver> yes
[19:02:57] <OndraSterver> but I want to use the latest gcc 4.7.2
[19:02:58] <Tom_itx> lemme know how it goes
[19:03:03] <OndraSterver> since it should be bringing some new stuff even for AVR
[19:03:10] <OndraSterver> such as automatic "PROGMEM" for strings etc
[19:03:22] <OndraSterver> or was it even in 4.6..
[19:04:20] <Sur3> just checked, my 486 has 2 rams with 32 MB together
[19:04:28] <OndraSterver> 30 or 72 pin?
[19:04:33] <Sur3> mom
[19:04:46] <OndraSterver> ?
[19:04:49] <OndraSterver> dad
[19:04:56] <Tom_itx> bro
[19:05:26] <Sur3> ahh 72 dman
[19:05:30] <Sur3> *damn
[19:05:39] <OndraSterver> those have 32bit bus..
[19:05:42] <OndraSterver> or was it 16bit
[19:05:48] <OndraSterver> bloody mind!
[19:07:29] <Sur3> hm for 72 pins i would need 9 Ports, so 3 of my ATmegas :-/
[19:08:14] <OndraSterver> LOL
[19:08:16] <OndraSterver> it does not work that way
[19:09:15] <OndraSterver> there is 11 address bits
[19:09:17] <OndraSterver> and 32 data bits
[19:09:18] <Sur3> but probably i could use this as advantage, when i just spilt the bytes returned so evry prozessor uses 1/3 of the bytes, but that would need lots of coordination between the ATmegas
[19:09:32] <OndraSterver> same firmware, same clock source
[19:09:34] <OndraSterver> (or clkout on one)
[19:09:39] <Sur3> ahh ok 11+32+x=72 ??
[19:09:47] <Sur3> ahh ok
[19:09:52] <OndraSterver> then there are some signals (WR, CAS, RAS)
[19:09:58] <OndraSterver> and many grounds, detect pins
[19:10:00] <OndraSterver> and vccs
[19:10:06] <OndraSterver> also note that these do not use 5V anymore
[19:10:12] <OndraSterver> whoops they do
[19:10:13] <OndraSterver> sorry
[19:10:30] <Sur3> 5V is great my ATmega is powered over usb ^^
[19:11:22] <OndraSterver> but in order to run DRAM you need:
[19:11:34] <OndraSterver> load the PORTx output with A0-A7
[19:11:39] <OndraSterver> blink CAS
[19:11:45] <Sur3> so the 72 Pin RAM should be useably by just one ATmega if i throw away the 16 high databits?
[19:11:47] <OndraSterver> load the PORTx with A8-A11
[19:11:53] <OndraSterver> blink RAS
[19:12:01] <OndraSterver> enable pullups on PORTy
[19:12:06] <OndraSterver> (actually, that before the RAS)
[19:12:43] <OndraSterver> note that in order to shift data by 8 bits you need 8 instructions, since there is no barrel shift register
[19:12:56] <OndraSterver> you are down to 30 cycles or so for read/write
[19:13:04] <OndraSterver> with fast page mode you could gain a little
[19:13:09] <OndraSterver> but still quite slow
[19:14:46] <Sur3> hm, what do i have to shift by 8 bits?
[19:14:55] <OndraSterver> the address
[19:15:14] <OndraSterver> whoops, my math was too simple
[19:15:16] <OndraSterver> it gets harder
[19:15:21] <OndraSterver> three ports:
[19:15:25] <OndraSterver> PX, PY and PZ
[19:15:36] <OndraSterver> PX, PY = address + signal, PZ = data (in/out
[19:15:46] <Sur3> ahh ok
[19:16:36] <OndraSterver> bloody server
[19:16:41] <OndraSterver> after blinking CAS:
[19:17:00] <OndraSterver> PX = A11-A18, PY = A19-A21
[19:17:15] <OndraSterver> enable pullups, set as input
[19:17:18] <OndraSterver> PZ
[19:17:24] <OndraSterver> and then blink RAS
[19:18:31] <Sur3> isnt PZ always on input state when using the ram?
[19:18:39] <OndraSterver> and how would you write?
[19:18:51] <Sur3> ah ok, thats a point ^^
[19:19:15] <OndraSterver> also note that you still need to WRITE to the RAM
[19:19:24] <OndraSterver> on vsync
[19:19:36] <OndraSterver> err
[19:19:38] <OndraSterver> on vblank
[19:19:43] <OndraSterver> too late to think damnit
[19:20:16] <Sur3> on vblank? does the ram has vblank or are u reffering to the vga?
[19:20:25] <OndraSterver> to the vga
[19:20:43] <OndraSterver> you need to redraw the buffer while the screen's trace travels back up
[19:20:46] <OndraSterver> (CRT times)
[19:20:56] <OndraSterver> there are some off the screen hidden pixels used for this
[19:20:58] <Kevin`> OndraSterver: why aren't you using an avr chip with a hardware dram interface
[19:21:00] <OndraSterver> and these calculations
[19:23:50] <Sur3> ok vsync would be difficult, i think if some windows are sometimes broken while moving them, that would not be the problem for me
[19:32:07] <Sur3> thanks for the short DRAM describtion, using my 16 MB 72 Pin RAM would be great, if it is not too slow i could also use a sd-card..?
[19:33:36] <Sur3> oh wait no my fault sd card for ram would be fast brocken xD
[20:37:50] <creep> hey
[20:38:01] <creep> what programmer do you recomment for atmega series?
[20:43:50] <Richard_Cavell> So is there any electrical reason why a DAPA cable can't be a few metres long? I want to do in system programming from the parallel port
[20:46:04] <Sur3> im using the Pololu USB AVR Programmer
[20:47:39] <Sur3> it has a TTL-level serial port for general-purpose communication and a SLO-scope for monitoring signals and voltage levels as aditional features
[20:50:38] <Sur3> i'm not sure about DAPA cables, but i think as long an the cable delay is less then the frequenzy of the of the port it should work
[20:52:53] <Tom_itx> creep mine
[20:53:08] <Sur3> you probably have to higher the voltage though
[21:04:52] <Sur3> speed of electricity in a copper cable = 200,000,000 meters/ second
[21:06:05] <Sur3> gn8
[21:45:03] <Casper> Richard_Cavell: several issues
[21:45:18] <Casper> noise is one, signal degradation is another one
[22:17:11] <Richard_Cavell> Casper: how long can it be really?
[22:17:22] <Richard_Cavell> I just bought the parts for my DAPA cable and I bought 4 metres of 6-core cable
[22:17:39] <Casper> buffered or unbuffered?
[22:17:45] <Richard_Cavell> huh?
[22:17:59] <Richard_Cavell> It's 5 wires that plug into the parallel port
[22:17:59] <Casper> shuelded or plain wires?
[22:18:05] <Richard_Cavell> look like plain wires
[22:26:14] <Casper> might only work for 10-20cm...
[22:26:32] <Casper> try and see
[22:29:53] <Richard_Cavell> No way that's too short
[22:30:28] <Casper> that's why buffered programmers exists
[22:38:40] <Tom_itx> mmm i thought you had a stk500 now
[23:08:57] <creep> anyone tried using a piece of 80 pin ATA cable for programmer?
[23:09:10] <creep> and use every second wire as shield?
[23:09:49] <creep> that would stop crosstalk.
[23:12:34] <Lt_Lemming> that is what the second wires are used for in ATA
[23:27:36] <aarobc> Is it possible to compile this https://github.com/a1ronzo/SparkFun-USBtoSerial in avr studio?
[23:27:40] <aarobc> I can't get it to work.
[23:48:16] <Richard_Cavell> megal0maniac_afk: DAPA cable has been constructed