#avr | Logs for 2016-06-05

Back
[03:02:32] <ljc> hey, when a program is loaded it's all in cseg right?
[03:10:41] <Xark> cseg? You mean text segment aka flash memory (AVR only runs from flash).
[03:13:10] <ljc> yes, the read only flash memory which the .cseg directive defines the start of
[03:14:10] <ljc> i guess my question is i've loaded a couple of arrays in cseg, and they start at 0x00. does the program get stored after them?
[03:15:42] <Xark> Well, if then are at 0x0000, then I would seem so. :)
[03:15:47] <Xark> they*
[03:16:12] <Xark> You can use avr-nm (or similar) to see from your executable.
[03:16:27] <ljc> hm
[03:17:31] <Xark> Typically you need to specially declare data that is stored in PROG_MEM (as it uses a different opcode to access vs SRAM).
[03:17:59] <Xark> With AVR both SRAM/registers and flash start at 0x0000...
[03:18:35] <ljc> but they're two separate memory areas right
[03:18:46] <ljc> for clarity i'm using m2560
[03:19:08] <ljc> data mem is 8bit, program memory is 16bits
[03:21:52] <Xark> Yes, two separate areas. However, typically even a const array will be copied to SRAM at init time.
[03:22:39] <Xark> You need to use PROGMEM extensions and special load_pgm_byte etc. C code to keep it in flash.
[03:25:02] <ljc> i've got 2 arrays in program memory and want to add each corresponding index together
[03:25:21] <ljc> i might have to create space in data memory, copy them over, and then add them together
[03:25:40] <ljc> unless i do some pointer arithmetic with Z
[03:25:42] <ljc> hm
[03:25:54] <Xark> As I mentioned, typically C runtime will copy all arrrays (and even const strings) to SRAM at init time.
[03:26:15] <Xark> To access anything but code from flash memory takes special operations.
[03:26:46] <ljc> sorry, i'm not using C i'm using the avr instructions
[03:26:59] <ljc> and by sram you mean the data memory?
[03:27:40] <Jartza> what do you mean by "avr instructions"?
[03:27:47] <Jartza> you're writing assembly?
[03:27:52] <ljc> yep
[03:28:08] <Xark> Ahh. :)
[03:28:23] <Xark> Well, to access flash you need to use LPM opcode.
[03:28:38] <Jartza> yes
[03:28:43] <ljc> yea, seems like most people program using AVR-C hey
[03:28:52] <Xark> (3 cycles or 62.5 ns * 3 at 16Mhz).
[03:29:16] <ljc> yea, just seems a bit of a bummer that it only uses the Z register to access the flash memory
[03:29:27] <ljc> would be handy to have X or Y do it too
[03:29:40] <Xark> No argument. :)
[03:30:03] <ljc> how did you calculate that?
[03:30:16] <ljc> 62.5 ns * 3 @ 16Mhz ?
[03:30:23] <ljc> 16Mhz - that's how fast the CPU runs
[03:30:46] <ljc> and there's 1 instruction per hz right?
[03:30:52] <Xark> Well, look up LPM and it is 3 cycles (like 328P datasheet). Then you can use Google to compute 1 second / 16000000 =
[03:31:25] <ljc> yep, 3 cycles,
[03:31:55] <Jartza> ljc: well, you can still use lpm Rd, Z or lpm Rd, Z+
[03:32:02] <Jartza> the Z+ is nice with strings
[03:32:51] * Xark (as Jartza) did a bunch of bit-banging to generate video so you learn the AVR cycle times rapidly -> https://www.youtube.com/watch?v=Imk5ony8JHI
[03:33:35] <Jartza> cool
[03:33:41] <Jartza> what's the resolution of that :)
[03:34:06] <Xark> Something like 22x22 8x8 pixel tiles.
[03:34:09] <Jartza> https://www.youtube.com/watch?v=G1QWNDck0yU
[03:34:20] <Xark> (4 cycles per pixel)
[03:34:35] <ljc> Jartza: yea, that's true, but i'd like to add two indexes of two different arrays together. so it's like i'd have lpm Rd, Z+; adiw Z, 0x20; lpm Rr, Z; adiw Z, -0x20
[03:35:49] <ljc> nice videos
[03:35:54] <Jartza> well. you can't "adiw" negative :)
[03:36:10] <ljc> doh
[03:36:16] <ljc> ok, diff strategy
[03:36:18] <Jartza> you want sbiw
[03:36:33] <Jartza> adiw can add 0..63 to word
[03:36:43] <ljc> ah yea, had a quick look but i didnt see it, i see it now
[03:36:55] <Jartza> sbiw does what you want
[03:37:19] <Jartza> but yeah. that's the downside of harvard
[03:38:14] <ljc> how do you mean? the downside of harvard?
[03:40:00] <Jartza> instruction and data memory are separate and accessing instruction memory is hard
[03:40:10] <Jartza> basically your flash is the "instruction memory"
[03:40:16] <Jartza> also, code can't be ran from ram
[03:41:26] <ljc> hm right
[03:42:22] <Jartza> actually pure harvard wouldn't let you access instruction memory at all
[03:42:30] <ljc> oh wow really
[03:42:31] <Jartza> avr is modified harvard, so it provides the LPM instruction for you
[03:42:34] <ljc> avr runs modified
[03:42:35] <ljc> yea
[03:42:57] <ljc> so with harvard you couldn't even use lpm?
[03:43:27] <Jartza> well. the term originates waaaaay back, from Harvard Mark I
[03:43:38] <Jartza> which used punch cards :D
[03:43:41] <Jartza> and relays
[03:43:58] <Jartza> so yeah. you couldn't read the punch card, it was just for instructions :D
[03:44:26] <Jartza> most MCUs that use harvard are modified harvard, which allows some way of accessing the instruction memory
[03:44:32] <Jartza> like avr and pic
[03:44:49] <ljc> back before ASCII encoding then :D
[03:45:05] <Jartza> Xark: your sprites look cool though.
[03:45:22] <Jartza> https://www.youtube.com/watch?v=qucJMObCUpI
[03:45:27] <Jartza> that's attiny5 :)
[03:45:54] <Jartza> yes. that sot23-6 chip. 6 pins. I run it with external oscillator, so I only have 3 pins free (because I disabled reset)
[03:46:19] <Jartza> I draw color vga out from 3 pins :)
[03:46:21] <ljc> trippy
[03:46:32] <ljc> you guys do some cool stuff
[03:46:34] <Jartza> it also has 32 bytes of ram. 512 bytes of flash (256 instructions)
[03:48:51] <Jartza> ljc: https://drive.google.com/file/d/0B2dTzW9TMeBxbTQ5WVVRTTRsa3M/view
[03:49:01] <Jartza> the chip on red breakout on left is the MCU :)
[03:49:11] <Jartza> chip on rightmost breakout is oscillator
[03:50:08] <ljc> hah, cool
[03:50:41] <Jartza> the attiny85 vga code is public
[03:50:42] <Jartza> https://github.com/rakettitiede/octapentaveega
[03:50:53] <ljc> it'd be cool to set one up as a server or something ;)
[03:51:45] <Jartza> octapentaveega can be used as VGA shield on arduino too :)
[03:52:00] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxUDQ4QUduWDV2TFE/view
[03:54:05] <ljc> a shield?
[04:02:17] <Jartza> yes, on top of arduino
[04:04:38] <ljc> that's pretty cool
[04:08:58] <ljc> ok i need dins
[04:09:16] <ljc> starving :)
[10:59:20] <WormFood> Is anyone aware of a commercial battery load tester, for testing small batteries, like the 18650, and phone batteries, for example.
[11:00:15] <Lambda_Aurigae> not I.
[11:00:25] <WormFood> Like, I just got a battery pack, that says it's 3500 MAh, and the original was 2200 MAh...but I suspect that 3500 MAh rating may be bogus.
[11:00:30] <Lambda_Aurigae> never searched for such though.
[11:01:02] <WormFood> how would you test such a beast? Draw 3.5 amps, over the course of an hour, and see what it does?
[11:01:21] <Lambda_Aurigae> pretty much...but I would do it several times with different current draws.
[11:01:34] <WormFood> Of course.
[11:01:43] <WormFood> 1 amp, at 3.5 hours ;)
[11:01:54] <Lambda_Aurigae> I've found that some battery packs say 3500mA but that's the raw battery capacity at the 1.5V cell voltage.
[11:02:12] <Lambda_Aurigae> running through the boost converter cuts that down dramatically.
[11:02:14] <WormFood> huh? 1.5 volts?
[11:02:23] <Lambda_Aurigae> or, whatever the cell voltage is.
[11:02:54] <WormFood> 3.7 is close to what most modern battery technology uses.
[11:03:15] <Lambda_Aurigae> oh, yeah..you mentioned 18650.
[11:03:17] <WormFood> 1.5 volts is like old batteries. A, AA, C, D
[11:03:53] <WormFood> fuck! I can't even remember the name of the technology. Carbon batteries, but I'm missing a word there.
[11:03:53] <Lambda_Aurigae> still, that's gotta run through a boost converter which is not 100% efficient so you lose some of your capacity.
[11:04:09] <Lambda_Aurigae> zinc carbon batteries from the olden days.
[11:04:12] <WormFood> Is there a boot converter inside the battery?
[11:04:16] <Lambda_Aurigae> alkaline batteries.
[11:04:19] <WormFood> that was the word, zinc
[11:04:22] <WormFood> zinc-carbon
[11:04:43] <WormFood> And I just mentioned zinc earlier today, when talking with a friend (but not zinc-carbon)
[11:04:45] <Lambda_Aurigae> you said battery pack...again, I made an assumption and thought of the 5V usb packs.
[11:05:04] <WormFood> Oh...I see what you're talking about now.
[11:12:20] <WormFood> When I said "battery pack", I was referring to a pair of 18650s in my particular product.
[11:19:26] <WormFood> I wonder how hard it'd be to build a load tester. Shouldn't be too hard really.
[11:35:48] <Lambda_Aurigae> http://www.embedds.com/diy-battery-capacity-tester/
[11:37:47] * WormFood checks it out
[11:40:07] <Lambda_Aurigae> mostly a quick article but shouldn't be too difficult to recreate.
[11:40:25] <WormFood> I understand what he's doing there
[11:40:36] <WormFood> you'd also need to calculate the load of the voltage regulator.
[11:40:40] <Lambda_Aurigae> yeah.
[11:40:48] <WormFood> And...why in the hell did he use a 10 watt resistor?
[11:40:53] <Lambda_Aurigae> quick check with an ammeter would help.
[11:40:55] <WormFood> It's drawing 1/4 of am amp
[11:41:04] <Lambda_Aurigae> 10 watt or 10 ohm?
[11:41:09] <WormFood> both
[11:41:39] <Lambda_Aurigae> big heatsink on there too it seems.
[11:41:42] <WormFood> 0.25 amps =2.5 volts / 10 ohms
[11:41:50] <WormFood> That is because it's rated for 10 watts
[11:43:55] <WormFood> 0.625 watts
[11:43:59] <WormFood> heh
[11:44:43] <WormFood> 2.5 volts * 0.25 amps = 0.625 watts....a 1 watt resistor would have been more than enough, but wow, 10 watts.
[11:45:07] <Lambda_Aurigae> there is no such thing as overkill
[11:45:22] * WormFood gets his shotgun to shoot flies
[11:45:49] <Lambda_Aurigae> There is only "Open Fire!" and "Time to reload!"
[11:46:08] <WormFood> Famous last words...."Giver 'er more voltage!!!"
[11:46:15] <Lambda_Aurigae> http://bugasalt.com/
[11:48:14] <WormFood> Are you sure that battery tester isn't a joke?
[11:48:19] <WormFood> Did you see the date on it?
[11:48:23] <WormFood> April 1st
[11:48:34] <Lambda_Aurigae> I missed the date.
[11:48:40] <Lambda_Aurigae> but it still shouldn't be difficult to do.
[11:49:21] <Lambda_Aurigae> load resistor, voltage measurement, log and average.
[11:49:24] <WormFood> I mean, the big-ass heat sink on it, looks cool, but has zero functionality.
[11:49:54] <WormFood> At what voltage is the battery considered to be depleted, and time for a recharge?
[11:50:52] <Lambda_Aurigae> when it drops below your voltage regulator's minimum rated input.
[11:50:59] <WormFood> When I said "big-ass heat sink", did you mentally move the hyphen to the next space on the right?
[11:51:37] <Lambda_Aurigae> nope.
[11:51:58] <Lambda_Aurigae> but, my mind is somewhat rather wacked out at the moment on B- and C- grade scifi movies.
[11:52:02] <Lambda_Aurigae> currently watching GOR
[11:52:10] <WormFood> http://www.xkcd.com/37/
[11:55:22] <Lambda_Aurigae> I'm more of a Schlock fan.
[11:55:24] <Lambda_Aurigae> http://schlockmercenary.wikia.com/wiki/The_Seventy_Maxims_of_Maximally_Effective_Mercenaries
[11:55:59] <Lambda_Aurigae> 14. "Mad Science" means never stopping to ask "what's the worst thing that could happen?"
[11:56:04] <Lambda_Aurigae> my favoritest.
[12:38:09] <carabia> I am building my own battery tester using node.js and an electric sauna stove as the load resistor
[13:03:46] <_ami_> hello guys
[13:03:54] <WormFood> 你好 _ami_
[13:04:40] <_ami_> WormFood: whats up
[13:05:02] <WormFood> About 8 inches on a good night.
[13:05:07] <WormFood> :D
[13:06:15] <WormFood> I'm just trying to clean up my office a bit.
[13:06:34] <_ami_> http://www.engbedded.com/fusecalc/ - i don't see entry of high/low fuses for 16MHz internal oscillator in case of atmega16a
[13:07:13] <WormFood> does it do 16 Mhz, on the internal osc?
[13:07:34] <_ami_> ah, sorry. i meant 16MHz external oscillator.
[13:08:03] <_ami_> datasheet suggests that atmega16a supports upto 16Mhz
[13:08:14] <WormFood> and the tables only go up to 8Mhz, right?
[13:08:28] <_ami_> WormFood: btw, working in office during weekends?
[13:08:37] <_ami_> WormFood: yes, 8 - 12 mhz
[13:08:53] <WormFood> I had that issue with my ATmega88. Datasheet doesn't show 12 Mhz, for the osc, only 8. So that works fine
[13:08:58] <WormFood> most of them should work.
[13:09:06] <WormFood> Just use the highest setting.
[13:09:34] <WormFood> if 12 is the highest the table shows, then use that setting.
[13:09:40] <_ami_> ok.
[13:12:04] <_ami_> what is the difference between Ext. RC oscillator and Ext. Crsytal/Resonator settings?
[13:14:07] <WormFood> They're all very slightly different, which is why I said most settings should work.
[13:14:32] <WormFood> My office is in my home, so this is where I tend to hang out. Plus now that I have an A/C in my office, I tend to spend even more time here.
[13:14:50] <WormFood> As far as to the actual technical differences, I couldn't say for sure.
[13:15:21] <WormFood> And, are you actually using an external osc, or a crystal?
[13:15:56] <WormFood> If you are, then I expect that none of the settings would make it stop working, because the osc has it's own driver.
[13:16:44] <_ami_> WormFood: currently, i am not using any ext. osc or a crystal. i need to find one. spent few mins to find it on my desk. :P could not able to find it.
[13:16:46] <WormFood> _ami_, there is a good chance, those settings are for optimal (minimal) power usage.
[13:17:07] <_ami_> i just flashed it to 8mhz internal osc. it works fine.
[13:17:09] <WormFood> I can get that kinda stuff, right around the corner.
[13:17:17] <_ami_> -U lfuse:w:0xe4:m -U hfuse:w:0x99:m avrdude settings.
[13:18:07] * _ami_ reading about oscillators. https://www.sparkfun.com/tutorials/95
[13:18:10] <WormFood> I can almost guarantee, that I can get more electronics stuff in 30 minutes, than anyone else in here. ;) It is only a 15 minute walk to Huaqiangbei (google it)
[13:19:20] <WormFood> I went to get some 12 Mhz crystals last month. Cost about 45 cents for 5 of them, and I can walk out with them in my hand.
[13:19:26] <_ami_> WormFood: you are lucky ! :)
[13:19:34] <WormFood> Lucky?
[13:19:41] <WormFood> It's all in where I choose to live.
[13:20:10] <WormFood> Ok. I'm lucky, to live with my girlfriend, which is walking distance to HQB, in a building owned by her parents.
[13:20:31] <WormFood> Actually, I should say she lives with me, because I've been here longer than she has.
[13:20:38] <_ami_> i ordered few stuffs from China recently. hoping to get it soon.
[13:20:54] <_ami_> WormFood: you are really very lucky! haha! ;)
[13:20:54] <learath> heh my last china order took 2 months
[13:21:12] <WormFood> my last china order took 4 days....slow fuckers.
[13:21:23] <_ami_> :)
[13:21:27] <WormFood> actually, that wasn't bad, because I ordered in the evening, and it came from Shanghai
[13:22:27] <WormFood> It's fuckin' insane, some of the prices they're getting for some parts here. Like, there is a 17% vat tax on all electronics stuff. But their prices are much higher than 17%, compared to the rest of the world.
[13:22:47] <_ami_> For faster delivery next time, ask the food delivery boy to pick some electronics stuffs for you ! :)
[13:23:36] <_ami_> WormFood: its a lot cheaper actually.
[13:23:52] <WormFood> the food deliver guy is right around the corner.
[13:24:02] <_ami_> ah
[13:24:05] <WormFood> I'll bet there are at least 1000 different places, that will deliver to my place.
[13:24:51] <WormFood> 我住在福田村
[13:25:04] <WormFood> 人山人海
[13:25:30] <_ami_> you speak chinese as well?
[13:25:36] <WormFood> I'm curious to how google would translate that. I doubt it will give the proper meaning. Probably just a literal translation.
[13:25:47] <WormFood> My Chinese is very poor
[13:26:03] <_ami_> btw, i got one q for you about china. is everybody there a hardware hacker?
[13:26:25] <WormFood> no, of course not
[13:27:25] <WormFood> #szdiy is a group of Shenzhen "hackers"
[13:27:45] <WormFood> Shenzhen is the city I live in (which you'd know, if you googled huaqiangbei)
[13:27:54] <WormFood> That channel is here.
[13:28:03] <WormFood> I'm not in it right now, but I stop by from time to time.
[13:28:23] <WormFood> I used to live walking distance to SeeedStudios
[13:28:33] <WormFood> That was last year, before I moved.
[13:29:22] <_ami_> WormFood: i ordered my stuffs from one shop in Shenzhen.
[13:29:34] <_ami_> so yeah, i heard abt this city.
[13:29:36] <WormFood> kewl
[13:29:50] <WormFood> Many people know the name, but many more don't.
[13:29:58] <WormFood> Do you know about Canton?
[13:30:05] <_ami_> Nope
[13:30:16] <WormFood> You know, the city, that Cantonese comes from.
[13:30:42] <Jartza> allo
[13:31:03] <WormFood> Look at any older map of China, and not far from Hong Kong, is a place called "Canton", or in Chinese 广州. Now, they're calling it Guangzhou.
[13:31:20] <WormFood> In the future, don't be surprised if the rename Hong Kong to Xiang Gang
[13:31:47] <_ami_> why is there sudden urge to change the city names?
[13:31:52] <WormFood> "Canton" and "Hong Kong" are both Cantonese names. Guangzhou, and Xianggang are Mandarin names.
[13:31:57] <_ami_> i thought it only happens in india.
[13:32:08] <WormFood> They rename cities all over the world.
[13:32:18] <_ami_> Banglore --> Bangloroo
[13:32:24] <WormFood> And, technically speaking, they didn't change the name.
[13:32:31] <_ami_> i like banglore name
[13:32:49] <WormFood> They've just asked the outside world to use the city's Mandarin name, and not it's Cantonese name.
[13:32:56] <WormFood> What about Peking?
[13:33:05] <WormFood> You've heard that before, right?
[13:33:21] <_ami_> capital?
[13:33:26] <WormFood> Good evening Jartza
[13:33:34] <WormFood> What's it called now?
[13:33:36] <_ami_> Beijing?
[13:33:44] <WormFood> Did it change names?
[13:34:40] <carabia> No it didn't
[13:34:51] <WormFood> A lot of people don't know this. It didn't change names. It changed writing systems. "Peking" is spelled using Wades-Giles, and "Beijing" is spelled using Pinyin. Both are pronounced exactly the same, even tho it doesn't look like it.
[13:35:19] <carabia> And on the other hand, a lot of people hate smart-asses.
[13:35:46] <WormFood> When you say "pee king", it was never pronounced that way in China (except maybe by foreigners).
[13:36:10] <carabia> And actually you don't, you say "peyking"
[13:36:20] <carabia> Are you done? :)
[13:36:36] <WormFood> It's pronounced 北京 :P
[13:36:54] <WormFood> It's had that name for over 1000 years.
[13:37:19] <carabia> Your smart-ass level is high enough for you to start making videos for youtube
[13:37:29] <orbiter> lol
[13:37:30] <carabia> With those annoying cuts every ten seconds
[13:37:36] <carabia> Or five.
[13:38:03] <WormFood> I was just trying to be more like you carabia
[13:38:45] <_ami_> WormFood got youtube channel? :)
[13:38:50] <_ami_> link plz? :)
[13:38:56] <WormFood> I don't do youtube
[13:39:01] <carabia> Futile. You'll never reach high enough on the awesome-scale
[13:40:49] <WormFood> carabia, did you have something to say, or you just trolling?
[13:41:12] <carabia> Actually I didn't, but turns out you didn't either :)
[13:42:14] <carabia> Baseless accusations!
[13:44:46] <superware> I can't find any information about a regulator named "LM3904IT-3.3", any ideas?
[13:45:50] <_ami_> superware: http://www.alldatasheet.com/view.jsp?Searchword=LM3904
[13:46:47] <superware> _ami_: where do you see any information about an "LM3904"?
[13:48:01] <_ami_> superware: ah, sorry. is n't it similar to other 5v regulators? difference is the output only?
[13:48:03] <_ami_> no?
[13:48:24] <superware> no idea, I thought it's 3.3V
[13:50:24] <_ami_> it is 3.3v. just refer to any 5v regulator datasheet or article
[13:51:25] <_ami_> WormFood: does there any emailing list where people discuss electronics/DIY stuffs?
[13:52:52] <WormFood> superware, you're right, it should be 3.3 volts. The specs are almost identical to the 5V part, as _ami_ said.
[13:53:10] <WormFood> _ami_, I'm sure there are some, but I'm not personally on any of them.
[13:53:53] <superware> ok, thanks!
[15:08:28] <NicoHood> is there a way to execute two programs "parallel" on avr? I think of a very low, hardcoded level for a special usecase in assembler. It would be best if you could execute both programs for 1us (16 cycles) and then execute the other again. Is there a way to achieve something similar?
[15:09:20] <LoRez> interrupts and events/jobs
[15:17:13] <Emil> NicoHood: there are rtos implementations for avr
[15:20:20] <LeoNerd> Woo. \o/ Successfully soldered a QFN32 (an ATmega88A in fact). Turns out you really want a stencil at that scale
[15:21:44] <Emil> Nice
[15:32:47] <Chillum> very nice
[15:32:59] <Chillum> those guys are tricky
[15:34:46] <Jartza> LeoNerd: I've done them just using the solder paste syringe :)
[15:34:55] <Jartza> but yea... they are PITA without stencil
[16:02:11] <Lambda_Aurigae> NicoHood, you can't execute two programs at the same time on an avr...you can do time slicing using an interrupt to let one program segment run for a while then switch context to another program segment..
[16:02:32] <Lambda_Aurigae> however, the chip is not multithreaded or multicore so one execution at a time.
[16:05:27] <A124> He knows that. He wants fast, granular context switching.
[16:07:07] <Lambda_Aurigae> the avr is suited to that in that you can quickly switch your stack location so each "program" can have its own stack.
[16:07:16] <Lambda_Aurigae> getting it to run exactly 16 cycles might be fun though.
[16:07:52] <Lambda_Aurigae> and there would be quite a few(relatively) cycles between stopping one and starting the next.
[16:11:12] <Emil> NicoHood: with 16 cycles of execution your overhead from context switching is massive
[16:11:54] <A124> I think it takes like five cycles to switch context when using functions, so yeah.
[16:12:01] <Jartza> NicoHood: I made two-task simple context switcher for attiny85 as an example
[16:12:15] <Jartza> but AVR has so many registers, there's huge overhead on context-swiwtch
[16:12:37] <NicoHood> i do not really need a context switch
[16:12:42] <NicoHood> i can reserv registers
[16:12:42] <LeoNerd> I personally woudln't bother. Just write your tasks in a small nonblocking coöperative return style and that'll be fine
[16:12:48] <Jartza> yea
[16:12:55] <Jartza> but I did that for teaching purposes
[16:13:05] <NicoHood> i just need to execute them after 1us. i just need to switch them
[16:13:18] <Jartza> sort of "real" switch. own stack for both tasks, saving all registers etc.
[16:13:32] <NicoHood> execute 1us code a, execute 1us code b. the only thing to restore is the Z register
[16:13:34] <Jartza> but I did context switch 1000 times a sec, not that fast
[16:14:02] <Jartza> NicoHood: neither of the tasks push anything to stack?
[16:14:12] <NicoHood> no
[16:14:24] <Jartza> mmkay
[16:16:34] <Emil> NicoHood: naked timer overflow interrupt
[16:16:40] <Emil> or compare match
[16:47:07] <Jartza> well. calling interrupt still saves something to stack :)
[16:47:14] <Jartza> the return address
[16:50:21] <Emil> True