#avr | Logs for 2016-12-28

Back
[01:20:31] <Casper> rue_house rue_bed rue_shop rue_shop1 rue_shop3 !! are you familliar with vibration dampening?
[01:36:42] <rue_house> not specifically
[01:44:34] <Casper> I'ld like to add some to my heatpump... the vibration get transfered to the house (L support to the foundation...)
[02:28:28] <rue_shop3> maybe you just need a countervibrating mass
[02:31:15] <Casper> the installer discarted them I beleive
[02:32:19] <inflex> hi folks
[02:32:55] * inflex will be doing an AVR build for a change again tonight... nothing interesting though, boring ole V-USB stack on a Tiny2313 to control my HDD recovery system
[02:33:23] <Casper> so far I got lucky with recovery
[02:33:34] <Casper> didn't had to really power cycle it
[02:34:04] <Casper> funny thing is: trying to read the disk directly caused it to lockup. using ddrescue went fine
[02:34:27] <rue_shop3> ?
[02:34:31] <rue_shop3> recovery?
[02:34:35] <inflex> probably a dud sectr or soft/weak one in the fs?
[02:34:46] <Casper> tons of bad ones
[02:34:46] <inflex> This will be a USB3 inline switcher
[02:34:55] <inflex> Ah okay, right, so likely in the filesystem
[02:35:07] <Casper> but still... a simple cp on linux caused it to freeze
[02:35:12] <rue_shop3> Casper, if the smart data says there is even 1 reallocated sector, change the disk!
[02:35:18] <Casper> as in stop being even recognised
[02:35:38] <inflex> Casper, can happen on some I've found depending on the issue at the bad spot.
[02:35:43] <Casper> ddrescue read all but a few MB of unimportant data
[02:36:13] * inflex loves ddrescue, latest versions have a minimum-read-rate exit option which made them very useful for getting around some firmware issues with some
[02:36:14] <rue_shop3> you know how to get at the smart data right?
[02:36:28] <Casper> rue_shop3: 1 reallocated is not a direct disk replacement, specially on WD, it have a tendency to corrupt a sector on power cut while writting
[02:36:45] <rue_shop3> !
[02:37:09] <rue_shop3> well, if the smart says its reallocated a sector, I get my stuff off the disk
[02:37:16] <Casper> oh reallocarted
[02:37:24] <Casper> I tought pending
[02:37:38] <inflex> https://www.youtube.com/watch?v=DHykaRlfRwc <=- last rescue I did, been quiet lately, but perhaps in the new year I'll get more dropped machines
[02:37:48] <rue_shop3> smartctl -a
[02:38:09] <Casper> of course
[02:38:13] <rue_shop3> no, reallocated sector means the surface is dieing, and once it starts to go, its a landslide
[02:38:18] <Casper> I know
[02:38:21] <Casper> hey it's 3am
[02:38:28] <Casper> and I'm food sleepy AND sleepy
[02:38:39] <rue_shop3> supper machine!
[02:38:42] <inflex> well, yes/no, some reallocation is normal, the trouble is when there reallocation reserves have been depleted
[02:38:45] <rue_shop3> buy one from rue!
[02:38:49] <Casper> waiting for the tons of liquid made it's way down a bit before I hit the bed
[02:39:11] <rue_shop3> na, once the smart says there is a reallocated sector, its done
[02:39:25] <theBear> rue_shop3, i ain't suggesting changing that, tho i will say i seen MANY disks (i'm 2ndhand/save-from-landfill hw guy remember, personal hw that is) with 1 or 2, even "a few" (less than a dozen, more than a couple is my personal def. of "a few" <grin>) reallocated sectors that perform 100% fine for many years after, assumedly the odd couple reallocateds were from some tiny manuf. defect or i dunno, a 1 in a million drop-while-spinning that touched a microsco
[02:39:26] <theBear> portion of the disk and damaged nothing else, likely the 1st one tho
[02:39:28] <Casper> yeah real = dead
[02:39:35] <Casper> pending = maybe dead
[02:40:12] <Casper> but really, for 1 I'm not worried
[02:40:18] <Casper> 2 start to make me uneasy
[02:40:21] <Casper> 3 is replace
[02:40:23] <theBear> doesn't pending literally mean real that hasn't yet been written and therefore hasn't yet used one of the pre-set-aside spares at one end of the disk ?
[02:40:37] <rue_shop3> theBear, but, like what windows stores in ram, you can have data going bad all over the place and never notice, cause 60% of stuff on a computer isn't important
[02:40:43] <Casper> pending mean: read error, it do not mean faulty
[02:40:49] <theBear> this machine i use for normal desktopping is at the start of that horrible slippy slope
[02:41:10] <Casper> as I said, it can be a simple write corruption due to a power failure while writting
[02:41:27] <rue_shop3> _I_ suspect that windows actually realtime checks for and maps around bad memory
[02:41:38] <Casper> the disk will one day maybe rewrite to that sector, and succede, so it will do a pending-- on the counter
[02:42:18] <Casper> rue_shop3: I don't think so at all, that would require ECC memory
[02:42:24] <rue_shop3> my understanding of reallocated sectors is that its having read/write error limits and has written off that sector as bad space and used one of its spares
[02:42:32] <theBear> rue_shop3, indeed, but you know me, i don't say these kinda non-broad things without being 100% sure of my listed facts, and i got a lotta sparetime, and no hw budget, so more than a handful of times i've tortured such disks with full read/write/repeat cycles, various patterns like a proper ram test, and confirmed on next read of course etc etc
[02:42:52] <rue_shop3> I'v seen windows machines run fine with bad ram
[02:43:23] <rue_shop3> anyting important I mirror raid anyhow :)
[02:43:33] <Casper> same, but it ended up showing here and there
[02:43:38] <rue_shop3> I gave up seeking reliable
[02:43:39] <theBear> Casper, hmmmm...... so you saying a pending can (if the right thigns happen) later become EITHER a reallocated or just "fixed" in the bad-write case ?
[02:43:44] <Casper> I'm guessing windows is just kinda lucky with bad ram
[02:43:52] <Casper> theBear: yup
[02:44:06] <rue_shop3> 196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
[02:44:11] <rue_shop3> which one is pending?
[02:44:19] <rue_shop3> 197 Current_Pending_Sector 0x0012 200 200 000 Old_age Always - 0
[02:44:21] <rue_shop3> that one?
[02:44:25] <Casper> on write success, it go back to normal usage, on failure it get remapped
[02:44:50] <rue_shop3> 9 Power_On_Hours 0x0032 040 040 000 Old_age Always - 43821
[02:44:56] <rue_shop3> :) 44k hrs?
[02:45:05] <theBear> rue_shop3, heh, fine... i certainly seen them run better than yer average "fix me, i clicked too many yes's blindly again" malware/virus/idiot "service" machine with bad ram <grin> course if yer an idiot that has no idea how you break your machine all the time, that's "fine" normal operationing
[02:45:59] <Casper> on my main drive, no such info :D
[02:46:02] <rue_shop3> it woulnd't surprise me if $MS put in some realtime bad memory checks to map out bad memory to make the os more stable on bad hardware
[02:46:10] <theBear> Casper, hmmm, cool... so umm, what decides between "try writing this pending 'back to fixed' one more time" vs "that's pender is EFFED, assign a realloc/backup to it" ?
[02:46:19] <rue_shop3> Casper, smartctl -a /dev/sddrive
[02:46:21] <rue_shop3> ?
[02:47:06] <Casper> https://bpaste.net/show/4677753982f5
[02:47:13] <theBear> err, -ax is max info i think, tho i spose i not thinking you only need that little standard smart table
[02:47:17] <Casper> and yes, that's the -a
[02:47:18] <theBear> need/want
[02:47:53] <rue_shop3> why the hell dosn't an SSD have the pull pallette?
[02:47:58] <rue_shop3> full
[02:48:09] <Casper> who knows
[02:48:11] <theBear> oh, x is smart PLUS additional non-SMART(tm) infos
[02:48:54] <theBear> wowee ! is that power-states stuff a new smart revision, or something that comes with fancy later-gen sata/ata or what ?
[02:49:17] <rue_shop3> oh wait I think that is there
[02:49:26] <rue_shop3> Available Spare: 100%
[02:49:56] <theBear> hmm, your smartctl one click newer than mine (not that i think THAT is why i never seen the power stuff)
[02:50:15] <Casper> you never seen that device too
[02:50:17] <rue_shop3> 6.1k hrs
[02:50:24] <Casper> /dev/nvme0n1
[02:50:25] <rue_shop3> wonder if that drive will make it to 44k
[02:51:24] <Casper> should
[02:51:32] <theBear> Casper, is that paste edited by you, or that drive also doesn't have the offline/SCT(security option/features) etc info right after the "=== START OF SMART DATA SECTION ===" assuming your .1 higher version hasn't changed a bunch of layout related bits
[02:53:01] <Casper> https://bpaste.net/show/ba025bad590d <=== do you prefer that? -ax /dev/sda
[02:53:55] <Casper> interessing.... the -ax
[02:54:11] <theBear> Casper, hmmm, certainly closer to what i expected, what was the command you used for the previous past, just outta interest
[02:54:22] <theBear> yeah, for many drives the x adds some handy bitgs
[02:54:50] <Casper> previous paste was -ax too
[02:54:57] <Casper> it is NOT a sata drive
[02:55:14] <Casper> 0f:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a802 (rev 01) <=== lspci
[02:55:27] <theBear> just asking 'cos my one -a or -ax (actually a is probly redundant next to x) both list the "SMART support is: Available - device has SMART capability. " for example, in the first "bit" but your previous didn't
[02:55:35] <theBear> oooooh, pci, very nice
[02:55:37] <Casper> ever seen a ssd listed directly in lspci? :D
[02:55:45] <Casper> pcie actually
[02:55:55] <theBear> mmmmm, i'm pretty sure i have once, very sure i never owned one :)
[02:56:02] <Casper> 2500MB/s read speed, 1500MB/s write speed
[02:56:11] <rue_shop3> I have a project to hook up a 25D80 (8Mbit flash) to an mega8 :)
[02:56:14] <Casper> there is no extra digit there
[02:56:41] <rue_shop3> I wonder if I could use a sata/pata adapter to use an ide interface to the drive
[02:57:07] <rue_shop3> somehow I suspect even if I did it wouldn't support pio mode
[02:59:05] <Casper> hmmm
[02:59:09] <theBear> rue_shop3, the umm, what drive ?
[02:59:13] <Casper> maybe it can work
[03:00:33] * theBear wonders how "dumb" yer average sata/pata adapter chip is
[03:01:01] <theBear> i spose if yer just passing standard ata to a different physical, it makes sense to be pretty dumb, from a design/compat. pov
[03:02:29] <Casper> from what I know, pio mode is mandatory to support on those, as udma mode is just an extention, and some board actually do not handle udma, and also it can fall back to pio in case of a driver or communication issue
[03:04:21] <Casper> ... that moment where you see an orange enveloppe and a 3 beside it, open it and you have nfc what it is and have to think hard to remember the small comment you left...
[03:06:40] <theBear> the umm, it's not just me is it ? that sentence was a bit more that a little err, ambiguousey ?
[03:15:53] <Tigzee> Casper, I'm using assembly. the result is supposed to be 10 bits, this is why I am confused with my adc return is spreading across 16 bits
[03:16:43] <Casper> Tigzee: be sure to read it in the right byte order, reading the wrong one first can cause the avr to think that you are done and feed the new value
[03:17:02] <Casper> also, might have issue if you read it too late, it may be putting the new value in while you are reading
[03:19:06] <rue_shop3> theBear, ssd on an avr?
[03:19:13] <rue_shop3> via a pata adapter?
[03:19:19] <rue_shop3> in 8 bit pio mode?
[03:19:21] <rue_shop3> :)
[03:21:29] <theBear> rue_shop3, 8mbit flash is a ssd ?
[03:22:05] <Tigzee> Casper, I am reading adcl then adch (the correct order) and I did have t in free running mode, but during diagnoses switched to single conversions where i wait until the adif flag is set to grab te results
[03:22:15] <theBear> i think i got a not huge, but much more than 8mbit old laptop hd par. ata inteface little board outta some old tiny form hp machine if ya want it ?
[03:34:12] <rue_shop3> theBear, na, two different projects
[03:34:35] <rue_shop3> lots of the new motherbaoards keep the bios on a 8 pin serial flash chip
[03:39:08] <theBear> wowee ! newer than i looked at that end of, but they surecan get a lot into a 8pin flash thing these days
[03:39:11] <theBear> no denying it
[04:13:48] <Tigzee> I still can't get my adc to work. Is the adc out to lunch unreliable? like it saying the room is 146'C when it's supposed to be 23'C
[04:19:07] <theBear> erm, not unless you got some wacky temp sense/circuit going on
[04:45:57] <Tigzee> I am now getting 270&271 (roughly -4C) for 23C. This is still out of wack for this chip? (attiny)
[04:48:53] <Tigzee> it is at least consistant now (ADLAR 0 - right shifted) ADCH-ADCL 01-[0d:0f]
[04:50:59] <Tigzee> ADCL should really be 1x OR 2x, not 0x
[05:07:05] <Tigzee> Well, i'm giving up. Since it's precies, I will pretend it's correct (at least until it can be moved to a freezer)
[05:07:12] <Tigzee> *precise
[05:08:01] <theBear> the ummm, but, what you got connected to it ? the sensor/circuit ?
[05:08:31] <Tigzee> I'm reading the internal temperature (ADC8)
[05:09:52] <Tigzee> it actually is portable...its sending the information to me via wifi and running off a ups battery. I just have to unplug the programmer. -4C outside..that should eb good enough
[05:11:49] <theBear> wait what ? what attiny has an internet thermo ?
[05:13:47] <Tigzee> attiny44a
[05:14:06] <Tigzee> I kind of thought most of them did
[05:15:49] <Tigzee> I think I am seeing it slooooooowly decreasing...which makes sense since it's a small ic under an adapter board on a bread board in only -4C for a minute
[05:17:26] <Tigzee> If things are linear, I have dropped 7C so far (23-7=16C)
[05:18:06] <Tigzee> Thats 40ft away from me now at the front door (this is also my first wifi distance test)
[05:20:56] <Tigzee> It's now reading 10C. I'm not sure why my values are off from the datasheet, but it is working
[05:26:42] <theBear> well i'll be dipped, lots of em got it in there
[05:27:17] <theBear> ok, now i know what's what, general possible reasons for "bad" readings... you using the a-d for other stuff, aka switching the a-d input mux in your program ?
[05:28:03] <Tigzee> nope. it's only reading the adc and sending it to me with a software serial I built
[05:28:24] <Tigzee> its very precise, just not expected with datasheet
[05:34:12] <Tigzee> This is my output using netcat and my formatted hexdump http://pastebin.com/LDAVFr0i
[05:43:22] <theBear> you got something sane on the adc-Vin (AVCC from memory, you should know the one, then again, maybe you don't if that's the hiccup)
[05:44:47] <Tigzee> I don't think there is a adc vcc
[05:45:22] <Tigzee> there is an aref, but when you read the temperature, you HAVE to read from the internal 1.1v regulator
[05:45:33] <Tigzee> ^thats what the datasheet says
[05:45:56] <Tigzee> I'm okay with a 4C swing
[05:46:05] <theBear> the err, hmmm, maybe not on such a not-many-pin one, give poor dusty brain another minute, see if it spits out any more common a-d gotchas
[05:46:34] <Tigzee> starting a diesel engine at -20C is a huge difference from 0C to 20C. 4C swing is okay
[05:47:03] <theBear> mmm, 4c is ok i spooooose... what made it go from super-wrong and jumpy to what you got now, outta interest ?
[05:47:23] <Tigzee> one of my timer routines...lol
[05:47:46] <Tigzee> I wasn't pushing/popping the variable, so I was sending out that result
[05:48:53] <theBear> mmm, that's ok then i spose... the err, so we talkin 4 least-sig bits of "noise" currently (re: 4C swing) ?
[05:57:33] <Tigzee> yep
[05:57:46] <Tigzee> I could always average it
[05:58:43] <theBear> mmmm.... for anything that don't need super fast/tiny-res a-d that's my standard approach
[05:58:49] <Tigzee> theres no multiply/divide, so I would probably just go if current_temp>avg_temp ++, if current_temp<avg_temp --
[05:59:22] <Tigzee> it's not really an average, but is self-centering
[06:00:29] <theBear> re: calibrating/double-checking and "linear-ish", you know that linear doesn't necesarily imply 1:1 relationship, just that a simple div/multiply formula can convert, vs an exponential or completely unpredictable input->output relationship yeah ?
[06:02:27] <theBear> you know a bitshift is a mult/div by base-2 in binary land right ? so something like (last-temp + new-temp) bitshift 1 sideways is a quick 2 sample avg, etc
[06:02:37] <Tigzee> I know, but with the lack of multiply and divide it starts to get complex (this is my first avr project in 15 years)
[06:02:58] <Tigzee> That is probably the better way to go
[06:03:52] <theBear> fairy nuff, don't worry, i forgot more about avr-C and proper vs psuedoey-code-or-plain-wrong-syntax/spelling than i still remember right at the moment
[06:04:16] <Tigzee> I'm doing assembly
[06:04:52] <rue_house> assembly is no different
[06:05:00] <rue_house> you just use less space for the code
[06:05:11] <rue_house> and avoid math like the plauge
[06:05:38] <theBear> mmm, well, i probly remember a little more of that, just cos i don't know a bunch of different asm's all with the same words (like while, if/then/else(/fi), for... etc) to be able to mix-up as i slowly fall outta practice <grin> noted re: tips tho
[06:06:47] <theBear> rue_house, nah, asm you can forget more obscure op's, but there's none of that slightly-different approach to finishing lines or typing a variable or notating a comparison like "languages" have
[06:07:55] <Tigzee> I can say this, I really am impressed with the esp8266 es01 wifi module. for a couple bucks, it brings much flexibility
[06:08:06] <theBear> must be a nightmare for anyone that knows the 20+ new langauges i never even heard of that seem to exist these days, my god !
[06:08:24] <theBear> Tigzee, indeed ! i looking forward muchly to having a better fiddle with my new/first one
[06:08:48] <Tigzee> I avoid all those new languages...they seems to want to fix a problem that usually doesn't exist
[06:09:59] <Tigzee> theBear, thats what I am using to grab the output. I have it running 19200 with my own built software serial intrerrupt controlled to send with 16byte software fifo
[06:10:08] <Tigzee> ^I'm very happy with that
[06:10:51] <Tigzee> these attiny's don't have a real hardware uart :(
[06:12:03] <Tigzee> when I ordered them (4 years ago), it was a choice ADC OR HW UART. I decided I could always "make" a uart, but could never make an ADC easily
[06:13:57] <Tigzee> They have a USI. which can be mangled into a mostly hardware 1-way uart. This is what I will be using for my uart recieve (still to be done)
[06:16:06] <theBear> mmmm indeed... they're kinda an odd mix that series (24 oh, err, 24a/44a/84a, which hopefulyl is close enough to yours, cos i didn't notice the extra a till just now) far as inbuilt peripherals and pincounts etc go
[06:16:59] <Tigzee> the a just means it's pico-power (uses less power). quite sure its the same
[06:18:07] <Tigzee> you can get atmega 128's for very cheap on ebay. I just ordered some. I don't think the attiny's are worth it now (I just have a stash of about 40 to go through)
[06:20:06] <Tigzee> I bought the attinys when I could have a handful vs 1 atmega pricewise. those ebay atmega128 kills that idiology (they are cheaper)
[06:21:32] <Lambda_Aurigae> I like the atmega1284p myself but they tend to be a bit pricier.
[06:22:04] <theBear> mmm, i just missed it completely when i grabbed the sheet to see what's up with this int.thermo-thanger you made me aware of
[06:23:05] <theBear> i'm still getting thru my 90s stocks, got a couple new avr's here and there, ya know, cos i needed proper usb or something less than 20 pins for a specific something, but i'm no doubt behind in a bunch of areas
[06:23:44] <Tigzee> Lambda_Aurigae, Thats a nice chip....4 timers, 2 uarts, 1 spi, lots of RAM :)
[06:24:24] <Tigzee> theBear, I know what you mean, if it wasn't for the attiny's I would be using the original 2313's that I have (that don't have an internal oscillator)
[06:24:43] <theBear> mmmm, i remember the years that mega's were far from "cheap", i appreciate you pain
[06:25:33] <inflex> mmm.. long gone now at least
[06:25:39] * inflex needs to get his T2313 job done tonight
[06:25:43] <theBear> Tigzee, oh i know, they were not only the chip on the first avr-based board i ever owned, but my weapon-of-choice back when i really was active with this stuff <grin> a fine chip
[06:26:07] <Lambda_Aurigae> Tigzee, and it comes in dip package for those of us who are too lazy to deal with smt.
[06:27:28] <Tigzee> My only real gripe with the 2313 was the lack of oscillator. always had to steal them from broken things, running at funny frequencies and losing 2 pins and the 2 extra capacitors required
[06:30:23] <inflex> Tigzee, ? has internal and xtal - or did you mean lack of ADC?
[06:31:08] <theBear> old 2313
[06:31:28] <Tigzee> the original 2313 did not have a built in oscillator. You HAD to use an external crystal/oscillator
[06:31:42] <theBear> not sure any of the 90s series had int. oscs... certainly none that i could afford at the time
[06:32:15] <Tigzee> lol, I thought you were talking about years..like mid 90's
[06:38:24] <theBear> heh nah, i'd be sad for lost years if there were avrs back then, when i was cursing whoever prices basic stamps or just the realities of minimum-chipcount + related bussing + eprom (ONE e) programming/wiping involved with non-micro/allINone setups
[06:39:58] <inflex> Tigzee / theBear - oh right, thought you were referring to the ATTiny2313
[06:41:09] <theBear> hmm.. funny how quickly you can flip from "avoiding keeping any tools in house-call sized tool-bags/boxes so you can always find things and quickly pack a kit if you got a callout" to "not being able to find any of your tools 'cos they all spread around the house in various tool-bags/boxes" again
[06:41:32] <Tigzee> I live that nightmare
[06:41:45] <theBear> inflex, yeah, we know <grin> but now i think we all up to speed again
[06:41:50] <Tigzee> I own 10 multimeters because I got tired of looking for them...
[06:42:14] <Tigzee> now they are always within hands reach no matter where I am
[06:43:13] <Tigzee> theBear, you were talking about USB earlier. just as an fyi, I was able to get 1megabyte throughput with a ping flood to the esp01
[06:43:21] <theBear> Tigzee, mmmm, i had a long too-young-to-be-that-smart period of the 2nd one, then a short period of sensibly planned/named mini-toolkits seperate to the main and everyday bench tool collection, maybe another decade, little less probly of the first one, and now after i suspect just 3-6 months of laziness, back to the 2nd one :(
[06:44:58] <Tigzee> keeping that speed in mind, your atmel will be the limiting factor
[06:45:04] <theBear> Tigzee, hmmmm, not sure (or the opposite) that pingflooding is a reasonable indicator of anything that isn't ping flooding with an esp thing, but that sure ain't a trivial amount of data to move when yer dealing with single or double-digit mhz clockrate micros, no sir
[06:45:22] <theBear> heh, great minds think alike eh
[06:55:50] <Tigzee> theBear, using that avg method you told me, the swing is now 1'C
[06:58:47] <theBear> Tigzee, sounds pretty acceptable to me ! and hooray for binary tricks and asm successes ! :-)
[09:34:59] <_ami_> Casper: were you making something based on vusb? :)
[10:33:39] <Tigzee> does anyone have any experience with using a USI? I only want the shift register and 1 line out. Can it be done without consuming a clock line as well?
[10:34:24] <Tigzee> *clock io line
[10:51:50] <Lambda_Aurigae> Tigzee, check with Jartza
[10:52:01] <Lambda_Aurigae> I believe he has done so with the usi to generate vga output.
[10:53:25] <Tigzee> interesting
[14:41:50] <eephyne> hello
[14:42:12] <eephyne> I have a issue with a atmega328p (smd)
[14:42:45] <eephyne> its part of a hardware and I needed to update the software on it
[14:43:39] <eephyne> the first part was to change the fuse and it work without issue but now I can't talk to it throught the usbasp
[14:43:54] <eephyne> I did check and recheck all the cable
[14:45:39] <jacekowski> you have probably disabled fuse that allows programming or something like that
[14:45:41] <eephyne> It seem after some research that may be the clk that is not wel set, So I wanted to use an external clock (an arduino) plug to XTAL1 but its don't work I still get the initialization failed rc=-1
[14:45:56] <jacekowski> as in, the reset enable fuse
[14:46:10] <eephyne> I did thought of that too
[14:46:17] <jacekowski> hard to say now
[14:46:26] <eephyne> I read the fuse I set the first time and they don't disable it
[14:46:34] <eephyne> don't seem to me at least
[14:46:50] <jacekowski> what did you set the fuses to?
[14:47:01] <eephyne> lf 0xFF hf 0xD3 ef 0xFD
[14:47:37] <eephyne> (and lock to 0x3F)
[14:49:53] <eephyne> the weird thing now is when I go in interactive mode with -tuF, and do a "read l/f/efuse"
[14:49:58] <eephyne> sometime i got 00
[14:50:05] <eephyne> and sometime I got FF
[14:50:10] <jacekowski> probably detection is failing
[14:50:16] <eephyne> and for lock sometime 00 and sometime 3F
[14:50:20] <jacekowski> it looks like you did disable internal RC oscillator
[14:50:59] <jacekowski> so you will have to provide it with external clock and it should work
[14:51:06] <eephyne> So a external clock plugged to xtal1 should do it ?
[14:51:12] <jacekowski> yes
[14:51:16] <jacekowski> but it has to be actual clock signal
[14:51:18] <eephyne> because thats what I did
[14:51:19] <jacekowski> not a crystal
[14:51:25] <jacekowski> and it has to be stable
[14:51:30] <eephyne> I put a program in another arduino
[14:51:44] <eephyne> and plug PB0 to XTAL1
[14:51:57] <eephyne> maybe I doing it completely wrong
[14:51:58] <jacekowski> what sort of program?
[14:52:26] <eephyne> I research it
[14:53:04] <eephyne> http://www.avrfreaks.net/forum/tutsoft-recovering-locked-out-avr
[14:53:15] <eephyne> the first quoted text
[14:53:32] <jacekowski> allegedly arduino is set to CKOUT by default
[14:53:37] <jacekowski> so you should have clock on PB0
[14:54:45] <jacekowski> do you have a scope and/or a meter?
[14:54:57] <eephyne> not a scope
[14:55:00] <eephyne> a meter yes
[14:55:15] <jacekowski> i would start by making sure you are actually getting clock into the AVR
[14:55:24] <eephyne> how to do that with a meter
[14:55:35] <jacekowski> does it have frequency mode?
[14:55:42] <eephyne> I don't think so
[14:55:52] <jacekowski> oh
[14:56:17] <jacekowski> not ideal
[14:56:51] <eephyne> Its a low cost meter :/
[15:02:39] <eephyne> when i load the program to the arduino, plug it and link pb0 to xtal1 then power the usbasp/atmega it don't work
[15:20:45] <eephyne> I feel like I'm digging a in a direction but the way out is clearly not there
[15:31:40] <Lambda_Aurigae> first thing...usbasp
[15:31:47] <Lambda_Aurigae> is it the latest firmware?
[15:31:54] <Lambda_Aurigae> can you slow down the communications speed?
[15:35:32] <eephyne> yes
[15:35:37] <eephyne> I can i updated it
[15:35:53] <eephyne> I did try -B option with 1..10
[15:35:58] <eephyne> change nothing
[15:39:19] <Lambda_Aurigae> hmmm..guessing english is not your first language.
[15:39:27] <Lambda_Aurigae> you did update it or you can update it?
[15:39:37] <eephyne> you guess well, sorry for that
[15:39:45] <eephyne> I did update it
[15:39:50] <Lambda_Aurigae> from what I see, most programming issues with usbasp result from old firmware on the usbasp.
[15:39:58] <Lambda_Aurigae> most others result from it being a usbasp.
[15:40:10] <eephyne> but I did update it after messing with the chip
[15:40:30] <eephyne> because I thought that would be helpful
[15:40:57] <Lambda_Aurigae> so, feed the avr in question a clock stream from something and try that way. I'm guessing that's what you did with the arduino.
[15:41:05] <eephyne> yes
[15:41:07] <Lambda_Aurigae> what else is connected to the clock lines though?
[15:41:28] <Lambda_Aurigae> if there is a crystal attached there, the external clock likely won't work.
[15:41:46] <eephyne> hum its a thought one, since its a pcb already mounted I'm not sur I'll be able to see that
[15:42:24] <eephyne> https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/blob/master/PCB%20v2.3d/PCB_v2.3d.jpg
[15:42:38] <eephyne> it seem to be connected to something (I do not have the same pcb)
[15:44:17] <eephyne> https://raw.githubusercontent.com/pascallanger/DIY-Multiprotocol-TX-Module/master/PCB%20v2.3d/Schematic_v2.3d.jpg
[15:44:29] <eephyne> doesn't seem to be connected here
[15:44:58] <Lambda_Aurigae> X1 is the crystal.
[15:45:05] <Lambda_Aurigae> connected both in the schematic and on the board.
[15:45:28] <eephyne> ho yes at tho bottom
[15:45:32] <Lambda_Aurigae> xtl1 and xtl2
[15:45:40] <eephyne> on a 16mhz
[15:45:46] <Lambda_Aurigae> pins 7 and 8 on the chip.
[15:45:49] <eephyne> yes
[15:46:07] <eephyne> what can i do then ?
[15:46:09] <Lambda_Aurigae> with that connected, the external clock probably won't work well.
[15:46:27] <eephyne> yes I can guess
[15:47:14] <eephyne> I probably could cut the connection between the crystal and the pins but I don't really feel confortable with smd soldering
[15:47:14] <Lambda_Aurigae> remove the crystal or replace the chip or cut the trace to the xtal1 line then bridge it with solder afterwards.
[15:48:20] <eephyne> I need to cut both xtal1 and xtal2 ?
[15:49:35] <Lambda_Aurigae> ummmm.
[15:49:36] <Lambda_Aurigae> dunno.
[15:49:48] <Lambda_Aurigae> it's a whole feedback loop there...I would say probably not.
[15:49:56] <Lambda_Aurigae> but,,,never actually tried it.
[15:50:23] <Lambda_Aurigae> from the looks of your fuses, all is good.
[15:50:31] <Lambda_Aurigae> unless you reversed two of them or something.
[15:51:08] <eephyne> I did it through arduino ide so I suppose its good
[15:51:16] <eephyne> I realy don't know what I did wrong
[15:51:36] <Lambda_Aurigae> no clue.
[15:51:43] <eephyne> the only thing I did that may be messing things up is pause between change fuse and upload program
[15:51:45] <Lambda_Aurigae> when it comes to arduino, my brain shuts down.
[15:51:56] <eephyne> and apparently it not problematic
[15:52:11] <Lambda_Aurigae> I know nothing about the ardweeny ide...loaded it once and nearly gagged on it.
[15:52:46] <eephyne> well the boards section I add simply launch a avrdude commande to set the fuse
[15:53:16] <eephyne> with that -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD3:m -Ulfuse:w:0xFF:m
[15:53:19] <Lambda_Aurigae> it seems something didn't go write.
[15:53:36] <eephyne> (among others flags of course)
[15:56:11] <Lambda_Aurigae> what is the voltage feeding the avr?
[15:56:27] <eephyne> 3.3
[15:57:06] <Lambda_Aurigae> assumed or measured?
[15:57:58] <eephyne> assumed, mesured its 3.23 if I remember well
[15:58:06] <Lambda_Aurigae> what other devices are connected to the SPI pins?
[15:59:16] <eephyne> four rf chip
[15:59:17] <Lambda_Aurigae> is that NRF module on the board? as I recall that is an SPI interfaced device.
[15:59:21] <eephyne> https://raw.githubusercontent.com/pascallanger/DIY-Multiprotocol-TX-Module/master/PCB%20v2.3d/Schematic_v2.3d.jpg
[15:59:46] <Lambda_Aurigae> devices connected to the spi can interfere with ISP communications.
[16:00:10] <eephyne> I don't ithnk I can disconnectd them
[16:00:57] <Lambda_Aurigae> well, that's all the help I can provide.
[16:01:12] <Lambda_Aurigae> I'm off to go hang some more sheet steel on my shed doors.
[16:12:23] <eephyne> thanks for your help
[18:55:35] <Jartza> hmmh
[19:21:40] <toddpratt> is there an emulator I can use to run a .hex file?
[19:21:55] <toddpratt> linux
[19:22:21] <toddpratt> guess I should search the repos
[19:29:55] <Lambda_Aurigae> simulavr, simavr
[19:37:56] <Tigzee> Does anyone have a first hand review on simular/simvar?
[20:40:59] <Casper> toddpratt: spoiler alert: all simulator sucks
[22:10:18] <Tigzee> Casper, could you elaborate? I have a friend that says to use a simulator as a goto answer for any problems I walk into. Which I'm hesitant due to the fact I am programming under linux
[22:13:22] <Casper> you can't connect stuff to your simulator, and the simulator is only as good as the simulation itself
[22:13:29] <Casper> it usually fail in the real life
[23:04:45] <rue_house> toddpratt, realize this
[23:05:09] <rue_house> if you run it in an emulator, all you know, is how it behaves IN that emulator, it wont tell you anything about eh real world
[23:05:28] <rue_house> Tigzee, same
[23:09:11] <Tigzee> How portable is code for jumping different chips. IE how much work does it typically take to convert an attiny program to run on an atmega?
[23:09:22] <rue_house> most of it,
[23:09:49] <rue_house> switching low level stuff beween avr species gets a bit fun
[23:10:28] <rue_house> for example, moving code from a mega328 to a tiny85 would mean finding the bits of any special subsystems you used and rewriting the register and bit names
[23:10:38] <Tigzee> do io register names for hte most part stay the same?
[23:10:47] <rue_house> only within a species
[23:11:34] <rue_house> so, likley the same name between mega8, 88, and 188, but different for a tiny13
[23:11:45] <Tigzee> I have been programming like: sbi porta, pa5 I feel this should be safe. but I guess timer control registers may be different
[23:11:49] <rue_house> might be different on the mega32
[23:11:56] <rue_house> yea
[23:12:02] <rue_house> if the chip your using has port A
[23:12:53] <theBear> just moving from an old mega to a 328 or back again is super-hassley, stupid down-to-bit-compatible registers and special/standard-header-listed names for stuff that some jackass decided to change the names of for no apparent reason at all
[23:13:37] <Tigzee> I guess I will be having some compiler conditions
[23:15:25] <rue_house> http://paste.debian.net/905331/
[23:15:35] <rue_house> there is kinda what the dir tree looks like on my system
[23:16:14] <rue_house> I have libraries that are all common in the root, the specific stuff ends up under the dir for that chip, and I just link it back from the projects
[23:16:24] <rue_house> I copy stuff to other chips and port it occasionally
[23:17:56] <rue_house> Tigzee, dont try to write universal libraries, the code will be unreadable
[23:18:12] <Tigzee> rue_house, I was thinking that
[23:18:23] <rue_house> theBear, you borred?
[23:18:27] <rue_house> per chance
[23:19:01] <Tigzee> have you guys played with self-programming? ie. I have been using the esp8266, and wondering how feasible it would be to update them over the air
[23:19:10] <theBear> bored is a very loose term
[23:19:23] <theBear> never heard it called "self programming" before <wink>
[23:19:28] <rue_house> I'm working on an 8 bit dac pcb
[23:22:18] <Tigzee> are you using pwm, resistor network, or something else?
[23:22:57] <rue_house> just 8 resistors, not even R-2R