#avr | Logs for 2016-02-11

Back
[00:20:21] <Deskwizard> Chillum: cehteh sorry, I got sidetrack, and I'm not very good at taking pictures but, theres you go :) https://drive.google.com/folderview?id=0Bz08z1XVRQVuSVpSVFZCaVJZSlU&usp=sharing
[00:22:10] <Chillum> zomg it is so cute
[00:22:18] <Chillum> what was it originally?
[00:22:21] <cehteh> much too pro :D
[00:22:24] <cehteh> http://public.pipapo.org/IMAG0115.JPG
[00:22:26] <cehteh> :D
[00:22:30] <Chillum> doorbell?
[00:22:36] <Deskwizard> see the text fill
[00:22:39] <Deskwizard> file*
[00:22:49] <Chillum> ahh
[00:23:12] <Deskwizard> I thought it was a bell too hehe
[00:23:30] <Deskwizard> the other possible option is, if they had both side by side, I took the wrong one
[00:23:36] <Deskwizard> im going back tomorrow to make sure
[00:23:39] <Chillum> ahh, crappy home security. You gotta love it when you can get a crappy item with a case for cheaper than a case would cost
[00:23:41] <Deskwizard> ill get more of those anyway
[00:23:51] <Deskwizard> yeah, cant be cheaper than that
[00:24:06] <Deskwizard> so you guys think that soic-8 is a 555 too? :P
[00:24:39] <Chillum> probably
[00:24:46] <Chillum> to make the sound oscillate
[00:25:06] <Deskwizard> yeah thats what I thought, something like that
[00:25:08] <Deskwizard> cool :)
[00:25:28] <Deskwizard> I have another "cool" find ill add tomorrow
[00:26:06] <Chillum> I have a bag of those reed switches
[00:26:12] <Chillum> they are pretty sensitive
[00:29:53] <Chillum> you can make project pcbs that fit the box perfectly
[00:30:03] <Chillum> you can even use the speaker
[00:34:41] <Deskwizard> Chillum: yeah, theres like so much possibilities ! im sure a small ESP8266 board would fit in there as well
[00:34:47] <Deskwizard> but I'm not sure the batteries can drive it
[00:34:52] <Deskwizard> im not there yet hehe
[00:35:08] <Chillum> if it sleeps most of the time it should be able to manage
[00:35:46] <Deskwizard> cool :)
[00:36:05] <Chillum> www.ebay.ca/itm/381370251618 <-- just ordered 5
[00:36:11] <Chillum> same one right?
[00:36:36] <Chillum> ohh, comes with stickytape
[00:36:49] <Chillum> $1 each
[00:37:08] <Chillum> ~ 93 cents US
[00:39:08] <Deskwizard> oh nice find !
[00:39:11] <Deskwizard> I loke yours better
[00:39:19] <Deskwizard> they probably the same inside
[00:39:24] <Deskwizard> but yours is more "rounded"
[00:39:31] <Deskwizard> mine is rectangular
[00:39:52] <Deskwizard> and I needed more fridge magnets so... lol
[00:40:17] <Chillum> ahh, round means less space though
[00:40:39] <Chillum> I guess I could make rounded pcbs
[00:40:44] <Chillum> I would prefer square
[00:41:02] <Deskwizard> good point about space
[00:41:10] <Deskwizard> I retract my previous comment your honor.
[00:41:18] <Deskwizard> ^.^
[00:42:27] <Chillum> aha, www.ebay.ca/itm/171998575032 this one has more space and takes 2xAAA
[00:42:33] <Chillum> moer powre!~
[00:43:34] <Casper> is plaster of paris blocking magnetic field?
[00:44:02] <Chillum> same price too
[00:46:26] <Mr_Sheesh> plaster of paris I wouldn't expect to stop magnetic fields much...
[00:47:10] <Casper> same... that or the grinding overheated the magnet and demagnetised them...
[00:57:46] <Deskwizard> Chillum: nice!!!
[00:58:10] <Chillum> ya, you can do a lot more with 2xAAA than with button cells
[00:58:42] <Deskwizard> yeah for sure!
[00:58:54] <Chillum> this is making me thing, what else comes in a great little box but sells for $1
[00:58:58] <Deskwizard> you can make the 2AAA space square and fit a nice lipo in there :P
[00:59:05] <Chillum> "making me think"
[00:59:12] <Chillum> yes you can
[00:59:31] <Deskwizard> Chillum: yeah me too, I spent like 20 minutes looking at every item in the "electronics" section thinking "can I use that for something"
[00:59:33] <Deskwizard> lol
[00:59:39] <Chillum> if you have or make a nichrome cutting wire you can remove those internal plastic segments easily
[00:59:44] <Deskwizard> I even ended up with a clock... lol
[00:59:48] <Deskwizard> the fuck
[01:00:07] <Deskwizard> Chillum: Oh, good idea
[01:00:18] <Chillum> though I am guessing it is brittle enough to snap
[01:00:29] <Deskwizard> I usually take my old flush cutters and finish it nice with a sharp blade hehe
[01:00:35] <Deskwizard> yeah.. probably lol
[01:00:47] <Deskwizard> I need 2 more monitors...
[01:00:59] <Deskwizard> and some kind of AI to take care of ebay and kijiji
[01:00:59] <Deskwizard> lol
[01:01:02] <Chillum> I need a bigger desk first
[01:01:24] <Deskwizard> put monitor on the wall, instant bigger desk
[01:01:34] <Deskwizard> its like if you want a bigger tv for free
[01:01:36] <Deskwizard> fkin site closer
[01:01:40] <Deskwizard> s/site/sit
[01:01:41] <Deskwizard> lol
[02:40:57] <nikomo> adc works. yay. that was easy.
[02:41:44] <cehteh> now make it work correctly .. :D
[02:42:57] <nikomo> lol
[02:43:23] <Casper> now, make it work with true 16 bits precision!
[02:43:28] <nikomo> I'm not actually sure I have to worry about that nasty offset etc.
[02:43:43] <cehteh> seriously .. what reference do you use, do you do oversampling, added lowpass filter?
[02:43:50] <cehteh> and calibration
[02:44:11] <Casper> nite
[02:44:12] <nikomo> I just compared a pot to vcc, going to do more in a bit
[02:44:19] <cehteh> Casper: there is this appnote how you get 16 bit precision out of it with oversampling
[02:44:48] <cehteh> nikomo: what do you want to sense? just pot position?
[02:45:23] <nikomo> I did the pot position because I just wanted to test that my code works. I haven't written proper C ever, been using only Arduino before
[02:45:48] <nikomo> I'm eventually going to measure voltage after a PMOS, in a bit, I reckon
[02:46:34] <nikomo> probably figure out 10bit first, I just used ADLAR now
[02:47:12] <cehteh> see my notes above, esp when you want to measuure voltage correctly you need to put some efforts into it
[02:47:44] <cehteh> do not use vcc as refrence .. use the builtin 1.1/2.54 V reference
[02:47:50] <nikomo> yeah, looking at the stuff in the datasheet kinda worries me
[02:47:53] <cehteh> possibly with external cap
[02:48:01] <cehteh> do some filtering/oversampling
[02:48:04] <nikomo> is there a delay in switching between vcc and bandgap as reference?
[02:48:19] <nikomo> I need vcc for a few buttons
[02:48:20] <cehteh> bandgap needs some startup
[02:48:37] <nikomo> but can the bandgap stay active whilst you use some other reference?
[02:48:53] <cehteh> do you poll the buttons analog?
[02:49:02] <nikomo> kinda have to, in this case
[02:49:10] <nikomo> gonna use the reset pin as adc
[02:49:18] <cehteh> uhm
[02:49:21] <cehteh> why?
[02:49:30] <cehteh> thats pita for beginning
[02:49:31] <nikomo> because I'm using a tiny85 and I need pins
[02:49:45] <nikomo> it's not that bad, it won't reset as long as I stay above 60% vcc
[02:49:46] <cehteh> have we takled before?
[02:49:54] <cehteh> na do not do that
[02:49:56] <nikomo> idk, maybe? probably not about this
[02:50:14] <cehteh> you can disable the reset function
[02:50:15] <nikomo> if you've talked to Jartza, you might recognize the topic, because I got the idea from him
[02:50:23] <nikomo> I don't have a programmer I can use if I disable reset
[02:50:29] <cehteh> but be carefulk then you cant program /change fuses with a normal programmer anymore
[02:50:39] <cehteh> better dont do that
[02:50:46] <cehteh> what you can do (ive done that)
[02:51:01] <cehteh> at startup you check if the startup was caused by a reset
[02:51:21] <cehteh> with that information you can use the reset as very limited button
[02:51:23] <nikomo> if reset affects timer0 in any way, that
[02:51:25] <nikomo> 's no-go
[02:51:32] <cehteh> ok then not
[02:51:34] <nikomo> and since it's a _reset_, I assume so
[02:51:38] <cehteh> yeah
[02:52:03] <cehteh> i only use that to initiate a calibration cycle on a battery watchdog
[02:52:26] <nikomo> this doesn't need to be super precise at all, so I'm thinking it'll do fine
[02:52:41] <nikomo> I was thinking I'd have timer0 interrupting and then in the interrupt, just grab all the ADC values I need
[02:52:44] <nikomo> timer1*
[02:52:47] <cehteh> the other way .. you can still use buttons read them analog with a resistor network and have 1.1V aref enabled
[02:52:56] <cehteh> w/o switching aref
[02:53:18] <cehteh> but you should really not use reset as io while it is enabled as reset
[02:53:52] <nikomo> reasoning for that? I only need 3 buttons so I don't need to go anywhere near the point where it could trigger reset
[02:53:58] <cehteh> the 60% you mentioned are rather 'by chance' .. when you need it reliably then dont do that
[02:54:26] <cehteh> what do you plan to do?
[02:54:54] <nikomo> digital-controlled linear regulator. pwm to rc-rc to op amp to etc., shift registers driving 7seg, few buttons
[02:55:15] <nikomo> it doesn't need to be a practical working thing in the end, it's just for funsies
[02:55:48] <cehteh> so one pin pwm out, one for voltage sense, one for buttons, 2 for the shift register
[02:55:55] <cehteh> wont that work?
[02:56:40] <nikomo> I haven't thought about my pin usage in a few days. I think I first wanted to save a pin for current sensing, but I scrapped that, so I think I might have a pin left free
[02:56:52] <nikomo> so yeah, if I don't have to use reset, I won't
[02:57:56] <cehteh> http://public.pipapo.org/Battswitch2.png ... did such a battery watchdog :)
[02:58:31] <nikomo> dat part number on that one TO package
[02:58:40] <nikomo> slightly big for 3D usage
[02:58:43] <cehteh> its even the wrong package
[02:58:49] <nikomo> lol
[02:58:55] <cehteh> a friend rendered that
[02:59:11] <cehteh> many things looking different in real
[02:59:55] <nikomo> I've been using kicad since last summer, been enjoying the 3d functionality in that
[03:00:11] <cehteh> i added current sensing too .. but if i make another revision i think i better lift the voltage divider on low voltage conditions
[03:00:29] <cehteh> yes a friend of me wanted to use eagle, for myself i use kicad
[03:01:24] <cehteh> http://git.pipapo.org/?p=battswitch.git;a=blob;f=src/battswitch.c
[03:01:36] <cehteh> maybe it has some intersting points for you
[03:13:17] <nikomo> C question, https://bpaste.net/show/d8012642eada my adc_result variable - my linter informed me that scope can be reduced (I had it outside the loop first) - but won't having the declaration in the loop, keep reallocating the variable?
[03:26:30] <cehteh> uhm dont use magic constants :D make this code bit unreadable
[03:27:05] <cehteh> 1<<ADEN; .. would be readable
[03:27:41] <nikomo> lol
[03:27:58] <cehteh> 1 << 6; is what bit?
[03:28:07] <nikomo> start conversion
[03:28:37] <nikomo> yeah I'll change that stuff around in a bit, not sure why I did that (I was a bit tired last night, doing that)
[03:29:30] <cehteh> and setting output on portb should be done with |= or &= you dont want to affect other bits or?
[03:29:47] <nikomo> I was just testing it out, so the other ports didn't really matter
[03:29:53] <cehteh> otherwise it looks ok
[03:30:09] <cehteh> i'd wont use delay
[03:30:16] <cehteh> but its only test code
[03:30:17] <nikomo> allocating the variable inside the loop isn't a problem?
[03:30:57] <cehteh> thats ok .. you only need it inside
[03:31:05] <cehteh> but in reality i would do some oversampling
[03:31:30] <nikomo> I diff'd the disassembly and there's no difference in the output between where it is
[03:31:33] <cehteh> reacting a bit slower, but gives more precision
[03:31:34] <nikomo> (did that just now)
[03:31:58] <cehteh> yes gcc prolly optimize it to the same
[03:32:15] <cehteh> in fact you dont need a variable at all
[03:32:20] <nikomo> end up with different results if the variable was used somewhere else though
[03:32:25] <nikomo> aye
[03:32:29] <cehteh> if(ADCH > 127){
[03:32:41] <cehteh> since you only use it once ther
[03:32:53] <cehteh> but with oversampling things may change
[03:33:31] <nikomo> I'm going to be writing results into variables in the interrupt, in the proper code, so I probably thought about that
[03:33:38] <cehteh> you may also look into interrupt drive programming
[03:33:58] <cehteh> and sleep modes
[03:34:11] <nikomo> yup
[03:34:19] <nikomo> there's the noise cancelling stuff etc.
[03:34:38] <nikomo> probably not that important for the button reading, but reading a voltage that matters, yeah
[03:35:08] <cehteh> reading voltage needs some fitlering esp when the voltage has some noise
[03:35:44] <cehteh> sampling is not the average between 2 samples but the voltage at a rather short time window
[03:36:08] <cehteh> in noisy environments you may measure some crap
[03:36:14] <nikomo> you reckon I should voltage divide the voltage down for usage with the bandgap reference, or you reckon it would be sufficient to read bandgap against vcc and then math it out? vcc can change, so that's annoying, but this doesn't need to be mV-precise
[03:36:45] <cehteh> http://tinyurl.com/onqagld
[03:36:53] <cehteh> did that once for someone else
[03:38:26] <cehteh> even if you dont need mV .. 10 bit isnt that much
[03:38:41] <cehteh> and btw the bandgap is reasonable stable, but it has some tolerance
[03:38:51] <cehteh> so you have to add some calibration factor
[03:39:03] <cehteh> either in software or by a trimmer
[03:39:20] <nikomo> yeah I'm gonna have up/down/"ok" button, so I'm thinking I'll have a cal thing you can enter by holding down the third button
[03:39:40] <cehteh> thats what i made with the reset button
[03:39:57] <cehteh> apply a stable calibration voltage (15V in my default) ...
[03:39:59] <cehteh> then reset
[03:40:07] <cehteh> and it calibrated to the 15v
[03:40:28] <cehteh> (further resets trigger through current and power calibration)
[03:42:44] <nikomo> wonder if I could cal the RC osc by flipping a pin constantly and then measuring the freq there. regular port output is fuse controlled, so that's out
[03:43:01] <nikomo> not that this thing needs an accurate clock
[03:46:06] <cehteh> yes thats my question too .. why do you OSCCAL?
[03:46:59] <cehteh> do you need some exact timing? then better use a crystal/external oscillator
[03:47:01] <nikomo> I got a new DMM with freq measurement and I wanted to have some fun
[03:47:22] <cehteh> or sync with something you can gather from the outside
[03:47:25] <cehteh> hah
[03:47:37] <cehteh> i havent checked how much MHz my DMM can do
[03:47:42] <daey> sure you can do that. use the pwm that way you can easily build a frequency divider
[03:47:52] <cehteh> yes
[03:48:03] <nikomo> this thing advertises up to 10MHz, it seems to work
[03:48:12] <cehteh> but the RC osc drifts and jitters
[03:48:19] <nikomo> aye
[03:48:24] <nikomo> I'm just gonna remove the osccal
[03:48:38] <cehteh> so once only calibrating OSCCAL is somewhat pointless
[03:49:04] <cehteh> if you have some external signal then its fun to sync it with and keep it in sync
[03:52:13] <cehteh> btw my battery watchdog runs from the 128khz osc ... 8mhz osc turned off
[03:52:28] <cehteh> low power
[05:02:45] <nikomo> back, had to go preach the gospel of avr to a pic-using teacher
[05:02:50] <nikomo> :3
[05:23:34] <Drzacek> Hi. I want to program AVR chips using USBasp programmer. Anything against it? Can I use atmel studio?
[05:25:57] <cehteh> they usually work
[05:26:14] <cehteh> windows and atmel studio is the problem usually :D
[05:28:32] <Drzacek> any other ide?
[05:32:59] <lorenzo_> Drzacek: you can program them in avr studio
[05:33:02] <lorenzo_> just not debug them
[05:33:20] <lorenzo_> http://shannonstrutz.com/uncategorized/setting-up-usbasp-for-use-with-atmel-studio-6
[05:33:23] <Drzacek> because of windows or because of programmer?
[05:33:29] <lorenzo_> of programmer
[05:34:04] <lorenzo_> since ATAVRISP2 and ATJTAGICE2 have been phased out, cheapest you can get for debugging is ATATMEL-ICE
[05:34:11] <lorenzo_> http://www.atmel.com/tools/atatmel-ice.aspx
[05:36:39] <nikomo> kinda wish I had something that could debug, but I think I'm ok
[05:42:13] <Drzacek> sooo I had to configure "external tool" for every avr type?
[05:43:23] <nikomo> I just disabled optimization (-O0), included avr/cpufunc.h, and added a massive NOP slide (_NOP();) to the start of main(), anyone know why it's not showing up in avr-objdump?
[05:43:39] <nikomo> using avr-libc and gcc-avr if that makes a difference
[05:45:13] <nikomo> https://bpaste.net/show/c0e43b5dd977 https://bpaste.net/show/0beace1c48a9
[05:46:23] <nikomo> ... this is the part where I ask a dumb question - does avr have a nop instruction, or is it done in some other way
[05:46:40] <nikomo> I just realized how repetitive the output is
[05:47:18] <nikomo> ... also the output jumps from 00000036 to 00000068 running the same instruction... nevermind
[05:51:22] <jben> Drzacek: it seems you have to. The avrdude command in the configuration of external tool involves programmer (-c) and chip (-p)
[05:52:41] <jben> Maybe you can configure the chip another place or maybe you can use a configuration variable instead of wrinting in the hard way the chip name
[05:53:12] <Drzacek> in that tutorial there was -p atmega16 parameter, but according to this http://www.nongnu.org/avrdude/user-manual/avrdude_4.html it should me m16
[05:53:32] <Drzacek> should be*
[05:55:08] <nikomo> oh, I found my nop
[05:55:11] <nikomo> I was totes wrong
[05:56:17] <jben> Drzacek: it does not seem have a configuration variable in http://www.atmel.com/webdoc/atmelstudio/ch10s05s02.html
[05:59:30] <jben> Drzacek: [...] partno ids and official part names on the terminal. (Both can be used with the -p option.)
[06:00:10] <jben> m16 is the id, ATmega16 is the part desc (a.k.a. name) in avrdude.conf
[06:00:30] <jben> so m16 and atmega16 are equivalent
[06:00:41] <Drzacek> great
[06:01:55] <jben> for the way to configure external tool in atmel studio, I can not help, I don't use windows and atmel studio myself
[06:02:30] <Drzacek> is there a risk to brick a chip if I configure it wrong? or it simply won't burn my program?
[06:03:56] <jben> Drzacek: when you are configuring some fuse, there may be a risk, but for me that never happens
[06:11:34] <Lambda_Aurigae> triple check your fuses.
[06:11:42] <Lambda_Aurigae> specialy those having to do with clock source.
[06:12:25] <Lambda_Aurigae> if you mess up the clock source you can often recover by feeding it with an external 1MHz clock source when reprogramming
[06:12:38] <Lambda_Aurigae> sometimes you have to go as far as HV programming which requires a different programmer.
[06:13:11] <Lambda_Aurigae> if you aren't changing fuses then there is no way that I know of to brick the chip.
[06:14:57] <Lambda_Aurigae> with an HV programmer or a FuseDoctor handy there is nothing you can do to the chip programming or fuse wise that you can't recover from....with the exception of some of the attiny chips and all the xmega that use other programming methods.
[06:16:25] <Haohmaru> waaat? microchip buys atmel?!
[06:17:22] <Lambda_Aurigae> Haohmaru, week late there.
[06:17:25] <Drzacek> Lambda_Aurigae, so if I start new project and try to upload it (plain empty main() ), there is no way I could brick it? I just want to test if I set my programmer right
[06:17:37] <Lambda_Aurigae> Drzacek, correct.
[06:18:22] <Drzacek> thanks
[06:18:24] <Drzacek> brb
[06:28:52] <Drzacek> "Please select a connected tool and interface and try again" - looks like atmelstudio doesn't see my usbasp
[06:34:59] <Haohmaru> Lambda_Aurigae okay, i'm scared now :~(
[06:43:05] <tavish> hi, i have a large look up table(a struct array) which I would like just in PROGMEM, but I also have a function pointer in there, what would be the best way to access that? struct definition:http://codepad.org/XgqVPVNK
[06:49:15] <Lambda_Aurigae> scared about what?
[06:49:35] <Lambda_Aurigae> avr will be around for a while yet.
[06:49:41] <Lambda_Aurigae> maybe something good will come of it all.
[06:50:08] <Haohmaru> yeah, more pics
[06:50:36] <Lambda_Aurigae> or maybe an avr with usb in dip package.
[06:50:44] <Haohmaru> u wish ;]
[06:50:44] <Lambda_Aurigae> or an avr core with pic peripherals.
[06:51:05] <Haohmaru> or avr with banked RAM
[06:51:07] <Haohmaru> x_x
[06:51:34] <Lambda_Aurigae> avr32 in a dip package would be fun.
[06:52:20] <Lambda_Aurigae> to go with the pic32 in dip package with hardware usb.
[06:54:26] <lorenzo_> avr with pic peripherals ;o
[06:56:14] <LeoNerd> AVR32 is dead
[06:56:21] <LeoNerd> Or at least, should be
[06:57:12] <Lambda_Aurigae> LeoNerd, yeah...it didn't get a good start..never really took off
[06:57:34] <Lambda_Aurigae> if they had pushed it harder early on it might have given arm a race.
[06:57:45] <LeoNerd> Yah...
[06:58:07] <LeoNerd> But now the range looks attiny - atmega - xmega - arm m0 /etc...
[06:58:13] <LeoNerd> There's no gap for avr32
[06:58:15] <Lambda_Aurigae> yup...
[06:58:32] <Lambda_Aurigae> I have really had fun with the pic32 chips though.
[06:58:59] <Lambda_Aurigae> they fill a gap between 8bit and arm pretty good.
[06:59:30] <lorenzo_> if only there was a pic-gcc
[06:59:35] <Lambda_Aurigae> there is
[06:59:38] <lorenzo_> sdcc?
[06:59:40] <Lambda_Aurigae> at least, for pic32
[06:59:45] <Lambda_Aurigae> xc32 is gcc
[06:59:56] <lorenzo_> hm
[07:00:02] <lorenzo_> how about programming tools?
[07:00:04] <lorenzo_> picdude?
[07:00:08] <Haohmaru> not for pic18
[07:00:20] <lorenzo_> one of these days I should really grab a pickit3 thing
[07:00:22] <Haohmaru> i use sdcc, it's not too nice
[07:00:26] <Lambda_Aurigae> they compiler their own with some additions and a license thingie for disabling optimizations in it.
[07:00:41] <Lambda_Aurigae> but you can compile it yourself without the optimization disabling..it's just a pain in the ass.
[07:00:52] <Lambda_Aurigae> I have a pickit3...works well.
[07:01:16] <Haohmaru> they have something similar to avrdude for pickit3... but it's a total sh*t
[07:01:43] <Lambda_Aurigae> I use the gui that comes with mplabx to upload.
[07:02:03] <Haohmaru> it has some okay-ish features which you'd expect, like being able to flash only certain parts of a hex onto the chip without flashing others... AAAAAND THEY DON'T WORK
[07:02:40] <Lambda_Aurigae> ok..time to head for work.
[07:05:08] <Drzacek> can I program 328p with 3.3V (3.6 actually) using usbasp? it seems that jumper setting for 5V doesn't work
[07:05:26] <LeoNerd> I do mine just fine at 3.3V
[07:06:33] <Drzacek> must be something else then
[07:07:25] <Drzacek> http://pastebin.com/0Ta1ztLf i double- and triple-checked my connections, tried 2 programmers
[07:12:18] <Drzacek> http://pastebin.com/psP7jZrh looks like he doesn't see my usbasp at all
[07:12:37] <jben> Drzacek: if you want to convert a usbasp from 5V to 3.6V (with a non-usable jumper), just use some resistor and zener diodes
[07:13:32] <Drzacek> jben, no, it only gives me 3.6V, but if I can work with that then okay
[07:14:26] <jben> Right
[07:14:46] <jben> Drzacek: your usbasp is on usb right ?
[07:14:50] <Drzacek> yeah
[07:15:09] <jben> the "Using Port : lpt1", does not seem fine
[07:15:23] <jben> try adding "-P usb" on your command line
[07:15:25] <Drzacek> I figured
[07:15:50] <Drzacek> error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc
[07:16:04] <jben> Drzacek: with the "-P usb" ?
[07:16:07] <Drzacek> yeah
[07:17:30] <jben> and with the "-P usb" it continue to usr lpt1 port ?
[07:18:10] <Drzacek> hmmm why my avrdude ver is 5.10? I believe I saw newer version
[07:18:26] <Drzacek> jben, no, then it changes port to usb, but the error stay
[07:20:46] <Haohmaru> yes.. there is avrdude 6.x already
[07:21:18] <jben> Drzacek: do you have a tool like "lsusb" on windows to see if you OS see your usb device?
[07:21:38] <Drzacek> isn't this linux command?
[07:21:39] <Haohmaru> it's called "device manager"
[07:22:07] <Haohmaru> go there and see if you see the usbasp in the USB devices, or if you have some unknown device warning
[07:22:46] <jben> and if you see the device id (vid and pid as writed by avrdude)
[07:23:19] <Drzacek> Is is there, installed
[07:24:19] <Drzacek> USB\VID_16C0&PID_05DC
[07:25:42] <jben> If avrdude can see it, and the OS have it, it may be some right access stuff
[07:26:22] <Drzacek> http://pastebin.com/V9xk2yJk used other version
[07:27:27] <jben> Why port == lpt1?
[07:28:21] <Drzacek> http://pastebin.com/dEZ36bWg
[07:29:12] <jben> are you sure about your connections?
[07:31:24] <Drzacek> pretty much yes
[07:31:36] <Drzacek> I'm checking them all the time, but everything seems ok
[07:31:53] <Haohmaru> i always make the connector mirrored the first time, even tho i try hard to be careful
[07:31:55] <jben> do you use your own schematics or a known one?
[07:32:23] <Drzacek> http://www.learningaboutelectronics.com/images/USBASP-10-pin-wiring-to-AVR-Atmega328-chip.png
[07:32:36] <Drzacek> + I added pullup resistor for reset
[07:33:41] <Haohmaru> ehm.. try calling avrdude with the -t switch
[07:33:46] <jben> Drzacek: which value on the pull-up ?
[07:33:51] <Drzacek> 10k
[07:36:06] <jben> Drzacek: do you check you don't have mirrored your connector as Haohmaru explained?
[07:36:33] <jben> (just check you have ~+3.6 between pins you expect to be Vcc and GND)
[07:36:51] <Drzacek> jben, not mirrored, voltage is where it's suppose to be
[07:36:56] <Drzacek> what does -t do?
[07:37:04] <Haohmaru> on the pic you pasted, that should be top-view, and your 10pin connector's "notch" should be on the side where the RESET pin is
[07:37:08] <Haohmaru> ..when you plug it
[07:43:34] <Drzacek> no, it all looks good here
[07:43:43] <jben> Drzacek: you don't need a pull-up on RESET, the µC have one, but 10k is not a strong pull-up and should not interract with the programming
[07:45:12] <jben> are you sue your µC is in the good position (I made that mistake the first time I sold a xmega, I use one week to found the mistake)
[07:46:51] <jben> also, just to be sure (I saw that mistake one time with a friend of mine), this is a pull-up? not a pull-down?
[07:47:01] <Drzacek> it goes to V+
[07:47:11] <Drzacek> I\m gonna check it again
[07:47:12] <Drzacek> brb
[09:23:54] <Drzacek> *sigh*
[09:24:05] * Drzacek puts his robes of shame
[09:24:15] <Drzacek> it might have been mirrored..
[09:37:27] <Haohmaru> i'm failing to sample a voltage with the xmega128a3u ADC :/
[09:37:46] <Haohmaru> i get 2047 and nothing else
[09:39:39] <Fleck> sampling 2V? :D
[09:40:34] <Fleck> err, 2.5V
[09:41:56] <Haohmaru> i've hooked a 10k pot between GND and 3.3V, then a 10k resistor on the wiper
[09:42:28] <Haohmaru> i'm also scoping it at that same point with the scope, it's currently 600mV
[09:42:37] <Haohmaru> i'm using the internal "1V" reference
[09:42:55] <Haohmaru> single ended mode, signed
[09:43:17] <Haohmaru> the pin is set as input, and digital buffer is disabled
[09:44:59] <LeoNerd> I don't know xmega but I know on atmega, the first ADC reading after switching the reference is basically invalid, and you should discard it
[09:45:22] <cehteh> the first few even
[09:47:57] <Haohmaru> the thing is connected via tcp with teh comput0r and i'm calling it to read the adc myself.. so i surely don't just hit it once
[09:48:38] <Haohmaru> i also checked what readings i get on the other 15 inputs (even tho most of them are not supposed to be used as ADC inputs according to my firmware needs)
[09:49:18] <Haohmaru> on some i get 2047 too, on some i got varying values around 1000, and on some i got varying negative values
[09:49:40] <Haohmaru> but none of them appear to be affected by the potentiometer voltage i'm feeding
[09:49:51] <Haohmaru> i also tried with ADCA and ADCB modules
[09:49:54] <LeoNerd> Negative values feels wrong
[09:50:08] <Haohmaru> why?
[09:50:12] <LeoNerd> Sounds like either your MUX settings are wrong, or there might be some odd hardware setup.. maybe damage even?
[09:50:47] <Haohmaru> i am using most of the PORTA and PORTB pins for digital outputs
[09:51:24] <cehteh> Haohmaru: check if you muxed to the correct input
[09:51:38] <cehteh> eh LeoNerd saied so
[09:52:01] * LeoNerd 's finger is on the pulse today
[09:52:01] <cehteh> and ADC prescaler !!!
[09:52:02] <Haohmaru> adc_chan->MUXCTRL = chan << ADC_CH_MUXPOS_gp;
[09:52:02] <LeoNerd> ouch
[09:52:12] <LeoNerd> That looks suspect
[09:52:23] <Haohmaru> where "chan" is 15, since i'm trying to use PORTB pin7 for the measurement
[09:52:32] <LeoNerd> I don't know the Xmega's ADC MUX, but certainly on an ATmega it's not a 1-bit-per-channel value
[09:52:34] <Haohmaru> prescaler is 32
[09:52:36] <cehteh> with wrong prescaler ADC produces shitload of crap
[09:52:38] <LeoNerd> It's a fairly opaque enumeration
[09:52:55] <cehteh> and input impedance should be below 15k at least for atmels iirc
[09:53:00] <cehteh> err atmegas
[09:53:18] <cehteh> otherwise you need to sample slower
[09:53:40] <LeoNerd> Or stick a follower buffer on there
[09:53:52] <cehteh> dunno if '32' is correct check the math
[09:54:08] <Haohmaru> i'm using definitions from the headers
[09:54:23] <Haohmaru> adc->PRESCALER = ADC_PRESCALER_DIV32_gc;
[09:59:09] <cehteh> i meant if 32 is correct for your system clock
[09:59:44] <cehteh> what libs are you using there btw?
[09:59:58] <cehteh> i thought xmegas can use avr-libc
[10:00:28] <Haohmaru> uhm.. nothing fancy.. avrgcc, and i'm writing in c++
[10:00:39] <cehteh> maybe thats the problem :D
[10:01:09] <Haohmaru> those headers i mentioned are all part of avrgcc (io.h)
[10:01:34] <cehteh> looks just strange
[10:01:43] <Haohmaru> what's strange?
[10:02:09] <cehteh> i use http://www.nongnu.org/avr-libc/
[10:03:39] <Haohmaru> i think i use that same thing
[10:04:14] <Haohmaru> i only have avrgcc and haven't put anything additional
[10:16:01] <Drzacek> my avr board for usbasp still doesn't work (after 3rd resolder). I give up, maybe avr isn't meant for me
[10:16:57] <Drzacek> is there some cheap board I could simply buy and connect to my programmer? where I could stick AVR ICs (attiny, atmega etc)?
[10:17:37] <LeoNerd> You could obtain a decent ISP programmer ;)
[10:17:52] <LeoNerd> The pololu one is nice. It combines ISP6 and UART on the same device, which I find is often exactly what I want
[10:18:00] <LeoNerd> Saves you needing two separate USB devices
[10:18:19] <Haohmaru> yeah.. i had uber discouraging first experience with mcus, specifically atmega and usbasp
[10:18:28] <Drzacek> LeoNerd, every programmer I saw only has cable (6 or 10 pin), so I need board with sockets anyway
[10:18:50] <LeoNerd> Well,.. yes :)
[10:18:56] <Drzacek> Haohmaru, one of the reasons I like arduino so much - works out of the box
[10:19:04] <LeoNerd> I made myself a little breakout board to turn the 2x3 into a 1x6 pin header.. useful for breadboarding
[10:19:14] <Drzacek> LeoNerd, soooo, are there such boards, or does one have to build one himself?
[10:19:14] <LeoNerd> Also has pin sockets so you can put individual jumper wires in it
[10:19:15] <Haohmaru> and it was.. i mirrored the ISP connector, and the usbasp was semi-broken
[10:19:23] <LeoNerd> I imagine you can buy these things
[10:19:38] <Drzacek> I'm looking for them at ebay now
[10:20:01] <Drzacek> cause after 2 days and endless troubleshooting I have enough
[10:20:20] <LeoNerd> Drzacek: https://www.sparkfun.com/products/retired/8508 one of these, with one of these http://www.hobbytronics.co.uk/cables-connectors/pcb-headers-sockets/arduino-header-6pin soldered into it
[10:20:37] <LeoNerd> Then you can stick the pins in a breadboard, or use the socket for jumper wires, or any combination of the two
[10:20:44] <LeoNerd> I do that with basically eeeeverything thse days
[10:21:04] <Drzacek> LeoNerd, still not what I want
[10:21:19] <jben> Drzacek: you broken you usbasp my mirroring the plug? Surprising for me.
[10:21:48] <Drzacek> jben, don't know if it's broken. all I know that it still doesn't work
[10:23:23] <Haohmaru> what does avrdude say?
[10:23:38] <jben> I think you should do basic check to see if you have signal on SCK, things like that. Do you have a scope?
[10:23:50] <Drzacek> jben, nope
[10:23:50] <Haohmaru> the usbasp is not responding, or the chip is not recognized, or you flash it and it doesn't verify?
[10:23:54] <LeoNerd> Drzacek: Ah; then I'm not quite sure what it is that you want
[10:24:28] <Drzacek> LeoNerd, a board with sockets for different avr chips, so I can plug my programmer cable to it and program it
[10:24:39] <LeoNerd> Oooh.. a target board
[10:24:49] <Drzacek> is this how it's called?
[10:24:56] <LeoNerd> Sometimes
[10:24:59] <LeoNerd> That's whatI call them anyway
[10:25:21] <Haohmaru> one board with many atmega sockets?
[10:25:36] <jben> A target board is nice for testing SMD chip, but, I don't see the utility for standard one
[10:25:36] <Drzacek> Haohmaru, atmega, attiny, yeah
[10:25:50] <LeoNerd> Drzacek: https://twitter.com/cpan_pevans/status/486965792916135938 <== I made myself an ATtiny target board
[10:25:53] <Haohmaru> that would be tough
[10:26:11] <Haohmaru> use DIP chips and breadboard
[10:26:12] <LeoNerd> An ATmega target board would be interesting, ... there's many more pinout shapes
[10:26:18] <Drzacek> jben, I figured it would be easier for me to flash the chip, then use it on breadboard
[10:26:31] <LeoNerd> No, much easier to put it into the breadboard, then attach the ISP header to the breadboard
[10:26:33] <LeoNerd> That's what I do
[10:26:39] <Haohmaru> there are boards for a single atmega.. they are usually called "breakout" boards
[10:26:44] <LeoNerd> Then you only need one header, and you use jumper wires to connect up the 6 lines individually
[10:27:00] <LeoNerd> Otherwise, you need a target board for every kind of chip you want to work on... That could get messy if there's lots of variants
[10:27:02] <Haohmaru> one board for a specific atmega (or attiny or whatever)
[10:27:21] <Drzacek> LeoNerd, Currently I only wanted for attiny85 and atmega328p
[10:27:26] <Drzacek> so two socket board
[10:27:28] <LeoNerd> "currently" ;)
[10:27:41] <Drzacek> LeoNerd, for the sake of learning
[10:27:44] <LeoNerd> Anyway, you'll find that gets -really- inconvenient
[10:27:47] <Haohmaru> get yourself two breakout boards then
[10:27:54] <LeoNerd> The whole point of ISP is that you can do it *in* circuit
[10:28:07] <LeoNerd> If you're always taking the chip out, reflashing, putting it back in to test again, you'll wear something out really quickly
[10:28:27] <LeoNerd> Either a pin on the AVR chip will snap off, or you'll start to wear out and bend the sockets on the breadboard and they won't hold a good connection any more
[10:28:46] <Haohmaru> ah he wants a programmer with sockets for different chips?
[10:28:52] <Haohmaru> don't do it
[10:28:54] <Drzacek> LeoNerd, I thought, that when I will build some project, then in final version I would add programming header there, but until I learn the basics...
[10:29:47] <jben> Drzacek: a breadboard is more conveniant to learn basics, really
[10:30:03] <LeoNerd> Yah
[10:30:09] <LeoNerd> Also much more flexible, as I said.
[10:31:15] <Drzacek> I don't know, I guess I could give it a try
[10:31:52] <LeoNerd> Well, just keep in mind you came in here asking for advice from more experienced people. :)
[10:32:47] <Drzacek> don't get me wrong, I do appreciate all your help
[10:33:28] <LeoNerd> Also, if you're working on ATtiny85s, you really want to get yourself one of these: https://www.tindie.com/products/bot_thoughts/eezee-tiny-breakout-programming-board-kit/
[10:33:39] <LeoNerd> I have the full set of those, and they're lovely. I always do my dev work using those
[10:34:00] <LeoNerd> He (BotThoughts) doesn't do any ATmega versions, but you can find similar ideas around I'm sure
[10:43:53] <sebus> LeoNerd wow
[10:43:59] <sebus> neat thing
[10:44:10] <Drzacek> http://pastebin.com/GTYvjCfa
[10:44:14] <LeoNerd> Yah - BotThoughts makes some good stuff :)
[10:44:37] <cehteh> huh .. tiny fits nice into breadboard as is
[10:44:38] <Drzacek> I connected programmer with attiny on a breadboard
[10:44:41] <sebus> why I didn't knew about it back then...
[10:44:55] <LeoNerd> They all fit on a breadboard. That's the point
[10:45:03] * sebus made himself board for debugging MCUs on breadboard
[10:45:17] <LeoNerd> It preserves the pin mapping of the chip, it just adds convenient power decoupling, reset button, ISP. Optional timing crystals for larger chips but Idon't like thos efitted
[10:45:22] <LeoNerd> If I want a crystal I'll add one
[10:45:38] <LeoNerd> Mmmm debug. I should play with dW more oneday
[10:46:01] <sebus> just isp header, few caps, few switches, 2 / 3 pin crystal plug
[10:46:16] <sebus> and 4 pin generator clock <fits in dip8/dip14 socket :P>
[10:46:16] <cehteh> i am thinking about some debugging library using normal uart
[10:46:35] <LeoNerd> Drzacek: Yah; that's not useful. Could be any of about 100 things. Check and doublecheck pin connections to the chip. Watch IO lines on the actual chip with a logic probe or scope or whatever... Check that everything looks good
[10:46:53] <LeoNerd> cehteh: dW is muuuuch more capable, though.
[10:47:00] <cehteh> will add some weight and being intrusive you have to add debug(); calls at interesting places
[10:47:04] <cehteh> LeoNerd: i know
[10:47:06] <LeoNerd> dW can interrupt the CPU, singlestep it, inspect hardware registers, etc...
[10:47:19] <LeoNerd> dW is reeeeeally nice. But annoyingly undocumented in the wider world.
[10:47:22] * LeoNerd hopes to fix this :)
[10:47:36] <sebus> LeoNerd but u must have also programmer with that feature
[10:47:38] <sebus> :>
[10:47:43] <cehteh> not only undocumented its ™
[10:47:45] <LeoNerd> Yah; you need a bit of hardware
[10:47:53] <LeoNerd> But that's OK. It's just a single-pin sharedbus UART
[10:48:06] <LeoNerd> Any UART module can talk that with the addition of a diode and a pullup resistor
[10:48:25] <sebus> single wire uart?
[10:48:33] <LeoNerd> Yah
[10:48:37] <cehteh> i never felt the urge to do such low level debugging
[10:48:47] <sebus> LeoNerd++ :-)
[10:49:00] <LeoNerd> cehteh: it can be handy to know e.g. to be able to inspect what the instruction pointer register is. If you think your CPU has crashed, you can find out where
[10:49:08] <cehteh> yeah
[10:49:30] <LeoNerd> I have a program that crashes somewhere, but I'm not quite sure where. Sure I could add lots of extra debug calls and use some spare IO pins to clock out some debugging info, but dW can give me that for free
[10:49:33] <LeoNerd> without an extra IO pins
[10:49:51] <LeoNerd> ... which, if you'll notice, I often work in small ATtiny designs, so sometimes I don't *have* spare IO pins ;)
[10:49:58] <cehteh> yes
[10:50:17] <cehteh> but usually i find bugs on some higher level, dont need to dig that deep
[10:50:31] <cehteh> add some instrumentation code, flash it run it
[10:50:40] <LeoNerd> sebus: single wire UART == "do the I²C bus trick with a UART". I.e., use a pullup resistor, connect TX pins via a pulldown diode, have all RX lines watch the wire
[10:50:53] <sebus> LeoNerd i know this trick
[10:50:57] <LeoNerd> So it idles high, any transmitter can pull it down to START... all RXes including the active transmitter can see it
[10:50:57] <LeoNerd> ah OK
[10:51:22] <Drzacek> When I put jumper power setting (3.3 or 5V) my programmer powers off - broken usbasp or fried avr?
[10:51:40] <LeoNerd> That sounds like some upset hardware somewhere
[10:52:15] <sebus> I've implemented it in gas measuring sensor as small interface for re-calibration
[10:52:50] <sebus> works great even at high baud rates and simple 1n4148 diode
[10:53:03] <LeoNerd> Mhm :)
[10:53:41] <sebus> also, others won't mess with this stuff without proper software
[10:53:43] * sebus :D
[10:55:29] <sebus> Drzacek use meter and try if your VCC/GND is shorted or not
[10:56:09] <sebus> It;s really hard to kill AVR's :>
[10:56:14] <sebus> even with 8V supply :D
[10:57:33] <Drzacek> don't know what I did, but it's not powering off now
[10:57:42] <Drzacek> still doesn't work tough
[10:58:17] <sebus> it just looks like something is drawing too much current
[10:58:19] <Drzacek> oh yeah, I used other gnd
[10:58:24] <sebus> ie shorted VCC with GND
[11:00:36] <Drzacek> avrdude: auto set sck period (because given equals null)
[11:00:36] <Drzacek> avrdude: error: usbasp_transmit: usb_control_msg: sending control message failed -- I got new error message
[11:05:27] * sebus needs to buy new laptop
[11:05:29] <sebus> :<
[11:06:21] * Drzacek is out of options
[11:08:19] <Chillum> at least you will have a new laptop
[11:08:25] <cehteh> i've recently seen a nice laptop
[11:08:46] <cehteh> http://www.tuxedocomputers.com/Linux-Hardware/Linux-Notebooks/10-14-Zoll/TUXEDO-InfinityBook-13-3-matt-Full-HD-IPS-Aluminiumgehaeuse-Intel-Core-i7-Energiespar-CPU-zwei-HDD/SSD-bis-16GB-RAM-bis-15h-Akku-Slim-Book.geek
[11:09:32] <sebus> Chillum my programming envirnoment is based on dell C610
[11:09:51] <sebus> I keep it alive because of hardware serial port
[11:09:56] <cehteh> heh ok
[11:10:01] <sebus> :D
[11:10:03] <LeoNerd> Drzacek: do you have any confidence that this USB device is actualyl functional yet?
[11:10:06] <Chillum> I have a lot of trouble doing real work on a laptop
[11:10:18] <Chillum> hehe the raspberry pi has hardware serial
[11:10:21] <sebus> matt lcd? <3
[11:10:25] <Chillum> it is the small keyboard
[11:10:26] <cehteh> i almost always use my laptop
[11:10:30] <LeoNerd> I.e. plug that in, with NOTHING else attached to it (i.e. no target), run avrdude on it, watch its reset/sck/mosi lines on a logic probe/oscilloscope/whatever, and see that it does *something*
[11:10:33] <cehteh> currently with external display
[11:10:38] <Chillum> I can deal with the small screen, though it does slow me down
[11:10:40] <LeoNerd> If it doesn't even do that, then I'd say it's dead and get a new one
[11:10:45] <Drzacek> LeoNerd, well, can anyone be confident about any device?
[11:10:53] <LeoNerd> At the moment I can't se you doing much more than just stabbing in the dark right now
[11:10:55] <LeoNerd> *debug* ut
[11:10:56] <LeoNerd> it
[11:11:23] <Drzacek> LeoNerd, I do have two usbasp, they both seem to have problems
[11:11:50] <sebus> Chillum http://imgur.com/TWs319I
[11:11:52] * sebus smiles
[11:12:14] <sebus> be a real man, use cpu *without* any features
[11:12:26] <Chillum> that is some setup
[11:13:17] <sebus> z80 @ variable clock speed, attiny2313 for clock source, atmega8 for code injection into SRAM and I/O device
[11:13:23] <Drzacek> LeoNerd, !! It worked, looks like one programmer is dead
[11:13:26] <sebus> wierd stuff, but still fun
[11:13:40] <Haohmaru> well crap, i'm not getting anything other than 2047 from that adc channel on the xmega :~(
[11:14:09] <cehteh> Haohmaru: i'd guess you doing something wrong
[11:14:29] <cehteh> try the most simple C program to test it
[11:17:42] <LeoNerd> Drzacek: Well, there we go :)
[11:17:43] <Drzacek> LeoNerd, I guess the jumpers were guilty somehow
[11:17:47] <LeoNerd> Mm.. possibly
[11:17:53] <LeoNerd> Some of those usbasp boards are stupid-cheap
[11:18:03] <LeoNerd> It wouldn't be at all surprised if a decent fraction of them are faulty
[11:18:03] <cehteh> still work for me
[11:18:09] <Drzacek> LeoNerd, yeah I can see it now
[11:18:14] <LeoNerd> Sometimes you can get lucky. Mine works.. reasonably
[11:18:17] <LeoNerd> on a good day
[11:18:25] <cehteh> once i had to update the firmware on one
[11:18:27] <LeoNerd> If you want a proper one, I really would suggest the Pololu one
[11:18:35] <LeoNerd> The dual ISP+UART feature is -really- nice
[11:18:57] <LeoNerd> https://www.pololu.com/product/1300 this thing
[11:18:57] <Drzacek> can you recommend something good (that doesn't cost as much as used car?)
[11:19:06] <cehteh> but hey there isnt much on them what can go wrong, of course they have no QA, customer does that (you get what you paied for)
[11:30:59] <sebus> cheapest usbasp clones and so on don't have any buffers on signal lines... This should be banned.
[11:31:31] <sebus> even simple HC125 saved my usb/programmer from serious damage
[11:33:25] <LeoNerd> Yah
[11:33:36] <LeoNerd> Another thing that's useful is current-limited drivers
[11:33:46] <LeoNerd> So you can't accidentally blow anything up in either direction, on bus contention
[11:33:57] <LeoNerd> Which is quite likely with the way that AVR reuses the SPI bus for ISP
[11:39:27] <sebus> LeoNerd better to make serial bootloader in case you're using SPI signals from mcu
[11:39:36] <sebus> if you have any spare rx/tx lines
[11:40:42] <LeoNerd> Hrm?
[11:44:14] <sebus> LeoNerd Once when I had sd card in one of my projects on avr, I made serial bootloader for it - too lazy to remove/insert sd card everytime I wanted to try new modifications in my code
[11:45:39] <cehteh> if possible i'd use the usbasp only for flashing bootloaders
[11:57:26] <LeoNerd> I usually run without a bootloader.. at least for normal development work
[11:57:42] <LeoNerd> I just keep the ISP programmer permananetly attached. Useful to supply power too :)
[12:24:52] <cehteh> for development i have a arduino nano here, on a small breadboard, few leds and logic analyzer attached
[12:26:48] <LeoNerd> Yah. useful
[12:27:07] <LeoNerd> Whenever I solder up pins on a breakout, I push the little plastic thing a bit further down, so more of the pins sticks up out of the top of the breakout
[12:27:14] <LeoNerd> That way it's easier to attach logic probe clips to it
[14:17:14] <Caesium> hi folks. does anyone know if there's anything "special" about PB1 on an attiny85? I seem unable to get it to output a high properly. every other pin works, but PB1 is only giving me 1.8v when I drive it high (Vcc of 4.2v)
[14:17:52] <Caesium> I can't see any mention of this in the datasheet though
[14:20:01] <Deskwizard> Caesium never had an issue myself
[14:20:15] <Deskwizard> thats strange
[14:20:34] <Deskwizard> Caesium: you unplugged the programmer, right?
[14:20:47] <Caesium> yeah, I just have a dead simple program which sets everything as an output then flips them between low and high every second, so I can compare the ports
[14:20:50] <Caesium> yeah, I did
[14:20:59] <Deskwizard> uh.... :|
[14:21:08] <Deskwizard> have another one to test? :P
[14:21:14] <Caesium> I only have one attiny85 atm :( two more on order from china though
[14:21:34] <Caesium> but yes I'm wondering if its borked, or I borked it :)
[14:21:53] <Deskwizard> Caesium: I dont want to sound like an ass, but sounds like its borked yeah
[14:22:00] <Deskwizard> probably not your fault *wink*
[14:22:18] <Deskwizard> tends to be mine from my experience lol
[14:22:34] <Caesium> I hope not.. its spent its entire life plugged into an uno as an isp so far, I don't think I gave it anything more than 5v :/
[14:22:43] <Caesium> it still programs fine so the pin clearly works as an input :)
[14:23:35] <Deskwizard> Caesium: I used arduino as ISP as well for a time, be careful, unmodified, it doesnt have hi-z at start (before its initialized on the first try to program) and doesnt always release properly
[14:23:55] <Deskwizard> but the last one might be because my board is like 10 yrs old and have seen some serious abuse lol
[14:24:33] <Caesium> I should rig up a quicker way to detach all the programming leads from the uno I guess, I expected that they'd all just go high impedance when its not actually programming tho
[14:24:39] <Caesium> bit of an assumption I know :)
[14:25:08] <Deskwizard> yeah, beware of assumptions with arduino as ISP, it'll bite you in the ass.
[15:31:37] <nikomo> I was wondering why I had trouble with adc on pb5 on tiny85, that's the reset pin. I'm an idiot
[15:39:54] <Drzacek> If attiny85 (I think it applies to all avr?) can be powered from 1.8V to 5.5V, then logical signals are 1) equal to Vin 2) allways slightly smaller than Vin 3) smaller than Vin but max 3.3 / 5V?
[15:47:37] <nikomo> Drzacek: I just measured about 200mV drop between supply (5V) and digital high, so
[15:48:22] <Drzacek> nikomo, thanks
[17:20:53] <julius> hi
[17:25:14] <LeoNerd> Evenin'
[17:56:54] <Lambda_Aurigae> http://www.allaboutcircuits.com/textbook/digital/chpt-3/logic-signal-voltage-levels/
[17:57:09] <Lambda_Aurigae> for drzacek,,guess he left.
[19:41:25] <Caesium> Deskwizard: doh I'm a retard. found my PB1 problem; I was setting it to output then later in my code that I'd forgotten about, setting it back to input for a pin change interrupt. all solved :)
[20:26:08] <Casper> Caesium: you said it, not us! :D
[20:26:56] <lorenzo> is there a low power display (cr2450 battery powered)
[20:27:03] <lorenzo> that can be driven with few pins (e.g. attiny4313) ?
[20:34:31] <flyback> BMCC
[20:34:37] * flyback headbutts Casper
[20:34:44] <flyback> lorenzo, yes
[20:34:49] <flyback> nokia 3310
[20:34:52] <flyback> < $5
[20:34:56] <flyback> 84x48 pixels
[20:34:57] <flyback> b/w
[20:35:00] <flyback> spi interface
[20:35:04] <flyback> I think < 10ma
[20:35:30] <flyback> it's just a funky consumer lcd but it's so cheap and low power and easy to bit bang
[20:35:36] <flyback> even high end industral sites sell it
[20:35:40] <flyback> I was like "WHOA"
[20:35:54] <flyback> so china is continuing to produce clones of it
[20:36:09] <lorenzo> well if nokia used it it's reliable enough :D
[20:38:35] * Casper throws flyback outside, naked
[20:38:44] <Casper> it is -17°C right now
[20:38:53] <flyback> it's more than 10ma if you use the led backlights but you can do tricks with pwm, etc to try to keep it low
[20:39:10] <flyback> like I said it's not sexy or high ips etc but it's diry cheap
[20:39:13] <flyback> easy to bit bang
[20:39:16] <flyback> there's like
[20:39:51] <carlsagan-> BILLIONS AND BILLIONS OF LINES OF CODE
[20:39:58] <carlsagan-> multiple os's, drivers, apps
[20:40:49] <lorenzo> ah yeah, it doesn't have to be sexy :D it's going on a electric oven along with a thermocouple and a max6675
[20:41:22] <flyback> http://www.ladyada.net/products/nokia5110/
[20:41:32] <flyback> oh it's plenty for that
[20:41:43] <flyback> you will be able to have a nice menu cli/gui etc
[20:41:53] <lorenzo> yeah, need to have the user switch F/C
[20:41:56] <lorenzo> peak hold
[20:42:02] <lorenzo> usual stuff
[20:42:11] <lorenzo> maybe it can even graph temp/time
[20:42:14] <flyback> lorenzo, https://www.google.com/search?q=nokia+3310+lcd&biw=1280&bih=879&source=lnms&tbm=isch&sa=X&ved=0ahUKEwifg-Pwk_HKAhXKox4KHYDMANQQ_AUIBygC&dpr=1
[20:42:21] <flyback> go there now :)
[20:42:32] <lorenzo> getting one :D
[20:42:48] <flyback> $10 isn't bad but you can find it cheaper if you need bulk
[20:43:25] <flyback> just don't expect fps out of it
[20:43:29] <flyback> only real limitation
[20:45:36] <flyback> amazing how some shit is timeless
[20:45:44] <flyback> like hd44780 and nokia 3310 :P
[20:45:48] <flyback> and 8051
[20:46:42] <flyback> fps = frames per second
[20:49:03] <flyback> lorenzo, they have a few low color ones too that are spi
[20:49:08] <flyback> like up to 4096 colors
[20:49:25] <lorenzo> I think b/w will do for a thermometer
[20:49:42] <lorenzo> also that 3310 display seems very easy to source
[20:50:16] <lorenzo> like, 9667 hits on aliexpress
[20:52:35] <flyback> like I said it's still one of the best sellers
[20:52:42] <flyback> for stuff that just needs "a display"
[20:52:48] <flyback> don't really have much requirements
[20:52:58] <flyback> I guess there's 2 versions of controllers on it
[20:53:04] <flyback> just make sure you can code either
[23:29:23] <flyback> lorenzo, I know you don't need it for this project but
[23:29:24] <flyback> http://minhdanh2002.blogspot.com/2011/03/interfacing-nokia-3510i-and-5110-lcd.html
[23:29:36] <flyback> example of one of the small color ones being easy to drive
[23:29:54] <flyback> the high color high res shit needs nasty 100 pin interfaces ugh
[23:36:35] <Xark> I haven't seem many 3510i offered (but tons of 5110 B&W ones).
[23:36:42] <Xark> seen*
[23:37:22] <flyback> there's clones lemme find them
[23:37:26] <flyback> nice to see you again Xark
[23:38:08] <Xark> You too. :) Working with avr stuff?
[23:38:43] <flyback> na but it was a good question to ask about soldering irons
[23:38:47] <flyback> good channel
[23:39:32] <Xark> Cool. :)
[23:41:57] <flyback> http://www.ebay.com/itm/1-44-Red-Serial-128X128-SPI-Color-TFT-LCD-Module-Display-Replace-Nokia-5110-LCD-/310876068105?hash=item4861a85909:g:9LoAAOSwpzdWqdY~
[23:42:04] <flyback> I bought a aoyue 2930
[23:42:19] <flyback> and got a new heater core to upgrade the air gun from 968 to 968a
[23:42:31] <flyback> couldn't upgrade the iron from 968 to 968A :P
[23:42:38] <flyback> $13 upgrade for the air gun
[23:42:53] <flyback> old one is 7 yrs old due to burn out any day anyways
[23:45:34] <Xark> Hmm, okay I do have ST7735 based LCDs, but it didn't seem related to Nokia ones (18 bit color IIRC). :)