#avr | Logs for 2011-12-24

Back
[00:13:17] <crazy_pete> wow
[00:13:20] <crazy_pete> 124 people
[00:19:11] <inflex> wtf is going on... missing something important here with my ADC code
[00:22:45] <Ralith> inflex: for a while I thought you were talking about washington state and had confused the units
[00:23:15] * inflex head-bangs-to-desk
[00:23:20] <inflex> no wonder my voltage code wasn't working
[00:23:36] <Casper> inflex: another code 13?
[00:23:50] * inflex swaped the cap and resistor around on the PCB accidentally which meant that instead of a 10K|1K divider, I have a 100n|1K divider
[00:24:26] <inflex> (the cap is supposed to be in parallel with the 1K
[00:25:33] <Casper> hehe
[00:26:17] <inflex> oh well, easy fix at least
[00:26:47] <Casper> you know
[00:27:07] <Casper> I'm starting to think that laptop battery are programmed to die
[00:27:16] <Casper> instead of physically dieing
[00:27:40] <Casper> it seems like the pack just refuse to put more energy in the batts than the last known capacity
[00:50:50] <vectory_> if avr code words are 16 bit, how much bit does rjmp 1 jump 8 or 16?
[00:51:06] <Casper> 16
[00:51:31] <abcminiuser> 16
[00:51:51] <Casper> and yes, it's wastefull
[00:51:58] <vectory_> why
[00:52:05] <vectory_> 8 would be wastewul
[00:52:10] <Casper> all instructions are 16 bits long
[00:52:25] <vectory_> the question was wasteful?
[00:52:39] <Casper> even if the instruction AND the address could fit in a 8 bits, they still use 16 bits
[00:53:16] <Casper> I guess the reason why they did that is because there is more than 128 instruction possible... so really no space left for the address
[00:54:08] <vectory_> yeah, and you can rjmp further :D
[00:55:07] <vectory_> and more reliable
[00:55:44] <vectory_> cant jump into middle of an instruction
[00:56:28] <Casper> that shouln't be a problem if you don't do stupid thing...
[00:56:45] <Casper> but really... it's more an instruction count issue than anything else
[00:59:24] <Ralith> vectory_: if your jump destination is wrong, your code is broken anyway.
[01:00:06] <Casper> many architecture have variable opcode length
[01:00:35] <Casper> there is no jump problem unless the programmer think he's more intelligent than the compiler :D
[01:00:48] <Casper> or assembler that's it
[01:01:27] <vectory_> ok ;)
[01:05:19] <inflex> Aaah, choosing of instructions and ideologies is always such a traumatic thing
[01:05:32] <inflex> I mean, we'd love for all of them to be orthagonal... but that's just not going to happen
[01:05:48] <inflex> The 68xxx series did a good job in my view
[01:09:01] <Casper> it's just sad that there is no "load immediate 16 bits" instruction
[01:16:44] <inflex> all about the compromises.
[01:17:16] <inflex> overall I thought they did a reasonably good job on the AVRs
[01:18:00] <inflex> though you certainly do get penalised for jumping around
[01:19:47] <crazy_pete> most archs have a penalty for jumping, for example on the intel (dunno if it is still is) it was an automatic cache flush
[01:20:29] <inflex> probably the P4's
[01:21:08] <inflex> but in part I think that was tamed down by splitting the pipe to give us the HT option and some improvements on their microcode
[01:21:52] <vectory_> do i need a cap from vcc to gnd or is a battery's supply stable enough?
[01:22:06] <inflex> dependson the battery - but it's a good recommendation to still always decouple close to your chips
[01:22:39] <inflex> because the dynamic drain can be frequently heavy enough to cause large spikes on anything more than a couple of inches of track or cable
[01:22:54] <vectory_> wont that draw more power? im all over power efficiency, without much of an idea what that lloks like xD
[01:23:15] <inflex> no, won't draw more power - if anything it'll improve efficiency
[01:23:56] <inflex> assuming you use caps that aren't as leaky as a sieve :D
[01:24:08] <inflex> 100nF ceramics do a good job
[01:25:09] <vectory_> for 3V?
[01:25:40] <inflex> doesn't really matter, I just use 25~50V ceramics
[01:25:42] <inflex> (0603 size)
[01:25:56] <vectory_> ohkaey
[01:26:40] <vectory_> im kinda lost :S reading a 300 page datasheet and posible several application notes is hard
[01:27:56] <Casper> nahhh not hard
[01:28:03] <Casper> you take it section by section as needed
[01:28:04] <vectory_> everything seems simple in tutorials, but skimming through the datasheets without a clue what to look for isn't
[01:29:54] <inflex> It's a big elephant to consume... so you have to take it small pieces at a time
[01:30:03] <inflex> no way you can try consume it all at once, you'll just explode.
[01:30:55] <Casper> vectory_: after a bit you'll realise that things are easy to find
[01:31:14] <vectory_> sure, im kinda hectic at the moment, wanna know it all
[01:32:42] <vectory_> head over heals, no experimenting or prototyping, directly writing all of the code - will be a bugfest x)
[01:42:58] <Casper> I hope you compile from time to time
[02:03:25] <vectory_> nope, im on linux but i only know how to assemble with studio :S
[02:08:13] <vectory_> and its really no fun to read man avr-gcc
[02:34:12] <Casper> just get a good makefile
[02:34:51] <vectory_> no time to read it and snip the parts i need
[03:32:08] <vectory_> Tom_itx: you dont follow design guide luines in your m168 tutorial
[03:32:30] <vectory_> or wait, is it?
[04:03:23] <rue_bed> so what is the most common detail missing from avr flashing led tutorials?
[04:20:25] <OndraSter> there is something missing?
[04:40:43] <vectory_> i mean a diode from reset to vcc. dont know why thats in the app note
[04:55:37] <OndraSter> diode from reset to vcc ?!
[04:55:45] <OndraSter> why would be diode there
[04:58:59] <vectory_> If not using High Voltage Programming it is recommended to add an ESD protecting
[04:59:00] <vectory_> diode from RESET to Vcc, since this is not internally provided due to High Voltage
[04:59:00] <vectory_> Programming.
[04:59:38] <vectory_> Alternatively, or in addition, a zener diode can be used to limit the
[04:59:38] <vectory_> RESET voltage relative to GND. The zener diode is highly recommended in noisy
[04:59:39] <vectory_> environments. The components should be located physically close to the RESET pin
[04:59:39] <vectory_> of the AVR. Figure 3-1 shows the recommended circuit on the RESET line.
[04:59:52] <vectory_> app note avr042, sorry for c/p
[05:10:13] <OndraSter> oh
[05:10:22] <OndraSter> it is for HVP
[05:11:45] <OndraSter> I was smart enough to not need HVP so far :P
[05:12:14] <vectory_> diode is for when you dont need hvp
[05:30:02] <OndraSter> do you have schematics of how it is connected, vectory_ ?
[05:30:05] <OndraSter> I don't get it why that is there
[05:30:36] <OndraSter> maybe if there would appear 12V so it doesn't jump to HVP?
[05:32:41] <vectory_> http://www.atmel.com/dyn/resources/prod_documents/doc2521.pdf page 5
[05:33:34] <`g> hi
[05:33:34] <tobbor> Hello `g
[05:33:53] <h4x0r`> [au] amsg: Merry Christmas to all... and to all, a Good Night :)
[05:35:54] <OndraSter> gn
[05:36:00] <OndraSter> oic vectory_
[05:36:53] <vectory_> to reduce high current loop, maybe?
[05:36:58] <vectory_> sounds smart at least x)
[05:37:30] <vectory_> maybe not a probem for a first blink.c
[05:39:28] <OndraSter> definitely not lol
[05:39:35] <OndraSter> I've never used it
[05:41:34] <OndraSter> chmpf, why they haven't put the BIOS into PLCC socket but soldered the PLCC directly onto the board
[05:41:38] <OndraSter> now how am I supposed to dump it
[05:42:06] <vectory_> because you arent supposed do that :P
[05:42:20] <OndraSter> but... I want to :(
[05:49:03] <jacekowski> OndraSter: uniflash
[05:49:28] <jacekowski> OndraSter: besides, they used to do that, but not many people change those so there was no real point in doing tha
[05:49:45] <jacekowski> uniflash under dos will dump it
[05:57:56] <vectory_> so, if got half the code written, only need setup and a pwm loop for tone generation >_< thats the worst half
[06:02:09] <OndraSter> jacekowski, I want to dump it so I can modify it and flash it back :P
[06:02:23] <OndraSter> so I need to be able to flash it outside the "PC"
[06:02:25] <OndraSter> plus I can't boot DOS
[06:02:29] <OndraSter> I can boot either WinCE or Linux
[06:05:14] <jacekowski> why not dos?
[06:05:22] <jacekowski> freedos will do as well
[06:05:40] <jacekowski> and besides, do you know how to modify bios?
[06:05:42] <OndraSter> because it can either boot B000FF image with WinCE or directly load ELF binary with linux kernel
[06:05:50] <OndraSter> disassembler!
[06:05:55] <OndraSter> I want to port there some normal BIOS
[06:06:45] <jacekowski> do you know that bios is bit more complicated than that
[06:06:51] <jacekowski> it's compressed modular image
[06:07:20] <OndraSter> I nkow
[06:07:22] <OndraSter> I know
[06:07:45] <OndraSter> by normal BIOS I mean something like OpenBIOS or Coreboot or w/e
[06:08:05] <OndraSter> they have working boards with same chipset, it can't be _that_ hard to port the GPU code
[06:08:33] <OndraSter> mostly when the GPU is inside the chipset
[06:09:39] <jacekowski> you would be surprised
[06:09:59] <OndraSter> I will
[06:10:00] <OndraSter> :P
[06:10:05] <jacekowski> you can try booting dos using kexec
[06:11:11] <OndraSter> I have here update package for BIOS, but it has some extra code in it too...
[06:11:57] <OndraSter> I mean, it is bigger than the 512kB EEPROM
[06:17:34] <inflex> OndraSter: just remove the bios with hotair and put a socket in its place
[06:17:41] <OndraSter> will it fit?
[06:17:47] <OndraSter> I mean, is it the same size?
[06:17:50] <OndraSter> the SMD bottom pads
[06:17:55] <OndraSter> I thought about that
[06:56:36] <amee2k> hrm
[06:57:00] <amee2k> can a dry cap on a 12V rail cause a 1A (secondary side) fuse to blow?
[07:43:31] <CapnKernel> abcminiuser: Re this batch of beer: It's not disgusting, but it's not sufficiently beerlike either.
[07:43:47] <abcminiuser> Ah, so it's English beer then
[07:44:08] <CapnKernel> I suspect the fermentation temp was too high, it's a bit fruity
[07:44:31] <CapnKernel> Hello Sunny, a very Merry Christmas to you and Libin!
[07:44:53] <CapnKernel> A season of celebration for you :-)
[07:44:53] <Steffanx> Who is Sunny CapnKernel ?
[07:45:03] <CapnKernel> Er, could actually be wrong window!
[07:45:16] <CapnKernel> Steffanx: Thanks for the heads-up!
[07:45:38] <CapnKernel> Sunny and Libin are a Chinese couple I know here in Melbourne.
[07:45:43] <Steffanx> :D
[07:49:01] <Tom_itx> rue_bed you failed to give us an answer
[07:49:36] <Steffanx> poor Tom_itx
[09:49:16] <ys0> oi
[09:49:26] <ys0> auguri
[10:00:57] <Steffanx> ys0 ?
[11:09:33] <Thrawn> Woooo
[11:09:35] <Thrawn> How are you?
[11:09:46] <Thrawn> Merry xmas to you all
[11:11:48] <`g> same for you Thrawn
[11:41:45] <budwaa> Hi, I am counting the pulses coming into INT0. The pulses represent a toothed wheel. All I want to do is have a fast interrupt to count the teeth up to the max value and return. Will this code work ok ? http://pastebin.com/4wGgYXYB
[11:42:55] <Tom_itx> you could do the comparison outside the interrupt
[11:43:12] <Tom_itx> and just tooth++ inside
[11:43:54] <Tom_itx> and i'm not sure if you need the reti() as C adds that iirc
[11:44:12] <budwaa> I think because I have used a naked interrupt this is not the case
[11:44:27] <budwaa> it strips out a lot of the code that normally wraps an interrupt
[11:44:37] <Tom_itx> ok
[11:44:49] <budwaa> It is really the use of the naked interrupt that I have some reservations about
[11:45:09] <Tom_itx> got a link to the documentation on ISR_NAKED?
[11:45:30] <Tom_itx> never used it myself
[11:45:34] <budwaa> http://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html#ga8b4c7e44627db0a60d676213add42d64
[11:46:16] <budwaa> actually I remember one thing I missed. I think that the rising/falling edge check is done by the compiler in the code normally generated by the interrupt. When you used a naked ISR I think you have to do the check yourself
[11:46:42] <Tom_itx> maybe you'd be better off without it
[11:47:08] <Thrawn> Are AVR microcontrollers a bit like Atmel and PIC?
[11:47:14] <budwaa> It adds quite a bit of delay to the interrupt.
[11:47:20] <budwaa> Atmel make AVR
[11:47:21] <Tom_itx> avr are atmel
[11:47:46] <Tom_itx> budwaa, what about SREG?
[11:47:49] <budwaa> The reason I want to remove the delay is that I am working with pretty fast signals
[11:47:50] <Tom_itx> did you save that?
[11:47:53] <budwaa> No idea..
[11:48:19] <budwaa> I work in C so it's not something I am familiar with tbh
[11:48:27] <Thrawn> So if I have an arduino mega I automatically have an avr?
[11:48:42] <Tom_itx> The user code is responsible for preservation of the machine state including the SREG register, as well as placing a reti() at the end of the interrupt routine.
[11:48:48] <Tom_itx> you did one but not the other
[11:49:09] <Tom_itx> maybe push the sreg and pop it before reti
[11:49:16] <Tom_itx> inline asm
[11:49:18] <budwaa> so i need to read the SREG and then write it bac
[11:49:25] <Tom_itx> i guess
[11:49:28] <Tom_itx> that's what it says
[11:49:57] <budwaa> Why would the SREG change in this instane?
[11:50:00] <budwaa> instance*
[11:50:14] <Tom_itx> look at the asm output
[11:50:17] <Tom_itx> maybe it doesn
[11:50:18] <Tom_itx> t
[11:50:48] <Tom_itx> write it in asm if you want it fast
[11:51:02] <Tom_itx> or tweak the asm output
[11:52:21] <Thrawn> I built an arduino controlled solar over, I have the video on youtube
[11:52:34] <Thrawn> Maybe I'll show you guys later when you're not so busy with machine code :)
[11:52:37] <budwaa> guess I can't avoid ASM forever...
[11:52:45] <budwaa> solar over?
[11:52:55] <Thrawn> oven sorry
[11:52:57] <Tom_itx> we're multitaskers here
[11:53:03] <Thrawn> So you're women?
[11:53:14] <Tom_itx> far from it
[11:53:20] <Thrawn> I'm a man I can only do one thing at a time
[11:53:43] <Thrawn> But yeah I glued loads of mirrors onto a sky dish
[11:53:49] <Thrawn> And I have 2 stepper motors
[11:53:51] <Thrawn> And some metal gears
[11:53:55] <Thrawn> And an arduino
[11:53:59] <Thrawn> And 4 light dependent Resistors
[11:54:05] <Thrawn> The HALF STEP algorithm
[11:54:11] <Thrawn> A 5v adapter
[11:54:14] <Thrawn> Some resistors
[11:54:18] <Thrawn> Some ULN transistors
[11:54:19] <Thrawn> Wood
[11:54:20] <Thrawn> Nuts
[11:54:21] <Thrawn> Bolts
[11:54:27] <Thrawn> Washers
[11:54:29] <Thrawn> Screws
[11:54:37] <budwaa> so how do I locate the INT0 code in the dissasembly?
[11:54:54] <Casper> do you have a .lst?
[11:55:02] <Tom_itx> it should be well commented in the .lst file
[11:55:06] <Thrawn> http://www.youtube.com/watch?v=BAWLjqMiulo
[11:55:12] <Thrawn> That's my arduino controlled solar oven
[11:56:10] <budwaa> no .lst as far as I can see. Using AVR Studio 5
[11:58:13] <Thrawn> You guys do some seriously advanced stuff. Are you any good on algorithms?
[11:58:14] <budwaa> Looks good
[11:58:57] <Tom_itx> budwaa why in god's name are you using studio 5?
[11:59:02] <Tom_itx> :)
[11:59:25] <Tom_itx> are you using winavr?
[11:59:25] <Thrawn> I can count steps with my system but when the dish reaches the suns sunset postion, I want it to go back the same number of steps to the morning's position, but I want the Light Dependent Resistors to move to the sun's position as it comes over the horizon, record the position in steps and the time, can I do that with AVR and you guys seem to know how to code it
[12:00:25] <Tom_itx> who's the dude in Au that's into telescopes?
[12:00:28] <Tom_itx> i bet he has code
[12:00:42] <Tom_itx> orlock
[12:00:43] <Tom_itx> iirc
[12:00:54] <Thrawn> Also I want it not to go above or below a certain number of steps so it doesn't go 180 degrees and bash into the stand
[12:01:22] <Tom_itx> how many steps per rev?
[12:01:23] <Casper> Thrawn: sound easy to do
[12:01:28] <Thrawn> orlock is his handle?
[12:01:28] <Tom_itx> divide that by 2
[12:01:32] <Tom_itx> i think
[12:01:34] <Thrawn> 6000
[12:01:35] <Tom_itx> he's in robotics
[12:01:38] <Thrawn> But in the 2nd video
[12:01:44] <Tom_itx> didn't watch it
[12:01:44] <rue_house> hmm someone wanted a copy of my motion control software
[12:01:46] <rue_house> hmm
[12:02:00] <Tom_itx> !seen someone
[12:02:03] <Tom_itx> !seen someone
[12:02:03] <tobbor> someone was last seen in #robotics on Jul 30 21:17 2011
[12:02:03] <Thrawn> the small stepper motor drives an even bigger video, please look: http://www.youtube.com/watch?v=JY-DhRM_Vto
[12:02:11] <Casper> Thrawn: you might also want to add some limit switch, which would also help against code error and mecanical failure or user error
[12:02:14] <Casper> or something
[12:02:30] <Tom_itx> yeah you could miss steps or something
[12:02:30] <budwaa> Tom_itx: not using winavr
[12:02:34] <Tom_itx> need a fail safe
[12:02:45] <Thrawn> If you pull the power, will the arduino remember the number of steps it was on last?
[12:02:45] <Tom_itx> budwaa, maybe you should be
[12:03:06] <Tom_itx> after all that's what studio 5 uses iirc
[12:03:14] <budwaa> Theres a lot I like about the AVR5 env
[12:03:18] <Casper> Thrawn: stepper motor are nice, but they have a realy bad downside: if you don't use a feedback (which would be the case if you use them... else you would have used DC motors), you can skip a step due to whatever reason
[12:03:26] <Tom_itx> not me, it's too bloated
[12:03:34] <Thrawn> Even with half step algorith?
[12:03:35] <Thrawn> m
[12:04:06] <Thrawn> And we're dealing with hundreds of thousands of steps for the big gear to do 180 degrees, a couple of steps don't mean shit right?
[12:04:30] <Casper> those reason include: trying to move to fast, too much friction/restriction so you'ld need more torque than what the motor can deliver, movement blockage...
[12:04:32] <Thrawn> If you make sure that it never turns a thousand steps from the mount
[12:04:34] <Casper> could also be wind
[12:05:15] <Thrawn> Hence why I got some big ass solid steel gears that take hundreds of thousands of steps to rotate
[12:05:24] <Casper> Thrawn: what if a couple of step today, and another couple tomorrow, and another couple the next days?
[12:06:09] <Thrawn> Well that's ok is only an approximation because throughout the day the arduino is in Tracking mode, i.e. it counts the steps but moves in harmony with the sun
[12:06:18] <Thrawn> The number of steps will change on a daily basis
[12:06:31] <Casper> but you said you want to also have a rotation limiter
[12:06:54] <Casper> so unless you reset the count while in tracking mode
[12:06:59] <Casper> it could end up drifting
[12:07:06] <Thrawn> When the time is within 5 minutes of sunrise of yesterday +/- track mode begins, when light levels drop and the time is +/-5 minutes of yesterdays sunset it goes back the number of steps it came to await the sun in the morning
[12:07:24] <Thrawn> I see your point about the drifting
[12:07:44] <Casper> this is why 2 limit switch could be usefull, unless you use some feedback
[12:08:02] <Casper> the feedback could use a single limit switch, unless you use a multi-bits encoder
[12:08:17] <Casper> then it wouln't even need a limit switch
[12:08:30] <Thrawn> Someone suggested reverse engineering an old old ball mouse use the l and r mouse buttons at the side so if it hits the stand it stops moving and the optical encoders on the small gear and count the number of steps
[12:09:07] <Casper> but personally, I'ld still put 2 switch... if any of the switch is activated when unexpected, then the uC should go in lockout mode and stop doing anything
[12:10:01] <Casper> and when expected, it could be used to reposition and resync the counts (i.e. move to one extreme, the "home" position)
[12:10:13] <Casper> and yes, an old ball mouse could also be very usefull too
[12:10:21] <Casper> it could even save you some coding
[12:10:39] <Casper> it have 2 optical encoders inside, with a counter
[12:10:44] <Tom_itx> budwaa, look in the compiler options and see if you can switch on the asm or lst output
[12:10:48] <Tom_itx> not sure you can or not
[12:12:36] <Tom_itx> Thrawn, ir is affected by sunlight
[12:12:59] <Tom_itx> keep that in mind if you use ir sensors
[12:13:16] <Tom_itx> and do your dishes
[12:13:24] <Casper> also remember that optical wheel can get dirty
[12:15:44] <Thrawn> resync mode, hmmm once per week it resyns by deliberately going as far as it can in both directions
[12:15:54] <Thrawn> Don't I need 2 limit switches for the y axis too?
[12:17:04] <jacekowski> Thrawn: do you know that you can calculate exact sun position based on time/date
[12:17:25] <jacekowski> and you can get absolute encoders
[12:17:30] <Thrawn> No the light dependent resistors just whizz towards the sun thanks to voltage levels
[12:17:31] <jacekowski> rather than incremental
[12:18:00] <Tom_itx> what if it's a cloudy rainy day?
[12:18:31] <Thrawn> I want the system to not to have a chart of sun times, but to just be within 5 degrees of where the sun is going to come up, follow the sun then at night go back to where the sun came up in the morning, i.e. recording the data in the first 5 minuts of sunrise
[12:18:37] <Tom_itx> what if it's a solar eclipse?
[12:19:16] <Thrawn> Cloudy day, there will still be a brightest point in the sky thanks to IR
[12:19:24] <Thrawn> Eclipses will confuse the fck out of it
[12:19:33] <jacekowski> Thrawn: you don't need a chart
[12:19:36] <jacekowski> Thrawn: it's simple math
[12:19:41] <jacekowski> Thrawn: to calculate position
[12:19:43] <keenerd> Is this one axis tracking or two?
[12:19:48] <Thrawn> 2
[12:19:53] <Thrawn> up down left and right
[12:19:58] <Thrawn> didn't you see my video?
[12:19:59] <Thrawn> http://www.youtube.com/watch?v=JY-DhRM_Vto
[12:20:32] <keenerd> Two axis does not gain much over one.
[12:20:37] <jacekowski> thing is, do you really need an encoder
[12:21:17] <jacekowski> limits + some IR to detect if brightest point is to left/right/up/down
[12:21:31] <keenerd> Two axis is a fun challenge to make though :-)
[12:21:46] <jacekowski> otherwise cheap encoder may be an option
[12:21:49] <Thrawn> Keenerd, with photovoltaics maybe, clearly you didn't watch my video. With parabolic mirrors if you only track on one axis you'll only get the light to hit the focal point once a day. you need 2 axis tracking to keep that focal point at the same place all day
[12:21:51] <jacekowski> absolute encoder
[12:23:08] <rue_house> Thrawn, that you? :)
[12:23:31] <Thrawn> sure is
[12:23:40] <rue_house> good stuff
[12:23:46] <Thrawn> merry xmas rue
[12:23:48] <rue_house> its gonna be outside eh?
[12:23:56] <rue_house> merry christmas
[12:23:58] <Thrawn> Yes sir/maam
[12:24:20] <rue_house> make sure its a bit extra strong for taking on wind eh?
[12:25:47] <Thrawn> I have welded solid steel 25mm cylinders to the 122mm solid steel main gear, I feel this will be UBER-strong and UBER-wind resillient
[12:50:31] <keenerd> Meh, not everyone has flash or bandwidth or time or even video display. Videos suck.
[14:22:23] <rue_house> heh
[14:29:34] <r0b_-> anyone here?
[14:31:17] <OndraSter> I have a dilemma... either take apart those old CRTs (17 and 19) and take electronics (mostly flybacks :P) from them and scrap the screen and plastic
[14:31:27] <OndraSter> I tried giving them away for free, but nobody wanted them
[14:31:40] <OndraSter> but I don't have the heart
[14:31:43] <OndraSter> electronics = pet :(
[14:32:19] <soul-d> meh solved that few years back already
[14:32:27] <OndraSter> scrapped?
[14:32:32] <soul-d> 19" crt 180 watt's
[14:32:44] <OndraSter> lol
[14:32:47] <OndraSter> that's a lot
[14:33:04] <soul-d> and since i have screen on on avrage 10 hours a day
[14:33:48] <OndraSter> I have now 24" and 22" LCDs at my PC
[14:33:54] <OndraSter> 1920x1200+1920x1080
[14:36:01] <soul-d> :P
[14:36:05] <soul-d> same setup
[14:36:36] <soul-d> almost 22" on left and 24" on the right
[14:37:24] <OndraSter> I have the exact opposite lol
[14:41:36] <soul-d> you can bring it to scrap yard and scavange :P
[14:41:45] <soul-d> bring back diouble the amount :)
[14:44:44] <rue_house> mm I have another bedframe today
[14:44:51] <rue_house> I dont know how many are in the rack now
[15:46:59] <Suner> Hi everyone, I'm trying to get an LED to blink using a timer but not sure what I'm doing wrong. the code I'm using (http://codepad.org/WYbPC976) seems to work fine in the simulator, but when I upload it to the chip nothing happens
[15:47:13] <Suner> anyone have any ideas?
[15:48:56] <Kevin`> Suner: are you watching with an oscilloscope? it might just be blinking really really fast
[15:49:11] <Kevin`> did you do any calculation for what the frequency should be?
[15:49:49] <Kevin`> PORTB = !(PORTB & 0xff);
[15:49:55] <rue_house> Suner, lets see the code
[15:50:05] <Kevin`> that seems strange
[15:50:33] <Suner> rue_house, I posted it above
[15:50:34] <Kevin`> ah right, the & is completely redundant, I see now
[15:50:50] <Kevin`> that should be ~ though, not !
[15:51:57] <Suner> Kevin`, I've tried with varying frequencies, some that are real long, still no blink however
[15:52:34] <Suner> the LED does light when I simply drive a 1 to the pin with PORTB = 0xFF
[15:52:45] <Kevin`> you are testing on PB0, right? that would be the only one that blinks with that code most likely
[15:52:58] <Kevin`> although it's technically undefined which would blink
[15:54:39] <Suner> Kevin`, the problem seems to be that the interrupt never actually occurs
[15:56:58] <rue_house> did you use signal or interrupt
[15:57:40] <rue_house> Suner, I think I know why, but you have to answer me to help you
[15:58:32] <Suner> it's an interrupt, but I believe I've fixed it, seemed like it was a silly mistake: calculation error
[15:59:36] <Suner> it works as expected now (which is awesome!), thanks for the help
[16:46:03] <rue_house> Suner, what information doyou think the tutorials need added to them?
[16:47:25] <Suner> rue_house, if we're talking about the timer tutorials, nothing that I can think of, they are pretty informative
[16:50:15] <rue_house> so all the tutorials you found were perfect, no improvements possable
[16:52:41] <Suner> practically, at least no improvements that are apparent to me
[17:25:02] <Tom_itx> which timer tutorials?
[17:54:20] <OndraSter> soul-d, thanks for advice, now my hands are in terrible shape lol
[17:54:26] <OndraSter> (I took the CRTs apart
[17:56:36] <soul-d> cuts ?
[17:57:33] <OndraSter> no
[17:57:48] <OndraSter> but they weirdly hurt
[18:02:35] <OndraLappy> oh and it is winter right
[18:02:43] <OndraLappy> usually it is all about snow
[18:02:51] <OndraLappy> and temperatures <-10C
[18:03:01] <OndraLappy> I was taking those CRTs outside
[18:03:06] <OndraLappy> in a TShirt
[18:03:10] <OndraLappy> 8C is outside today lol
[18:03:14] <OndraLappy> was
[18:03:36] <OndraLappy> 6C when I was out
[18:06:41] <soul-d> yeah same here
[18:08:12] <OndraLappy> my sister told me I am crazy not wearing anything long sleeved
[18:08:27] <OndraLappy> but she is cold even with 20C inside :P
[18:08:32] <OndraLappy> the house
[18:08:44] <OndraLappy> it seems that not all of us can be awesome :P
[18:09:08] <soul-d> tell her people on the net are reuqesting pictures again preferrly with out the longsleeves
[18:09:19] <OndraLappy> she is 14
[18:09:35] <soul-d> lol thats almost legal
[18:09:40] <OndraLappy> haha
[18:09:41] <OndraLappy> almost
[18:09:42] <OndraLappy> 1 year
[18:09:45] <OndraLappy> half year actually
[18:10:53] <soul-d> i feel old now :(
[18:10:57] <OndraLappy> haha
[18:11:09] <OndraLappy> I am 19 lol, not sure if I should feel old
[18:11:12] <soul-d> closing in on 30 somwhere these years
[18:11:13] <OndraLappy> "teen" not anymore
[18:11:19] <OndraLappy> next year
[18:11:45] <soul-d> yeah swichting numbers again soon
[18:11:57] <soul-d> donno when im from early 80's somewhere
[18:12:02] <OndraLappy> tell me about switching year numbers
[18:12:14] <OndraLappy> I keep trying to learn that it is 2011
[18:12:22] <OndraLappy> and few days later they say that it is 2012 already :(
[18:14:12] <soul-d> yup
[18:14:44] <OndraLappy> seriously, I hate this... I find some great chip in something I take apart - like 6502 core CPU, with bunch of DACs and I2C 'n stuff, built for TV
[18:14:48] <OndraLappy> but it has OTP memory :(
[18:15:33] <soul-d> :) yeah usaly like that
[18:16:07] <OndraLappy> "wooot, it has great features!" "oh s*it, you can't re-programm it at all :("
[18:20:30] <OndraLappy> how do they even make the firmware
[18:20:37] <OndraLappy> they have either 10000s of those chips
[18:20:40] <OndraLappy> and keep swapping them
[18:20:46] <OndraLappy> or they have special editions
[18:26:38] <OndraLappy> gn
[18:53:45] <Tom_itx> on a mega168 etc what's the difference between INT0 (PD2) and PCINT0 (PB0) ?
[18:53:54] <Tom_itx> is the PCINT the pin change interrupt?
[18:54:03] <Tom_itx> ... full port
[18:59:39] <timemage> Tom_itx, i'm not the best to answer this question, but here goes: the priorities are different, also INT0 will wake up the processor from shutdown, pcint0 won't.
[19:00:19] <Tom_itx> int0 is first after reset int and pcint0 is 3rd
[19:00:29] <Tom_itx> vectors 2 and 4
[19:01:41] <timemage> Tom_itx, that would make int0 a priority over pcint0, which makes sense in my mind at least.
[19:02:13] <Tom_itx> yes
[19:02:57] <Tom_itx> can be input or output as well
[19:04:05] <Tom_itx> i can't see much use for it as an output though. if you change the pin state in software you would know it
[19:04:42] <timemage> yeah. although you can kind of use it as a kind of subroutine though.
[19:04:54] <timemage> that is, from within your software.
[21:33:51] <rue_house> pin change interrupts are state independant, you get a interrupt every time the logic level changes, providing fuse config
[21:34:48] <rue_house> erm /fuse/register/
[21:35:15] <Tom_itx> so they have no mask for edge or level?
[21:36:29] <Tom_itx> _- would generate 2 ints?
[21:36:44] <timemage> Tom_itx, yes. although you can configure int0 that was also.
[21:36:52] <Tom_itx> i know
[21:37:01] <Tom_itx> but it looks like you have more choices with int0
[22:46:59] <Tom_itx> what's the most efficient way to detect which pin on pin change interrupt fired it?
[23:11:49] <Casper> Merry Christmas!
[23:14:11] <inflex> bitchig hot here in north QLD Australia
[23:14:13] <inflex> really REALLY hot
[23:14:24] <Tom_itx> mild here
[23:46:43] <raden> how hard is it to link 2 microcontrollers together ?
[23:46:57] <Tom_itx> not so hard
[23:47:24] <Tom_itx> might be worth getting a bigger one
[23:50:24] <Tom_itx> i2c, spi are 2 ways
[23:51:02] <Casper> raden: i2c, spi, smbus, canbus, plain serial, ......
[23:51:38] <raden> wow
[23:51:41] <raden> cool
[23:51:54] <Tom_itx> how do you tell which pin on a pcint caused it to fire?
[23:52:03] <raden> and how hard is it to interface to a LCD ?? looking on mouser and looking at datasheets what the simplest way ?
[23:52:22] <Tom_itx> 7 pins iirc
[23:52:27] <Tom_itx> maybe 8
[23:52:50] <raden> how do they communicate ?
[23:52:52] <Tom_itx> d0..4, e, rs, rw
[23:53:07] <Tom_itx> that's for 4bit mode
[23:54:59] <timemage> Tom_itx, you could mask the four bits you want and store them in a global. on the interrupt mask the port pin values for the same 4 bits and xor that with your last know values in the global. if you dig around you might find a register that shows which pins changed for that particular interrupt, but i don't see it.
[23:55:40] <Tom_itx> i didn't see it either
[23:56:02] <timemage> Tom_itx, it's possible they expect you to carry out the xor procedure yourself.
[23:56:58] <Tom_itx> is the port value good inside the interrupt though
[23:58:09] <timemage> Tom_itx, gawd i hope so. would be pretty useless if not.
[23:58:18] <Tom_itx> i suppose the first thing you could do is store it to a var then do the compare
[23:58:38] <timemage> Tom_itx, that's what i'm guessing.
[23:58:38] <Tom_itx> how many clocks would it be good for though?
[23:59:22] <Tom_itx> and there seems to be no difference between rising or falling with pcint
[23:59:31] <Tom_itx> just change