#avr | Logs for 2012-11-24

Back
[01:45:50] * megal0maniac smacks megal0maniac_afk
[07:55:32] * tld slaps megal0maniac.
[07:55:47] <tld> don't slap megal0maniac_afk, he's afk (unconcious), and can't defend himself!
[09:59:39] <Malinuss> so this is about the most powerfull avr microcontroller, right? http://www.atmel.com/devices/ATUC256L3U.aspx
[10:17:10] <Steffanx> Perhaps, but they call it an AVR, but is the question if that's not just a name for a totally different uc (compared to the 8bit AVR)
[10:18:32] <Steffanx> -but
[10:20:21] <Horologium> that is closer to an ARM than an AVR really...although it is called an AVR, it is in the 32bit AVR line which is totally different from the attiny/atmega/atxmega/at90s lines
[10:24:03] <Malinuss> so I wouldn't be abel to use a normal programmer and use normal avr-c code?
[10:24:43] <Steffanx> No
[10:25:06] <Steffanx> whatever normal avr-c code is :)
[10:25:34] <Horologium> there is gcc for the avr32
[10:25:41] <Horologium> but, no, you can't use avr-gcc for it...
[10:25:47] <Horologium> it is a whole other world from 8-bit avr
[10:27:15] <Tom_itx> those likely use jtag to program
[10:27:42] <Horologium> or boot off of an SD chip, depending on how it is configured.
[11:00:54] <Malinuss> oh god :(
[11:01:12] <Malinuss> I don't like the sound of that
[11:02:01] <Horologium> then turn off your hearing aids.
[11:03:35] <yunta> Malinuss: was that you asking about radio transmission with 2 transistors couple days ago?
[11:55:42] <Malinuss> yunta, haha I think I had questions about AM-transmitting almost every day :)
[12:02:05] <Malinuss> yunta, why?
[12:30:55] <Dan-K2VOL> hey all
[12:34:47] <inkjetunito> Tom_itx: the package arrived today. well done :)
[12:37:10] <Tom_itx> that was fairly quick for your area
[12:41:30] <inkjetunito> Tom_itx: indeed. it often takes longer than that to get stuff from other european country
[13:58:14] <andresjk> hi there
[13:58:48] <andresjk> is anyone awake?
[14:07:27] <yunta> Malinuss: I remember some schema you may have pasted some time ago. Try removing transistor 2, just short it. Or safer - replace it with resistor. And then check if still nothing changed.
[14:07:30] <yunta> andresjk: yes
[14:08:31] <andresjk> great!
[14:08:37] <andresjk> I have a question...
[14:09:16] <andresjk> I am developing an application for the ATmega8 in which I'm using floating point operations
[14:09:29] <andresjk> I wanted to debug the operations
[14:09:34] <andresjk> by using the UART
[14:09:52] <andresjk> I have developed a function to print integers
[14:10:17] <andresjk> but I don't a clue of how to print a floating point number
[14:10:38] <andresjk> I was looking to use printf as standard C
[14:11:05] <yunta> yes, you can use printf
[14:11:25] <yunta> http://www.nongnu.org/avr-libc/user-manual/group__avr__stdio.html
[14:13:06] <andresjk> but how do I configure it? Is with static FILE mystdout = FDEV_SETUP_STREAM(usart_putchar_printf, NULL, _FDEV_SETUP_WRITE);
[14:13:24] <andresjk> yunta, Im following is example : http://efundies.com/avr/avr_printf.htm
[14:13:45] <andresjk> but the compiler cannot compile it
[14:15:04] <yunta> I'm not going to read that example, because I'm too lazy. But, first 2 arguments for FDEV_SETUP_STREAM have to be function pointers.
[14:15:24] <yunta> first arg is a pointer to your function that puts single character to usart
[14:15:40] <yunta> second arg is a pointer to your functions that gets single character from usart
[14:15:53] <yunta> it's up to you to implement those single-character functions
[14:15:53] <andresjk> Yes, I have already setup that function
[14:16:06] <yunta> and it doesn't work?
[14:16:22] <andresjk> the function itself does work
[14:16:35] <Xark> Or screw that, just use sprintf and print it yourself. :)
[14:17:06] <yunta> andresjk: are you using fprintf or just pritnf?
[14:17:12] * Xark notes last time he "hooked up" avr-libc stdio the documentation wasn't quite accurate...
[14:17:14] <yunta> s/pritnf/printf/
[14:17:17] <andresjk> just printf
[14:17:34] <yunta> did you also set stdout to your mystdout?
[14:18:04] <andresjk> yes I did
[14:18:12] <andresjk> like this
[14:18:12] <andresjk> stdout = &mystdout;
[14:18:30] <yunta> sounds good
[14:18:44] <yunta> does it print other things than floats?
[14:18:53] <andresjk> I think it could be the compiler setup
[14:18:59] <andresjk> No, I can not compile it
[14:19:06] <yunta> ah, what's the error then?
[14:19:48] <andresjk> Error 11 expected '{' at end of input C:\Users\Andres\Documents\Atmel Studio\printf_test\printf\printf\printf.c 180 1 printf Error 3 expected '=', ',', ';', 'asm' or '__attribute__' before '{' token C:\Users\Andres\Documents\Atmel Studio\printf_test\printf\printf\printf.c 56 1 printf Error 4 expected '=', ',', ';', 'asm' or '__attribute__' before '{' token C:\Users\Andres\Documents\Atmel Studio\printf_test\printf\printf\printf.c 107 1
[14:20:20] <yunta> windows? uh...
[14:21:04] <andresjk> haha, I use Linux too
[14:21:26] <andresjk> yunta, do you use AS6?
[14:21:29] <yunta> no
[14:21:34] <yunta> I don't touch windows
[14:22:13] <yunta> can you post your printf.c to some pastebin ?
[14:23:18] <Xark> andresjk: Here is a snippet from some code I wrote to print to a TV console with Printf (not caps). However, it shows how to hook AVR to add your "output char" function. I had to hack around a bit, because as I mentioned the doc is apparently out of date -> http://pastebin.com/vYmnNg1P
[14:23:27] <Xark> *note caps
[14:25:58] <andresjk> well the code I was trying out was the one of the example I mention. I have uploaded here http://pastebin.ca/2254973
[14:26:07] <yunta> and here is mine: http://pastebin.com/09kA9YPK
[14:27:00] <Xark> andresjk: Yes, AFAICT "FDEV_SETUP_STREAM" is broken (and this is why I had to "hack up" my own version that compiled).
[14:27:13] <andresjk> Thanks I'm to chek it out
[14:27:22] <andresjk> Xark yes, I have noties that
[14:27:28] <andresjk> thanks
[14:27:51] <yunta> andresjk: line 30
[14:28:12] <yunta> did you mean to declare or define that function (it's neither at the moment) ?
[14:31:13] <yunta> andresjk: it's not going to compile until you fix line 30....
[14:38:22] <Xark> andresjk: Do try adding the missing semicolon. You may not need the hack I had to use (depending on avr toolchain version).
[14:39:50] <andresjk> Xark, yunta you were right. How do I miss that
[14:39:55] <andresjk> It works
[14:39:58] <andresjk> in Proteus
[14:40:10] <andresjk> I have to solve a frequency issue
[14:40:15] <andresjk> now
[14:40:26] <andresjk> but atleast It does print
[14:40:31] <andresjk> thanks a lot guys
[14:41:08] * Xark tips his hat to yunta who spotted that. :)
[14:51:43] <yunta> Xark: haha, thanks to our wonderful C parsers (most of them), "at the end of input" or "{" in error message means -> ignore line number, search for unclosed shit
[14:53:25] <Xark> Yep. :)
[15:11:22] <andresjk> finally I could print a floating point number
[15:11:43] <andresjk> I could see the result in the UART terminal in proteus
[15:12:06] <andresjk> I notices that I print only the first 6 decimal numbers
[15:14:02] <slidercrank> andresjk, did you use wsprintf()?
[17:59:39] <froggyman> hmm... PORTC on my atmega32 seems to be dead
[17:59:48] <froggyman> well for bits 2-7 at least
[18:00:20] <froggyman> 0 and 1 work as expected. 2-7 lightly dim my LEDs
[18:00:42] <froggyman> everything works as expected on PORTD
[18:01:28] <Tom_itx> is spi on that port?
[18:01:31] <Tom_itx> is it enabled?
[18:02:46] <Tom_itx> err i mean JTAG
[18:03:35] <Tom_itx> jtag is on pc1..5
[18:06:17] <froggyman> well I didn't enable
[18:06:52] <froggyman> it
[18:06:57] <Tom_itx> it may be enabled by default, i can't recall
[18:07:29] <Tom_itx> looks like it is
[18:07:38] <Tom_itx> http://www.engbedded.com/fusecalc/
[18:10:17] <froggyman> ah,
[18:10:21] <froggyman> so how do I disable it?
[18:10:41] <Tom_itx> change the fuse bit with avrdude or studio
[18:10:50] <Tom_itx> have you changed any fuses?
[18:11:11] <froggyman> Tom_itx: not yet
[18:11:48] <Tom_itx> the defaults are LF:0xE1 HF0x99 so you want to change HF to HF:0xD9
[18:12:17] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/how_to/atmega168/using_avrdude_index.php
[18:12:26] <Tom_itx> follow the cmd line there for it
[18:12:46] <Tom_itx> read your current fuses first and write them down
[18:13:06] <Tom_itx> To read the current device lfuse and hfuse to the console:
[18:13:06] <Tom_itx> avrdude -c usbtiny -p m168 -U lfuse:r:con:r -U hfuse:r:con:r
[18:13:23] <Tom_itx> change it to suit your programmer etc
[18:13:40] <Tom_itx> To write the desired fuse settings to hfuse:
[18:13:40] <Tom_itx> avrdude -c usbtiny -p m168 -U hfuse:w:0xDF:m -u
[18:13:48] <Tom_itx> same applies
[18:14:06] <Tom_itx> just change the hex value there
[18:14:11] <froggyman> alright, I think I can handle that. thanks!
[18:23:46] <OndraSter_> I suggest disabling JTAG not through fuses
[18:23:50] <OndraSter_> but through MCUCR.
[18:24:19] <froggyman> OndraSter_: oh? Is that done via a line of code?
[18:24:24] <OndraSter_> two
[18:24:26] <Tom_itx> possibly
[18:24:31] <OndraSter_> you need to write the data there twice in 4 cycles :)
[18:24:33] <Tom_itx> can you do that on the mega32?
[18:24:35] <Tom_itx> i wasn't sure
[18:24:37] <OndraSter_> yes
[18:24:38] <OndraSter_> I did that
[18:24:54] <Tom_itx> you need to write it twice within 4 cycles though!
[18:25:04] <Tom_itx> as he just said :)
[18:25:55] <froggyman> so everytime I want to write something to PORTC it would need to be written twice within 4 cycles?
[18:26:06] <froggyman> That seems a bit more complicated
[18:26:15] <Tom_itx> not really
[18:26:18] <Tom_itx> no
[18:26:22] <Tom_itx> once at the beginning
[18:26:49] <Tom_itx> hang on
[18:26:54] <OndraSter_> no
[18:27:05] <OndraSter_> you just write JTAGDSBL or something into MCUCR
[18:27:09] <OndraSter_> on the beginning
[18:27:24] <froggyman> oh, so its a one and done kind of deal.
[18:27:43] <froggyman> OndraSter_: what exactly would that code look like?
[18:27:52] <Tom_itx> MCUCR = (1 << JTD); // disable jtag MCUCR = (1 << JTD); // disable jtag
[18:28:09] <Tom_itx> that's for a different chip but is how you do it
[18:28:15] <Tom_itx> the reg may or may not be the same name
[18:28:45] <OndraSter_> it should be the same IIRC
[18:28:51] <OndraSter_> I have got mega32 too here around somewhere
[18:29:40] <Tom_itx> MCUCR = (1 << JTD); // disable jtag
[18:29:40] <Tom_itx> MCUCR = (1 << JTD); // disable jtag
[18:29:50] <froggyman> Tom_itx: hmm... alright. I suppose that would be covered in the data sheet somewhere?
[18:29:52] <Tom_itx> just put that at the top of your code somewhere
[18:30:04] <Tom_itx> look in the tables at the back
[18:30:09] <Tom_itx> for that register
[18:30:38] <froggyman> awesome
[18:34:37] <OndraSter_> I've been drinking, I am too tired, gn.
[18:39:36] <froggyman> haha
[18:39:41] * froggyman was just about to start drinking
[19:30:25] <eadthem> i have a project for avr
[19:30:31] <eadthem> been a while sense ive had one
[19:30:36] <eadthem> whats the best ide currently
[19:30:50] <eadthem> is it now ardino or avrstudio
[19:30:57] <eadthem> planing to use c or c++
[19:31:09] <eadthem> bit to complex for assembly
[19:36:22] <Tom_itx> depends on your pleasure
[19:36:48] <Tom_itx> arduino is limited to what their boards support
[19:36:59] <eadthem> wasnt planning on using there board
[19:37:01] <eadthem> just there software
[19:41:07] <jadew> I find IDEs to be a bit of an overkill for this stuff
[19:41:38] <jadew> a good editor is all you need
[19:41:47] <Tom_itx> all i use
[19:42:37] <eadthem> got to figure out what i did with my isp
[19:43:34] <jadew> any idea what the strobe and balance pins are meant to do on this comparator: http://www.ti.com/lit/ds/slcs007h/slcs007h.pdf
[19:43:57] <eadthem> strobe is probably like an enable pin
[19:44:05] <eadthem> latching the output according to its state
[19:44:16] <eadthem> balance is to null out the small variance between pins
[19:44:37] <jadew> ok, and it's enabled while high or low?
[19:44:46] <eadthem> check the datasheet for that
[19:44:47] <jadew> this stuff is not specified in the datasheet
[19:44:51] <jadew> yeah, it's not there
[19:44:52] <eadthem> it depends on the part and manufacture
[19:45:13] <eadthem> sometimes a diffrent manufacture migth help if they make the same part
[19:45:22] <jadew> I thought it's something standard and that's why they didn't bother mentioning it, but I guess they just suck at datasheets
[19:45:23] <eadthem> parasitic values will be diffrent
[19:45:30] <eadthem> but the logic would be the same for the same part number
[19:45:38] <jadew> true
[19:45:43] <eadthem> well is it strobe with or without a line over it
[19:46:01] <jadew> the line would only imply that it's inverted
[19:46:10] <jadew> but it wouldn't tell you the normal levels
[19:46:36] <eadthem> probably 5v
[19:46:44] <eadthem> unless vcc is less than 5v then its probably 3.3
[19:46:57] <eadthem> the datasheet shuld have absolute mins and maxes
[19:46:58] <jadew> yeah, that's not the issue
[19:47:05] <eadthem> if not then you need a diffrent part and a diffrent maker
[19:47:08] <jadew> is low == on, or high == on?
[19:47:24] <eadthem> line is active low
[19:47:37] <jadew> where does it say that?
[19:48:30] <jadew> ah, found this line "if the strobe is low, the output is in the off state, regardless of the differential input."
[19:48:44] <jadew> so I guess I need to tie it to vcc if I want it to be always on
[19:49:00] <jadew> altho, in their examples, there's no mention of the strobe pins
[20:11:06] <yunta> eadthem: emacs is quite good ide
[20:11:31] <eadthem> emacs is not a ide
[20:12:41] <yunta> no?
[20:12:42] <yunta> hm
[20:12:52] <yunta> well, it's a good editor then
[20:13:43] <eadthem> ile go with editor
[20:13:54] <eadthem> but if i was to do that i would use akelpad or vim
[20:14:37] <yunta> ok. don't know akelpad, but I've heard vim is quite good.
[20:14:48] <Tom_itx> eadthem what you gonna make?
[20:14:51] <eadthem> akelpad is a notepad repalcement
[20:15:03] <eadthem> need to finish the rfid deadbolt for the new house
[20:15:15] <eadthem> as buying a lock i consider to be good is not realy dooable
[20:15:31] <eadthem> so im gonna just cap the keyhole and put a servo on the back
[20:16:12] <eadthem> cant justify the cost of a 300$ lock when i will have to buy washer dryer refrigerator...
[20:24:42] <eadthem> mmm now i know there are RFID shealds for arduino ive seen them in radioshack where they be charging a arm and 3 legs for
[20:25:37] <eadthem> maby that was sparkfun
[20:26:37] <vectory> are you aiming for security by obscurity? its not like rfid was entirely secure :/
[20:27:26] <eadthem> no
[20:27:50] <eadthem> i was going to see what was avalable
[20:29:22] <agile_aardvark> use normal key as 1-wire bus for a code to the second, invisible from outside the house lock behind the door.
[20:30:01] <eadthem> 1 wire bus still needs 2 wires
[20:30:15] <eadthem> but thats a though using the existing key hole for that
[20:30:17] <agile_aardvark> you can use whatever you want as a gnd
[20:30:31] <eadthem> would have to mod the lock rather hevaly
[20:30:40] <eadthem> well cylinder
[20:31:09] <Tom_itx> you can't get a solonoid deadbolt?
[20:31:23] <eadthem> ?
[20:31:36] <eadthem> clynder is the key part
[20:31:55] <Tom_itx> why not get an electric deadbolt
[20:32:01] <Tom_itx> and use that
[20:32:12] <eadthem> for the bolt action?
[20:32:19] <eadthem> they cost quite a bit
[20:32:23] <eadthem> that was what i wanted to avoid
[20:32:24] <Tom_itx> then program a key pad for it
[20:34:32] <yunta> 1.25kg-force pull solenoid is about 15e
[20:35:37] <yunta> on the other hand servo is even cheaper..... but may be more difficult to mount
[20:35:51] <eadthem> https://www.sparkfun.com/products/8911
[20:35:55] <eadthem> was thinking of something like this
[20:36:05] <eadthem> of course for 1/4 the cost on ebay
[20:36:20] <Tom_itx> http://www.ebay.com/itm/Door-Lock-Assembly-Solenoid-DC-12V-1-71A-6mm-700gf-w-Mount-Board-/330819432033?pt=LH_DefaultDomain_0&hash=item4d065fee61
[20:37:08] <eadthem> wanted to use the existing deadbolt
[20:39:13] <Tom_itx> http://www.handlesets.com/lockey-e-910-electronic-keypad-single-cylinder-deadbolt-with-6-user-codes-and-led-illumination-from-the-e-digital-series/p1831252
[20:39:55] <eadthem> ya to expensive
[20:40:16] <eadthem> i can get a mechcanicaly sound deadbolt that will work fine
[20:40:31] <eadthem> just the key cylender will be lousy
[20:40:42] <eadthem> probably cost about 20 30$
[20:51:34] <Malinuss> any of you guys have any devboards?
[20:52:08] <eadthem> i usualy just use a breadboard
[20:53:18] <Malinuss> nah but I mean, other then just 8-bit micrcontrollers, like the raspi etc.
[20:53:37] <jadew> that's not a devboard
[20:54:20] <jadew> development boards are working examples around a product and you can experiment with them
[20:55:00] <jadew> so the first step would be to pick a chip, eh?
[20:55:30] <Horologium> I have some msp430 and renasys boards.
[20:55:53] <Malinuss> jadew, of course its a devboard..
[20:55:54] <Horologium> rPI is just an arm based computer with some i/o pins brought out.
[20:56:10] <Malinuss> so what, a beagleboard is not a devboard either?
[20:56:21] <jadew> exactly
[20:56:25] <Malinuss> lol
[20:56:30] <Malinuss> I don't get it then
[20:56:59] <jadew> wait
[20:57:02] <jadew> I read there breadboard
[20:57:09] <jadew> just googled that
[20:57:30] <Malinuss> wut?
[20:57:37] <Malinuss> ah
[20:57:49] <Malinuss> jadew, http://beagleboard.org/bone
[20:57:52] <jadew> I don't know what it is, looks like a devboard
[20:58:17] <Malinuss> well for me a raspi looks like a devboard too :)
[20:58:30] <jadew> raspi is a full blown pc
[20:59:00] <jadew> you don't use it to test what you could do with the chip, you use it as a pc
[20:59:39] <Malinuss> ah
[21:00:19] <jadew> the only development boards that are worth getting are those for chips that you can't solder yourself
[21:00:32] <jadew> otherwise it's better to test it with your own peripherals
[21:00:33] <Malinuss> jadew, so like the 32-bit dev boards?
[21:00:48] <jadew> so you don't rely on stuff that has been tuned for you already
[21:01:02] <Malinuss> yeah I understand that
[21:01:02] <Horologium> https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino-WIFI/ something halfway toward being a dev board...more so than the rPI and, in my opinion, much better, although twice the price.
[21:01:33] <eadthem> http://www.ebay.com/itm/12V-10RPM-Torque-Gear-Box-Motor-New-/321026016610?pt=LH_DefaultDomain_0&hash=item4abea44562
[21:01:34] <Malinuss> Horologium, yeah, that is much like the beagleboard too
[21:01:38] <Horologium> yeah.
[21:01:49] <eadthem> Tom_itx something more like that
[21:01:53] <Malinuss> I would much rather get that then a rPI
[21:01:58] <eadthem> btw tom you herd of gardner?
[21:02:28] <Malinuss> I still wouldn't have any idea about what is going on - hell I'm still not sure what is going on inside my 8-bit :)
[21:02:36] <Horologium> I have that olinuxino on my gotta-have-it list.
[21:03:03] <Horologium> taught 5 guys how to make flashy led throwies tonight.
[21:03:10] <jadew> Horologium, what do you plan to do with it?
[21:03:21] <Horologium> jadew, no clue yet...but looks like a fun toy.
[21:03:30] <Malinuss> ^that
[21:03:33] <Malinuss> hehe'
[21:03:48] <Malinuss> when I buyed my 8-bit uC I had no idea what to do with it either :)
[21:03:49] <jadew> I wanted to get a raspbery pi, but I figured that interfacing my stuff with it would be a mistake
[21:03:58] <Horologium> we used attiny45 chips, little magnets, RGB LEDs, and 3.6V lithium batteries.
[21:04:00] <jadew> since at some point I'll give up on the rPi
[21:04:10] <Horologium> jadew, that's why I like that olimex board.
[21:04:31] <Malinuss> Horologium, but even with that, you still need a full-blown OS etc.
[21:04:38] <Horologium> with some work we got these things to stick to a metal plate when tossed and not turn on till they stick.
[21:04:48] <Malinuss> it's not like you just change some register values to make things happen :)
[21:04:52] <Horologium> Malinuss, you don't NEED...if you want to write code from scratch...
[21:04:57] <Horologium> but it comes with linux.
[21:05:06] <jadew> Horologium, nice
[21:05:13] <Horologium> hell, I've written standalone apps that run on an x86..
[21:05:15] <Malinuss> Horologium, well I don't NEED a OS from my desktop either then ;P
[21:05:16] <Horologium> they boot off floppy.
[21:05:22] <jadew> you can pretend your spies now, to impress the chicks
[21:05:23] <Horologium> simple app.
[21:05:27] <Malinuss> I could write my own :)
[21:05:36] <jadew> you can just throw one of those things on a random car
[21:05:40] <Horologium> ayup.
[21:05:45] <jadew> then whisper something to your wrist watch
[21:06:33] <Horologium> ended up using 2 magnets on each one, one on each side.
[21:06:58] <jadew> how do you detect that they stuck?
[21:07:08] <Horologium> then had to come up with pressure switch....couple bits of wire separated by itty bitty bits of black tape..when the magnet would pull against the metal plate it presses the wires together.
[21:07:25] <Horologium> you could just squeeze them to make them turn on too.
[21:07:25] <jadew> ah
[21:07:26] <jadew> nice
[21:08:00] <Horologium> wrote up some simple 3 channel bitbanged pwm with a pseudo-random generator to fade in and out the 3 colors..
[21:10:41] <Horologium> using the temp sensor tied to the ADC as a source for the random number generator and a 256 byte lookup table of random numbers.
[21:11:30] <jadew> hmm, if you left it floating you would have got randomness as well
[21:11:36] <jadew> and you didn't need the lookup table
[21:11:50] <jadew> there are simple PRNG algos you can use
[21:11:52] <Horologium> used the lower 4 bits of the ADC.
[21:12:12] <Horologium> and incremented the upper 4 bits with each read of the random number.
[21:12:21] <Horologium> this was the quickest I could come up with on short notice tonight.
[21:12:43] <jadew> should have asked :)
[21:12:52] <Horologium> wasn't online really.
[21:13:02] <Horologium> was quick and simple and it worked.
[21:13:09] <Horologium> used my PC to generate the lookup table.
[21:13:25] <Horologium> made several and used different ones in different devices.
[21:13:33] <Horologium> so they are all different.
[21:14:07] <jadew> should write this down, for future projects: rand = (k * rand) % m
[21:14:12] <jadew> you need to seed rand first
[21:14:22] <jadew> K = small prime number
[21:14:27] <jadew> M = big prime number
[21:14:49] <jadew> K * M = the period and it shouldn't overflow the variable
[21:14:53] <Horologium> I was doing everything as uint_8
[21:15:22] <jadew> well, it would have still been faster even with uint16_t
[21:15:25] <Horologium> not that we didn't have plenty of processor power to spare or would have to worry about large math or something.
[21:15:33] <jadew> yeah
[21:15:37] <Horologium> running them at 1MHz
[21:15:40] <Horologium> could have clocked up to 8
[21:16:04] <Horologium> the guys are going to test them with different batteries and see how long they run.
[21:16:28] <Horologium> most we did with a single 3.6V lithium cell...cr2032 or something like that.
[21:16:47] <Horologium> one we did with a stacked pair of cheapy 1.5V watch batteries.
[21:18:46] <Horologium> Maxim 25: If the damage you do is covered by a manufacturers warranty you didn't do enough damage.
[21:18:57] <jadew> I wonder who makes the props for sci-fi movies
[21:19:11] <Horologium> depends on the movies.
[21:19:15] <jadew> they must have like... a full time electronist right?
[21:19:24] <Horologium> for the syfy channel, the 9th grade art class of the nearest highschool.
[21:19:38] <Horologium> yes, they do.
[21:19:43] <Horologium> usually more than one.
[21:19:54] <jadew> would be a cool job
[21:19:56] <Horologium> is a job I would love to get.
[21:20:07] <Horologium> except for having to be in a union...
[21:20:07] <jadew> yeah
[21:20:14] <jadew> what's a union?
[21:20:44] <Horologium> group of people who get together to negotiate their wages and time off and such..
[21:20:55] <jadew> ah, that's not a bad thing
[21:21:05] <Horologium> for what they started out, it wasn't.
[21:21:08] <jadew> it makes sure people won't sell themselves for scrap
[21:21:12] <Horologium> for what they became, it has become a bad thing.
[21:21:26] <jadew> making the job pay less for capable people
[21:21:40] <Horologium> like, a janitor who pushes a broom and refuses to pick up something off the floor because it is not in his labor union contract.
[21:21:52] <Horologium> and makes 25 dollars an hour doing so.
[21:21:52] <jadew> lol
[21:21:56] <jadew> no way
[21:21:57] <Horologium> yes, I know a guy like that.
[21:22:05] <Horologium> works in a steel manufacturing plant.
[21:22:10] <Horologium> has done so since he was 16.
[21:22:12] <jadew> is that a regular janitor sallary where you live?
[21:22:15] <Horologium> he is a janitor...
[21:22:28] <jadew> holly crap
[21:22:31] <Horologium> where I live, here, a janitor makes about 9 or 10 dollars an hour.
[21:22:38] <jadew> ah
[21:22:51] <Horologium> this guy is a union janitor at a steel manufacturing plant...his job is to sweep..
[21:22:56] <Horologium> he will not mop..not in his contract.
[21:23:08] <jadew> heh
[21:23:11] <Horologium> he will not help you pick somehthing up and move it...not in his contract.
[21:23:27] <Horologium> he is probably 55 or so now.
[21:23:50] <jadew> I'd quit my job for that job at 10/hr
[21:23:53] <Horologium> same job all his life...makes a bloody fortune doing jack shit...but long as he does it they can't fire him...
[21:24:06] <Horologium> I make 14 an hour plus bonuses for performance.
[21:24:08] <Horologium> fixing copiers.
[21:24:50] <jadew> yeah, as I said, 10/hr for that, it's great
[21:24:58] <jadew> and your mind is free to be wherever you want
[21:25:16] <jadew> as opposed to other jobs which keep you focused for the entire day
[21:25:19] <Horologium> oh well...off to bed...
[21:25:28] <jadew> night
[21:38:20] <Essobi> sup
[22:13:27] <TechIsCool> So I was told to post this when I finished my schematic. Anyone want to look it over and see if anything crazy is done. http://techiscool.com/temp/outline.pdf
[22:29:58] <Casper> TechIsCool: 2 errors already: 9 19 and 31 shall be shorted together I beleive, meaning that 2 pins are basically disconnected from VCC
[22:30:44] <Casper> TechIsCool: look up to see if you need pullup/down on your usb data lines
[22:31:42] <TechIsCool> Casper: No USB resistors since they are built in spec sheet says kind of nice.
[22:32:13] <TechIsCool> Casper: So VCC 9,19,31 should be connected together and then connected to 3.3v
[22:32:18] <TechIsCool> is what you are saying
[22:32:23] <Casper> TechIsCool: double check the datasheet for your voltage regulator to see what capacitance they suggest, some require 0.01-0.1uF ceramic and would have bad result with 10uF electrolitic
[22:33:01] <Casper> AVCC probably need to also be connected to VCC via a low pass filter
[22:34:07] <Casper> just double check the datasheet to be sure, I never worked with the xmega, but did on mega, the mega need all VCC to be tied together, AVCC to be connected to VCC via a low pass filter or directly (low pass help if you do analog sampling, if not just straight connect it)
[22:34:50] <TechIsCool> Casper: 10uf is what is speced for the 10uf Ceramic. http://www.onsemi.com/pub_link/Collateral/NCP1117-D.PDF
[22:35:52] <Casper> TechIsCool: ok, if the datasheet say that, use that :D many use electro for 10uF... I forgot you use smd, which have good ceramic one in high value
[22:36:07] <TechIsCool> No problem
[23:01:39] <TechIsCool> alright updated the vcc and since I will never be using adc I don't think I need it filtered http://techiscool.com/eagle/outlinev2.pdf