#avr | Logs for 2015-08-03

Back
[01:05:11] <ferdna> i need help with my fuses
[01:05:13] <ferdna> :|
[01:06:59] <RikusW> ferdna: what are you trying to do ?
[01:07:14] <ferdna> RikusW, set it to my external crystal
[01:07:22] <ferdna> frequency
[01:07:26] <RikusW> which avr ?
[01:07:47] <RikusW> tiny/mega ?
[01:08:10] <ferdna> RikusW, http://www.mouser.com/ProductDetail/Atmel/ATMEGA328P-PN/?qs=%2fha2pyFaduiGCJtTvs2wv27CcYM4NEfqrCT8%252bDYHslh4CxdQ8BsHzA%3d%3d
[01:08:18] <ferdna> ATMEGA328P-PN
[01:08:39] <RikusW> and the frequency of the crystal ?
[01:08:43] <ferdna> 16mhz
[01:09:14] <Casper> ferdna: still on that???
[01:09:18] <ferdna> yes
[01:09:19] <ferdna> :S
[01:09:59] <RikusW> set the low fuse to 0xFF
[01:10:39] <RikusW> Did you try to set it before and the avr isn't responding perhaps ?
[01:11:41] <RikusW> and remember the 18 - 22pF caps on both sides of the crystal
[01:11:51] <ferdna> RikusW, i do have those caps
[01:12:02] <RikusW> good
[01:12:18] <Casper> ferdna: on breadboard or real board?
[01:12:26] <ferdna> real
[01:12:34] <RikusW> which software/hardware are you using to program the avr ?
[01:12:35] <Casper> commercial or diy?
[01:12:49] <ferdna> RikusW, Lo: F7 Hi: D9 Ex: FF
[01:12:53] <ferdna> that is what i have currently
[01:13:15] <ferdna> avr mkii / eclipselinux
[01:13:36] <RikusW> and its not working right ?
[01:14:00] <ferdna> RikusW, i dont know if its working or not...
[01:14:08] <ferdna> 而而而而而
[01:14:12] <ferdna> thats what i get in my terminal
[01:14:47] <ferdna> give me a known uint8_t value that i can test with
[01:15:04] <ferdna> ...
[01:15:13] <RikusW> if it is on breadboard remove the crystal, then the programmer will fail to read the chip
[01:15:32] <ferdna> why would i do that?
[01:15:49] <RikusW> to make sure it is actually running from the crystal
[01:15:59] <RikusW> (no clock = no ISP programming)
[01:16:05] <ferdna> i see
[01:16:10] <ferdna> crystal cant be removed now
[01:16:11] <ferdna> :/
[01:16:43] <RikusW> well, if it is still working with low=F7 it must be working from the crystal
[01:17:11] <RikusW> setting the wrong clock fuses disables the clock and ISP programming
[01:17:31] <ferdna> yeah ive heard that before
[01:17:32] <RikusW> it can be fixed by applying an external clock the XT1 btw
[01:18:08] <RikusW> so I assume you don't have a frequency meter or scope ?
[01:19:13] <Casper> RikusW: ISP can't be disabled with ISP, however you can disable reset, which I find it stupid
[01:19:43] <RikusW> or the clock..
[01:20:06] <ferdna> RikusW, i do have a scope
[01:20:54] <RikusW> something like DDRB=0xFF; while(1) PORTB++; will give you nice toggling outputs to check the frequency
[01:21:15] <RikusW> B0 will be a bit below half the clock
[01:21:23] <RikusW> B1 half of B0 and so on
[01:22:00] <RikusW> or set the scope probe to 10x an try probing XT2
[01:22:49] <ferdna> RikusW, what will the pins be?
[01:23:03] <RikusW> XTAL2
[01:23:14] <RikusW> pin 10
[01:23:41] <ferdna> and what should i look for?
[01:23:44] <ferdna> on my scope
[01:24:31] <RikusW> 16MHz oscillation ?
[01:24:54] <RikusW> probably square wave
[01:25:48] <ferdna> cool
[01:27:47] <Xark> In my experience on a scope it won't be "too square" from the xtal. However, if you enable CLKOUT on AVR, then it is pretty square (buffered by AVR).
[01:28:24] <Xark> (but for your purposes, just look for ~16MHz I assume)
[01:29:15] <ferdna> cool thanks Xark
[01:30:34] <RikusW> ferdna: to enable CKOUT set low fuse = 0xB7 or BF it will be on B0/pin14
[01:31:12] <ferdna> RikusW, thank you rikus...
[01:41:24] <Xark> Not a bad idea when sanity checking clock rates etc. I have had problems where probing an xtal with scope interferes with oscillation (but CLKOUT pin won't do that).
[01:43:07] <RikusW> indeed
[01:52:34] <ferdna> Xark, RikusW: i'll try it tomorrow
[02:27:56] <day> is my math correct? Do i get 8Mbit/s throughput on an atmega @16Mhz with the f_osc/2 SPI divider? :o (16Mhz /2 /1000 /1000 = 8Mbit/s)
[02:35:27] <Xark> day: I believe that is correct.
[02:35:47] <Xark> day: However, for SPI, I think it is 18 cycles a byte (vs 16), so perhaps a bit less.
[02:36:03] <Jartza> if I understood correctly, you can send with that speed, but not receive :)
[02:36:04] <Xark> (kind of a forced "stop bit")
[02:36:41] <Xark> Jartza: Receiving only happens when sending with SPI, so I think you can do both. :)
[02:42:11] <day> its really amazing how much punch a small atmega8 has. i rotated an object via cos/sin. i expected it would grind to an hold. But nothing of that sort happened.
[02:45:02] <Xark> day: Like an Apple ][ on steroids. :)
[09:45:50] <rue_house> yea, people dont understand how terrible modern software is that makes it crawl at 2Ghz
[09:47:23] <rue_house> I once made a really evil trig calc and put it in a loop, it was able to run it faster than the lcd could update
[10:36:37] <ferdna> will CKOUT slow down my avr in any way?
[10:37:59] <LeoNerd> Nope, it just enables a bit of hardware
[10:38:06] <ferdna> nice
[10:38:12] <LeoNerd> (literally, one bit. the output enable gate)
[10:38:30] <ferdna> so my readings from my CKOUT are 15.92 and 16.03
[10:38:36] <ferdna> that is correct right?
[10:47:16] <ferdna> http://i.imgur.com/o8KWYgt.png
[10:47:53] <ferdna> Xark, http://i.imgur.com/o8KWYgt.png
[10:56:17] <ferdna> LeoNerd, can you program pin14 while you have CKOUT enabled?\
[10:56:33] <ferdna> no right?
[10:56:52] <LeoNerd> Huh?
[10:57:36] <ferdna> if you have CKOUT enabled in your chip...
[10:58:18] <ferdna> you wont be able to control that pin because CKOUT is giving the clock output
[10:58:44] <LeoNerd> ah; not sure offhand
[10:58:55] <LeoNerd> There's "complex" rules on how GPIO and other pin peripherals interact
[10:59:09] <LeoNerd> I don't make a habit of overdriving them so I've never really bothered to look it up.
[10:59:12] <LeoNerd> The datasheet should explain
[11:00:05] <ferdna> cool... thanks.. LeoNerd
[13:48:48] <bss36504> Quiet in here today...
[13:49:32] * antto drops a diode on the concrete floor...
[13:54:32] <Lambda_Aurigae> some of us are here at work.
[13:55:17] * antto spills a whole bag of diodes on the floor..
[13:55:30] <Lambda_Aurigae> http://xkcd.com/1559/
[13:55:51] <Lambda_Aurigae> hopefully they were 0803
[13:56:39] <bss36504> Hey, I'm at work too
[13:56:58] <Lambda_Aurigae> well, I'm at lunch right now
[13:57:02] <Lambda_Aurigae> I don't get to irc at work.
[13:57:35] <antto> hey don't step on mah diodes!
[14:03:34] <bss36504> Lambda_Aurigae: I had to get crafty to make it work, but it does so I hang on here. I used to be on all the time at my last job.
[14:03:44] <bss36504> I missed you guys though :'(
[14:04:36] <Lambda_Aurigae> I can get on from work.
[14:04:49] <Lambda_Aurigae> I just usually am not in my office to get online. I do a lot of onsite stuff.
[14:04:57] <Lambda_Aurigae> installing new copiers and such.
[14:05:03] <Lambda_Aurigae> or repairing them.
[14:05:19] <Lambda_Aurigae> I just remote into my home computer like I'm doing now.
[14:05:33] <bss36504> I spend an unfortunate amount of time sitting in my cube. Writing code mostly. Occasionally I get to play with some circuits though
[14:08:27] <Lambda_Aurigae> wish I could code for work.
[14:08:40] <Lambda_Aurigae> I get to play with circuits but it's mostly replacing boards.
[14:10:08] <bss36504> I'm a test engineer for Hall effect current sensors. I would much prefer to do some embedded stuff, but there arent a lot of jobs nearby in that field. So for now Im settling for this. Coding can be a bit tedious after a while. Just connecting tester resources to device pins. Apply stimulus, measure results.
[14:12:51] <Lambda_Aurigae> better than having some old woman yell at you because her printer is out of paper.
[14:13:02] <Lambda_Aurigae> when you show her it says, "Load Letter" on the screen
[14:13:17] <Lambda_Aurigae> she says, "But, I wasn't printing letters! I was printing invoices!"
[14:13:24] <Lambda_Aurigae> yes, that REALLY happened.
[14:13:31] <bss36504> lol
[14:13:42] <bss36504> Alright, I guess im doing ok here :P
[14:14:50] <Strangework> who dropped all these friggin diodes
[14:15:53] <Lambda_Aurigae> he did!
[14:15:55] * Lambda_Aurigae points.
[14:16:28] <Lambda_Aurigae> we were gonna dump some glue on them to make a non-skid surface.
[14:18:40] <Strangework> That could actually look very pretty
[14:19:12] <Lambda_Aurigae> use some good cyanocrylate.
[14:22:32] <Lambda_Aurigae> ok...lunchtime over...back to the pits!
[14:28:06] <bss36504> Have fun!
[14:50:57] <trickyfish> hello. anybody active?
[14:55:53] <bss36504> howdy
[14:57:04] <trickyfish> hi
[14:58:51] <trickyfish> are you familiar with avr? the timers to be specific?
[14:59:58] <tpw_rules> yeah
[15:00:08] <tpw_rules> have you tried looking at the tatasheet
[15:00:11] <tpw_rules> datasheet
[15:01:24] <Strangework> gwehehehehhh. tatasheet.
[15:02:06] <trickyfish> i have. im looking at it right now. im trying to put timer0 on an arduino into CTC mode and use an external clock source to count pulses. i have all the bits set correctly...i think. it just doesnt use the external source at all.
[15:03:49] <LeoNerd> I'm not sure that Timer0 can use external count can it?
[15:04:43] <trickyfish> it says so on the datasheet, and theres a pin labeled for it on the board diagram ive got.
[15:04:44] <LeoNerd> Ohright, yes... it as the T0 pin
[15:04:51] <LeoNerd> It just can't do input capture
[15:05:03] <trickyfish> right, thats timer1, which i have plans for as well.
[15:05:17] <LeoNerd> Soyeah, you should just need to set the WGM bits into CTC mode, and CS into external T0 mode
[15:06:26] <trickyfish> thats what i thought as well. the interrupt runs when the count is triggered, but the count runs independently of the input i give it from the external source.
[15:07:10] <trickyfish> its like its not going into CTC mode or something. but ive triple checked the bits ive set, and it looks right. but im also a noob.
[15:09:36] <trickyfish> http://hastebin.com/iliwivisaf.coffee here is my current code if anyone is willing to take a peek for me. i figure its something stupidly simple that im doing wrong.
[15:41:34] <trickyfish> serivishy
[16:13:57] <mike_papa> Hello. Is it possible (in C) to set two registers to same value (clear them) at the same time? I want to start two timers with the same value. Something like having them synchronized, but they will run with different prescalers.
[16:19:12] <mike_papa> NVM. Just started reading on GTCCR :)
[16:30:00] <trickyfish> i read a bit about port manipulation recently, that may be helpful as well for your purposes.
[16:35:03] <mike_papa> trickyfish: no. Actually GTCCR does the job. TSM bit holds PSRSYNC bit (which is normally cleared immediately), and PSRSYNC holds prescaler for timers 0,1,3,4 and 5 on my atmega2560. That lets me set up timers, write value 0 to all of them, and let them go at the same time by clearing TSM (or whole GTCCR).
[16:41:26] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxa1NQUmJtWkJ2dzg/view
[16:41:29] <Jartza> TADAA
[16:53:59] <mike_papa> Jartza: nice fps ;)
[16:54:38] <Jartza> well, that's what you get with 9600bps
[16:55:27] <Jartza> and attiny85 :)
[16:59:36] <Jartza> the fps would be of course higher with faster uart
[16:59:55] <Jartza> but 9600bps is an achievement imo :)
[17:03:26] <mike_papa> Jartza: no external clock?
[17:07:13] <Jartza> sure
[17:07:16] <Jartza> 20MHz oscillator
[17:07:53] <trickyfish> mike_papa: could you tell me why this code isnt setting either the CTC mode or the external clock source properly? http://hastebin.com/iliwivisaf.coffee
[17:08:11] <Lambda_Aurigae> trickyfish, what external source are you using for starters?
[17:09:02] <trickyfish> i will eventually be using a single line from a rotary encoder, but im just trying to get it off the ground right now.
[17:09:29] <trickyfish> i was trying to pulse it manually from a push button and 3.3V
[17:10:02] <trickyfish> but the output is doing what it wants independently of the input, so im thinking i didnt set the timer right somehow
[17:10:43] <Lambda_Aurigae> and do you have the input floating when the button is not pushed?
[17:11:14] <Lambda_Aurigae> or do you have a pulldown resistor between the input and GND? like 4.7K or 10K ohm resistor.
[17:11:28] <Lambda_Aurigae> and is your button debounced?
[17:11:40] <trickyfish> no, it is grounded through a resistor.
[17:11:56] <Lambda_Aurigae> ok.
[17:11:59] <trickyfish> and it is not debounced, because i havent gotten that far yet
[17:12:12] <trickyfish> like i said, it isnt even reacting to the input at this point
[17:12:14] <Lambda_Aurigae> just making sure you didn't have floating inputs...that will cause the interrupt to trigger rather randomly.
[17:13:06] <Lambda_Aurigae> beyond that, what is the arduino stuff doing to your setup?
[17:13:49] <trickyfish> im sorry, i dont understand the question
[17:13:57] <Lambda_Aurigae> you earlier mentioned arduino.
[17:14:06] <Lambda_Aurigae> the arduino setup stuff can interfere.
[17:14:38] <trickyfish> how so? i have disabled interrupts during the timer setup. is that not sufficient?
[17:15:07] <Lambda_Aurigae> I don't know.
[17:15:18] <Lambda_Aurigae> I don't know what all the arduino code is doing
[17:16:14] <trickyfish> sorry, almost the entire code is setting up the timer, i dont have anything else written into it yet.
[17:16:53] <trickyfish> other than setting a global variable and the interrupt itself, which should toggle an led, the rest of it is all timer settings
[17:18:56] <Jartza> hmmh
[17:18:57] <Jartza> 818 bytes
[17:19:07] <Jartza> and 9600bps seems to work nicely :)
[17:21:57] <Lambda_Aurigae> trickyfish, what about the core arduino software? the arduino main() and setup functions...do those do anything with the timer0?
[17:22:03] <Lambda_Aurigae> Jartza, awesome.
[17:22:08] <Emil_> Jartza: What's the project?
[17:23:16] <trickyfish> as far as i know timer0 only controls delay() and millis() functions, which if not being used, shouldnt interfere with anything.
[17:23:17] <Lambda_Aurigae> Emil_, he is making an attiny based vga adapter.
[17:25:06] <Emil_> Lambda_Aurigae: what resolution?
[17:25:11] <Emil_> That seems kind of slowish
[17:25:20] <Emil_> but cool nonetheless
[17:25:21] <Lambda_Aurigae> Emil_, it is slow and text only.
[17:25:24] <Lambda_Aurigae> but awesome.
[17:25:32] <Lambda_Aurigae> https://drive.google.com/a/bethnray.com/file/d/0B2dTzW9TMeBxa1NQUmJtWkJ2dzg/view
[17:25:37] <Emil_> But, I mean, it could be made faster
[17:25:49] <Emil_> Yeah I saw that
[17:25:55] <Emil_> Jartza: overclock it, mate
[17:26:02] <Lambda_Aurigae> naaa.
[17:26:06] <Lambda_Aurigae> it does wonders as it is.
[17:26:23] <Lambda_Aurigae> trickyfish, what are you setting CS02, CS01, and CS00 to?
[17:26:31] <Emil_> Mate, if better performance can be achieved, easily, then is should be done
[17:26:34] <Lambda_Aurigae> they should be 1 1 0 or 1 1 1
[17:27:07] <Emil_> Jartza: use pll clock for 32MHz internal
[17:27:12] <Jartza> naah
[17:27:21] <Lambda_Aurigae> Emil_, he wont get full graphic display out of the chip due to lack of ram for frame buffer.
[17:27:22] <Emil_> It doesn't even vary much
[17:27:24] <Jartza> I want to use it as-is
[17:27:34] <Emil_> Jartza: It is as is?
[17:27:42] <Jartza> I mean, according to specs
[17:27:43] <Emil_> You can do everything in software
[17:27:48] <trickyfish> TCCR0B = bit (CS02) | bit (CS01) | bit (CS00);
[17:27:59] <trickyfish> should set them all to 1
[17:28:01] <Jartza> Emil_: yeah, but the chip is not specced to 32MHz and it wouldn't help
[17:28:09] <Jartza> I already use all RAM for screen buffer
[17:28:11] <Emil_> Jartza: "Not specced"
[17:28:16] <Jartza> yes
[17:28:19] <Emil_> mate, it runs fucking well on pll clock
[17:28:34] <Jartza> I don't doubt it, but if datasheet says 20MHz, I'm sticking with it
[17:28:40] <Emil_> and it would help, you'd gain 50% more cycles
[17:28:57] <mike_papa> Jartza: if you want high serial speeds use 18.432Mhz clock.
[17:28:58] <Jartza> because the whole point of this project was to see what can be done with that chip within specs
[17:29:06] <Emil_> Well, it's your loss
[17:29:09] <mike_papa> Jartza: check http://wormfood.net/avrbaudcalc.php
[17:29:18] <Jartza> agh
[17:29:22] <Jartza> that doesn't help :)
[17:29:29] <Lambda_Aurigae> mike_papa, that's great if you are using the hardware usart..which he is not.
[17:29:32] <Emil_> http://www.nongnu.org/avr-libc/user-manual/group__util__setbaud.html
[17:29:37] <Lambda_Aurigae> he is bitbanging the uart.
[17:29:39] <Emil_> Or just use the libc calculator
[17:29:41] <Emil_> ..........
[17:29:43] <Jartza> even 9600bps required some funny timings
[17:29:46] <Lambda_Aurigae> using the usi to generate video.
[17:29:58] <mike_papa> Lambda_Aurigae: oh... I didn't get that.
[17:30:00] <Jartza> you don't seem to have an idea what kind of chip attiny85 is :)
[17:30:11] <Lambda_Aurigae> trickyfish, no clue then...it should work.
[17:30:21] <Jartza> Emil_: the point being... get more clock cycles... to do what? :)
[17:30:33] <Emil_> Jartza: update faster
[17:30:35] <Jartza> Emil_: does getting more clock cycles grow the chips memory, for example? :)
[17:30:43] <Jartza> it won't update faster
[17:30:50] <Emil_> it would
[17:30:52] <Jartza> it updates the screen 60 times per second
[17:30:55] <Jartza> no it wouldnt :)
[17:31:14] <Jartza> the vga it outputs is 640x480@60Hz
[17:31:40] <trickyfish> yeah, im lost as well. :/
[17:31:44] <Jartza> and the vertical refresh rate is 31.46875 kHz
[17:32:16] <Jartza> or actually in my case 31.45 kHz, but close enough
[17:32:33] <LeoNerd> Why that particular number?
[17:32:43] <Lambda_Aurigae> that's the vga spec.
[17:32:44] <Jartza> because attiny85 has 8bit timer
[17:32:45] <Lambda_Aurigae> or close to it.
[17:33:12] <LeoNerd> Yeah, but I presume it must be some specific division of a higher frequency
[17:33:13] <Jartza> I can't really get to 31.46875kHz with 8bit timer, but 31.45kHz is close enough
[17:33:54] <Jartza> so. I run this hsync piece of code 31450 times a sec
[17:34:10] <Jartza> and in the same code read 9600bps uart, bitbanged
[17:34:17] <LeoNerd> Ooooh *H*-sync
[17:34:50] <Jartza> which isn't very divisable :)
[17:35:08] <Jartza> 31450 / 9600 =~ 3.28
[17:35:21] <Jartza> so I had to make some funnies to even get the 9600bps working
[17:35:38] <Jartza> and adding megahertz wouldn't help any because I'm still tied to vga timings
[17:36:36] <Jartza> 32x14 character screen buffer eats 448 bytes of sram, then there is 2 buffers of 32 bytes, one for horizontal line currently being drawn and one for the next line being precalculated.
[17:36:44] <Jartza> there's your 512 bytes of SRAM :)
[17:36:48] <Jartza> rest happens with registers
[17:37:22] <Jartza> I already draw 192x112 pixels.
[17:37:47] <Jartza> wouldn't achieve much with higher clock
[17:37:55] <Jartza> it won't change the timings for uart
[17:39:22] <Jartza> personally I think this is already quite great :)
[17:45:52] <Jartza> Lambda_Aurigae: https://github.com/Jartza/attiny85-vga/tree/asmbranch
[17:45:55] <Jartza> if you want to try
[17:46:01] <Jartza> makefile is for avra, though
[17:46:14] <Jartza> should compile with atmel studio too, but I haven't created a project for it
[17:46:33] <Jartza> when it boots, it doesn't print anything :)
[17:46:36] <Jartza> just listens to uart
[17:58:52] <Jartza> and no, the screen doesn't scroll
[17:58:58] <Jartza> not sure if I even implement something like that
[17:58:59] <Jartza> might not
[18:51:53] <Lambda_Aurigae> Jartza, do you have some kind of data format for that uart interface? commands or something? or just send data and it displays and wraps around?
[18:55:14] <Jartza> Lambda_Aurigae: currently no, it's work-in-progress
[18:55:28] <Lambda_Aurigae> oh, I thought you had the uart working.
[18:55:35] <Jartza> currently just wrap around
[18:55:39] <Lambda_Aurigae> ok.
[18:55:44] <Jartza> uart us working yes
[18:55:45] <Lambda_Aurigae> any i/o pins available?
[18:55:52] <Jartza> and enter :)
[18:55:55] <Jartza> no :D
[18:56:02] <Lambda_Aurigae> dang.
[18:56:12] <Lambda_Aurigae> was thinking using one of those to enter some kind of command mode.
[18:56:20] <Lambda_Aurigae> or change from wrap to scroll mode.
[18:56:21] <Jartza> ahh
[18:56:46] <Jartza> yea, I'll implement commands later
[18:56:49] <Lambda_Aurigae> could use the reset line.
[18:56:57] <Jartza> now it just prints what it gets
[18:56:57] <Lambda_Aurigae> turn it into an i/o
[18:57:01] <Jartza> sure
[18:57:24] <Jartza> I just broke my hvsp so testing would be harder
[18:57:29] <Lambda_Aurigae> yeah.
[18:57:41] <Lambda_Aurigae> avr fuse doctor!
[18:58:16] <Jartza> but basically, uart will have some kind of command-protocol later. now it's just print'n'wrap
[18:58:36] <Jartza> main thing was to get the uart working at all :)
[18:59:49] <Lambda_Aurigae> yup.
[19:00:02] <Jartza> and seems to work well
[19:01:08] <Lambda_Aurigae> hope to get my stuff out this weekend and see what I can do.
[19:01:54] <Lambda_Aurigae> scrolling wouldn't be difficult. Just start at the beginning of the second line and copy the data from that point to the beginning of the first line...and go from there through the rest of the data...writing blanks to the last line.
[19:02:07] <Lambda_Aurigae> shouldn't be too difficult or memory consuming.
[21:08:58] <apo_> Huh, a friend's measuring 20 cycles between two events that should really be 21 cycles apart. I'm gonna have to take a look at that with my scope... Main loop: "loop: sbi pinb, 0; rjmp loop", interrupt every 256 cycles that just does "sbi pinb, 1; reti"
[21:10:05] <apo_> the delay between two matching flanks on portB0 should be 4 (interrupt delay) + 3 (jump to handler) + 2 (sbi) + 4 (reti) + 4 (rjmp/sbi) = 21
[21:10:21] <apo_> er
[21:10:32] <apo_> oh right, matching flank
[21:10:38] <apo_> +4 because second set of rjmp/sbi
[21:32:41] <Casper> apo_: are you sure for sbi? also, double check the jump, depending on which call it can be I think 2/3/4 cycles
[21:33:04] <apo_> Casper: sbi takes 2, jmp always 3, rjmp always 2
[21:33:54] <apo_> Yeah, I checked =P
[21:34:12] * apo_ doesn't know the instruction timings by heart, yet