#avr | Logs for 2016-08-14

Back
[02:37:53] <abcminiuser> Yay I'm back in the land of non-8KB/s internet
[02:38:28] <abcminiuser> @theBear, I'm still FURIOUS about the NBN screwup
[02:38:59] <abcminiuser> Damn idiots ruined a very sorely needed national project, just to avoid having a success under the other guy's tally
[02:44:56] <theBear> heh, i can't bring myself even close to furious over something so stretched out and not-movey, sure, there been a few minutes here and there i thought how nice it'd be if we had half what they said we would have well before right now, but pfft, i'm old, even i ain't got that much maintain the rage in me
[02:45:21] <theBear> i'll be extra grumpy in my first few rants about how they effed it up for all of us when it actually finished, that'll make up for it
[02:45:49] <abcminiuser> I can happily deliver a 40+ minute speech about why it's the worst thing to happen to Australia
[02:45:56] <abcminiuser> I'm available for bookings, I work for food.
[02:53:26] <abcminiuser> Tonight's Sunday night sponsored by http://www.schoefferhofer.de
[02:53:36] <abcminiuser> Damned good stuff
[02:54:20] <Casper> hey abcminiuser ! 8kB/s is fast in 1998! what are you complaining about!
[02:55:01] <abcminiuser> Yeah, using Ares in the early 2000s, and seeing my dialup scream at 6kb/s downloads
[02:55:04] <abcminiuser> Wait are you my NAS?
[02:55:16] <abcminiuser> (My NAS is called Casper, from the computer in Evangelion)
[02:57:15] <Casper> I am not your nas
[02:57:32] <abcminiuser> Damn, I was going to tell you to get back to work transcoding for me.
[02:57:33] <Casper> but you could help me with it! if you know about nic bonding under linux :(
[02:57:57] <abcminiuser> I'm afraid I've got a Synology, I just selected "Bond" in the pretty gui :P
[02:58:17] <abcminiuser> I don't have a proper managed switch that has link aggregation tho, so it's bonded TX only
[02:59:54] <Casper> my issue is that eth0 work, eth1 do not... grrr
[03:00:07] <Casper> will have to reread about it... maybe it is tx only...
[03:00:36] <abcminiuser> Does your switch support link aggregation? I forget the 802.11.x spec it lives under, but the switch has to support it
[03:00:56] <abcminiuser> If not, you can only use SW bonding, which doubles TX throughput but not RX
[03:01:29] <Casper> I use only 1 link for now
[03:01:43] <theBear> aggregation eh ? that like putting sawdust in the oil in a bodgy engine-part to make it sound healthy fer a short while ?
[03:01:50] <Casper> and it was supposed to be redundant and add the bw both tx and rx
[03:02:40] <theBear> you're err, ears are redundant ! ish !
[03:07:51] <MarkX> haha wb abcminiuser
[03:09:43] <MarkX> this 13 hour shift just won't end
[03:09:45] <MarkX> :'(
[03:10:18] <abcminiuser> Goddam what do you do all day, sew shirts?
[03:10:22] <MarkX> hahaha
[03:10:32] <MarkX> i support manufacturing lines for major automotive plants
[03:10:50] <MarkX> ford/chrysler/gm/tesla/toyota/etc
[03:11:16] <Casper> oh so you support the automated "sewing" machines that "sew" the "skirt" of the cars...
[03:11:23] <MarkX> hahahah
[03:11:25] <Casper> so close enought
[03:11:27] <MarkX> i guess it's a form of sewing yes
[03:11:29] <abcminiuser> I know manufacturing has long shifts, but I always figured that was a bad idea - better to have three regular 8 hour shifts so people remain alert
[03:11:47] <MarkX> abcminiuser, shhhh don't tell them that. these shifts are paying for my house hahahha
[03:12:01] <abcminiuser> Same with medicine, I'd rather not have my junk sewn back on by the guy at the tail end of a 16 hour shift...
[03:12:01] <Casper> they won't listen anyway
[03:12:12] <theBear> MarkX, that's what mark lowndes said
[03:12:17] <Casper> there is a reason why gouvernement motor is there...
[03:12:19] <abcminiuser> (Full disclosure, have not had my junk reattached)
[03:12:25] <Casper> and fix or repair daily...
[03:12:28] <MarkX> do you have a minute? i gotta bug you about some USB stuff like the good ol' days
[03:12:30] <MarkX> theBear, i don't know who that is
[03:12:33] * theBear thinks he is hilarious, IF he remembered a popular "sports"persons name right
[03:12:37] <abcminiuser> Sure, go nuts
[03:12:51] <theBear> MarkX, i think it's the racing car driver with the ugly wrong looking head on 'im, and real bushy eyebrows
[03:13:01] <theBear> i prefer cold turkey, but i could go nuts i spose
[03:13:12] <abcminiuser> Turkey's too dry.
[03:13:14] <MarkX> haha
[03:13:51] <MarkX> so basically i am making a usb device. it will eventually be a little toy robot. so far i have a sound interface and a serial interface working
[03:14:26] <MarkX> i want to make the host app in chrome. the problem is chrome only works with winusb (on windows)
[03:15:01] <MarkX> Currently, with the usbccgp.sys driver, I cannot even
[03:15:01] <MarkX> see my device listed when i have chrome search for available/usable devices.I
[03:15:01] <MarkX> would like to use the WinUSB driver for the main device (control endpoint i
[03:15:01] <MarkX> think would be the right term) but when i assign that driver (using zadig) i
[03:15:01] <MarkX> lose my interfaces in device manager.
[03:15:08] <MarkX> omg wtf is with that paste
[03:15:59] <MarkX> anyways
[03:17:14] <MarkX> Do i have to make a custom INF file that states WinUSB for the main device, then generic audio for the audio interface and usbser for the serial interface?
[03:17:32] <MarkX> Can a device even have WinUSB as the parent driver with 2 other drivers for its interfaces?
[03:19:43] <abcminiuser> Device gets one main driver - if your device descriptor specifies either zeros or the Interface Association Descriptor values for class/subclass/descriptor, it'll bind to the Windows composite driver
[03:19:57] <MarkX> right that's what it does right now
[03:20:08] <abcminiuser> That driver then looks at each configuration descriptor and hands it off to the appropriate driver
[03:20:21] <MarkX> but it binds to USBCCGP, the generic parent driver for composite devices
[03:20:27] <abcminiuser> If you use WinUSB as your primary driver, it won't know how to deal with the composites
[03:20:41] <MarkX> go on
[03:22:48] <abcminiuser> Unfortunately that puts you into a bind, your choices are exclusive WinUSB, or let the win composite driver do its work
[03:23:07] <abcminiuser> Can chrome work with a WinUSB interface that's part of a composite device?
[03:23:48] <MarkX> yes
[03:24:30] <MarkX> someone suggested making a new control interface and have it be a proxy for ep0 but that feels hacky to me
[03:25:17] <abcminiuser> If chrome is expecting WinUSB as the root driver, you're out of luck
[03:25:33] <MarkX> hmm
[03:26:01] <MarkX> okay tonight i can try writing up a quick device with an added interface
[03:26:06] <MarkX> i can assign winusb to that interface
[03:26:18] <MarkX> and see if chrome detects it
[03:27:14] <MarkX> if it does work, will i basically be copying data from a new ep to ep0? or can i assign ep0 to that interface?
[03:27:41] <abcminiuser> EP0 is owned by the root driver, the Windows composite driver
[03:28:05] <abcminiuser> That said, I'm trying to remember if sub-interfaces have permission to issue control requests
[03:28:24] <abcminiuser> I guess they must, since many classes use them
[03:28:54] <abcminiuser> So the device will use the composite driver as the root driver, and hand off the various interfaces to the appropriate drivers
[03:29:14] <abcminiuser> Then those drivers should be able to issue control requests, proxied by the OS to EP0
[03:29:15] <MarkX> right so then i will have 3 drivers at play, generic sound, generic serial and winusb
[03:29:23] <abcminiuser> Yeah, should work
[03:29:39] <MarkX> beauty, one more quick question
[03:29:41] <abcminiuser> The only wrench is that if you run newer Windows versions your INF has to be signed
[03:29:47] <abcminiuser> Which requires a code signing cert
[03:29:51] <MarkX> yea that's going to be a bitch
[03:30:09] <MarkX> actually wait, if i just use usbccgp i don't need my own INF
[03:30:19] <MarkX> because it should auto get sound and serial at least
[03:30:41] <MarkX> as for WinUSB ... i'm not sure
[03:31:23] <abcminiuser> WinUSB will need an INF, from what I remember it uses vendor class (0xFF/0xFF/0xFF) interfaces
[03:31:56] <MarkX> hmm so i can just use zadig for that assignment
[03:32:49] <MarkX> zadig sets it all up without having to deal with driver signing
[03:34:27] <MarkX> so when i set up the interface i'm guessing i'll need an endpoint as well
[03:35:45] <MarkX> then i need USB Endpoint Interrupt request? or will USB General Interrupt request be sufficient?
[03:36:25] <MarkX> i think the general one should be fine, i just don't know how it'll know specifically that the data is for newEP rather than EP0
[03:38:51] <carabia> st.com's forums going to be down for hours still :(
[03:39:13] <carabia> and i needed them right nooooow
[03:39:20] <abcminiuser> Yeah, your WinUSB interface will need a pair of bulk endpoints for the data
[03:40:39] <MarkX> bulk transfers? i can't just send control transfers?
[03:45:30] <MarkX> hmm is it even possible to send a control transfer to an endpoint other than EP0
[03:46:01] <MarkX> shoot! line's down
[03:46:02] <MarkX> be back soon
[03:46:18] <abcminiuser> Trying to find any info online, generic info is that it supports either, but can't figure out if it *requires* the endpoints
[04:49:24] <MarkX> finally done
[04:49:56] <MarkX> abcminiuser, what did you mean "can't figure out if it *requires* endpoints"
[04:50:52] <abcminiuser> Generally USB classes have defined endpoint requirements, at least loosely (e.g mass storage interface requires bulk in, and bulk out endpoints)
[04:51:16] <abcminiuser> The WinUSB driver is meant to be generic, but I wasn't sure if it would just support being bound to any old device or interface
[04:51:38] <abcminiuser> Quick research says that yes, it'll "just work" and expose whatever endpoints your interface contains to the host
[04:52:51] <MarkX> ah gotcha
[04:52:59] <MarkX> okay cool. let me try all of this
[04:53:03] <MarkX> thanks as always for the help!
[04:58:30] <abcminiuser> No prob
[04:58:43] <abcminiuser> Man, at this point Dark Matter is amazing heckling material
[04:58:56] <abcminiuser> The writing is. So. Bad.
[05:00:10] <MarkX> dark matter?
[05:01:16] <abcminiuser> Sci Fi TV show
[05:01:23] <abcminiuser> And it's SO BADLY WRITTEN
[05:01:26] <abcminiuser> SO SO BAD
[05:01:44] <MarkX> ah
[05:01:50] <abcminiuser> Someone is working through the entire TV Tropes website writing it
[05:24:19] <carabia> To me - in all its naivety - TNG is still the best sci-fi show ever made
[05:25:10] <carabia> then again, I don't watch that much TV, due to my inherent lack of interest. So maybe my opinion is really moot
[05:27:38] <abcminiuser> SG1 was the best
[05:28:00] <abcminiuser> Followed by Battlestar (the new one, minus the batshit crazy ending) then The Expanse
[05:28:12] <abcminiuser> The latter is new, and surprisingly well written
[06:00:51] <antto> to cause a wdt reset, do i need some specific fuse settings?
[06:01:17] <antto> i see "Watchdog timer always on" which is not enabled in my case :/
[06:32:53] <abcminiuser> antto: no, the fuse will just force it on when power is applied
[06:33:07] <abcminiuser> If disabled you can still manually turn it on in firmware, the fuse is for safety critical apps
[06:33:08] <antto> then i'm doing something wrong
[06:34:17] <antto> i need WDE=1, WDIE=0, to get a Reset when it times out, as far as i understand
[06:35:04] <antto> so i cli(), then i wdt_enable(), then while (1);
[06:35:09] <antto> it should work, right?
[06:35:53] <Lambda_Aurigae> if you turn off interrupts then the watchdog interrupt won't fire, I think.
[06:36:29] <antto> do i need that interrupt?
[06:36:52] <abcminiuser> Wait are those fuses inverted?
[06:36:52] <Lambda_Aurigae> hmm..you don't want WDT interrupt,,just reset..
[06:37:01] <antto> it says that if WDIE=1, the wd will generate an interrupt, and then reset
[06:37:32] <antto> abcminiuser nope, those are not inverted and they aren't fuses
[06:38:00] <antto> WDTON is a fuse, and in my case it's effectively off
[06:39:30] <antto> hm.. the macro wdt_enable() contains an asm "cli" instruction
[06:39:36] <abcminiuser> Oh derp, my bad
[06:39:45] <Lambda_Aurigae> kinda early here.
[06:39:51] <Lambda_Aurigae> I slept in..just got up.
[06:39:55] <abcminiuser> IIRC, and it's been a few years, there's a safety bit you have to set to change the WDT
[06:40:12] <abcminiuser> Are you using the avr-libc functions or hand-rolling?
[06:40:38] <antto> i'm looking at this: http://www.fourwalledcubicle.com/files/LUFA/Doc/120730/html/_page__software_bootloader_start.html
[06:41:07] <abcminiuser> Oh that dude sounds like he knows what he's doing, listen to him :P
[06:41:08] <antto> but i'm only trying to cause a reset, therefore i only put cli() and wdt_enable()
[06:41:16] <antto> heh
[06:41:33] <antto> aaand an infinite loop
[06:41:45] <abcminiuser> That should work, what device?
[06:41:53] <antto> atmega2561
[06:43:22] <antto> it's configured to always run the bootloader on reset, and the bootloader itself decides whether to remain running or to jump to the FW
[06:44:18] <antto> i'm trying to have a button combo in the FW which goes back to the bootloader (otherwise i have to use the power on/off switch, and not all of these have one)
[06:44:39] <abcminiuser> Hrm, refreshing my memory from the datasheet, that's supposed to work the same way as the device I wrote that code for
[06:44:53] <Lambda_Aurigae> should work the same for most all atmega chips.
[06:44:54] <abcminiuser> Are you compiling under -Os?
[06:45:04] <Lambda_Aurigae> looking at atmega1284p right now and it seems so.
[06:45:59] <antto> nope, -O2 only
[06:46:53] <antto> wdt_enable() comes from <avr/wdt.h>
[06:47:02] <antto> it's an asm blob
[06:47:42] <Lambda_Aurigae> what option are youpassing wdt_enable() ?
[06:48:33] <antto> i tried WDTO_250MS like in the example, now i tried WDTO_15MS
[06:49:58] <antto> the LEDs go blank, but it doesn't look like the bootloader is properly running
[06:50:27] <antto> the bootloader normally enables interrupts, and drives the LEDs, showing a very distinct pattern
[06:50:58] <Lambda_Aurigae> does the bootloader do any kind of test as to what caused the reset?
[06:51:05] <antto> no
[06:51:31] <antto> it checks a rotary encoder to decide if it should stay or jump to the FW
[06:51:35] <Lambda_Aurigae> http://www.embedds.com/using-watchdog-timer-in-your-projects/
[06:51:56] <Lambda_Aurigae> some code in there showing how to setup the WDT
[06:52:17] <Lambda_Aurigae> now, granted, they are using interrupt/reset mode rather than just reset..
[06:52:18] <Lambda_Aurigae> but
[08:06:35] <antto> well, nope, can't get it to work
[08:07:52] <theBear> well, pfft then i spose
[08:12:36] <antto> i tried something.. set it to WDTO_1S, then i don't just while (1); but i put an infinite blinking loop
[08:12:51] <antto> when i trigger this - i see it blink for 1 second, then it freezes
[08:13:00] <antto> so it kinda works
[08:13:05] <Lambda_Aurigae> so,it's resetting
[08:13:22] <antto> yeah, but then the bootloader isn't quite starting
[08:13:52] <antto> it doesn't set its special LED pattern, nor does it respond to the UART
[08:14:37] <Lambda_Aurigae> sounds like the bootloader is checking what starts it and jumps out.
[08:14:55] <antto> uh, nope
[08:17:30] <cehteh> why do you need the WD timer for something else, thats always some pita
[08:17:52] <Lambda_Aurigae> antto, he is trying to jump to bootloader from the main program.
[08:18:44] <cehteh> ah
[08:19:28] <cehteh> then perhaps .. crappy bootloader: watchdog stays enabled when resetting
[08:20:09] <antto> the bootloader declares a few variables in main(), then it moves the interrupt vector (two assignments to MCUCR), then it initializes the IO pins, then it enables SPI (which is used for the LEDs shift-registers), then it sets the LEDs to the special pattern, then it checks the rotary encoder
[08:20:15] <cehteh> but if the bootloader waits for some connection for longer than the WD triggers and doesnt care about disabling the WD, then you are in a reboot loop
[08:20:32] <antto> hmm
[08:20:33] <cehteh> your bootloader?
[08:20:49] <LeoNerd> That sounds like quite a fancy bootloader
[08:20:57] <antto> it's a modified stk500v2
[08:21:08] <cehteh> disable the watchdog at start of the bootloader
[08:21:15] <antto> too late for that
[08:21:17] <antto> ;]
[08:21:34] <cehteh> then set the WD to 8 secs, maybe that helps
[08:21:43] <antto> btw.. the watchdog is disabled from the fuses
[08:21:47] <antto> ..WDTON
[08:21:51] <cehteh> doesnt matter
[08:21:59] <cehteh> thats just for power up
[08:22:03] <antto> ah
[08:22:07] <antto> well, crap
[08:22:08] <Lambda_Aurigae> when you do a WDT reset, I'm not sure if it turns off the WDT.
[08:22:15] <cehteh> it does not
[08:22:26] <Lambda_Aurigae> then the first thing the bootloader needs to do is turn it off.
[08:22:34] <cehteh> exactly
[08:22:44] <cehteh> or ping the WD
[08:22:53] <antto> i'll know for next time, unfortunately it's too late now
[08:22:58] <cehteh> why that?
[08:23:07] <cehteh> cant you flash a new bootloader now?
[08:23:17] <antto> about 200 of these are bought by people all over the globe ;]
[08:23:17] <Lambda_Aurigae> or project is over.
[08:23:30] <cehteh> lol
[08:23:42] <antto> well, it's not a critical feature
[08:23:55] <cehteh> well you can make instecutions how to flash a new bootloader and/or recall them for service :D
[08:24:03] <antto> it's mostly myself who has to frequently re-flash the FW as i develop it
[08:24:26] <antto> that's not gonna happen
[08:24:44] <cehteh> for that i like the chips with 'weak' bootloader support like the tiny85 .. there bootloaders can update themself :D
[08:24:54] <theBear> their
[08:24:55] <cehteh> i wonder if thats somehow possible on megas
[08:25:03] <antto> it is
[08:25:03] <Lambda_Aurigae> kinda.
[08:25:08] <Lambda_Aurigae> dual bootloader.
[08:25:10] <antto> with a hack
[08:25:12] <theBear> and it's amazing even a bootloader without spare code room fits on chips that size if ya think about it
[08:25:21] <Lambda_Aurigae> bootloader can update the bootloader section if things are set right.
[08:25:21] <antto> there was a hack, i read about it
[08:25:27] <cehteh> ah ok
[08:25:47] <Lambda_Aurigae> but if you overwrite active code it gets,,,,bad.
[08:25:51] <theBear> cehteh, and yeah, the general idea from what i seen is doing a tagteam deal, kinda temporarily make the main code a 2nd bootloader, then boot that to write the first
[08:25:54] <Lambda_Aurigae> so you have to have a dual bootloader...
[08:26:14] <Lambda_Aurigae> just have a small section in bootloader that writes flash..have it waaaay high.
[08:26:17] <cehteh> theBear: yes
[08:26:18] <theBear> in theory you can do it all "on the fly" if yer really careful to not need to load anything after you start etc, but pfft
[08:26:26] <Lambda_Aurigae> and have the bootloader and/or the main program call that small piece of code.
[08:26:42] <antto> this bootloader can be flashed two ways: via UART (stk500v2, avrdude for example) or via MIDI SYSEX on another UART
[08:26:48] <antto> it's quite big ;]
[08:27:02] <antto> aaaand it's locked from the lockbits
[08:27:51] <antto> and it displays something like a progress bar animation on the LEDs while its flashed
[08:27:55] <antto> very fancy ;]
[08:27:59] <theBear> ooh sysex firmware update, how very sneaky and bold and rare
[08:28:30] <antto> there is another avr bootloader which works via sysex, but it's more naive
[08:28:31] <theBear> effing twice in a row today ! just poured another 1/4bottle of methylated alky on my lap ffs
[08:28:38] <antto> you have to send the data slowly
[08:28:42] <antto> mine is buffered ;]
[08:28:45] <theBear> now my leg is cold again, slightly, and for a little bit longer !
[08:28:50] <theBear> life is hell huh ?
[08:29:05] <Lambda_Aurigae> theBear, you shouldn't be trying to drink alcohol through your gonads.
[08:29:23] <theBear> not alcahol this fine for sure
[08:29:36] <theBear> it's a travesty in my own pants !
[08:30:23] <cehteh> reminds me .. i need to finish by epoxy mold .. bbl
[08:37:58] <antto> hmmm.. http://stackoverflow.com/questions/32802221/how-to-write-a-custom-reset-function-in-c-for-avr-studio
[08:38:05] <antto> the first answer there explains it
[08:55:08] <carabia> I'm starting to think that, the methylated booze was for drinking purposes
[09:08:03] <Lambda_Aurigae> haha..
[09:08:11] <Lambda_Aurigae> "100% fairly certain."
[09:21:37] <carabia> Personally I wouldn't imagine myself ever going that low, but I haven't quite hit the rock bottom yet... :)
[09:23:22] <carabia> But, I guess everything mixes a-okay with some OJ. But I'm not sure, extensive usage might lead you to shitting blood and stuff. Probably not the greatest idea.
[09:23:43] <Lambda_Aurigae> or going blind.
[09:26:29] <Lambda_Aurigae> as far as questionable drinking...I've had some stuff that wasn't much above distilled jet fuel.
[09:29:22] <carabia> The russian vodka I used to get at a certain workplace used to have all kinds of stuff floating in it.
[09:29:34] <Lambda_Aurigae> aahh, the good stuff!
[09:29:48] <Lambda_Aurigae> they didn't bother to filter out the bits of potato
[09:29:51] <Lambda_Aurigae> and bugs
[09:29:55] <carabia> Never drank it though. I don't trust anything with a russian label
[09:29:58] <Lambda_Aurigae> and whatever else got spat into the vat.
[11:06:50] <Chillum> geez guys, it is not hard to make ethanol, don't drink the poison stuff
[11:07:13] <Chillum> to me questionable drinking is choking down a molson, yuck!
[12:07:15] <Snert> skunk beer!
[12:07:30] <Snert> Molson, Heiny and a few others
[12:07:41] <Snert> green bottle skunk beer
[14:21:35] <rue_shop4> anyone used a tlc5940?
[14:23:00] <antto> iz that an opamp?
[14:23:13] <rue_shop4> 16 channel 12 bit pwm genorator
[15:29:07] <LeoNerd> I have one but I've not actually used it in anger yet
[16:00:12] <theBear> hmm, i don't think so, but somewhere kickin' round behind this here keyboard is one of them maaaaybe 4*7seg max big old 28 or 32pin dippey wide things that sounds like it'd be cool if i ever used it for something
[16:01:15] <theBear> as it is if anything it's just kinda annoying when i gotta shuffle around the desk crap to avoid bending it all into a mess, just like all the many many times i alraedy done the same since the thing came to this desk/room in general, i now notice, for reasons i cannot possibly explain or even imagine up falsely to stop me wondering
[16:02:28] <Lambda_Aurigae> I have boxes of stuff like that!
[16:02:53] <Lambda_Aurigae> hell, I have a whole basement full of stuff like that!!
[16:05:10] <theBear> hmm, is that even french ? stupid google can't beat me in the one-step-ahead game at it applies to multiple languages and guessing preferred/natives across multiple platforms and ambiguously fingerprinted nat'd logins and crap, which usually entertains me, but right now i wanna confirm something like pfft, err, damn, gotta be spanish, so many silly apostrophes everywhere.... err, ete bloquee dans votre pays par l'utilisateur qui l'a mise en ligne ...
[16:05:11] <theBear> hmmm, maybe one of them not-german spinoffs even ? i'm even worse at spelling forign than talking it right, but i'm thinkin' that means i can't watch (utilise) mr this-video cos where i'm at, and err, i sposed to ummmmmmm 1.) be(?) somewhere that isn't even close to here to watch it, or err, surely a language with that many apostrophes and funny words can't spell/define "pays" the same as i normally would ?
[16:26:08] <liwakura> uhm. my i2c code always returns (TWDR | 1) when read, always.
[16:26:12] <liwakura> here is the code: https://w1r3.net/rRMtXH.txt
[16:26:34] <liwakura> the ISR is close to the bottom
[16:27:39] <liwakura> i set the TWDR to 0xfe for testing, but i still get 0x33 for all reads, while TWAR is 0x32
[16:35:26] <liwakura> i guess the write-data if section never gets executed
[16:37:43] <theBear> hmmm, i gonn aassume you're all over it, cos it's too late to be thinking here, and i smell bad, almost like i've been lazily avoiding having a shower all day/night
[16:38:17] <theBear> pfft, don't spose there's anything i personally could do to fix that tho, sigh, woe is me <grin>
[16:39:41] <liwakura> and the I2C status register is explained nowhere in my datasheet
[16:39:42] <liwakura> wtf
[16:40:03] <liwakura> > The different status codes are
[16:40:25] <liwakura> > described later in this section
[16:40:39] <liwakura> *sigh*
[16:44:02] <liwakura> i swear to god. The Datasheets dont explain the TWSR register bits for atmega{4,8,16,32}8
[16:54:18] <eszett> RTFM ;-)
[16:55:38] <liwakura> Oh, Mr. dumb-comment-and-part
[17:04:36] <liwakura> my current guess is that my i2c master does not ack the bytes read from the slave
[17:26:47] <liwakura> eszett: please read the manual first
[17:27:27] <theBear> did someone call ? oh, heh, that was way dumber than my comments :)
[17:44:00] <cehteh> liwakura: its in my datasheet
[17:44:22] <liwakura> nah, i already given up by now
[17:44:23] <cehteh> 21.9.3, page243
[17:44:54] <cehteh> and a lot tables before
[17:44:59] <liwakura> 21. ends for me with 8
[17:45:16] <cehteh> maybge your datasheet is a bit dated :D
[17:47:12] <liwakura> i guess yours is, bc the datasheet on the web site has ADC stuff on page 243
[17:47:33] <cehteh> 35.1
[17:47:33] <cehteh> Rev. 8161D – 10/09
[17:47:47] <cehteh> could be as well, but at least the register you are missing is described here
[17:49:06] <liwakura> http://www.atmel.com/images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet_Complete.pdf
[17:49:09] <liwakura> page 231
[17:49:37] <cehteh> http://public.pipapo.org/twsr.png
[17:50:10] <liwakura> > the different status codes are explained later in the section
[17:50:12] <liwakura> where?
[17:50:17] <liwakura> same issue with your version
[17:50:38] <cehteh> actually its not later but before .. a lot tables in the TW description
[17:50:38] <liwakura> also how comes that yours is longer
[17:51:27] <cehteh> size matters .. and i have the longest :D
[17:51:59] <liwakura> -.-
[17:52:13] <cehteh> i really dont know, thats just what i have and use
[17:52:27] <cehteh> there are certainly different versions around
[17:52:46] <cehteh> want mine?
[17:52:52] <liwakura> have you worked with linux i2ctools before?
[17:52:53] <liwakura> mh
[17:52:59] <liwakura> dont know what difference it would make
[17:53:12] <liwakura> also, yours is 6 years old?
[17:53:13] <cehteh> well here it seems its explained what you need
[17:53:17] <cehteh> yes
[17:53:24] <cehteh> but it has the data you are missing
[17:53:50] <cehteh> and yes i used i2ctools once, but forgotten anything about them
[17:54:01] <liwakura> the tables in transmission modes?
[17:54:03] <liwakura> whatever
[17:54:07] <cehteh> iirc there are some ways to brick your system when using wrong
[17:54:10] <liwakura> im in a bad mood today.
[17:54:21] <liwakura> good night
[17:54:31] <cehteh> n8
[21:36:58] <carabia> memcpy only works in the memory area specified as heap right?