#avr | Logs for 2013-03-06

Back
[04:23:25] <cxz_> when an interrupt is assert, I want the program to flow in the beginning of while(1) loop, and I use goto function to accomplish it. But, I see that it is not recommended to use goto in avr programming and it also outputs error while compiling, what is the best method to ensure the program continues just in the beginning of while(1) after the interrupt function? here is my skelaton code http://pastebin.com/fixShshP
[04:29:22] <damjan> cxz_: an outer while(1) and an inner while(flag) after the code that should run for the interrupt
[04:29:38] <damjan> and you just set flag in the interrupt routine
[04:29:46] <damjan> make sure you make it volatile
[04:33:58] <cxz_> damjan, do you mean it should be like this http://pastebin.com/tdHu9vjj
[04:34:16] <damjan> but goto is not so bad either
[04:34:40] <damjan> cxz_: no
[04:34:53] <damjan> you have 2 label_one and still the goto
[04:35:19] <cxz_> I forgot to delete the label_one inside while(flag)
[04:35:50] <cxz_> otherwise, how should it be?
[04:36:18] <damjan> so do you want to completely interrupt the flow?
[04:36:19] <cxz_> how should I replace goto?
[04:36:30] <cxz_> yes, I want program to start again
[04:36:42] <damjan> since, just settings the flow will exit the inner while(flag) on the next loop
[04:38:50] <cxz_> is it correct like this http://pastebin.com/ddhVEQmf
[04:39:23] <damjan> cxz_: I'm not an expert, but afaik that goto from the ISR is a no go
[04:39:40] <damjan> I'm not sure that's even allowed in C
[04:40:39] <cxz_> damjan, it is for sure you have a lot better experience than I have. how would you write the code that when it exits from the interrupt, it would restart the program?
[04:40:59] <cxz_> or what would you use to replace goto function?
[04:41:18] <damjan> restarting from scratch is easy, just reset the microcontrller
[04:41:34] <theBear> it's not recommended to use goto in any programming the last 10 or 15 years
[04:43:13] <cxz_> I misused the "restart program", it would be correct to say the program to return in the beginning of while loop when it exits from the interrupt function
[04:43:35] <cxz_> theBear, what would you use instead of goto function?
[04:43:39] <theBear> not if you speak english it wouldn't
[04:43:43] <theBear> that made no sense at all
[04:45:03] <damjan> http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_softreset
[04:45:06] <cxz_> then I guess this piece of code explains what I want to do with goto function, right? http://pastebin.com/ddhVEQmf
[04:48:07] <cxz_> I don't want to do the initialization again by reseting the MCU, isn't it possible to jump in a specific line after exiting from the interrupt subfunction?
[04:48:45] <theBear> without looking, and being about to lie down, even with goto you can't jump into a while loop, without the while statement there IS no loop
[04:50:11] <damjan> cxz_: maybe http://www.nongnu.org/avr-libc/user-manual/group__setjmp.html
[04:50:59] <cxz_> theBear, I started my question by stating that using goto is not a good idea. what I am asking what should I use instead of goto?
[04:51:19] <inductiveload> cxz_: you might consider setting the flag in the interrupt, checking it in main(), and going back to the start of the main while loop with a "continue"
[04:53:51] <cxz_> damjan, thank you, I will try setjmp
[04:54:30] <inductiveload> otherwise, setjmp would work as well, but watch out for confusing program flow getting out of hand if you use it for a lot of different things :-)
[04:56:10] <inductiveload> goto isn't always bad, but it gets hard to see what is going on if you use it for jumping around a lot. for example, the Linux kernel uses a lot of them to jump to the error handling code in functions on failures.
[04:59:22] <cxz_> inductiveload: thank you, I will bear it in my mind
[05:00:46] <inductiveload> cxz_: the most important thing is as long as after you get back from a holiday, you still know how it all works.
[05:01:44] <cxz_> right
[07:10:44] <Valen> !seen CapnKernel
[07:10:44] <tobbor> CapnKernel was last seen in #avr on Mar 06 03:54 2013
[07:26:07] <Steffanx> !time
[07:26:08] <tobbor> My watch says its 05:14AM Wed Mar 06 2013
[09:15:29] <OndraSter_> daddy's home
[09:15:53] <Steffanx> Yes, you are right
[09:15:59] <theBear> i don't see him
[09:16:15] <OndraSter_> "who's your daddy"
[09:16:18] <OndraSter_> "who's YOUR daddy"
[09:16:24] <OndraSter_> "I DO NOT KNOW!! :'( :'("
[09:16:28] <theBear> umm, arthur fonzarelli ?
[09:21:01] <creep> -Hello? -Hey baby, do you have a boyfriend? -Yes and he is with me right now, who's that? -Your dad, just wait till i get home!
[09:52:19] <Grievre> Hmmm
[09:52:37] <Grievre> what state could the TWI peripheral get into where it's continuously holding the data line down but not the clock?
[10:30:41] <creep> wow look what i found http://www.mesanet.com/
[10:31:51] <creep> pci-e fpga board sounds awesome
[10:37:10] <creep> http://www.mikekohn.net/micro/atmel_vga.php
[10:37:44] <Steffanx> There is a much nicer one.. incl sound etc.
[10:38:56] <Steffanx> Creep has never seen this one: http://www.linusakesson.net/scene/craft/ ?
[10:42:06] <Malinuss> Steffanx, awesome
[10:45:19] <creep> wow 386 power!
[10:45:37] <OndraSter_> haha
[11:09:23] <creep> oscilloscope demo? http://www.youtube.com/watch?feature=player_embedded&v=s1eNjUgaB-g
[11:11:55] <Steffanx> Indeed Malinuss. I like the tune :)
[11:15:46] <Steffanx> Have you seen what kind of fancy 'pcb' he uses Malinuss ? :)
[11:18:30] <kdehl> Hi. I run Atmel Studio on Windows XP. I have an STK500 compatible programmer, and I read somewhere that those don't need drivers, is that really true? The only tool Atmel Studio seems to be able to find is "Simulator," which I assume has nothing to do with the hardware device.
[11:19:07] <kdehl> Or did I miss something here?
[11:24:15] <Malinuss> Steffanx, I have no idea how he made all the connections with no jumpers :S
[11:24:41] <Malinuss> Steffanx, but other then that, it's just a printed "schematic", on top of a protoboard?
[11:24:59] <Malinuss> kdehl, windows XP? Did you just time travel ;D?
[11:26:25] <Malinuss> kdehl, on the serious note (but seriously windows xp? This isn't 2002 ;D) - atmel studio does not find STK500 automatically, think you will have to add it manually
[11:26:54] <Malinuss> kdehl, you use AS 6 right? Or are you using 1 or 2 xD?
[11:29:50] <kdehl> Malinuss: Hehe. I use Atmel Studio 6, yes. I tried to add a driver that I found on sparkfun.com, but it doesn't seem to work. When I click on it in the Device Manager it just says "Device cannot start" Have no idea what that means.
[11:30:44] <Malinuss> kdehl, tools->add STK500 ?
[11:30:49] <kdehl> Yeah, well, heh. It's my first time using Windows since Windows 98 was hip.
[11:30:51] <kdehl> Um..
[11:31:06] <Malinuss> kdehl, lol and you choose xp ;P
[11:31:35] <OndraSter_> haha
[11:31:36] <kdehl> Well, I thought "this is new, I've never tried it."
[11:31:37] <OndraSter_> in the year 2013
[11:31:41] <OndraSter_> XP
[11:31:52] <OndraSter_> the saga never ends!
[11:31:55] <OndraSter_> please people, stop using XP :(
[11:32:12] <OndraSter_> even 8 years old laptop can run W7 with no issues
[11:32:14] <kdehl> Hehe. Yeah, maybe I should try a newer one. Heh.
[11:32:46] <kdehl> Anyway, I do tools -> add target and STK500 shows up, but I can't choose com port to it...
[11:33:30] <Malinuss> kdehl, is it connected xD?
[11:33:49] <OndraSter_> how many serial ports do you have?
[11:33:51] <OndraSter_> in your system
[11:33:57] <OndraSter_> aka device manager => COM ports
[11:34:36] <kdehl> Hehe, yes, it's connected through a USB connector.
[11:35:33] <kdehl> Under "ports", there's only a LPT1 and the AVR ISP500-TINY Xmodem Bootloader (COM1)
[11:35:37] <kdehl> *an
[11:35:58] <kdehl> I'm using VisualBox, btw. Does that screw things up?
[11:36:22] <OndraSter_> it very much can
[11:36:45] <kdehl> Right.
[11:36:47] <kdehl> Hm.
[11:36:52] <kdehl> Wait, I know. *reboots*
[11:37:04] <kdehl> Good ol' Windows debugging process.
[11:38:36] <Malinuss> kdehl, may I ask why you even bother with windows?
[11:38:57] <Malinuss> kdehl, just download the avr-gcc for linux and avr-dude?
[11:41:24] <kdehl> Yeah, I guess. I just thought it was easier to use Atmel Studio for everything. But I guess you're right.
[11:41:24] <creep> so, want proof? yeah, cocacola http://www.youtube.com/watch?feature=player_embedded&v=oeA3IAVULZc
[11:42:23] <kdehl> I just finished a bottle.
[11:42:34] <kdehl> Second one today.
[11:43:31] <creep> http://www.youtube.com/watch?v=FoFpsUvaJlE
[11:43:33] <creep> :)
[11:43:37] <creep> good appetite
[11:43:43] <kdehl> Indeed.
[11:43:52] <kdehl> Malinuss: Is there a nice GUI for AVR programming under Linux?
[11:44:29] <Malinuss> STOP THE PRESSES! COKE HAS PHOSPHORIC ACID IN IT!!!!!
[11:44:32] <kdehl> I'm quite new to this stuff, so I wanted to keep things as simple as possible. That's why I thought Atmel Studio was a nice start.
[11:44:41] <OndraSter_> it is
[11:44:44] <OndraSter_> virtualbox is not
[11:45:12] <kdehl> Good point.
[11:45:19] <OndraSter_> no idea how virtualbox handles serial ports
[11:45:33] <OndraSter_> I don't know how any virtualization thing handles it
[11:45:46] <kdehl> Yeah, me neither. I kinda discovered Virtual Box at the same time as I discovered Windows XP. Which was like last week.
[11:46:05] <OndraSter_> I am vmware user
[11:46:09] <OndraSter_> or hyper-v
[11:46:17] <Malinuss> STOP THE PRESSES! NaCl WORKS AS A PRESERVATIVE!!!!!!!!!!!
[11:46:24] <Malinuss> sigh...
[11:46:24] <OndraSter_> huh Malinuss
[11:46:39] <Malinuss> OndraSter_, just commenting creep links ;)
[11:46:44] <Malinuss> 's
[11:46:58] <OndraSter_> Malinuss, I told a chemistry joke
[11:47:00] <OndraSter_> there was no reaction
[11:47:13] <Malinuss> OndraSter_, when?
[11:47:42] <kdehl> Um. I'm sorry about the newbie questions here, but is there just a command for avrdude to see whether it can find the programmer at all?
[11:47:44] <OndraSter_> my chemistry teacher threw sodium chloride at me.
[11:47:46] <OndraSter_> that's a salt
[11:49:39] <Malinuss> OndraSter_, I saw a girl once reach too much into a fume hood (head in, always a good idea) - she didn't know there were a bottle with chloroform in it...
[11:49:47] <Malinuss> that was fun, haha
[11:50:08] <OndraSter_> I WAS MAKING A JOKE
[11:50:13] <OndraSter_> http://i.imgur.com/DKVoh.jpg
[11:50:16] <OndraSter_> there
[11:50:19] <OndraSter_> all 6
[11:50:37] <Malinuss> oh
[11:50:37] <inductiveload> kdehl: not as far as i know
[11:50:49] <Malinuss> OndraSter_, sorry for being a aspie I guess ;D?
[11:51:01] <inductiveload> but presumably you have some idea of what you programmer and chip are?
[11:51:51] <kdehl> Yeah, I have a Atmega 1284P and the programmer is supposed to be a STK500 compatible one.
[11:52:04] <kdehl> From Olimex.
[11:53:17] <inductiveload> is that serial or usb?
[11:53:28] <inductiveload> (i've never used an stk500)
[11:55:05] <kdehl> It's USB.
[11:55:16] <kdehl> I did 'avrdude -p m1284p -c stk500 -P /dev/ttyACM0', and it does indeed seem to communicate with it!
[11:55:19] <kdehl> Yay!
[11:55:21] <kdehl> First step.
[11:55:30] <inductiveload> yep
[11:55:35] <inductiveload> nice
[11:55:51] <inductiveload> did you manage to get a hex file ready?
[11:56:23] <kdehl> I haven't connected the microcontroller yet. I just wanted to see if I could communicate with the programmer first.
[11:56:35] <inductiveload> ah right
[11:56:42] <kdehl> So now, chip wiring.
[11:57:27] <kdehl> I have to say I love Patrick Hood-Daniel's youtube series on AVR programming, btw. I'm using his schematics now when I connect to the controller.
[11:59:18] <kdehl> He's perfect for a beginner like me.
[12:05:43] <[z_z]> I'm thinking of getting an AVR JTAGICE mkII anyone use that to program an avr32 from linux yet?
[12:06:47] <diametric> no, though I'd like to get one, or any other programmer that can support debugging
[12:07:04] <diametric> my avrispmkII is starting to feel lacking.
[12:07:55] <[z_z]> doesn't usbprog have JTAGICE2? I've never used it, so i can't say if it works or not.
[12:10:06] <kdehl> Should I connect RESET on the µC to GND when I program it?
[12:13:08] <kdehl> Oh. No. I use the RESET on the programmer to connect to the RESET on the controller. D'uh.
[12:14:34] <Malinuss> kdehl, no. reset to reset
[12:17:24] <solexious> is there a quick way with gcc avr/avrdude to check how much program space my code will take up without pregramming a chip?
[12:18:54] <kdehl> Okay, it's fryin' time!
[12:19:31] <kdehl> Haha! It's working!
[12:19:50] <kdehl> Device signature = 0x1e9705, safemode: Fuses OK
[12:19:56] <kdehl> Seems a-ight, right?
[12:21:32] <kdehl> Now, I want to blink.
[12:46:43] <[z_z]> solexious, you can analise the code you compiled. if you have a hex file you can simple read it.
[12:47:23] <[z_z]> avr-objdump
[12:55:02] <solexious> [z_z]: thanks
[12:55:33] <[z_z]> solexious, my bad. more usefull is avr-size
[12:56:37] <kdehl> Okay, a new newbie question. I can't compile stuff. I do #include <avr/io.h> and compile with 'avr-gcc -mmcu=avr51 blink.c', but I still get #warning "device type not defined" and ‘DDRA’ undeclared
[12:57:37] <kdehl> I use a Atmega1284P, which if I understand it correctly is what (amongst others) avr51 is for.
[12:57:40] <kdehl> *an
[13:00:22] <kdehl> Never mind, you use atmega1284p instead of avr51!
[13:13:26] <kdehl> avrdude: safemode: lfuse changed! Was 62, and is now 0
[13:13:28] <kdehl> What's that?
[13:16:03] <creep> Malinuss<< sugar is a preservative too above 10 m/m %
[13:25:58] <Malinuss> creep, yeah that could be the case in the bread. neverless - that video showed nothing ;P
[13:26:47] <creep> Malinuss<< see ya like in 50 years
[13:27:33] <Malinuss> eh?
[13:27:54] <creep> you don't think long term
[13:34:18] <Malinuss> lol
[13:35:28] <Malinuss> typical, people read some article in some gossip papers and think they are experts on what is healthy and not
[13:35:54] <Malinuss> detox and whatnot
[13:35:59] <creep> typical people will not give a shit about what he is eating
[13:36:37] <creep> it will not kill you (instantly)
[13:38:55] <Malinuss> I consider myself pretty healthy, and I use a big amount of time on my food (counting calries - especially when changing from bulking to loosing weight, also trying to get all the right micros and fibres)...
[13:39:42] <[z_z]> kdehl, dont go around randomly changing your fuses... read the datasheet to see what it means.
[13:40:10] <creep> Malinuss<< how much do you count for the hamburgers ?
[13:40:12] <kdehl> [z_z]: Will do.
[13:41:23] <[z_z]> read the fuses out one more time, to make sure they really are 0... and not some glitch or something
[13:43:44] <Malinuss> creep, eh? iirc the are like 300kcal, don't bother looking it up, can't really see how it matters? Waht does it have to do how long I will live? Okay pleas do tell me what would be considered unhealthy in the macdonalds burger?
[13:44:43] <creep> Malinuss<< hmm, i was thinking the same question, but reversed, what could be considered healthy in the mcdonald hamburger ? even mold does not want it
[13:46:11] <creep> btw i saw another video with the burger something growing on it, i'm sure it is fake
[13:47:19] <Malinuss> okay sorry, I don't come to #avr to teach people about the basic of nutrition and physiology , just buy a book or attent some classes in your nearest uni....
[13:47:53] <Malinuss> sorry didn't mean to make it sound that dick-ish
[13:48:04] <creep> i don't care anyway eat whatever
[13:49:04] <creep> just answering questions sometimes
[13:50:15] <kdehl> [z_z]: Seems like everything is wrong, when trying to verify the data. I first do: 'avr-gcc -mmcu=atmega1284p blink.c -o blink', then 'avr-objcopy -O ihex -R .eeprom blink blink.hex', then 'avrdude -c stk500 -p ATMEGA1284P -P /dev/ttyACM0 -U flash:w:blink.hex'. I'm a little uncertain about the second command, though...
[13:50:53] <creep> avr is definitely not a what are healthy stuff to eat channel
[13:51:38] <[z_z]> kdehl, that -R .eeprom.... what do you need it for?
[13:51:42] <[z_z]> what chip you got?
[13:52:38] <kdehl> It's an Atmega1284p
[13:52:58] <kdehl> I get verification error, first mismatch at byte 0x0000, 0x0c != 0x00 every time I run it.
[13:53:06] <kdehl> Even when I removed the -R .eeprom
[13:54:48] <kdehl> I dunno, but it seems to me that all that is read is 0x00, both from flash and the fuses (whatever that is...).
[13:54:59] <[z_z]> ah -R removes a section by name...
[13:56:46] <[z_z]> kdehl, can you read fuses?
[13:57:14] <kdehl> Good question...
[13:57:34] <[z_z]> use avrdude and read out the fuses
[13:57:48] <kdehl> -U fuse:r:output.txt ?
[14:00:12] <kdehl> Ah.
[14:00:14] <kdehl> Yes.
[14:00:19] <kdehl> :01000000FF00
[14:00:20] <kdehl> :00000001FF
[14:00:43] <kdehl> Is what I got from -U efuse:r:output.txt:i
[14:00:50] <kdehl> Is that... good?
[14:00:51] <kdehl> ;)
[14:01:23] <kdehl> Hm. I get a lot of "Command timed out" too...
[14:03:47] <kdehl> I get
[14:03:48] <kdehl> avrdude: safemode: lfuse changed! Was 62, and is now 0
[14:03:48] <kdehl> Would you like this fuse to be changed back? [y/n] y
[14:04:01] <kdehl> And when I press enter, it seems to lock.
[14:04:10] <kdehl> The programmer's LED is turned off.
[14:04:15] <kdehl> Weird.
[14:06:14] <kdehl> Oh. It does indeed take quite some time to read the entire flash memory. Maybe it isn't locked, after all.
[14:06:42] <kdehl> I did -U flash:r:output.txt:i and on after 90 seconds it's only on 25 %.
[14:13:37] <kdehl> When it's done it seems that output.txt is the same as blink.hex, which was the one I used to program with to begin with.
[14:34:55] <tjtr33> How can i reduce this oneshot pulse width ? It works but is too large, http://pastebin.ca/2328841
[14:35:46] <OndraSter_> 95 lines
[14:35:50] <OndraSter_> which one is the pulse on?
[14:36:00] <OndraSter_> also, where are the manners? What about say hi first? :P
[14:36:15] <OndraSter_> ignore my grammar, I am too tired :)
[14:36:15] <tjtr33> sorry, hello,
[14:36:18] <OndraSter_> :D
[14:37:05] <OndraSter_> abcmu was here!
[14:37:08] <OndraSter_> I wanted to talk to him :(
[14:37:09] <[z_z]> whats your clock frequency?
[14:37:42] <tjtr33> 16Mhz 'F_CPU = 16000000' and line 36 sets the output pin high
[14:37:59] <tjtr33> 38
[14:38:22] <megal0maniac_afk> OndraSter_: He's been on quite a bit lately
[14:38:30] <OndraSter_> I know
[14:39:13] <creep> tjtr33<< 404
[14:39:17] <megal0maniac> He'll be back
[14:39:21] <creep> try pastebin.com
[14:39:37] <tjtr33> will do
[14:39:48] <megal0maniac> creep: works here
[14:40:11] <creep> ok then .ca got me shitlisted
[14:40:32] <creep> selective sharing
[14:40:56] <tjtr33> creep, hello, here it is http://pastebin.com/RexbyRZt
[14:43:43] <OndraSter_> creep, it works here too btw
[14:45:01] <creep> tjtr33<< what is the problem?
[14:45:17] <tjtr33> the pulse width is too wide
[14:45:19] <creep> tjtr33<< you know that a button will bounce right?
[14:45:30] <creep> that means it will press many times
[14:46:00] <tjtr33> i put in debounce code and its extreemley reliable and repeatable
[14:46:12] <tjtr33> no latency on scope
[14:46:39] <tjtr33> TDS320 DSO
[14:46:58] <creep> the times at the beginning look all right to me, so it waits more than expected?
[14:48:20] <tjtr33> the time should be 1/16000000 * Prescale * OCRA0 = some nuber of 62.5nS wide, i get extra 29 counts
[14:48:44] <tjtr33> i'm trying to find out where the 29 clock cycles went
[14:48:56] <[z_z]> are you sure the startOnShot() func doesn't get called twice?
[14:50:21] <tjtr33> the debounce seems solid, but no, i'm not sure its not called twice
[14:50:33] <[z_z]> make your main loop toglle led; delay; start onshot; toggle; delay; scope out the two leds.
[14:50:48] <[z_z]> remove the thing your not sure about.
[14:51:48] <tjtr33> ah, ok, done that before, will do it again, thx
[14:51:58] <creep> tjtr33<< did you read the ASM too?
[14:52:26] <tjtr33> ? the link from a cpl days ago?
[14:52:39] <tjtr33> i used some things from it
[14:54:34] <tjtr33> its interesting that after OCRA0 = 0x07 , each increment is exaclty 1 clock cycle of 62,5nS
[14:55:02] <tjtr33> after that it's width increases correctly
[14:55:46] <tjtr33> i'll try z_z's suggestion, simultaneous or substituting outputs
[14:56:22] <tjtr33> thx, & sorry if i missed something in the docs
[15:00:21] <[z_z]> If the pulse length is what you expected it would indicate you are using the timer correctly. After that work on the debouncer only. Have the micro tell you how many presses it registers. then press the button once and see if you get only one hit.
[15:28:19] <[z_z]> oh. tjtr33. since you are not using the timer to directly act on the OCM pins... its not guaranteed that the pins will change state at the exact time you want. there will be overhead between setting the pin high, starting the timer, catching the interrupt, and setting it low again.
[15:29:03] <[z_z]> err. by OCM i mean output compare match, or whatever those pins are called.
[15:34:47] <tjtr33> z_z it seems the overhead is the arduino C stack frame being saved and restored on interrupt,
[15:35:19] <tjtr33> thats whay its so repeateble after the overhead time is exceeded at 29 or so clock cycles
[15:35:38] <[z_z]> makes sense.
[15:35:44] <tjtr33> thx, i gottalook at non-C programming, thats all, just ASM
[15:36:01] <[z_z]> what do you need this precise trigger for?
[15:38:18] <[z_z]> why not: if(button pressed){ PIN up; delay; PIN down; }
[15:39:09] <tjtr33> its a programmable timer for the spark pulse in an EDM machine , duration 200nS to 4000uSm precision varies with prescale, triggered by external circuit the senses Voltage drop across spark gap.
[15:39:30] <tjtr33> so programmabilty makes the hard loop idea ... unappealing
[15:40:21] <[z_z]> counter = delay factor; while(counter--); ... is pretty predictable.
[15:40:32] <tjtr33> the btn will become the external trigger circuiit
[15:40:51] <creep> do you use this? http://cdk4avr.sourceforge.net/
[15:41:55] <tjtr33> maybe thx! an real asm for avr
[15:43:25] <creep> C can do inline asm too btw
[15:48:58] <tjtr33> creep, thx, i'm reading http://www.nongnu.org/avr-libc/user-manual/inline_asm.html now
[15:50:13] <creep> yeah that is the best thing to read about it
[16:07:43] <Tom_itx> http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html#s5
[16:11:45] <tjtr33> Tom_itx, thx , much nicer than http://www.nongnu.org/avr-libc/user-manual/inline_asm.html
[16:15:29] <Roklobsta> Hallo. Anyone used Contiki or Atmel's Zigbee stack?
[17:13:01] <moushira> hello, any ideas why would avrdude find an unexpected signature for ATTINY84, even though the chip is ATTINY84! Could this be a fuse definition error?
[17:14:00] <Toneloc> is chip from ebay by any chance?
[17:14:08] <moushira> nope from Farnell.
[17:14:16] <Toneloc> oh, that rules that out then
[17:14:28] <moushira> Which doesn't provide a better service than ebay..but anyway. Yes?
[17:14:56] <Toneloc> I dunno, I only bought a programmer for atmel today
[17:15:19] <Toneloc> I only ever programmed an atmel with a homemade programmer to do a blinking led
[17:15:37] <Toneloc> so, sorry not familiar with atmel devices
[17:16:32] <moushira> ok, maybe someone else is. Thanks <and who buys chips from ebay?>
[17:20:40] <moushira> done. Just add -F to makefile to override the check! Thanks Toneloc anyway.
[17:24:57] <Toneloc> hey, glad you got it sorted.
[17:30:19] <vsync_> watch out that bootleg chip's gonna fry!
[17:31:49] <moushira> @vsync, why?
[17:32:11] <Toneloc> vsync_lol
[17:51:00] <moushira> am using ardiuno as ISP, and didnt add -b to define baud in makerfile. . . as a result it is detecting the atmega of the arduino first. /me is smart
[19:23:47] <rue_house> #define IsHigh(BIT,BYTE) ((BYTE & (1<<BIT)) != 0)
[19:23:47] <rue_house> #define IsLow(BIT,BYTE) ((BYTE & (1<<BIT)) == 0)
[19:23:48] <rue_house> #define SetBit(BIT,BYTE) BYTE |= (1<<BIT)
[19:23:48] <rue_house> #define ClearBit(BIT,BYTE) BYTE &= ~(1<<BIT)
[19:29:52] <Fleck> cool, cool rue_house :D
[19:30:54] <rue_house> I'm going to make a point of re-posting them every so often
[19:31:21] <Fleck> :)
[19:31:38] <Fleck> make cmd - !bm as bit manipulation :D
[19:31:44] <Tom_itx> even in the wrong channel
[19:32:30] <Fleck> Tom_itx: everyone must know! :D
[19:33:35] <inflex> noooo... rue_house, you're recreating Audrino ;)
[19:33:54] <rue_house> no
[19:34:32] <Valen> rue_house: why not just use the avr035 app note or whatever it is
[19:34:42] <rue_house> ?
[19:35:09] <rue_house> about every 4 months someone asks for those macros
[19:35:15] <Valen> avr035.h
[19:35:17] <rue_house> my pasting it was preventitive
[19:35:44] <Valen> AVR035: Efficient C Coding for AVR
[19:36:14] <Tom_itx> or give the link to the reference CD
[19:36:21] <rue_house> https://code.google.com/p/avr-uip/source/browse/trunk/libs/misc/AVR035.h
[19:36:23] <Tom_itx> has all the data sheets, app notes etc
[19:36:30] <rue_house> I dont see how thats more of less efficient
[19:36:49] <rue_house> those 4 macros are what people most ask for
[19:37:26] <rue_house> checkbit and getbit are the same, bad to have more than one name for hte same thing
[19:40:09] <Valen> anyway, any suggestions for a cheap rapid turn pcb fab?
[19:40:36] <Valen> i was looking at itead and seeed but i'm a little concerned about how long it'll take to get the boards even with express shipping
[19:43:31] <Tom_itx> you either get fast or cheap
[19:43:38] <Tom_itx> but not both
[19:43:43] <Valen> but i want both
[19:43:54] <Tom_itx> DIY
[19:43:58] <Valen> fast and not so cheap would also perhaps be ok
[19:44:07] <Tom_itx> what board?
[19:44:11] <Valen> got tracks running under 805's so i'm a little concerned
[19:44:52] <inflex> ? 0805 with proper pads should be able to have 2 012 tracks under them easy
[19:45:13] <inflex> Valen: I use iTeadstudio, pretty good turn around, and you can opt for EMS freight
[19:45:47] <Valen> inflex: DIYing them is the issue with that scale
[19:46:17] <inflex> oh, if you're etching your own, yes
[19:46:27] <Valen> if i do the rapid frieght what sort of turn do you think i'd get?
[19:46:54] <inflex> http://imall.iteadstudio.com/open-pcb/pcb-prototyping/im120418001.html
[19:47:08] <inflex> 5 days for the production, 5 days for shipping usually
[19:47:26] <inflex> hard to argue with a $29 total price for that option (if you go EMS)
[19:47:43] <Valen> even ups would be ok
[19:47:45] <Valen> only $40
[19:51:54] <Valen> dang edited the file in a new kicad, now i need to update it here before i can use it again lol
[20:09:44] <Valen> http://imagebin.org/249240 is the PCB btw
[20:09:59] <Valen> note the size of the micro usb connector ;->
[20:10:15] <Valen> its about 20mmx20mm, the 5x5cm itead will get us 40 boards ;->
[22:17:28] <Grievre> I'm going to feel very silly: Do atmega328ps ship with fuses set to use internal or external osc?
[22:19:20] <Tom_itx> internal
[22:19:22] <Tom_itx> at 1 Mhz
[22:21:03] * Grievre facepalm
[22:21:07] <Grievre> of course
[22:21:49] <Valen> light flashing a bit slow?
[22:22:11] <Grievre> nah, hard to read a 250000 baud serial line with only a 1 MHz clock
[22:22:27] <Tom_itx> change the ckdiv8 fuse
[22:22:29] <Valen> pshaw
[22:22:31] <Tom_itx> for 8Mhz operation
[22:22:37] <Valen> you need more efficent code ;-P
[22:24:05] <inflex> turbo-boost it!
[22:24:16] <creep> :)
[22:24:19] <creep> 6.5V !
[22:24:36] <creep> heatsink, 30MHz
[22:25:01] <creep> will outperform a 80386
[22:25:53] <creep> (386 is 32 bit)
[22:27:08] <Valen> i mean geez 1mhz is like 4 instructions per bit, you wastefull so and so
[22:27:27] <Valen> in my day we had to lick the micro controllers with our tounges to program them
[22:27:31] <Valen> and they were through hole
[22:27:36] <Valen> and we LIKED IT
[22:27:55] <Grievre> Okay that's weird
[22:28:10] <Grievre> when a break condition happens on the serial line, I get a frame error on the first byte AFTER the break
[22:28:18] <Grievre> but not the "byte" that's received from the break itself
[22:31:25] <Grievre> oh durrr I was reading the byte before checking for the frame error
[22:31:25] <Grievre> derp
[22:33:06] <creep> hahaha this is close to wire bonding http://hackaday.com/2012/11/13/hand-soldering-bga-parts-should-be-a-circus-act/
[22:45:44] <inflex> ha, and that's only a 3x3. You should look at the videos by Wites Om Telsa on Youtube who does his own hand-reballing without a stencil!
[22:46:10] <creep> "reballing"?
[22:46:15] <creep> without balls i assume.
[22:46:21] <inflex> I'll get the link
[22:46:45] <creep> not important
[22:46:51] <creep> it is possible... but not easy
[22:47:19] <inflex> ja, uses the soldering iron directly
[22:47:22] <inflex> no premade balls
[22:47:59] <creep> i don't do rework usually i don't even have flux
[22:48:15] <inflex> http://www.youtube.com/watch?v=MU1gU0LcCIg <=- from 3:40.
[22:48:48] <creep> and bga can not be reworked without excessive amounts of flux