#avr | Logs for 2016-12-18

Back
[03:44:21] <irseeyou1> Would int pA = (PIND &= _BV(PD2)); give me the value of PD2? I can't figure out what is wrong.
[03:56:08] <sabor> irseeyou1: int pA = (PIND & _BV(PD2));
[03:58:32] <irseeyou1> sabor: Do you happen to know off hand how to move the bit place >> 2 with the mask? It was something like 0x4 & for that placement. Essentially I want to read either 1/0 from bit places higher than 1s place.
[03:58:52] <irseeyou1> Or do I have to use shift operators /does not remember
[03:59:07] <sabor> int pA = (PIND & _BV(PD2)) != 0;
[03:59:29] <sabor> the result of that is 0 or 1
[04:00:09] <sabor> another way is: int pA = (PIND >> PD2) & 0x01;
[04:00:22] <irseeyou1> Thats the one!
[04:00:33] <irseeyou1> sabor: Thank you so very much, you saved me hours of searching!
[04:00:45] <sabor> you're welcome :)
[04:04:54] <irseeyou1> sabor: You sir just saved me 50% execution time. Seriously, thank you so much!!!
[04:05:07] <sabor> nice to hear :)
[04:05:10] <irseeyou1> 16-20 microseconds down to now 4-8!
[04:07:20] <sabor> ooh, nice
[04:07:47] <sabor> it probably does less shifts
[10:38:25] <arij> hi
[10:39:02] <arij> im getting a content mismatch error when trying to set fusebits of a Atmega32U2 with a USBASP device and AvrDude
[10:39:07] <arij> i've tried multiple chips
[10:39:14] <arij> so i dont think its a faulty chip
[10:39:19] <arij> also I can read the fusebits just fine
[11:05:57] <Jartza> darn. farnell doesn't have attiny5 in stock anymore
[11:06:08] <Jartza> does it mean I have to move on to stupidly BIG chip like attiny10? :(
[11:07:15] <Chillum> it is available in other places
[11:07:32] <Jartza> sure, but I would want it before christmas
[11:07:32] <Chillum> http://www.newark.com/atmel/attiny5-ts8r/microcontroller-mcu-8-bit-attiny/dp/68T3779 - that is a neat tiny mcu
[11:07:35] <Chillum> ah
[11:07:39] <Chillum> ask Santa for one?
[11:07:46] <Chillum> ohhh _before_
[11:07:49] <Jartza> and in sot23-6
[11:08:16] <Jartza> and newark is "farnell" in this part of the earth
[11:08:34] <Chillum> 32 bytes of ram? That sounds like a challenge
[11:08:36] <Jartza> they don't have it anymore
[11:08:59] <Jartza> yea, and 6 pins
[11:09:13] <Jartza> Chillum: https://www.youtube.com/watch?v=kLnk6vnc7w0
[11:09:24] <Jartza> this is what I got out from the chip so far, but now it seems I broke the chip :)
[11:09:26] <Chillum> I suppose one could make a state machine on one that uses little to no ram
[11:09:27] <carabia> Jartza: you based in hki?
[11:09:31] <Jartza> carabia: yes
[11:09:36] <carabia> sec.
[11:09:37] <Jartza> or well, 65km from helsinki
[11:09:41] <Jartza> but I work in helsinki
[11:09:44] <Jartza> so visit there daily
[11:10:44] <Lambda_Aurigae> arij, you are likely getting a verify error.
[11:10:57] <Lambda_Aurigae> arij, what chip are you using?
[11:11:21] <arij> Atmega32u2
[11:11:36] <arij> I think I remember something about a verify error
[11:11:55] <Jartza> this one attiny5 I have was leftovers from one project I made to Suunto
[11:12:25] <Lambda_Aurigae> arij, what is happening, most likely, is there is a fuse that is reserved..it always reads as 1 even if you write it as 0
[11:12:28] <carabia> you're probably shafted
[11:12:29] <Lambda_Aurigae> what are your fuse settings?
[11:12:40] <Jartza> I remembered first it was sample from atmel and when I looked to sample envelope if there was more, it seems that the samples were actually attiny841
[11:13:04] <Jartza> seems my own memory was messed up too, I remembered then that this was from suunto project :)
[11:13:06] <Lambda_Aurigae> likely on the extended fuse byte.
[11:13:07] <arij> Lambda_Aurigae: I will be back at the computer to tell you in a few minutes. Thanks for helping
[11:13:24] <Lambda_Aurigae> upper 4 bits of extended byte always read 1
[11:13:31] <Lambda_Aurigae> you are likely writing them as 0
[11:13:38] <Lambda_Aurigae> change them to 1 and you are good..
[11:13:47] <Lambda_Aurigae> so instead of 0x05 it would be 0xF5
[11:14:25] <Lambda_Aurigae> this is about the 8th or 9th time in the last year I've seen this here and on a couple of other channels.
[11:22:27] <carabia> Jartza: I think your options are limited to mouser/dk but both ship from the states
[11:23:47] <carabia> buy in bulk so you can justify express shipping!
[11:24:01] <Lambda_Aurigae> 5K attiny5 chips!
[11:24:17] <Lambda_Aurigae> should be able to get 4K hdmi out of enough of them, right?
[11:32:46] <Jartza> carabia: digikey & mouser also has it in stock
[11:32:51] <Jartza> but both ship from US too
[11:33:08] <Jartza> oh. just read what you said :D
[11:33:09] <Jartza> lol
[11:33:14] <Jartza> I'm a bit on slow today it seems
[11:34:55] <arij> avrdude -c usbasp -p m32u2 -v -b 4800 -U lfuse:w:0xde:m
[11:34:59] <arij> Lambda_Aurigae: ^
[11:36:06] <arij> http://puu.sh/sTGkM/aa80bd23ef.png
[11:36:14] <arij> i press Y for yes at the end - it just hangs
[11:36:32] <arij> so i unplug the programmer then it starts saying the rest of that stuff at the bottom
[11:39:17] <Lambda_Aurigae> arij, have you erased the chip?
[11:39:22] <Lambda_Aurigae> what's your avrdude command?
[11:41:09] <Lambda_Aurigae> and verify what the efuse is supposed to be...just do a fuse read and see how it reads.
[11:41:18] <Lambda_Aurigae> you seem to have another problem with the lfuse too.
[11:41:36] <arij> that was my avrdude command: avrdude -c usbasp -p m32u2 -v -b 4800 -U lfuse:w:0xde:m
[11:41:44] <arij> i was trying to change lfuse
[11:42:07] <Lambda_Aurigae> ok..just read the fuses and see what they read as first.
[11:42:27] <arij> low fuse is: 0b1011110
[11:42:35] <arij> (the one im trying to change)
[11:43:24] <carabia> Jartza: happens
[11:44:21] <Lambda_Aurigae> arij, you have a comms issue somewhere it seems to me. being as it is a usbasp my first thought is to throw it in the trash and build an stk200 clone.
[11:44:32] <Lambda_Aurigae> however, being as you are new at this, you likely don't have anything with a parallel port.
[11:44:41] <Lambda_Aurigae> so, get a real programmer and test it that way.
[11:44:49] <arij> i have a few servers with a parallel port i think
[11:45:13] <arij> or it may be a serial port
[11:45:16] <Lambda_Aurigae> an stk200 clone can be as simple as 4 wires out of the parallel port but I recommend buffering it with a 74ls125 or 74ls244 chip.
[11:45:30] <Lambda_Aurigae> I keep a couple of older laptops around with parallel ports just for such things.
[11:45:49] <arij> any idea if there is maybe a usb to parallel adapter or such
[11:45:52] <Lambda_Aurigae> and my new-ish desktop(4 years old) has serial and parallel ports too...bought specifically for those on the board.
[11:45:59] <Lambda_Aurigae> usb-parallel adapters will NOT work.
[11:46:30] <Lambda_Aurigae> different animal entirely. you can't address the individual pins as inputs and outputs on a usb-parallel port adapter.
[11:46:35] <arij> i see
[11:47:04] <Lambda_Aurigae> there are lpt(parallel port) boards out there for pci
[11:47:07] <arij> what about ordering another usbasp - could mine be faulty?
[11:47:13] <arij> i may have to try that, for pci
[11:47:19] <carabia> what about getting a legit programmer?
[11:47:19] <Lambda_Aurigae> usbasp is faulty, period, in my opinion.
[11:47:28] <arij> carabia: any suggestions?
[11:47:32] <Lambda_Aurigae> usbasp is a hack of a hack.
[11:47:39] <carabia> arij: depends
[11:47:40] <arij> Lambda_Aurigae: so I get a parallel port pci-e card
[11:47:45] <arij> then do I need anything else?
[11:47:48] <arij> pci card
[11:47:50] <Lambda_Aurigae> arij, that's one way to do it.
[11:47:52] <carabia> if you're just tinkering with megas or tinys get mk2
[11:48:04] <Lambda_Aurigae> or, get a real programmer from atmel.
[11:48:07] <arij> what is mk2? im looking for something cost effective
[11:48:17] <Lambda_Aurigae> anyhow, my job here is done so I'm outta here..gotta drive home now.
[11:48:19] <carabia> if you want to broaden your horizons in terms of atmel shiz, get the ice
[11:48:24] <arij> ATLMEL-ICE
[11:48:26] <arij> oh
[11:48:34] <carabia> arij: it's not "cost effective" in terms of china.
[11:48:43] <arij> ice looks nice :)
[11:48:45] <arij> little pricey
[11:48:48] <carabia> but it's effective in temrs of productivity.
[11:48:58] <arij> any other reliable options that may be slightly cheaper than ICE?
[11:49:11] <arij> but i'm willing to pay more than $3 like I did for usbasp lol
[11:49:11] <carabia> mk2
[11:49:25] <carabia> but it's more than that.
[11:49:26] <arij> what should I search for? atmel mk2?
[11:49:28] <arij> oh
[11:49:38] <carabia> avrisp mk2
[11:50:35] <carabia> you don't need the ice for tinkering with megas or tinys, really. The need for dw is questionable at best
[11:50:39] <arij> so for ice - do i need anything other than the device and some jumper cables?
[11:50:41] <arij> oh
[11:51:41] <arij> carabia: can you possibly suggest me a avrisp mk2 to purchase? there seem to be a few different ones
[11:51:50] <arij> I clearly cant choose something that works :(
[11:52:06] <carabia> arij: the atmel original 8)
[11:52:17] <arij> out of stock - that was the first one i checkde
[11:52:19] <arij> checked*
[11:53:16] <carabia> arij: the only strong selling point for the ICE for tinkering is that it can do ocd with debugwire on tiny/mega-line
[11:53:30] <arij> this is a new area for me so I dont even know what that means
[11:53:50] <carabia> but, it's really not needed. Only go for ice is you're going to expand into xmegas or the arm-line
[11:53:57] <arij> i dont see myself needing to change anything other than what im currently trying to change
[11:54:01] <arij> but whoknows
[11:54:22] <arij> carabia: im building keyboards
[11:55:44] <carabia> oh what the fuck. mk2 is discontinued?
[11:56:07] <Jartza> I got ICE for free :)
[11:56:09] <carabia> so i guess they want people to buy cheap clones instead. Good shit. No beginner wants to get the ICE
[11:56:11] <Jartza> from Atmel
[11:56:21] <Jartza> or well... "free"
[11:56:26] <Jartza> I exchanged it to one Tagsu
[11:56:46] <carabia> this marketing strategy seems golden
[11:57:02] <carabia> no wonder they got acquired.
[11:58:00] <arij> carabia: seeing as its discontinued - should I go for something else?
[11:58:04] <arij> or get a mk2 knock off
[11:58:21] <carabia> arij: you're on your own! if i was to give advice, i'd say drop avr bullcrappery and switch to arm. You'll thank yourself later!
[11:58:29] <arij> lol wat
[11:59:03] <arij> do i connect ICE to my pc?
[11:59:07] <arij> and use avrdude?
[11:59:40] <carabia> yes
[11:59:55] <carabia> but with ice you should probably use atmel studio
[12:00:12] <carabia> if you want to do debugging anywho.
[12:00:14] <arij> oh ok, thats fine - do you know if I connect via usb or do I need parallel port?
[12:00:23] <carabia> ice's usb
[12:00:27] <arij> sorry if these are dumb questions
[12:00:38] <arij> alright - thanks carabia and everyone else who helped. I guess i'll need to order an IRC
[12:00:40] <arij> ICE*
[12:01:23] <carabia> even though i am a proponent of the ICE i would almost certainly recommend against that, but you know, YMMV and all that stuff ;D
[12:02:11] <arij> you cant tell me im on my own then tell me not to buy it!
[12:02:18] <carabia> though it's not the end of the world if you get the barebones version. I think it clocks in at $60 or so.
[12:02:19] <arij> I need an alternative
[12:02:56] <carabia> arij: well, you could just go with another clone as atmel's marketing strategy seems to be one of pushing customers into buying cheap clones
[12:02:59] <arij> oh it looks like I can 3d print a case for it
[12:03:29] <carabia> The barebones ice is a very jew product. I think they even scrapped the USB-cable :D
[12:04:18] <arij> ATATMEL-ICE-PCBA: PCB assembly of main unit only, no cables
[12:04:34] <arij> i have a bunch of usb cables laying around
[12:05:39] <arij> would be nice to have the 6pin connector though
[12:06:50] <carabia> you can use regular jumper wires. or buy one off ebay for $.5 or something.
[12:07:08] <arij> yea
[12:07:32] <arij> i guess i'll do the barebones... although i do like the case that it comes with
[12:07:33] <arij> but whatever
[12:09:28] <carabia> on another note though, you can get full breakouts with cortex-m0/3 from china, the full board being around the size of two side-by-side dip40s, for the price of less than say, a mega1284
[12:13:01] <carabia> noticeably cheaper even. A cm3 breakout I'm looking at has a tag of $3.8. Populated with a micro-usb connector, vreg, xtal osc, 128K/20K flash/ram running up to 72MHz
[12:13:14] <arij> your just confusing me even more
[12:13:18] <arij> i'm a noob
[12:13:51] <arij> can you link me?
[12:14:36] <carabia> hotmcu sells them. I've ordered a couple of boards from them before.
[12:14:47] <arij> carabia: is this worth trying? Program an AVR or Arduino Using Raspberry Pi GPIO
[12:15:03] <carabia> arij: should work.
[12:15:16] <arij> oh, nice, this way i dont need to spend any more money
[12:15:46] <specing> arij: lol you wasted money on rpi
[12:15:55] <arij> i have a few of them laying around
[12:16:00] <specing> lmao
[12:16:02] <arij> wasted was not
[12:16:16] <arij> whats your problem buddy?
[12:16:22] <carabia> Ada. Ada is his problem.
[12:16:23] <arij> :(
[12:16:34] <arij> show me an alternative
[12:16:36] <arij> and i'll buy it
[12:17:26] <specing> BBB
[12:18:32] <carabia> specing: why the hate. You can cross compile ada for everything!
[12:32:30] <Lambda_Aurigae> ok..show me a cross compiler for ada for my watch.
[12:34:50] <carabia> what watch
[12:35:34] <carabia> you're a timex watch in a digital world...
[12:36:01] <Lambda_Aurigae> https://sites.google.com/site/emrirc/avrisp-buffered.gif
[12:36:15] <Lambda_Aurigae> it's a cheap 8 dollar digital watch carabia
[12:36:33] <Lambda_Aurigae> arij, that link is the first avr programmer I ever made..it still works and is my primary avr programmer.
[12:37:36] <arij> With USB would be easier for me
[12:38:08] <Lambda_Aurigae> well, you can bitbang a usb hub as an avr programmer, but that's just silly.
[12:38:48] <Lambda_Aurigae> you could also bitbang an IDE port as an avr programmer, but that's sillier.
[12:38:50] <carabia> that's all fine and dandy but most of us are not stuck in the 90s with parallel ports
[12:39:05] <carabia> and not a lot of people have ides anymore either
[12:39:30] <Lambda_Aurigae> carabia, and you probably don't have a working commodore vic-20 either.
[12:40:09] <carabia> haha, no not a vic-20. but a c64.
[12:40:11] <Lambda_Aurigae> but parallel ports are used to this day, on new modern equipment still in current production.
[12:40:33] <Lambda_Aurigae> mostly industrial level equipment
[12:40:56] <carabia> sure, you can make this argument for a lot of things, they're just not very helpful right now
[12:42:53] <Lambda_Aurigae> grabbing an old p-4 with a parallel port and using it as an avr programmer is likely more stable than usbasp in my opinion
[12:43:53] <Lambda_Aurigae> arij, only way to know what is going on,,for me at least,,is for you to have a second programmer, preferably of a different type.
[12:44:25] <carabia> hey, if you're gonna be silly about it just drop avrs, switch to arm and get ocd with a $3 clone that works better than usbasp.
[12:45:54] <carabia> arm cm works much the same was as the old bash quote of vim and anal sex
[12:46:14] <Jartza> well
[12:47:05] <Jartza> you could also hack together few capacitors, comparators and resistors and use your computers headphone-jack to program AVR, but that would be the silliest thing, who in their right mind would want to do that? :)
[12:47:09] <Jartza> oh shit, I did that.
[12:47:46] <Jartza> can also be done without comparators, but then choosing right volume is pretty important and it's not as reliable
[12:48:35] <Jartza> I think with right kind of software, one could even use vic-20 to program AVR
[12:48:53] <Lambda_Aurigae> Jartza, most likely..should be fairly simple.
[12:49:07] <Lambda_Aurigae> hell, one can do it with a bunch of debounced swiches and some LEDs for that matter.
[12:49:17] <Jartza> maybe I need to try it
[12:49:22] <Lambda_Aurigae> have done it.
[12:49:30] <Jartza> I meant, vic-20 ;)
[12:49:33] <Lambda_Aurigae> oh
[12:49:44] <Lambda_Aurigae> yeah...vic-20 has that 5V user interface port.
[12:49:45] <carabia> leds are highly optional. They say, real engineers make do without.
[12:49:48] <Lambda_Aurigae> kind of a paralle port.
[12:49:50] <Jartza> yeah
[12:50:06] <Jartza> I still have my vic-20 fully operational
[12:50:12] <Lambda_Aurigae> me too.
[12:50:15] <Lambda_Aurigae> including tape drive
[12:50:15] <carabia> c64 > vic20
[12:50:16] <Jartza> C64 has broken sid-chip, only 2 channels play :(
[12:50:27] <Lambda_Aurigae> I hook it to the projector and play games on it.
[12:50:40] <Jartza> I also have the Magnavox Odyssey 2
[12:50:50] <Jartza> or, Philips Videopac like it was called on this side of the pond
[12:50:56] <carabia> i took one of my 64s apart. Two are still gathering dust in the garage.
[12:51:05] <Lambda_Aurigae> I have several c-64 units and a c-128 that all work too.
[12:51:25] <Lambda_Aurigae> one of them is a C-64C too...that looks more like the c-128 package.
[12:51:26] <Jartza> the video output quality of the videopac has deteriorated to quite bad, though :(
[12:51:32] <Jartza> I might need to open it and take a look one day
[12:51:42] <Jartza> probably some leaking caps or something
[12:51:49] <Lambda_Aurigae> very likely.
[12:52:14] <Jartza> I might do the S-Video out hack to it when I open it, although then it wouldn't be original anymore
[12:52:16] <Lambda_Aurigae> http://hackaday.com/2016/12/18/retrotechtacular-rocket-sleds/
[12:52:21] <Lambda_Aurigae> video here is really interesting.
[12:52:45] <Jartza> but the RF-modulator metal case is pain to open
[12:52:46] <Jartza> and fix
[12:55:00] <Jartza> sorry, remembered wrong, it was composite video out that the hack did
[12:55:55] <Jartza> https://easyeda.com/normal/Odessy_2_a_v_mod-S4YgarJ1j.png
[12:55:57] <Jartza> pretty simple fix
[14:08:35] <sebus> Few days ago I bought lights for christmas tree and noticed there's no beep-beep music going out from box so... Meh. I made this and I think I put it under christmas tree with motion detector :D https://www.youtube.com/watch?v=Br_MXL3P2_U What am I doing with my life? :D
[14:37:33] <arij> the pi didnt work
[14:37:41] <arij> looks like i'll just order ICE
[14:39:34] <carabia> :D
[14:41:51] <arij> but my mouser order ends up being $90 because of all of the other random crap I added lol
[14:42:07] <arij> its dangerous
[14:42:42] <carabia> does mouser have free shipping over $x?
[14:43:31] <arij> I don't think so
[14:43:40] <arij> I spent $600 the other week and still had to pay for shipping
[14:44:55] <carabia> what'd you get
[14:45:23] <arij> the other week?
[14:45:25] <carabia> yeah
[14:46:12] <arij> stuff and thing
[14:46:13] <arij> s
[14:46:15] <arij> http://puu.sh/sTRTF/894f6930d3.png
[14:46:52] <arij> the teensy 2.0s were expensive
[14:47:07] <Lambda_Aurigae> yup.
[14:47:25] <arij> and here I am ordering another one
[14:48:50] <carabia> well that's not the whole order. May I be so inquisitive as to ask what is it that you're making?
[14:49:15] <Jartza> I guess it's ok to replace BC548 with 2N3904?
[14:50:16] <carabia> Jartza: rtfds
[14:50:35] <carabia> my connection is major league crap right now
[14:50:53] <arij> carabia: keyboards
[14:51:10] <arij> ergodox.. was making
[14:51:16] <arij> im having this issue with a differnt thing
[14:51:25] <carabia> arij: oh yeah. Makes sense for the bulk of diodes you're getting
[14:51:29] <antto> soak your router in liquid viagra
[14:52:05] <carabia> antto: i'm gonna soak it through the window any moment now...
[14:53:04] <antto> Q: are you connected to your router via a cable?
[14:53:57] <carabia> A: yes
[14:54:25] <antto> so then.. call teh ISP
[14:54:47] <carabia> 10:30 pm on a sunday night. Good luck with that
[14:55:48] <antto> you're in my timezone ;P~
[15:04:57] <carabia> arij: just sayin' ( :) ), instead of those teensies you could have gone for, e.g.: http://www.hotmcu.com/stm32f103tb-arm-cortex-m3-development-board-p-222.html?cPath=1_20
[15:06:01] <arij> Needed teensy loader
[15:06:09] <Jartza> well. seems to be just fine fit for this purpose
[15:06:20] <carabia> arij: ?
[15:33:21] <Emil> Hmm
[15:33:28] <Emil> Something has changed in the matrix
[15:33:39] <Emil> 115200 used to work just fine when not on double speed
[15:33:43] <Lambda_Aurigae> vous-ja-des all over again?
[15:33:45] <Emil> Now it absolutely needs it
[15:33:50] <Emil> Very strange
[15:34:15] <Lambda_Aurigae> you reversed the polarity of the neutron flow.
[15:35:18] <Emil> And this is not even tied to a single space
[15:35:31] <Emil> Perhaps it is me, emitting some kind of spacetime altering field
[15:36:26] <Lambda_Aurigae> it's the 7805...it emits inverse anti neutrinos.
[15:37:15] <Jartza> don't let the beams touch
[15:37:50] <Emil> Perhaps the quality of my simulation has been degraded
[15:38:02] <Emil> Thus the error rate on 115200 has increased beyond rating
[15:40:57] <carabia> The first matrix I designed was quite naturally perfect. It was a work of art. Flawless. Sublime. A triumph only equaled by its monumental failure.
[15:41:32] <Lambda_Aurigae> most complex matrix that is guaranteed to work...tic tac toe.
[15:43:26] <carabia> no, I like a 4x4 matrix more than a 3x4
[15:43:28] <carabia> 3x3 even
[15:46:05] <carabia> so i can simultaneous 3d rotation and translation
[16:26:31] <arij> is there a cheaper device than the ice that is just as reliable?
[16:26:49] <Emil> arij: define requirements
[16:27:30] <arij> be able to change fusebits sucessfully on atmega32u2
[16:27:37] <Emil> usbasp
[16:27:38] <Emil> Get
[16:27:41] <Emil> or usbtiny
[16:27:55] <Emil> With usbtiny you can have a spi term easily also
[16:28:02] <arij> i have a usbasp but it doesnt work
[16:28:16] <Emil> Remember to use the slow speed when you first program
[16:28:23] <arij> i tried that
[16:28:31] <Emil> The divide by 8 fuse default is fucking annoying
[16:29:27] <arij> yea
[16:29:43] <arij> its messing up my project
[16:29:47] <arij> http://puu.sh/sTYsJ/5ac2859eb8.png
[16:30:26] <arij> any ideas other than trying atmega ICE?
[16:30:40] <arij> or atmel ice rather
[16:32:17] <arij> Emil?
[16:39:54] <Emil> Hmm
[16:39:55] <Emil> Well
[16:40:05] <Emil> Are these fresh chips?
[16:40:24] <arij> ya same error on the two i tried
[16:41:00] <Emil> Well, check your settings then
[16:41:04] <Emil> USBASP should work just fine
[16:41:10] <Emil> Settings and connections
[16:41:33] <Emil> Also update your usbasp firmware
[16:41:39] <arij> which settngs?
[16:42:08] <arij> connection is ok i can read just fine
[16:42:08] <Emil> All of them
[16:42:14] <arij> lol wat
[16:46:00] <arij> sounds like updating the firmware is the way to go
[16:47:45] <Lambda_Aurigae> arij, from an earlier post, your usbasp doesn't support the clock speed changes.
[16:48:36] <Lambda_Aurigae> could be a firmware issue...often is.
[16:49:37] <arij> i dont have another usbavr to update this one
[16:51:29] <Emil> arij: you can use another avr
[16:51:30] <Emil> too
[16:51:39] <arij> I dont have any other ones
[16:51:47] <Emil> Well, sucks to be you, then :D
[16:51:52] <Lambda_Aurigae> gotta be able to program one to write the program to program the other.
[16:51:59] <Lambda_Aurigae> hence, my reliance on parallel port.
[16:52:02] <arij> i tried to make my raspberry pi into one but it says it cant use one of the gpio pins
[16:52:05] <Lambda_Aurigae> no chicken-n-egg problem.
[16:52:16] <Emil> arij: if you have raspi you can program them
[16:52:24] <arij> i tried
[16:52:27] <arij> it was like "no"
[16:52:30] <Emil> You have to sudo to use gpio traditionally
[16:52:40] <Emil> Or the spi
[16:52:46] <Emil> you also have to enable the spi in raspi-config
[16:52:54] <arij> i dont know if i did that
[16:53:14] <Emil> https://learn.adafruit.com/program-an-avr-or-arduino-using-raspberry-pi-gpio-pins?view=all
[16:54:43] <Lambda_Aurigae> you COULD use some switches and LEDs and program it by hand.
[16:55:01] <Emil> :D
[16:55:06] <Emil> Lambda_Aurigae: hardcore
[16:55:09] <Lambda_Aurigae> it is doable.
[16:55:18] <Lambda_Aurigae> I did it once just to prove to myself I could.
[16:55:24] <Emil> Lambda_Aurigae: sure, I think there was a video about it
[16:55:27] <Emil> Lambda_Aurigae: Nice
[16:55:36] <Emil> How did you dea§l with pin debounce?
[16:55:40] <Emil> Switch*
[16:55:43] <Lambda_Aurigae> also used a 555 as a dc to 1mhz clock
[16:55:50] <Lambda_Aurigae> caps across the switch contacts.
[16:55:58] <Emil> Hmm, well it works
[16:56:02] <Lambda_Aurigae> yup.
[16:56:02] <arij> i have switches and leds
[16:56:06] <arij> whatdo
[16:56:12] <Emil> arij: this is not something you want to do, really :D
[16:56:25] <Lambda_Aurigae> arij, you have to read and understand the datasheet where it talks about memory programming
[16:56:32] <Lambda_Aurigae> it is not a beginner thing.
[16:56:33] <Emil> Wayyy easier and faster just to use the raspberry pi
[16:56:42] <arij> rpi is bork
[16:56:49] <arij> it doesnt want to work
[16:56:53] <Emil> Lambda_Aurigae: To program a simple serial bootloader, how many flips is that?
[16:57:05] <Lambda_Aurigae> a shitload.
[16:57:15] <Lambda_Aurigae> I just programmed fuses.
[16:58:02] <Emil> Ah :D
[16:58:06] <Lambda_Aurigae> in the old old olden days we did that though...loaded bootloaders through switches and buttons...then load program off of tape.
[16:58:06] <carabia> Lambda_Aurigae: no. No leds.
[16:58:10] <Lambda_Aurigae> TI 980B
[16:58:20] <carabia> Lambda_Aurigae: you are a beginner if you need the LEDs.
[16:58:33] <Lambda_Aurigae> carabia, it helps to be able to read back what you are programming
[16:58:44] <carabia> my point exactly
[16:58:51] <Emil> carabia: mister hardcore ;)
[17:00:17] <Emil> Anycase, I think if you optimise you could fit a bootloader into 256 bytes
[17:00:26] <Emil> But that's a shitty bootloader then
[17:00:28] <carabia> heating should be done with firewood, food should be gathered (for hippies) or hunted (for real men), and avrs should be programmed by hand
[17:00:35] <Lambda_Aurigae> could be fit into smaller than that I bet.
[17:00:43] <Emil> Lambda_Aurigae: probably
[17:00:50] <Emil> I should write my own shitty bootloader
[17:00:59] <Lambda_Aurigae> depending on your interface you use, what hardware you can use, etc.
[17:01:16] <Emil> carabia: not by forming pockets in the air with camp fire and letting cosmic particles flip the necessary bits?
[17:01:21] <Lambda_Aurigae> you can do spi comms in 64 bytes pretty easily.
[17:01:36] <Lambda_Aurigae> although, if you are doing spi, you might as well use ISP as that is basically spi anyhow.
[17:01:37] <arij> i need ez mode
[17:01:48] <Emil> arij: use the linked raspberry pi tutorial
[17:01:53] <Emil> You have no other choice
[17:02:12] <carabia> Emil: no is that the stupid webcomic thing everyone seems to post? i really despise that comic
[17:02:13] <Emil> If you don't have another arduino/avr board to use
[17:02:36] <Emil> carabia: you don't like it? I think they are fun to read. Not god like, though, like the hivemind says
[17:02:41] <Lambda_Aurigae> I can see doing rs232/usart in about that....adding the programming side,,,another 64 if you don't want verify...
[17:03:22] <Emil> Lambda_Aurigae: I think usart and SPI fit into the same size quite easily
[17:03:38] <carabia> ah the hivemind. Consensus and democracy. What a great fucking system
[17:03:46] <Emil> Well, spi perhaps easier because it needs less registers
[17:20:18] <arij> that didnt work
[17:23:43] <Vikinger> cant seem to generate a random number
[17:23:51] <Vikinger> with rand()
[17:24:51] <Vikinger> i want to generate random numbers from 1 to 7 only
[17:25:18] <Vikinger> with avr-gcc
[17:36:39] <antto> Vikinger use your own algo
[17:40:03] <Jartza> https://i.imgflip.com/ad455.jpg
[17:41:13] <Vikinger> still rand() should be usefull
[17:44:16] <Vikinger> antto: any hint ?
[17:45:31] <Emil> Vikinger: ?
[17:45:32] <antto> look around for a PRNG
[17:45:36] <Emil> You have to seed it
[17:46:00] <antto> get 16bit at least, and scale its output to your required range
[17:46:12] <Emil> You can get "real" randomness from reading unconnected pins
[17:46:23] <antto> that would be better
[17:46:25] <Tom_L> analog floating pin
[17:46:48] <Emil> You can use that to seed a generator
[17:47:24] <antto> just read it 3 times and you got your 3 bits for the number ;P~
[17:48:41] <Jartza> it's pretty hard to get random numbers out of deterministic microprocessor
[17:48:54] <Jartza> you have to seed some kind of randomness in first
[17:49:34] <Jartza> until you read something like floating pin or avalanche noise collector, it's always pseudo-randomness even with seed
[17:50:11] <antto> on the device where i need random stuff - i load a seed from eeprom on init, i generate a new seed immediately and save it to eeprom for the next time
[17:50:28] <antto> this isn't really proper but better than starting from the same point every time
[17:51:27] <Jartza> yeah, sort of "saving the entropy"
[17:51:37] <Jartza> better than many other systems I've seen :)
[17:52:44] <Lambda_Aurigae> could always ask the user their birthday.
[17:53:09] <Jartza> or add ESP8266 and connect to random.org
[17:53:10] <Jartza> :D
[17:53:13] <carabia> wtf
[17:53:28] <Lambda_Aurigae> well, I suppose if it is male it will be less random than if female.
[17:53:32] <carabia> real men use geiger tubes for seeding
[17:54:25] <antto> real men have seeds
[17:54:43] <carabia> real men seed yo mama!
[17:55:18] <antto> and they periodically scramble the seeds
[17:55:50] <antto> michael jackson did it on stage way too often
[17:56:10] <antto> he wasn't actually too real
[17:57:27] <Vikinger> PRNG ill start there
[17:57:29] <antto> i use a 16bit prng currently, it's an algorithm from Marsaglia, with "k=5" .. that's 5 feedback taps which makes the prng more random
[17:57:51] <carabia> NEEDS_MORE_BITS
[17:58:05] <antto> or more taps
[17:58:11] <carabia> or more seeds
[17:59:31] <carabia> or more mj.
[17:59:57] <antto> mj is ded
[18:00:11] <antto> all young boys can sleep safely
[18:01:42] <Lambda_Aurigae> zombies.
[18:01:53] <Lambda_Aurigae> didn't he/she/it have some music video about zombies?
[18:02:10] <antto> yes.. like two at least
[18:02:45] <carabia> thriller comes to mind
[18:03:07] <Lambda_Aurigae> and one about jacking off.
[18:03:18] <Lambda_Aurigae> or, that's what it looked like in the little bit I saw of it.
[18:03:46] <antto> i've heard his nose was falling off
[18:03:51] <Lambda_Aurigae> naaa.
[18:03:53] <Lambda_Aurigae> he had several
[18:04:19] <antto> but i guess his seed sack did too, that would explain his constant touching.. checking if it's still there
[18:04:55] <Lambda_Aurigae> that's what he/she/it had little boys around for.
[18:05:31] <Lambda_Aurigae> Michael Jackson was proof that a poor little black boy could grow up to be a rich white woman and die pennyless.
[18:06:04] <antto> "hey little jimmy, come sit on my lap" "is that candy in your pocket, mj?" "sssuuurre"
[18:06:06] <Lambda_Aurigae> the armenian dream!
[18:06:23] <carabia> i wish many a seed befall upon your behinds, for the both of you
[18:07:34] <Lambda_Aurigae> you one of her fans there carabia ?
[18:08:44] <carabia> no, not really
[18:15:13] <Vikinger> but then again, what is the funtion rand() useful for ?
[18:15:29] <Lambda_Aurigae> Vikinger, generating easily guessable passwords.
[18:22:00] <Vikinger> i dont follow
[18:22:22] <Lambda_Aurigae> it's not very random without a seed
[18:22:23] <Lambda_Aurigae> so,
[18:22:33] <Lambda_Aurigae> if you use it to generate random numbers, they are predictable.
[18:23:16] <Vikinger> ok
[18:23:36] <Vikinger> thats what srandom() is for
[18:23:47] <Vikinger> i have been reading the avrlib
[18:23:55] <Vikinger> avr-libc
[18:24:06] <Lambda_Aurigae> same smell different finger
[18:24:30] <Vikinger> can you show me some code
[18:25:10] <Lambda_Aurigae> void main() { printf("hello world\n");}
[18:25:16] <Vikinger> cool
[18:25:35] <Vikinger> not exactly what i was asking though :P
[18:25:38] <Jartza> function(s){for(w=t=0;f=s[t++];w=f>w?f:w)for(x=4;x;f*=s[--x+t]);return w}
[18:25:47] <Lambda_Aurigae> you asked for me to show you some code..that is code.
[18:25:55] <Vikinger> indeed it is
[18:26:10] <Vikinger> now some code to generate random int s
[18:26:16] <Vikinger> integers
[18:26:31] <Lambda_Aurigae> no can do.
[18:26:35] <Emil> Vikinger: just read unconnected ADC
[18:26:42] <Lambda_Aurigae> can't generate true random numbers.
[18:26:44] <Emil> Not a hard thing to do
[18:26:46] <Lambda_Aurigae> pseudo-random, yes
[18:28:31] <Vikinger> its an attiny13, i have no more unconnected pins
[18:28:55] <Vikinger> pseudo-random will do
[18:28:56] <Lambda_Aurigae> does it have an adc tied to an onboard temp sensor?
[18:29:03] <Vikinger> nop
[18:29:17] <Vikinger> all busy on leds and a switch
[18:31:16] <carabia> http://www.fourmilab.ch/hotbits/
[18:31:49] <carabia> real men use geiger tubes.
[18:32:28] <Lambda_Aurigae> so, read the i/o pins and use that as a seed.
[18:32:30] <Jartza> http://holdenc.altervista.org/avalanche/images/random-generator-avalanche.png
[18:33:34] <carabia> no. krypton-85 is the future.
[18:33:54] <carabia> personally i would use plutonium
[18:34:08] <Lambda_Aurigae> I prefer unobtanium
[18:34:16] <carabia> weapons-grade
[18:38:21] <FL4SHK> I want to see weapons-grade paintbrushes
[18:45:59] <Lambda_Aurigae> https://upload.wikimedia.org/wikipedia/commons/a/ab/AC-130H_Spectre_jettisons_flares.jpg
[18:46:53] <Lambda_Aurigae> http://media.defenceindustrydaily.com/images/AIR_AC-130H_Specter_Firing_lg.jpg painting some serious hurt on the enemy
[18:51:10] <Jartza> Vikinger: attiny13 has internal temp sensor
[18:51:19] <Jartza> adc can be tied to that
[18:52:15] <Lambda_Aurigae> I was just looking for hat but didn't find.
[18:53:09] <Lambda_Aurigae> hat/that
[18:53:14] <carabia> Lambda_Aurigae: welcome to 10 years ago
[18:53:26] <Lambda_Aurigae> 10?
[18:53:33] <Lambda_Aurigae> specter is older than that.
[18:53:57] <carabia> well yes, but it was more like a figurative thing.
[18:54:07] <carabia> The hercules angel flare is so old
[18:54:15] <Lambda_Aurigae> it's still impressive as hell.
[18:54:30] <Lambda_Aurigae> specially seeing it in person.
[18:54:34] <carabia> call from last millenium, asking for you
[19:13:58] <Jartza> d'oh
[19:14:11] <Jartza> I'm not sleepy at all
[19:14:16] <Jartza> stupid day-rhyth
[19:14:20] <Jartza> rhythm, even
[20:53:56] <Emil> Jartza: datasheet fails to mention such
[20:54:52] <Emil> Jartza: you are wrong
[20:54:58] <Emil> atmel says it doesn't have a temp sensor
[21:47:08] <Casper> rue_bed rue_house rue_shop rue_shop1 rue_shop3 ! do you know how to make misting nozzle for water using only city water pressure? I failed...
[22:00:27] <rue_shop3> no, thats rocket science, sorry.
[22:01:54] <Casper> it appear to be
[22:01:58] <Casper> I want to make a snow canon
[22:02:27] <Casper> will be fricking cold tonight, would have been nice if I could have made a few thousands liters of snow
[22:25:42] <Tom_L> tried that once with a pan of boiling water when it was very cold outside
[22:30:31] <Casper> I'm actually wondering how small of water droplet you need to make snow
[22:32:21] <Tom_L> http://www.ebay.com/itm/Mist-Coolant-Lubrication-Spray-System-Part-For-CNC-Lathe-Engraving-Machine-New-/351657658566?hash=item51e06e08c6:g:ZykAAOSwll1WxYXI
[22:32:25] <Tom_L> that would require air
[22:32:31] <Tom_L> but it would mist water for you
[23:16:25] <rue_shop> I got a mister
[23:16:34] <rue_shop> works good
[23:16:44] <rue_shop> I thought of using it with the pulser I made today
[23:16:47] <rue_shop> I'm excited
[23:21:40] <Casper> I couln't find any mister this summer
[23:21:52] <Casper> my next hope is hydroponic stuff
[23:22:14] <Casper> if nothing there, then... I'll have to hope for lots of snow