#avr | Logs for 2012-06-06

Back
[03:16:43] <OndraSter> what day is today
[03:16:46] <OndraSter> it's IPv6 day!
[03:17:01] <JyZyXEL> again?
[03:17:08] <specing> OndraSter: ENC28j60?
[03:17:09] <OndraSter> once a year?
[03:17:16] <OndraSter> specing, what with that?
[03:17:40] <specing> Well I thought you managed to make a ipv6 webserver on an AVR
[03:17:55] <OndraSter> ohh lol
[03:17:59] <OndraSter> hell no
[03:18:21] <OndraSter> but I think that netduino has IPv6 stack inside.... or not?
[03:19:04] <JyZyXEL> IPv6 has been around for over 10 years and nobody is still using it
[03:19:20] <specing> UNTRUE, the chinese are
[03:19:34] <JyZyXEL> they are?
[03:19:49] <JyZyXEL> that would instantly tip the balance close to everybody is using it
[03:19:54] <OndraSter> they have to
[03:20:26] <Casper> OndraSter: not quite
[03:20:32] <OndraSter> well
[03:20:37] <OndraSter> if they want to have public IPs
[03:20:39] <OndraSter> then yes :D
[03:20:47] <OndraSter> but I was more targetting it as a joke.
[03:20:52] <Casper> it's ipv6 ... how did they called it? readyness?
[03:21:02] <Casper> the 8 is the ipv6 launch day
[03:21:14] <OndraSter> oh
[03:21:15] <OndraSter> hmm
[03:22:55] <Casper> I bet my isp won't give ipv6 for a while
[03:23:11] <Casper> sadly... the concurence isn'T great
[03:23:14] <OndraSter> same here ;D
[03:23:34] <OndraSter> although all the new routers etc that were bought for past 3 years are IPv6 compatible
[03:24:25] <specing> OndraSter: Going IPv6 would mean you would have a public IP
[03:24:39] <OndraSter> not nescesarilly
[03:24:44] <OndraSter> but yes, that is one reason :D
[03:27:10] <JyZyXEL> i wonder what kind of blocks ISP's would give to regular customers
[03:27:28] <Casper> rumors say a /64
[03:27:38] <Casper> that would be your mac address
[03:27:57] <Casper> in other words, you will be tracable everywhere in the world without spyware
[03:28:05] <OndraSter> heh
[03:28:19] <specing> Casper: :dead:beef:cafe <- trace that
[03:28:46] <specing> Also assigning /64 is plain stupid
[03:29:07] <specing> In 2100 the same problem with ipv4 will reapear
[03:29:13] <Casper> yes and no
[03:29:20] <specing> and we will be forced to go ipv8
[03:29:23] <OndraSter> there is one major problem with ipv6
[03:29:27] <mrfrenzy> no it is very clever
[03:29:28] <OndraSter> one does not simply remember ipv6 addresses
[03:29:33] <OndraSter> (or at least I don't)
[03:29:33] <Casper> the first 64 would be the isp
[03:29:39] <Casper> and the second your mac address
[03:29:47] <mrfrenzy> one of the big problems with cidr and ipv4 is that the routing tables get huge with small assignments
[03:29:49] <Casper> the mac should be unique...
[03:29:58] <karlp> OndraSter: only idiots remember ipv4 addresses. that is what dns is for
[03:30:10] <Casper> so it will take a while before we exaust the mac address pool...
[03:30:13] <OndraSter> well you have to remember IPs for your ISP (unless he has DHCP working)
[03:30:13] <mrfrenzy> it's better to assign a huge range to begin with than start with a small range and then get more ranges later on as busineess grows
[03:30:38] <specing> karlp: I'm a mathematician, I find IPs easier to remember than domain names
[03:30:45] <karlp> if your isp makes you remember ips, your isp sucks.
[03:31:07] <OndraSter> there is no DHCP from my ISP
[03:31:15] <mrfrenzy> http://bgpmon.net/stat.php
[03:31:19] <OndraSter> lucky me, having router right as the first thing in my house!
[03:31:24] <OndraSter> that fixes that issue.
[03:31:27] <mrfrenzy> many old routers had to be replace because the bgp table outgrew the ram
[03:31:47] <OndraSter> I think I will buy Gbit ethernet to my download PC
[03:31:50] <OndraSter> and make it router
[03:33:49] <specing> Why gigabit?
[03:34:17] <mrfrenzy> because harddrives push around 70-120 MB/s
[03:36:42] <specing> SCSI anyone?
[03:37:13] <mrfrenzy> scsi from servers to your clients gets a little impractical ;)
[03:37:26] <OndraSter> that's actually right
[03:37:30] <OndraSter> for the ISP I need only 100Mbit
[03:40:03] <mrfrenzy> I actually get 200 Mbit from the isp
[03:42:12] <specing> mrfrenzy: 2* 100M link?
[03:42:22] <specing> Thats a little weird though
[03:43:09] <mrfrenzy> specing: no, single gigabit link capped to 200 Mbit
[03:58:29] <specing> Ah
[03:58:35] <specing> me so jelly :S
[03:58:51] <specing> Where do you guys get such high connection speeds?
[03:59:03] <specing> And how much do you pay for it?
[04:03:40] <Tom_itx> i'm only getting 17.7 Mbps up and 7.8 down
[04:04:07] <specing> More up than down? what kind of ISP is that?
[04:04:26] <Tom_itx> switch that :)
[04:04:31] <Tom_itx> it's 3am
[04:04:38] <specing> I wish I had up and down mixed aswell
[04:05:56] <OndraSter> to the edge of Prague where I live I am getting something like 24Mbit half duplex
[04:05:59] <OndraSter> well, 20Mbit or so
[04:06:03] <OndraSter> depends on the load of the ISP
[04:06:18] <OndraSter> 2 - 2.4MB/s downloads, uploads the same (if I get good server)
[04:06:24] <OndraSter> ofc half duplex
[04:06:38] <OndraSter> so it is not a brightest idea to download and upload at the same time
[04:06:59] <theBear> lol, for a moment there i thought you said your whole edge of the city was getting half a 24mbit :)
[04:10:35] <OndraSter> actually... :D
[04:10:41] <OndraSter> I am eating half of ISP's line often LOL
[04:10:50] <OndraSter> just because the wifi works somewhat fast here
[04:10:56] <theBear> :-)
[05:04:08] <iR0b0t1> So... I can receive using I2C fine. Problem is I can't transmit data to the master. Using a USI on a tiny85, the start condition interrupt occurs _once_, even though I issue a request from the Arduino TWI module library once every 100ms.
[05:04:16] <iR0b0t1> Is this an issue with the master?
[05:05:33] <jacekowski> it's not arduino channel
[05:05:59] <jacekowski> and in i2c slave isn't supposed to initiate communication
[05:06:03] <iR0b0t1> My question wasn't about Arduino.
[05:06:08] <iR0b0t1> And yes, I know. It doesn't.
[05:06:36] <iR0b0t1> Problem is there is no traffic on the clock or data lines after the start interrupt.
[05:06:56] <iR0b0t1> It gets one start condition and then stops.
[05:06:56] <iR0b0t1> Maybe it didn't send an ack? Hmm
[05:28:46] <rhumbot> hi all. is there a simulation software for linux to test and debug code?
[05:29:10] <rhumbot> i guess there is :) but do you have an advice which one i should use?
[05:43:58] <iR0b0t1> rhumbot: the one that works
[05:48:41] <rhumbot> thanks for the advice
[06:43:11] <rhumbot> could someone help me with a problem: http://pastebin.com/bXJmmc7e i loaded this tutorial code on a attiny13. The result is: PB0 high all others low - no change ...
[07:07:57] <Tom_itx> rhumbot, did you add the tiny13 to your makefile device?
[07:08:07] <Tom_itx> well how about that
[11:48:44] <rhumbot> hi all, could someone explain to me why this small piece of code is not working? http://pastebin.com/5WJ8hBDK
[11:49:01] <rhumbot> PB1 is supposed to change every second ...
[13:56:05] <rhumbot> hi again ... im still looking for help :/ is there a reason why PB0 remains high on this code: http://pastebin.com/JAJ4Rtt4 ?
[13:58:15] <drgreenthumb> rhumbot, ^= ?? we gave you the code to take a pin low. it's PORTB &= ~(1 << PB0);
[13:58:28] <Steffanx> ^= should work too
[13:58:42] <drgreenthumb> hmm what does that do? heh I hever use it
[13:58:53] <Steffanx> xor .. aka toggle the pin
[13:58:59] <drgreenthumb> aha
[13:59:08] <Steffanx> or pins :)
[13:59:16] <Steffanx> or bits whatever you want to call it
[13:59:17] <rhumbot> drgreenthumb same result when usind &= ~(1<<PB0)
[13:59:29] <Steffanx> Tried another pin?
[13:59:31] <drgreenthumb> rhumbot, sorry my bad I didn't know what ^= does
[14:00:03] <rhumbot> could there be a problem with the _delay_ms?
[14:01:38] <drgreenthumb> rhumbot, are you 100% positive you are testing the correct physical pin? that seems most likely.
[14:02:28] <rhumbot> give me a minute to test again since 99% is not enough :)
[14:02:42] <drgreenthumb> rhumbot, what are you driving on the pin by the way?
[14:02:42] <Steffanx> Which avr is it rhumbot ?
[14:02:54] <drgreenthumb> it's not a motor, right? ;)
[14:03:45] <drgreenthumb> or are you just testing with multimeter or an LED and resistor?
[14:04:02] <rhumbot> atmega8, an LED, also tested with multimeter
[14:06:28] <drgreenthumb> rhumbot, is this on a solderless breadboard by chance? lately mine have been losing connectivity along the rows and I have to be careful where I put things. I'm about to throw them all out and get new ones :/
[14:06:51] <drgreenthumb> oh heh though, it sticks high
[14:06:53] <drgreenthumb> hmm
[14:07:11] <drgreenthumb> oh wait I know
[14:07:13] <drgreenthumb> watchdog
[14:08:10] <drgreenthumb> #include <avr/wdt.h> MCUSR &= ~(1 << WDRF); wdt_disable();
[14:08:14] <drgreenthumb> rhumbot, ^^
[14:08:24] <drgreenthumb> disable that jerkface watchdog!
[14:08:31] <drgreenthumb> it's resetting your AVR
[14:08:57] <drgreenthumb> so the 1 second timeout is never reached
[14:08:59] <drgreenthumb> it starts over
[14:09:03] <drgreenthumb> so it sticks high
[14:12:38] <rhumbot> drgreenthumb at least kind of a success :) now it toggels every ?? ms. probably 50 or so
[14:14:21] <drgreenthumb> what happens if you just put _delay_ms(1000) directly instead of your loop?
[14:15:02] <drgreenthumb> oh. perhaps your F_CPU is set incorrectly.
[14:15:13] <drgreenthumb> _delay_ms and _delay_us require it set right
[14:15:33] <drgreenthumb> 3686400UL is that the exact freq if your crystal?
[14:15:40] <rhumbot> lol funny thing: its blinking without delay included :P
[14:15:59] <drgreenthumb> now that sounds like watchdog is active. weird.
[14:16:27] <drgreenthumb> you put the wdt_disabled() thing first, right?
[14:16:52] <drgreenthumb> should pretty much be the first thing main() does
[14:17:16] <rhumbot> second after MCUSR &= ~ (..)
[14:17:23] <drgreenthumb> yeah. huh.
[14:17:47] <rhumbot> 3686400UL is a randum frequency found in a tutorial
[14:17:50] <drgreenthumb> oh
[14:18:03] <drgreenthumb> if you're not using an external crystal, set it to one million
[14:18:07] <drgreenthumb> (1Mhz)
[14:18:09] <theBear> sounds kinda like a colourburst crystal from memory
[14:19:07] <drgreenthumb> rhumbot, the AVR has an /8 PLL which means it divides the internal clock by 8 by default. so you have an internal 8Mhz / 8 == 1Mhz. you can change the fuses to get control over that divisor.
[14:24:07] <rhumbot> f**k this SAFAJ-ASJFI "$)§U%& ")$%I)$"I :( ill try again tomorrow. its simply not working as supposed ...
[14:24:21] <rhumbot> thanks for your help drgrrenthumb
[14:24:57] <drgreenthumb> what an extradordinarily patient fellow ;D
[14:29:10] <drgreenthumb> heh for real though. I'm about to throw all my breadboards through a window
[14:29:37] <drgreenthumb> I think what I have to actually do is conductivity test every row and mark with red pen if broken. what a pain :/
[14:30:12] <drgreenthumb> some of the contacts are intermittent which is pretty terrible.
[14:31:23] <drgreenthumb> it's 2012 why do breadboards still suck?! that 100-in-1 Electronics Kit that I had when I was 7 had better connectors.
[14:31:45] <drgreenthumb> those little springs :)
[14:34:05] <specing> I have a conrad one which doesen't suck
[14:40:50] <drgreenthumb> hmm mine came from Radio Shack and Sparkfun. they don't seem to have any brand name on them.
[14:40:59] <drgreenthumb> that's probably the problem here ;)
[14:41:16] <Steffanx> Yeah, the one from conrad are nice specing :)
[14:46:51] <drgreenthumb> hmm actually I have one that looks nearly exactly like http://www.conrad.com/Conrad-830-Point-Breadboard.htm?websale7=conrad-int&pi=527819&ci=SHOP_AREA_14742_2512070
[14:46:59] <drgreenthumb> and that one is all messed up too :/
[14:47:20] <drgreenthumb> doesn't say "Conrad" on it though, maybe it's a knockoff
[14:48:22] <drgreenthumb> the actual breadboard part looks exactly like that. same shade of red and blue strips, same exact hole pattern
[14:52:36] <specing> drgreenthumb: I have a dual one
[14:54:03] <drgreenthumb> hmm actually ok. it looks in alright shape I just beep tested a quarter of it
[14:54:19] <drgreenthumb> I'll use this one exclusively for now
[14:54:51] <drgreenthumb> my new rule, rule 38: check each row before connecting anything.
[14:56:18] <drgreenthumb> maybe when I redo it I'll make the wires perfectly shaped and flat against the board, to make specing happy :P
[14:57:02] <drgreenthumb> I do have a lot of happy colored wire here, just ready to be cut into the perfect shapes! ;)
[14:57:27] <specing> I hate it how they put a lot of long wires in the wiring kits
[14:57:39] <specing> One almost never uses thos 10cm wires EVER
[14:57:50] <specing> and the put like 15 of them there
[14:58:15] <specing> Instead of providing 5 of those and more 300 mil ones
[14:58:29] <specing> I always run out of 300 and 400 mil ones
[14:58:31] <specing> ALWAYS
[14:58:34] <drgreenthumb> yeah
[14:58:44] <drgreenthumb> a ton of stuff just needs edge connections
[14:58:52] <drgreenthumb> and you get like 4 of those
[14:59:00] <specing> -.-
[14:59:20] <drgreenthumb> or heh, maybe my kit came with more. but they're so small they got vacuumed up ;)
[14:59:30] <specing> If someone makes a kit like that it will become a bestseller instantly
[14:59:30] <drgreenthumb> need like a bag of 1000x :P
[14:59:33] <drgreenthumb> heh
[15:00:44] <drgreenthumb> I just like to get some longer pieces of solid wire with nice colored insulation, and then just have a nice pair of wire strippers handy.
[15:00:59] <drgreenthumb> the wire kits are a bit weak
[15:01:32] <drgreenthumb> http://www.sparkfun.com/products/8696 that's probably the best thing I ever bought from sparkfun
[15:01:39] <drgreenthumb> gets used constantly :)
[15:02:36] <specing> Meh
[15:02:42] <specing> I gave up on wire strippers
[15:02:52] <specing> I just use a pocket knife for that
[15:02:59] <mrfrenzy> stripax ftw
[15:03:02] <drgreenthumb> this one works extremely well
[15:03:11] <drgreenthumb> before it, I used my teeth :P
[15:03:29] <specing> If I ever get proper strippers...
[15:03:41] <specing> I have about a kilometer of wire here
[15:04:18] <drgreenthumb> heh this time I'll try to get the bus wires colored consistently. MISO = green, MOSI=blue, SCLK=yellow. it'll make things a lot simpler.
[15:04:44] <specing> drgreenthumb: use ribbon cables ;)
[15:04:56] <specing> I once found ones for 30c each
[15:04:58] <drgreenthumb> lol for four inches of breadboard? ;)
[15:05:05] <specing> 30cm, 14 wires, multicoloured
[15:05:32] <specing> Works extremely well with my ispmkii clone
[15:05:35] <drgreenthumb> also there's four devices that need to get connected to it
[15:05:48] <drgreenthumb> I don't think ribbon wire is entirely appropriate here ;p
[15:06:03] <specing> I have my programmer off-protoboard
[15:06:09] <specing> seperate PCB
[15:06:17] <drgreenthumb> well yeah mine is too
[15:06:23] <drgreenthumb> it's Tom_itx's
[15:06:33] <specing> Heh
[15:06:52] <drgreenthumb> but just colored wire seems fine. it's only three lines plus reset for programmer
[15:08:15] <drgreenthumb> heh I was thinking of cutting up a ribbon for something else though. I have this Altera FPGA dev kit with the same headers as PATA cables. so heh it works awesome there.
[15:08:55] <drgreenthumb> there's no better way to bring 40 lines out to something usable really
[15:23:39] <specing> Does there exist an PLD/CPLD/FPGA with an opensource synthesis engine?
[17:01:06] * specing is looking at the ISO/OSI model
[17:01:23] * specing is looking at implementing his own network
[17:01:41] * Tom_itx wonders why
[17:01:46] * drgreenthumb too
[17:01:56] <specing> I have too much time, obviously
[17:02:01] <drgreenthumb> heh
[17:02:34] <specing> And since one of my fields is networking (cisco...)...
[17:03:28] <Tom_itx> don't borrow proprietary code now...
[17:04:29] <specing> Hey!
[17:05:10] <specing> Im going to do it with AVRs over UARTs/SPIs/I2Cs :)
[17:08:28] <Tom_itx> xmegas?
[17:09:37] <specing> Probably
[17:10:02] <specing> It could also be ARMs/MSP430s
[17:10:26] <specing> But the first implementation will be on regular 16MHz AVRs
[17:10:59] <specing> Then I'll see what I can get from it, what requirements it has, how much traffic it can handle, what I want
[17:11:10] <specing> And then I'll decide on the target micros
[17:11:51] <Tom_itx> then you will port it to all of them.. right?
[17:13:07] <specing> Highly unlikely
[17:13:34] <specing> But it could be my diploma in 3 years time
[21:18:38] <iR0b0t1> If I've got two protocols I need to watch for, and the best way to decode them is with a level change interrupt... Would putting both protocol decoders in the same pin change interrupt vector be a bad idea? Should I dedicate an external interrupt to one of them?
[21:18:48] <iR0b0t1> (b/c it is multiple pins per pin change interrupt)
[21:25:12] <iR0b0t1> One protocol does happen to work on the order of 600µs, and the other 1µs, so I think they would mesh pretty well.
[22:54:46] <ferdna> need help deciding....
[22:54:51] <ferdna> http://www.homedepot.com/h_d1/N-25ecodZ5yc1v/R-203278673/h_d2/ProductDisplay?catalogId=10053&langId=-1&keyword=yost+vice&storeId=10051
[22:54:54] <ferdna> or this one:
[22:54:59] <ferdna> http://www.homedepot.com/h_d1/N-25ecodZ5yc1v/R-202786364/h_d2/ProductDisplay?catalogId=10053&langId=-1&keyword=yost+vice&storeId=10051
[23:45:28] <ICSP> hey guys, i'm trying to get PWM working on OC1B of an Attiny45
[23:45:37] <ICSP> but i can't seem to get things working
[23:45:42] <ICSP> http://fpaste.org/yVU7/
[23:45:56] <ICSP> that's the code i have
[23:46:07] <ICSP> MIN is defined to be 0x00 but it increases every time a compare match occurs
[23:46:13] <Casper> check DDR, be sure to choose the right PWM mode.... I don't have the datasheet on hand, and going to do router firmware upgrade
[23:46:25] <ICSP> which means i should be getting a fadein effect on an LED
[23:46:31] <ICSP> DDR is set to be 0xff
[23:46:33] <ICSP> all output
[23:46:40] <ICSP> led is wired as active high as well
[23:46:58] <ICSP> and yes, i've been up and down the datasheet on PWM modes
[23:47:05] <ICSP> nothing
[23:47:10] <ICSP> LED remains on
[23:47:14] <ICSP> no matter what the clock frequency is
[23:47:39] <ICSP> amusingly, timer0 works ok
[23:47:48] <ICSP> then again, the configuration for timer1 is somewhat different
[23:51:55] <ICSP> well damn
[23:52:00] <ICSP> i found the problem
[23:52:03] <ICSP> missed the errata
[23:52:56] <Essobi> ICSP: Where's your head at? :D
[23:53:07] <ICSP> seems some revisions of the attiny45 have a hardware defect on timer1
[23:53:41] <ICSP> need to set some extra bits on TCCR1 for it to work
[23:53:56] <ICSP> [bits that don't relate to OC1A in any way]
[23:54:07] <ICSP> i mean
[23:54:12] <ICSP> OC1B