#avr | Logs for 2014-12-10

Back
[00:08:01] <Romzetron> sudo rm -rf /
[00:12:51] <Casper> permission denied
[05:15:09] <edmont> is it possible to drive a LED without a resistor making use of DPDS0 register?
[05:20:43] <malinus> what is a DPDS0 register?
[05:21:55] <malinus> I always though current was the only thing that could drive an LED :P
[05:22:05] <malinus> t
[05:23:18] <malinus> being serious - I'm pretty sure there is no "DPDS0" register, at least not in the mega/tiny 8-bit avrs
[05:27:42] <malinus> damn, he already quit
[05:27:45] <malinus> haha
[08:29:49] <eefanatic> What are the chances of a simple board, with an Atmega that reads a simple probe (alread FCC certified) through UART. failing FCC?
[08:31:36] <eefanatic> I know this is a broad question, but what I am trying to say is, I am not building a massive motherboard, or very complex equipment. Just simple electronics. How strict is the FCC, if the board makes a little noise will they disapprove?
[09:00:57] <Shavik|Work> Stupid noob question. Detecting a contact closures from a 1/4" jack. Looking at another schematic. I understand the listed TVS diodes protect agaisnt ESD. What exactly are the 10 ohm resistors's purpose? Just current limiting? Well if one is just looking for the line to be pulled to GND why would you need to limit the current? https://www.dropbox.com/s/c3v78c49uyc44q6/Screenshot%202014-12-10%2008.38.39111.png?dl=0
[09:01:41] <LeoNerd> Probably just helps in case of a short somewhere unexpected
[09:01:45] <LeoNerd> Though, 10ohm is a little small for that
[09:02:03] <LeoNerd> I usually put a set of 220Rs onto external "digital IO" connectors
[09:02:32] <Shavik|Work> to limit to around 22mA?
[09:02:33] <Shavik|Work> for 5
[09:02:38] <Shavik|Work> for 5v*
[09:02:42] <LeoNerd> It rarely interferes with digital signals, but a short at 5V means a 20mA..
[09:02:43] <LeoNerd> yah
[09:02:56] <Shavik|Work> Smart
[09:02:59] <Shavik|Work> Thanks
[09:04:19] <Shavik|Work> Also, "rarely" is that just with higher speed signals?
[09:05:35] <LeoNerd> High enough speed, and the resistance works alongside the native capacitance of the board/wiring/etc.. as an RC filter, smoothing out the fast transition shapes
[09:21:20] <Shavik|Work> Polarity doesn't matter on bidirectional TVS diodes right?
[09:41:17] <hamiiid> hi, how can i make precise 1ms time with 11.0592MHz crystal in the Atmega32a?
[09:41:34] <jacekowski> how precise?
[09:42:04] <LeoNerd> You can easily make something that averages out to 1000 ticks/second. You just do it by occasionally altering the exact delay of each
[09:42:46] <LeoNerd> You want them to average 11059.2 ticks each. So that's a cycle of five things; four at 11059 and every fifth is an extra tick of 11060
[09:43:24] <jacekowski> ehhh, timer and timer capture interrupts
[09:43:34] <jacekowski> use them
[09:44:10] <LeoNerd> Indeed. Use the 16bit timer at a delay of one of those counts; keep track of the per-five-cycle count and adjust the count for the next one.
[09:45:45] <hamiiid> OK thanks jacekowski
[09:55:07] <edmont> hi
[09:55:46] <edmont> i found my avr micro has a pullup internal resistor in the RSTN pin
[09:55:57] <edmont> why would i use an external one then?
[10:06:07] <LeoNerd> Probably just covering the bases? Most chips don't have those I think
[10:06:18] <LeoNerd> Generally good practice to put pull(up/down)s on switches
[10:51:54] <apo_> Internal pullup + normally-closed switches = :D
[10:52:16] <LeoNerd> Eww
[10:52:34] <LeoNerd> NC switches for that are horrible on battery life
[10:53:41] <apo_> True
[10:53:54] <apo_> But I don't have anything that runs on batteries
[10:54:44] <LeoNerd> I've been considering that kind of thing a lot lately
[10:54:53] <LeoNerd> Lots of theatrical props. I get shot if things run out mid-show
[10:56:39] <apo_> mmh
[10:57:55] <apo_> I've been wanting to get a gold cap and a linear regulator and see how much time I can get out of 1F * 5V :D
[16:36:31] <hetii> Q: why i get: unknown type name 'voidptr' http://pastebin.com/qB4TEzxx
[16:50:10] * twnqx doesn't even get what those typedefs are supposed to do
[16:50:58] <twnqx> are you trying to declare a function that has no arguments and returns a void *?
[16:51:11] <twnqx> whatever void would be
[16:51:28] <hetii> well general it should be a pointer to some function
[16:51:48] <twnqx> that doesn't work, you have to have the full prototype of the function in there
[16:52:08] <hetii> well it works if I have it in the same file
[16:52:18] <twnqx> what
[16:52:29] <twnqx> you can't have a "generic function pointer"
[16:52:50] <twnqx> you have to have the right number and type of arguments
[16:53:10] <twnqx> (with the exemption of vararg functions, but let's not go there)
[16:53:35] <hetii> ok, i know but the issue there is just about the place where I have this typedefs
[16:53:45] <hetii> when I uncoment line 19 all works fine
[16:54:06] <hetii> sorry I mean 16
[16:54:29] <hetii> but with the typedef uint16_t(*uint16ptr)(uint8_t); I don`t need to do the same
[16:54:36] <twnqx> void
[16:54:39] <twnqx> is not a type in C
[16:54:40] <hetii> thats its odd for me
[16:54:56] <twnqx> so probably you include something somewhere before spi.h but not before utils.h
[16:55:00] <twnqx> that defines void to be something
[16:55:23] <twnqx> well ok, void is declared, my bad
[16:55:49] <twnqx> let me get back to what that is supposed to do
[16:56:00] <twnqx> would want to declare a type named voidptr
[16:56:10] <twnqx> that is a pointer to a function, right?
[16:56:32] <hetii> yes to a function that like void foo(void);
[16:57:51] <twnqx> can you paste the full compiler error
[16:57:58] <twnqx> and the .c that produces it?
[16:58:19] <hetii> ok just a second cause have a bit mess :)
[17:19:10] <hetii> heh I really do a mess...
[17:19:19] <hetii> must create again my project :/
[18:10:25] <hetii> twnqx: ok I rebuild my project and now is all fine, seams that other issue affect somehow in this part with typedefs
[18:10:51] <hetii> or general I do something stupid :/
[18:11:02] <hetii> *did
[18:13:27] <twnqx> good good
[18:13:39] <twnqx> the name for the typedef is... bad btw :P
[18:15:49] <hetii> ?
[18:23:05] <_methods> thx in adv but i'm having a problem with avrdude, i can upload a sketch from the arduino ide just fine but if i try and push a .hex file to the board from avrdude commandline i get the out of sync 0x00 error
[18:24:21] <_methods> http://pastebin.com/HEDx5m7k
[18:24:37] <_methods> that's the command line i'm using
[18:24:39] <specing> crap pastebin
[18:24:57] <_methods> i can just paste it in here if it's cool
[18:25:13] <specing> sub 5 lines is cool with me
[18:25:18] <_methods> kk
[18:25:27] <_methods> avrdude -F -v -p atmega2560 -c arduino -P /dev/ttyACM0 -b115200 -D -Uflash:w:/tmp/build5607287152043695392.tmp/Fade.cpp.hex -C /etc/avrdude.conf
[18:26:52] <_methods> system is ubuntu 14.04 and i'm must plugged into the mega2560 usb port
[18:26:58] <_methods> s/must/just
[18:57:20] <_methods> ack
[18:57:22] <_methods> i got it
[18:58:20] <_methods> the mega needs to use wiring for the upload protocol
[18:58:22] <_methods> doh!
[20:49:47] <apo_> http://p.0au.de/b55adff0/2014-12-11-032546_1388x750_scrot.png it's working :o