#avr | Logs for 2013-02-22

Back
[00:01:41] <Casper> I have a few monitor to repair, probably all bad caps
[04:49:59] <iSaleK> Why can't I read a pin status with this line? (I always get 1 even thou the PIN has pull-up res)
[04:50:00] <iSaleK> if( !(PINB & PB0) ) { PovecajMinute(0); _delay_ms(350); }
[04:54:57] <Malinuss> iSaleK, your bit math is wrong... you just and those two, and often some of the other pins might be high or you have a pullup resistor in one of them... try this: if (PINB & (1<<PORTB0))
[04:55:44] <Malinuss> iSaleK, also I would sugest reading some theory on bitmath, it's not all that hard when you get a hang of it! Arduino had a nice tutorial on it, but it seems to be down now ;P
[04:57:15] <iSaleK> Malinuss (1<<PORTB0) or (1<<PINB0) ?
[04:58:18] <Malinuss> iSaleK, is propably be the same, but rather use PINB0 ;D, you can look it up in the datasheet, and the devicename.h file
[04:59:23] <iSaleK> Malinuss Thanks, because Atmel Studio highlights PINB0 as constant and doesn't PORTB0 but both pass compile :)
[04:59:36] <iSaleK> And do you have a link to that tutorial so I can look it up when it comes back? :)
[04:59:54] <Malinuss> iSaleK, np. http://playground.arduino.cc/Code/BitMath
[05:00:11] <iSaleK> thank you :)
[05:00:40] <Malinuss> iSaleK, when you have finished it a line like " if (PINB & (1<<PORTB0))" wouldn't just be "the line I write to check that pin", but something that actually makes sense ;P
[05:01:31] <iSaleK> I know that it does bitwise and with PORTB pins and 0b00000001 :)
[05:01:54] <iSaleK> I just wasn't sure why my code wasn't working like I intended it to :)
[06:45:52] <creep> Horologium<< deadly swarm of quadcopters will soon be realized http://www.youtube.com/watch?v=ShGl5rQK3ew
[06:48:12] <Richard_Cavell> if you can make them coordinate with each other, I'll be impressed
[06:48:40] <creep> just make them learn, and soon they will turn against you
[06:55:16] <Horologium> creep, if we can just build automagic snowblowers I will let them rule the world.
[07:00:43] <iSaleK> Could someone please take a look at this code... I can't find which part keeps reseting my minutes to 3... :\
[07:00:44] <iSaleK> http://pastebin.com/HAU3znTi
[07:01:03] <iSaleK> When I try to increment mintues every second it keeps reseting to 3 :\
[07:02:14] <creep> japan and china are preparing for next world war by developing humanoid female suicide troopers http://www.youtube.com/watch?v=YvbAqw0sk6M
[07:03:27] <Horologium> if( !(PINB & (1<<PushBreset) && deviceCounting == 1) ) {
[07:03:43] <Horologium> not sure what your logic is there but it looks all kinds of messed up.
[07:04:20] <iSaleK> I check if Reset button is pressed (Active on logic "0") and check if device is counting
[07:04:59] <Horologium> if( !( (PINB & (1<<PushBreset)) && (deviceCounting ==1) ) ) {
[07:05:34] <Horologium> I'm betting it's an order of operations issue...by adding some () it might fix it...might.
[07:05:43] <Horologium> too early for full logic mode in the brain though.
[07:06:51] <iSaleK> Still the same :\
[07:07:08] <Horologium> then I have no clue...time for some debugging code..
[07:07:19] <iSaleK> I've tried commenting that line that works for button reset and it still keeps reseting to 3 after 1s :\
[07:07:58] <Horologium> cut that IF statement down to if(1==0) {
[07:08:05] <Horologium> and see if it makes a difference.
[07:08:37] <creep> T-REX reborn ! http://www.youtube.com/watch?v=FjYgboXIWGE
[07:09:03] <Horologium> and, that's all the help I can give..time to go to work.
[07:09:59] <iSaleK> woot :S I've tried Atmel studio simulator and when I follow my code it goes trough that loop every time :\ How come?
[07:13:00] <iSaleK> Horologium I've added 1==0 and also commented that line and both give same result so I guess it's not that line :\
[07:29:57] <iSaleK> This simple tea-timer is making me insane :S
[07:30:14] <iSaleK> Can't find the damn bug that resets minutes to 3 :S
[07:48:36] <iSaleK> What am I doing wrong... Timer0 is not working now :\ -> http://pastebin.com/TyZ2keeS
[07:48:45] <iSaleK> I configured it to make interrupt every 1s
[07:51:21] <iSaleK> Anyone?
[08:03:17] <creep> new us military robots http://www.youtube.com/watch?v=mdYSStF4fqc
[08:32:11] <vsync_> yee
[08:32:16] <vsync_> works well on the treadmill
[08:32:42] <vsync_> throw it out there and it'll get stuck on the first rock or take a fall on the stairs like asimo
[08:34:15] <vsync_> also curios on the battery life of such a thing, couple of hours at the very maximum
[08:34:21] <vsync_> curious*
[08:34:26] <vsync_> and that petman is just... rofl
[08:35:40] <vsync_> oh they have that doggy like crawler. but we get back on the battery life. Also all of that has been done before. Now that it has a darpa-thing to it, people are horny about it
[08:35:49] <vsync_> it's the same with mit and other bullshit
[08:36:42] <vsync_> the only thing that amazes me is how the troops keep their poker face when they have a fucking robot dog walking among them
[08:40:30] <creep> they are probably nuclear powered and use steam
[08:40:52] <creep> regulating steam takes little electronic power
[08:47:32] <vsync_> yeah
[08:47:36] <vsync_> they are cold fusion powered
[08:47:47] <vsync_> i heard that from the internet experts
[08:48:02] <creep> that CIA spyplane must have some cold-fusion power source too
[08:48:20] <vsync_> my buddy told me also... he's software developer. they know everything. They have this google thing of great source of knowledge
[08:48:51] <creep> i thought it was named ECHELON
[08:53:57] <Malinuss> iSaleK, I can't open pastebin for some reason, you still have the problem?
[09:05:42] <rue_house> prolly pastebin is full of down again
[09:05:58] <rue_house> try http://paste.debian.net/
[09:06:18] <rue_house> or just jump into ##C and see what they are using in their topic message
[10:38:08] <creep> what kind of music do you consume?
[10:38:23] <creep> Flyleaf - i'm so sick, Fully Alive http://www.youtube.com/watch?v=iWIADZKU9dw hackers used to listen stuff like this on films
[10:39:41] <Malinuss> creep, I thought evanescence stopped being popular somewhere around 2005 xD
[10:41:08] <RikusW> how about some Bach ? ;)
[10:41:38] <jadew> justin beiber \o/ xoxoxo
[10:41:43] <creep> i think it is boring to have only a piano
[10:42:03] <RikusW> or worse, an organ...
[10:42:18] <jadew> this is popular now: https://www.youtube.com/watch?v=KRAMNWzfjcg
[10:42:19] <jadew> YouTube: Asaf Avidan - One day / Reckoning Song (Wankelmut Remix)
[10:42:35] <jadew> at least in my country
[10:42:43] <creep> where?
[10:42:54] <jadew> romania
[10:42:57] <creep> ah
[10:43:02] <jadew> lol
[10:43:16] <jadew> that sounds like "ah.. the song must be shit then"
[10:43:37] <creep> well most popular stuff is crap in my country too
[10:44:07] <creep> popular is not equal to good
[10:44:13] <Malinuss> jadew, haha that hipster party in the video
[10:44:23] <Malinuss> jadew, 3hipster8me
[10:44:43] <jadew> Malinuss, I don't normally watch the videos, but yeah, I'd like to be there :D
[10:47:19] * RikusW wonders who is typing on the oldest keyboard ?
[10:47:37] <RikusW> mine is 15 years or so, AT with PS/2 converter
[10:47:56] <jadew> you're one cheap bastard :)
[10:48:09] <RikusW> left alt is so worn there is a hole in it :)
[10:48:17] <RikusW> jadew: I like the way it types
[10:48:20] <jadew> hehe, is it an ibm one?
[10:48:27] <jadew> I figured, I was kidding
[10:48:30] <RikusW> Mecer / Mustek
[10:48:37] <jadew> ah
[10:48:45] <jadew> I still have an ibm-m one
[10:48:54] <creep> jadew<< i like tracks that are more "alive" http://www.youtube.com/watch?v=-d3RYW0YoEk
[10:48:55] <jadew> but I don't use it because it's lacking the windows key and I'm too fond of it
[10:49:17] <RikusW> fond of the m or win key ?
[10:49:29] <jadew> creep, then you might enjoy this: https://www.youtube.com/watch?v=lyViVmaBQDg
[10:49:45] <jadew> RikusW, the windows key
[10:50:02] <RikusW> mine got that at least..
[10:50:25] <RikusW> will have to shop for a keyboard with the same layout and the right feel sometime
[10:50:34] <RikusW> different layouts are annoying...
[10:51:18] <RikusW> there even an XT keyboard around :)
[10:53:39] <creep> more like this livin' a lie (original mix) - milk inc. http://www.youtube.com/watch?v=QwpwIZtTYww
[10:53:47] <jadew> yeah, swtiching the layout sucks (for the direction keys, right?)
[10:53:53] <jadew> but you get used to it
[10:54:12] <RikusW> the \ before the backspace
[10:54:12] <jadew> RikusW, http://www.elitekeyboards.com/
[10:54:21] <jadew> RikusW, yeah, that too
[10:54:47] <jadew> creep, that's so 95 lol
[10:54:55] <RikusW> there was one keyboard that had the suspend button where my delete button are :S
[10:55:17] <RikusW> very very annoying
[10:55:34] <jadew> RikusW, ah, I don't have media keys on this one
[10:56:05] <jadew> but I mapped the numpad keys to volume up / down / calendar :)
[10:56:10] <RikusW> fortunately it was someone else's PC, so it was only temporary
[10:56:50] <RikusW> a single visit, :)
[10:57:58] <jadew> I love media keys
[10:58:09] <jadew> sadly the good keyboards usually don't have them
[10:58:30] <jadew> currently I'm working on a leopold with cherry mx brown key switches
[10:59:13] <RikusW> my keys are partly brown :-P
[10:59:26] <RikusW> asdfjkl; is white ;)
[10:59:32] <jadew> hehe
[10:59:59] <RikusW> ~ and caps lock are a fairly dark color...
[11:00:51] <jadew> creep: http://www.youtube.com/watch?v=46YJJQLn77A
[11:00:52] <jadew> YouTube: The Fondas - Make You Mine & Can&#39;t Live Without Love
[11:01:38] <jadew> wrong version
[11:02:00] <iSaleK> Could someone please take a look why my timer0 is not beeping when it should :)
[11:02:01] <iSaleK> http://pastebin.com/uRkiv81M
[11:02:36] <iSaleK> I've tried adding BuzzerSound() to the main and it works just fine... and I think Timer0 is configured properly
[11:03:44] <jadew> creep, this version: http://www.deezer.com/en/track/16471968
[11:04:15] <RikusW> jadew: my keyboard's computer have been upgraded several times :-P
[11:04:30] <RikusW> it started as P1 150
[11:04:33] <creep> i'm no rocker btw
[11:04:50] <jadew> creep, it's not necesarily rock... :)
[11:05:05] <jadew> RikusW, I don't know them
[11:05:38] <RikusW> sure you do... Pentium 1
[11:05:47] <jadew> ah
[11:05:48] <jadew> :P
[11:06:00] <iSaleK> What does Arnold Schwarzeneger say when he is asked to act in classic music video?
[11:06:04] <jadew> now I figured out what you said :) hehe
[11:06:04] <iSaleK> - I'll be Bach :)
[11:07:34] <jadew> creep, maybe this will get you started on punk: https://www.youtube.com/watch?v=SSuH1E4yZxA
[11:07:35] <jadew> YouTube: X-Ray Spex - I Can&#39;t Do Anything
[11:07:50] <creep> jadew<< i dislike punk
[11:08:09] <RikusW> jadew: I'm used the the Enter key being big extending to where the \ usually are like in -> http://www.elitekeyboards.com/products.php?sub=leopold,fullsize&pid=fc500rrab
[11:08:14] <jadew> best music ever, especially when sang by chicks
[11:08:21] <RikusW> and -=\bs
[11:08:33] <creep> show me good trance with girl singing then maybe
[11:09:24] <jadew> RikusW, I like it more with the small enter key
[11:10:30] <jadew> creep, maybe this then? https://www.youtube.com/watch?v=05SsK-HkeOg
[11:10:32] <jadew> YouTube: DETROIT COBRAS - OUT OF THIS WORLD
[11:10:57] <jadew> can't believe how old this music is... and I totally love it, wasn't even born when this stuff was made
[11:11:26] <Tom_itx> that's when all the good stuff was written
[11:12:05] <jadew> yeah, tbh I didn't know it's that old, I just had it in my music collection, thought it's new
[11:13:16] <creep> jadew<< i'm not opening more stuff from you
[11:13:26] <jadew> lol
[11:13:56] <jadew> one more! NOT rock, promise! https://www.youtube.com/watch?v=BY3ZTLfKQkI
[11:13:58] <jadew> YouTube: Ami - Trumpet Lights (official video HD)
[11:14:09] <jadew> this is romanian, popular right now in here
[11:14:21] <creep> Trumpet Lights < if they burn it then it is cool
[11:14:56] <jadew> (she's not singing in romanian, but it's a romanian song)
[11:17:31] <iSaleK> Could someone please take a look at my code? It's driving me insane. I've commented almost every line and it still keeps reseting minutes to 3 every second :S
[11:17:53] <Tom_itx> look for a typo
[11:17:55] <RikusW> WDT ?
[11:18:00] <Tom_itx> or htat
[11:18:59] <iSaleK> Fuses are LOW:E6 and HIGH:DF so watch dog timer is off
[11:19:03] <iSaleK> or at least it should be
[11:19:07] <jadew> looks good
[11:19:11] <iSaleK> Using Tiny2313
[11:19:17] <jadew> try to forcefully shut down the WDT
[11:19:27] <iSaleK> jadew how?
[11:19:58] <jadew> just turn it off, check the manual on how to do it properly, I don't recall on which MCU, but the gcc code was insufficient
[11:20:14] <jadew> so you had to clear some registers manually
[11:20:40] <jadew> anyway, check the datasheet to see how it's done and also check the errata
[11:22:21] <RikusW> seems t2313 got no WDT fuse..
[11:23:12] <iSaleK> It has WDTON fuse
[11:23:22] <iSaleK> Page 39
[11:23:47] <RikusW> WDTCR register
[11:25:01] <RikusW> now I see the fuse...
[11:29:51] <iSaleK> I've set WDTCSR = 0x00; and still the same problem :\
[11:32:04] <Tom_itx> not how you disable it iirc
[11:32:48] <iSaleK> I've tried setting WDTCSR to 0x00 and also included avr/wdt.h and used wdt_disable() but still it keeps reseting :\
[11:32:59] <awozniak> Are there any known issues with GCC and arrays > 255 bytes long?
[11:33:17] <awozniak> e.g. is uint8_t foo[1024] a problem?
[11:34:33] <LoRez> probably not on a platform with more than 1k of RAM
[11:35:02] <iSaleK> Does anyone have any ideas why WDT is still active? :S
[11:35:40] <awozniak> atmega324p, sram=2K
[11:36:18] <LoRez> are you using another 1k of space for other variables?
[11:36:28] <LoRez> what problem are you seeing?
[11:36:57] <awozniak> LoRez: avr-size a.out says text:7532 data:170 bss:1067 dec:8769 hex:2241
[11:37:17] <awozniak> ram for variables should be data+bss, correct?
[11:37:44] <awozniak> should leave me plenty of stack space
[11:37:53] <awozniak> and I'm not doing any dynamic memory allocation
[11:37:57] <LoRez> so what's the problem then?
[11:38:06] <awozniak> (btw, what is "dec" ?)
[11:38:21] <LoRez> decimal size
[11:38:36] <LoRez> sum of the rest, hex is that in hex
[11:38:37] <awozniak> LoRez: I'm still debugging, I just wanted to be sure there weren't known compiler issues w/ arrays >=256 bytes (I've seen this on other platforms)
[11:39:00] <LoRez> gcc is gcc. if it has a problem with arrays of that size I'd be very surprised.
[11:39:45] <awozniak> thanks LoRez.
[11:40:13] <iSaleK> I'm using internal 128KHz clock and it's prescaled 1024 times so I get 1s interrupt from timer but whatever I do WDT is reseting the device :S
[11:40:42] <LoRez> iSaleK: "whatever you do"? including resetting the watchdog?
[11:41:07] <awozniak> 128KHz/1024 = 125Hz
[11:41:13] <iSaleK> How can I reset it when It's disabled? Or at least it should be :\
[11:41:34] <LoRez> isn't there an instruction to call for that?
[11:41:38] <awozniak> iSalek: check fuse settings? Is watchdog enabled at powerup?
[11:41:40] <iSaleK> awozniak I'm using timer0 with 7C and 83 OCR&TCNT
[11:41:47] <iSaleK> awozniak No, the fuse is 0
[11:42:09] <iSaleK> awozniak Or at least I've unchecked WDTON
[11:43:40] <awozniak> iSalek: 0 means "programmed". WDTON=0 would enable watchdog, I think. Double check.
[11:45:37] <iSaleK> Well' I've tried CF and DF as HIGH fuse and the same thing is going on
[11:46:48] <iSaleK> First thing I do in code is write 1 to WDE and WDIE and right after that write 0x00 to WDTCSR, just like app note says
[11:47:29] <awozniak> iSalek: that enables the watchdog.
[11:47:54] <iSaleK> awozniak Writing 0x00 to WDTSCR??
[11:48:13] <iSaleK> Datasheet said that when WDT and WDIE are 0 the WDT is disabled
[11:49:53] <awozniak> Which chip? I'm assuming they're all pretty much the same. For mega324p, WDTON=1, WDE=1, WDIE=0 means watchdog is enabled.
[11:50:14] <iSaleK> Tiny2313
[11:50:56] <iSaleK> Here WDTON=1, WDT = 0, WDIE = 0 says that mode is STOPPED
[11:52:53] <awozniak> iSalek: if you want the watchdog timer off always, you want fuse bit WDTON=1, and then just don't mess with any of it in your code.
[11:54:02] <iSaleK> So the HIGH fuse should be DF to set WDTON=0 to 0 right? And don't mess with WDT in code?
[11:55:48] <awozniak> iSalek: fuse logic is inverted. WDTON=0 means the fuse is programmed and the watchdog is enabled. You want WDTON=1
[11:56:14] <iSaleK> awozniak So that fuse should not be set? That configuration I have right now
[11:58:18] <awozniak> iSalek: HIGH=DF. => DF=11011111 => WDTON=1 => watchdog disabled
[11:58:56] <iSaleK> awozniak Ok, my fuses are set like that but still I get reset after 1s
[11:59:02] <iSaleK> don't know why :\
[11:59:49] <awozniak> On most chips there's a register that'll tell you how you got reset.
[12:05:37] <iSaleK> awozniak I don't have any debugging options on this board :\
[12:06:08] <iSaleK> And it seems it doesn't matter what I do, it keeps reseting after 1s :\
[12:17:02] <iSaleK> This **** is driving me insane 3:(
[12:17:19] <iSaleK> How the hell it keeps resetting when WDT is disabled
[12:19:03] <inductiveload> iSaleK: have you tried calling wdt_reset();, to make sure that resetting the WDT actually prevents the device resetting?
[12:20:13] <iSaleK> Yes, I've tried call it in main and still the same...
[12:21:10] <inductiveload> well, if you reset the WDT more often than once a second, and it still resets, then it shouldn't be the WDT that's resetting your chip
[12:22:09] <iSaleK> What else could it be? I don't have anything else set-up
[12:22:18] <inductiveload> how's your power, you're not browning out or something, are you?
[12:22:23] <iSaleK> no other interrupts or reset sources, BOD is disabled, wdt is disabled...
[12:22:31] <iSaleK> It's 5V from USB
[12:22:48] <inductiveload> can i see your code?
[12:22:57] <iSaleK> Sure, just a sec
[12:23:13] <iSaleK> This is the old one -> http://pastebin.com/JpWqutdV
[12:23:56] <iSaleK> And here is the new one with just few lines to make SPI work and still the same problem -> http://pastebin.com/h4k5TceS
[12:28:19] <inductiveload> so does it get as far as sendinf 7seg stuff?
[12:28:42] <iSaleK> inductiveload yes it sends numbers to 7seg and it works fine except the resett thing :S
[12:28:49] <iSaleK> Every 1s
[12:30:10] <inductiveload> how quickly does that count up?
[12:30:25] <inductiveload> how long does it take to do a spin of the main while(1)?
[12:30:36] <inductiveload> if its > 1s, it could still be the WDT
[12:30:52] <inductiveload> although i know you put wdt_disable there
[12:31:02] <iSaleK> It spins to 9 really fast and then hangs there and then reset
[12:32:01] <iSaleK> transition from 0 to 9 is almoast instant and then it stops at 9 and then reset :\
[12:36:59] <iSaleK> Any ideas? :\
[12:37:32] <inductiveload> hmm
[12:40:34] <inductiveload> what's going on with that "i"?
[12:41:06] <iSaleK> nothing, that one was just copied from old code
[12:41:17] <iSaleK> if you mean on volatile int i=0; part
[12:41:33] <inductiveload> you're using it as the loop index in main, and also in the spi_send function, which is called from inside the main loop
[12:43:00] <iSaleK> Hmmm... :\
[12:43:21] <iSaleK> I've changed i to x in spi_send and now the whole 7segment just flashes :\
[12:43:37] <iSaleK> oh wai,t one more line to change
[12:43:41] <inductiveload> and does it still reset?
[12:43:49] <iSaleK> Just a sec
[12:44:12] <iSaleK> I don't know how it could affect the code since the main is calling SPI code but ok..
[12:44:22] <iSaleK> Hmmm, it looks like it's not reseting now :D
[12:44:30] <iSaleK> have to check it on original full code
[12:44:44] <inductiveload> you were stuck in a loop
[12:46:18] <inductiveload> the spi_send was setting i back to 8 every time, so the main loop was incrementing to 9 every time, and looping back to display a "9"
[12:46:43] <inductiveload> then the spi_send would set back to 8 and the cycle continues
[12:48:02] <iSaleK> well in the old code it keeps reseting even thou I changed i to x
[12:48:03] <iSaleK> :S
[12:48:52] <inductiveload> have you got any more i's in the old code?
[12:48:59] <inductiveload> loop vars should be local
[12:49:09] <iSaleK> I've checked and no, I don't...
[12:49:16] <inductiveload> otherwise any function inside the loop could be smashing up your count
[12:49:40] <iSaleK> It should count up every 500ms but when it get's to 1 it resets (again after 1s)
[12:49:42] <iSaleK> :\
[12:50:41] <inductiveload> and try with a wdt_reset in the old code?
[12:51:41] <OndraSter_> global variables!
[12:51:41] <OndraSter_> named "i"
[12:51:42] <iSaleK> I've added it in the main, take a look -> http://pastebin.com/LucaWNYa
[12:52:10] <iSaleK> Well I is unused now
[12:52:13] <iSaleK> i
[12:52:51] <inductiveload> well that wdt_reset will be hit evey 5 sec
[12:52:54] <iSaleK> and I've removed that line volatile int i=0; but still the same :\
[12:53:15] <inductiveload> but the reset in the for-k loop
[12:53:18] <inductiveload> *put
[12:53:26] <iSaleK> ok
[12:53:43] <iSaleK> still the same thing :\
[12:55:32] <inductiveload> ok, and now remove the _delay_ms altogether?
[12:56:08] <inductiveload> just in case you've managed to get a < 500 ms WD timeout
[12:56:09] <iSaleK> How will I know if it's working or not if numbers just flash on 7segment display? :\
[12:56:39] <inductiveload> it'll be too fast to see, probably it'll look like "8"
[12:57:04] <iSaleK> Well it does look like 8 now but I can't tell if its reseting or not :\
[12:57:44] <inductiveload> what do you mean "reset"?
[12:58:27] <iSaleK> Well when I remove delay I just see 8 but it's too fast to see if it's resseting for example at 4 to 0 and then goes few time from 0-9 or it goes round and round like it should
[12:58:40] <iSaleK> I've changed delay to 250ms and it goes from 0-3 and then resets to 0
[12:59:04] <iSaleK> but it should go to 9 so again it resets at 1s even thou for loop has wdt_reset() :\
[13:00:41] <OndraSter_> do you have any kind of serial port on your PC - be it real serial port or USB-serial adapter?
[13:00:41] <OndraSter_> I like to use it to send information from the micro to the PC
[13:00:41] <OndraSter_> or vice-versa
[13:00:41] <OndraSter_> like what is happening etc
[13:02:03] <iSaleK> I could manage to solder some wires to MCU pins but still how can I see what issued the interrupt if it resets the device :\
[13:02:03] <inductiveload> iSaleK: and try enabling the wdt with a 2 sec timeout wdt_enable(WDTO_2S); instead of the disable?
[13:02:50] <iSaleK> inductiveload still the same... :\
[13:02:59] <inductiveload> 1 second?
[13:03:06] <iSaleK> Yes :\
[13:03:10] <inductiveload> are you sure your power is ok?
[13:03:12] <iSaleK> Don't know how is that possible
[13:03:29] <iSaleK> inductiveload Pretty sure, I can change another source, just a sec
[13:04:03] <iSaleK> board has mcu and shift register and is powered from USB but I will connect it to desk bench psu to check it...
[13:04:14] <iSaleK> btw BOD is disabled :\
[13:05:05] <creep> yo inductiveload , add a capacitor
[13:07:24] <iSaleK> Still the same even with the psu
[13:08:13] <iSaleK> It would be understatement that this thing is pissing me off :S
[13:08:54] <iSaleK> This morning it was counting up from 0-9 just fine with and it took 20s to complete the loop... now whatever I do it resets after 1s :S
[13:08:59] <Tom_itx> time to take a break from it then
[13:09:48] <iSaleK> Tom_itx The problem is not that I'm tired, even with the simplest code the device is still reseting :(
[13:10:05] <inductiveload> creep: zero phase shift is for squares
[13:10:18] <Tom_itx> i haven't been following along. just walked in for a bit
[13:10:33] <iSaleK> I know, just saying...
[13:10:52] <iSaleK> I'm this close to debugg it with sophisticated device called sledgehammer...
[13:10:53] <Tom_itx> did you get wdt shut off?
[13:10:55] <creep> inductiveload<< i like them balanced ;/
[13:11:03] <Tom_itx> you send the command twice
[13:11:22] <iSaleK> disabled, disabled WDTON, reset in code, wdt on 2s...whatever I do it resets after 1s
[13:11:24] <Tom_itx> at least in asm
[13:11:50] <Tom_itx> what chip is it?
[13:11:54] <iSaleK> Tiny2313
[13:12:17] <Tom_itx> in c?
[13:12:22] <iSaleK> Yes
[13:12:54] <iSaleK> Here is the latest code and it still resets after exactly 1s -> http://pastebin.com/svJUPfzW
[13:13:12] <iSaleK> I've tried with the desk bench PSU so it's not power or BOD related
[13:14:00] <Tom_itx>  /* Disable watchdog if enabled by bootloader/fuses */MCUSR &= ~(1 << WDRF);wdt_disable();
[13:14:15] <Tom_itx> i have that on one but not the 2313
[13:14:17] <Tom_itx> should be the same
[13:14:23] <Tom_itx> or very similar
[13:16:10] <iSaleK> Still the same :S
[13:16:28] <iSaleK> I have no ide what's the problem with this piece of ****
[13:16:49] <Tom_itx> first glance at the code.. looks sane
[13:17:13] <iSaleK> Only thing I could think of is that for some reason it keeps WDT on because I'm using 128KHz internal oscillator but the datasheet says that WDT and MCU oscillators are separated
[13:17:22] <Tom_itx> why do you init the wdt at all though?
[13:17:47] <Tom_itx> and take the wdt_reset() outside the loop
[13:18:19] <inductiveload> Tom_itx: that's my bad, i was wondering if it was still active even though it shouldn't be
[13:18:35] <iSaleK> Well at first there was no WDT initialized or wdt_reset...
[13:18:41] <Tom_itx> debugging will tell you that
[13:19:20] <iSaleK> I've disabled the wdt and removed wdt_reset but still the same thing
[13:19:24] <Tom_itx> put the wdt_disable() right below init main(void) {
[13:19:57] <inductiveload> iSaleK: sorry, i've got to go, good luck
[13:20:19] <iSaleK> inductiveload Ok, thank you for your time... I really appreciate it :)
[13:20:24] <turutk> i am trying to use pin change interrupt at atmega32 but i cannot find PCMSK in the data sheet. does it have another name or does m32 not have the feature?
[13:20:43] <inductiveload> i know how annoying MCUs are when a small speedbump turns into a lost afternoon
[13:20:44] <iSaleK> Tom_itx I've added wdt_disable just below main but still the same :\
[13:21:17] <inductiveload> beer can help, pour half on the chip and the rest is for you
[13:21:22] <inductiveload> ;-)
[13:21:45] <LoRez> turutk: are the pins labeled PCINTXX?
[13:21:51] <iSaleK> Well if it comes to that I'll pour all of the bear in my belly and use sledgehammer on chip :)
[13:22:40] <turutk> LoRez: there are some labeled just INT. as far as i know i am not looking for int
[13:23:23] <LoRez> if the pins aren't labeled PCINT, then they don't do pin change interrupts.
[13:23:40] <LoRez> the 32's an older design
[13:23:57] <iSaleK> Tom_itx Do you see anything that could cause 1s reset in code?
[13:24:13] <iSaleK> I'm out of ideas :\
[13:24:30] <turutk> LoRez: is there a newer version of m32?
[13:25:20] <turutk> atmega168 seems like a newer one
[13:27:52] <turutk> can anyone recommend me a 40pin DIP atmega with a more recent design?
[13:29:26] <yunta> I'd recommend to change your requirements and go for xmega :P
[13:29:50] <OndraSter_> atmega32 = no PCINT
[13:29:50] <OndraSter_> only two regular INTs
[13:31:33] <OndraSter_> :P
[13:31:33] <OndraSter_> indeedy!
[13:31:33] <OndraSter_> the "best" DIP atmega is atmega1280 or 2560 if there is one
[13:32:06] <krphop> 1280 isn't made in dip i dont think
[13:32:15] <krphop> its 100 pins
[13:33:24] <turutk> it doesnt have dip
[13:33:46] <OndraSter_> hmm
[13:33:46] <OndraSter_> there was one in DIP format
[13:33:46] <OndraSter_> 1284?
[13:33:59] <turutk> i don't have much choice. the best i can go for is atmega324p. or i can order another from digikey and wait
[13:34:14] <krphop> turutk: where are you located?
[13:34:20] <turutk> krphop: turkey
[13:34:23] <krphop> heh
[13:34:41] <turutk> atmel is not so popular here. i don't know why
[13:34:57] <krphop> 1284 is available in a 40PDIP
[13:35:07] <OndraSter_> yes, 1284
[13:35:07] <OndraSter_> eh
[13:35:07] <OndraSter_> or just go xmega route :P
[13:35:07] <OndraSter_> there are no DIPs, but there are boards that convert it to DIP :P
[13:35:43] <krphop> xmega32a4 will give you a 44 pin 32k flash in a toic for cheaper than a 1284
[13:36:23] <turutk> krphop: probably i am not going to be able to find that one
[13:36:35] <krphop> digikey :-)
[13:37:04] <turutk> it is very weird that digikey is cheaper than buying locally
[13:37:19] <krphop> thats the way it is in the US too
[13:38:10] <turutk> krphop: i can buy from digikey directly but there are import customs that may be issue
[13:38:19] <krphop> ah, i see
[13:38:42] <turutk> krphop: or i can go to a store have them import from digikey. they multiply the price with 1.5 and add taxes
[13:38:49] <krphop> ouch
[13:39:02] <krphop> but, supporting local business community can be nice too heh
[13:39:10] <turutk> which is still cheaper than other stores that sell
[13:39:49] <Tom_itx> iSaleK, why are you and'ing your port setup instead of or?
[13:39:53] <turutk> when i burned a 644p it hurt really much buying from a local store 2x the price of digikey
[13:40:26] <iSaleK> Tom_itx what do you mean?
[13:40:28] <iSaleK> What line?
[13:40:42] <Tom_itx> in the init routine
[13:41:32] <iSaleK> For push buttons?
[13:41:38] <iSaleK> Can you paste the line here?
[13:42:07] <Tom_itx> DDRB &= ~( (1<<PushBreset) | (1<<PushBincrement) | (1<<PushBstart) );
[13:42:09] <Tom_itx> for one
[13:42:30] <iSaleK> Well it will set those pins to input right?
[13:42:43] <Tom_itx> #define bit_set(p,m) ((p) |= (m))
[13:43:30] <Tom_itx> #define bit_clear(p,m) ((p) &= ~(m))
[13:43:40] <iSaleK> Tom_itx I want to se those pins as input so I'm setting them to 9
[13:43:43] <iSaleK> *0
[13:43:49] <Tom_itx> ok
[13:44:32] <turutk> krphop: i have been looking a the xmega you recommended. i am trying to learn programming so i am working with a breadboard. this is why i am looking for a dip solution. is there some kind of breakout board for xmegas. i guess they have a different programmer too
[13:46:22] <Tom_itx> iSaleK, take the wdt_reset out of the interrupt routine too
[13:46:41] <Tom_itx> if you disable it at the beginning you don't need to keep resetting it
[13:48:48] <krphop> turutk: yeah, you can get toic to pdip breakout boards
[13:48:54] <krphop> what kind of programmer do you have now?
[13:49:17] <krphop> (i'm actually doing the same thing, current project needs more IO than the mega328)
[13:49:36] <turutk> usbtinyisp
[13:49:54] <iSaleK> Tom_itx I've removed it and still the same thing :S
[13:50:01] <krphop> the avr isp programmer is relatively inexpensive, and programs a lot of chips
[13:50:12] <iSaleK> Tom_itx Is it possible that tiny has somehow bugged itself and it keeps reseting after 1s
[13:50:29] <iSaleK> because this morning it was working just fine and all of a suden it starts reseting :\
[13:50:29] <krphop> and if you can front even a bit more money, the jtagice is down to about ~$110US, which will let you do debugging
[13:51:52] <turutk> google did not return any results in turkish when i searched xmega:D
[13:52:31] <turutk> any pic can be found. only atmega8 16 and 32 can be found
[13:52:41] <turutk> is there a cheaper way to debug?
[13:53:31] <krphop> print statements and uart with ftdi
[13:58:47] <Tom_itx> iSaleK that's why you save backups of your code revisions
[13:59:05] <iSaleK> Tom_itx It was another code that was just counting up every 2s
[13:59:11] <iSaleK> and it was working...
[13:59:38] <iSaleK> I don't know what else to do... I'm thinking about manufacturing a FTDI board for usb-2-serial communication
[13:59:46] <iSaleK> but I don't know if that will help me with debugging ?
[13:59:59] <iSaleK> And is there a way to hard reset a chip or whatever?
[14:02:38] <Tom_itx> there is but i forget how
[14:05:15] <iSaleK> HVP or that is just for fuses?
[14:05:57] <Tom_itx> oh
[14:06:04] <Tom_itx> why do you need to do that?
[14:06:18] <Tom_itx> HVPP will
[14:06:31] <Tom_itx> but you generally only do that if you can't ISP to it anymore
[14:10:07] <iSaleK> Ok, I'm just asking... I don't know how to reset the chip to factory default :\
[14:11:09] <Tom_itx> HVPP
[14:11:13] <Tom_itx> you shouldn't need to though
[14:11:17] <Tom_itx> dragon will do HVPP
[14:18:07] <iSaleK> Ok, but how can I reset the chip to factory default or some kind of hard-reset? :\
[14:20:45] <Tom_itx> CapnKernel?
[14:21:09] <Tom_itx> iSaleK, via HVPP
[14:21:28] <Tom_itx> unless there's a default in studio for that using ISP
[14:21:34] <iSaleK> :\
[14:21:46] <iSaleK> I've tried chip erase + default fuses but still no luck :(
[14:22:06] <iSaleK> Also I'm thinking about building FTDI usb2uart board, is this schematic ok? http://i.imgur.com/wFFg5PE.png
[14:22:24] <iSaleK> I made it according to their datasheet...
[14:24:17] <iSaleK> I'm giving up on this tea timer for now... I will buy another tiny tomorrow if possible and hope that this one that I have is faulty...
[14:24:18] <iSaleK> :\
[14:24:30] <iSaleK> I lost whole day debuging this piece of shit...
[14:24:48] <Tom_itx> when you once fix this, you will not forget
[14:25:02] <iSaleK> Well I guess the new chip will be the fix...
[14:25:12] <iSaleK> This one could be damaged since it's not new one...
[14:25:29] <Tom_itx> i don't see anything in studio to reset it
[14:26:42] <iSaleK> I know... :\
[14:27:09] <iSaleK> It's really frustrating that it resets every damn 1s, whatever you do or whatever you enable/disable...
[14:27:27] <iSaleK> WDT, BOD, interrupts, registers... whatever, it keeps doing the same thing :(
[14:28:23] <Tom_itx> always keep a spare chip on hand
[14:28:26] <Tom_itx> for such issues
[14:28:45] <Tom_itx> if i start a project with a different chip i get 2
[14:28:52] <Tom_itx> at least 2
[14:54:34] <creep> what is more important, having an SSR running off 3.3-19V, or 6-25V and having over temperature shutdown ?
[14:58:11] <jadew> I guess that depends on the application
[14:59:05] <creep> it would be nice to have my control circuit operate on 5V, but if i use an lm317 current source then it drops around 3V
[14:59:29] <creep> +1.2V for current gen + the IR diode 1-2V...
[15:00:49] <creep> and using opamps in an SSR would overcomplicate it
[15:02:00] <jadew> I think I forgot to brag about my new oscilloscope screenshot tool: http://dumb.ro/screenshot/T9vpc.png
[15:02:12] <jadew> that's taken with this: http://dumb.ro/files/screen_scope.png
[15:03:40] <jadew> no more get the stick, save to stick, put the stick in the pc, convert image, upload
[17:27:12] <hackvana> Tom_itx: Hi
[17:27:26] <hackvana> Me, aka CapnKernel
[19:19:54] <Malinuss> Isn't the frequency and power consumption linear?
[19:34:49] <vsync_> my headphones turned out masterpiece
[19:34:53] <vsync_> http://vsync.rantapallo.org/ghettoluurit/13020044.jpg
[19:38:49] <Casper> zip tie... :(
[19:38:59] <Casper> no duct tape... I'm deceived
[19:39:19] <Casper> but man.... those leds are BRIGHT!
[19:39:25] <Casper> like... really
[19:40:31] <creep> well mine is much better for 3 wuros
[19:44:58] <vsync_> i sort of fubar'd my headset
[19:45:28] <vsync_> so i decided to re-use the mic boom, cut it, soldered an extension, hooked it up to these sennheiser px 100-IIs
[19:46:19] <vsync_> the extension i had to use was a pretty heavy gauge wire so it had a tendency of tilting... so then i just ripped off one of the cushions from my headset, and the mount plate for it, and it was a perfect fit
[19:46:27] <vsync_> i saved like a lot of €€€ by doing this!
[19:47:56] <vsync_> i do like the sound quality of these headphones. I was wondering between these and alessandro ms-1's. But I like the lower freqs on these better than those. Plus, these are cheaper
[19:50:37] <creep> vsync_<< well i hacked together mine from 2 junk ones, the guy i get them was looking badly at me when he heard i made a cool stuff from them
[19:51:04] <creep> this would be like $50-$60
[19:51:27] <creep> "earmuff" type with good quality
[19:51:45] <Casper> damn that's bright....
[19:51:54] <Casper> 16 leds...
[19:51:58] <Casper> white one
[19:51:59] <Casper> high brightness
[19:53:44] <vsync_> nice, well when hacking headphones the casing's always the problem
[19:54:11] <vsync_> i for one am not gonna start vacuum moulding in the oven, missus wouldn't like
[19:54:38] <vsync_> or well, you don't do the moulding in the oven of course, but you heat the plastics
[19:55:20] <creep> i just used fbs and a plastic sheet
[19:56:02] <creep> and used the "muff" from one and the cables, and the headset speakers from another
[19:57:16] <creep> who needs molding, i cut out plastic with an utility knife
[19:58:42] <vsync_> got any photos of that
[19:59:07] <creep> i have a junk webcam not of any quality now
[19:59:16] <vsync_> :\
[20:00:19] <vsync_> oh well. Dunno if I should go to bed or not. Didn't get my motors and my esc's this weekend... Too bad, I had the week off.
[20:00:31] <vsync_> Stupid slow singapore post :(
[20:05:24] <Malinuss> the BOD voltages, min. typ. and max, is just the values, at which the BOD will kick in and turn off (restart actually), the uC. Right?
[20:05:53] <Malinuss> so if it's lower then those values - it will turn off.
[20:06:58] <Casper> it's the voltage at which if the supply is lower than it will keep the µC in reset
[20:08:35] <Malinuss> Casper, so the min. typ. max values, just mean, that max. is the highest voltage it could start the reset at, typ would be the typical and minimal, is the lowest possible voltage it would turn off at?
[20:09:02] <Casper> yes
[20:10:07] <Malinuss> Casper, okay, thanks, just wanted to make sure