#avr | Logs for 2012-10-21

Back
[00:01:15] <ferdna> what would be a super fast IC to detect voltage?
[00:02:50] <ferdna> MIC2755?
[00:03:34] <eric_j> shodan45, it does definitely need a crystal/clock if the fuse has been set to use an external crystal or clock
[00:08:35] <shodan45> eric_j: afaik, the flash is blank, I've never used this one
[00:09:29] <shodan45> eric_j: oh and that's still the case when programming it?
[00:20:55] <shodan45> aaaaand wtf moment of my day: my supposedly blank 328p has an arduino blink program on it
[00:54:18] <shodan45> eric_j: thank you. I owe you a beer. All this time my blank, "fresh from the factory" 328p was already programmed & had fuses set.
[01:13:10] <eric_j> shodan45, glad to hear you're up and running
[01:24:16] <Richard_Cavell> shodan45: bonus from the factory?
[01:24:29] <Richard_Cavell> no you're down to only 9,999 writes of your flash
[02:28:46] <megal0maniac> Richard_Cavell: For future reference, an AVR DOES need a clock for ISP programming. If the fuses are set to use external xtal, then you'll need an external xtal for programming. This is why Tom's programmer has a recovery clock output.
[02:29:01] <megal0maniac> HVPP and (I think) JTAG provide their own clock sources
[02:30:43] <megal0maniac> Factory default for most megas is 8mhz internal RC oscillator with CKDIV8, meaning resultant clock of 1mhz
[02:38:46] <Richard_Cavell> So what then is SCK on the ISP header?
[02:38:51] <Hugglesworth> hey, trying my new attiny12 and I'm getting "initialization failed, rc=-1" and "Expected signature for ATtiny12 is 1E 90 05" (attiny12 /is/ 1e 90 05 in the configs oddly enough) with `avrdude -P /dev/ttyACM0 -c stk500v2 -p t12 -v -F`
[02:39:02] <Hugglesworth> everything looks to be wired right to the best of my knowledge
[02:39:17] <Hugglesworth> going off the attiny12 datasheet and http://node.wickeddevice.com/wp-content/uploads/2010/12/ISP-6-way-pinout.png
[02:39:39] <Richard_Cavell> Hugglesworth: well that means that it can take to the stk500 but not to the avr
[02:40:00] <Richard_Cavell> Is the AVR powered up? Do you have the programming leads going to the right pins?
[02:40:01] <Hugglesworth> mmkay, what might be reasons for that
[02:40:15] <Hugglesworth> leads go to the right pins in so far as if that picture is right
[02:40:23] <Hugglesworth> chip is taking 5V through a resistor
[02:41:01] <Hugglesworth> Vcc on the isp pinout is disconnected right now though
[02:41:11] <Richard_Cavell> the chip is getting power from somewhere else?
[02:41:46] <Hugglesworth> bread board power supply
[02:42:20] <Richard_Cavell> so the AVR is sitting in a breadboard and you're using in system programming?
[02:42:29] <Hugglesworth> yes
[02:42:49] <Richard_Cavell> is the attiny12 a new one?
[02:43:10] <Hugglesworth> yes
[02:43:27] <Richard_Cavell> http://circuits.datasheetdir.com/18/ATTINY25-pinout.jpg
[02:43:45] <Richard_Cavell> You've checked and double-checked that the header pins are connected to the correct AVR pins?
[02:44:06] <Hugglesworth> yeah, that's the same chip pinout as my datasheet
[02:44:14] <Hugglesworth> yes
[02:44:26] <Hugglesworth> the isp image I linked is correct?
[02:44:29] <Richard_Cavell> yes
[02:44:37] <Hugglesworth> and the hole in the image is the nob of the connecter?
[02:45:09] <Hugglesworth> hrm, one sec
[02:47:28] <Richard_Cavell> now you're using the 6 pin header that's right at the edge of the STK500 right?
[02:47:28] <Hugglesworth> same errors if I flip my ribbon cable
[02:47:41] <Hugglesworth> correct
[02:48:06] <Richard_Cavell> It's right between a 10-pin header and one of those expansion connectors
[02:48:18] <Hugglesworth> there's a 6pin and a 10pin cables, I only have the 6pin connected
[02:48:31] <Richard_Cavell> right
[02:48:34] <Hugglesworth> I have a Olimex programmer, a USB one
[02:48:35] <Richard_Cavell> but there are 4 x 6 pin headers
[02:48:56] <Hugglesworth> I was told to use stk500 as my -c
[02:49:01] <Richard_Cavell> oh ok
[02:49:13] <Hugglesworth> so I only have a 6pin a 10pin and a usb-in
[02:49:36] <Richard_Cavell> It should work mate
[02:49:40] <Richard_Cavell> try adding -B 32 to the command line
[02:51:03] <Hugglesworth> no dice
[02:51:25] <Richard_Cavell> take several photos and upload everything to avrfreaks.net
[02:51:28] <Richard_Cavell> don't leave out any details
[02:51:49] <ferdna> is this legit?
[02:51:50] <ferdna> http://lightake.com/detail.do/sku.Nano_V3.0_AVR_ATmega328_P_20AU_Module_Board___USB_Cable_for_Arduino___Blue___Black-58530
[02:55:08] <Hugglesworth> Richard_Cavell: will do
[02:55:19] <Hugglesworth> http://msscripting.com/stuff/avr/ -- if it helps for here anyways
[02:56:11] <Richard_Cavell> you've tried disconnecting the rest of hte circuit and just having the attiny and the ISP wires?
[02:56:24] <Richard_Cavell> and by the way reduce size of your pics
[02:57:14] <Hugglesworth> have not tried that
[02:58:43] <Richard_Cavell> and the pin that you're missing is not the one you should be missing
[02:58:54] <Hugglesworth> oh?
[02:59:24] <Hugglesworth> thought I was missing Vcc
[02:59:31] <Richard_Cavell> Just try this. See how you have 2 columns of pins? Reverse them.
[02:59:49] <Hugglesworth> reverse or rotate?
[02:59:53] <Richard_Cavell> no reverse
[02:59:56] <Hugglesworth> kk
[03:00:41] <Richard_Cavell> http://msscripting.com/stuff/avr/IMG_20121021_014040.jpg << For this one the ISP plastic header thing has the top-right hole not connected. That corresponds to MISO or GND
[03:00:49] <Richard_Cavell> depending on which way round you have it
[03:01:26] <Richard_Cavell> When you look at this http://node.wickeddevice.com/wp-content/uploads/2010/12/ISP-6-way-pinout.png
[03:01:35] <Richard_Cavell> That's looking at the pins that are on the board, not looking at the socket
[03:01:54] <Richard_Cavell> The socket's going to be the mirror image
[03:02:02] <Hugglesworth> *facepalm*
[03:02:35] * Hugglesworth rewires
[03:06:29] <Hugglesworth> same errors though :/
[03:08:28] <Richard_Cavell> okay take new pics and post them so I can trace the wires
[03:09:42] <Hugglesworth> http://msscripting.com/stuff/avr/IMG_20121021_015702.jpg
[03:10:29] <Hugglesworth> you can't see it, but ground is actually grounded
[03:10:53] <Richard_Cavell> one of your wires has come out of the socket in that pic
[03:11:02] <Hugglesworth> that's my vcc
[03:11:28] <Hugglesworth> should I have my programmers vcc connected to my 5V source as well as the chip?
[03:11:59] <Richard_Cavell> no
[03:12:07] <Richard_Cavell> the chip needs to be powered by 4.5 to 5.5 v
[03:12:11] <Richard_Cavell> where it comes from doesn't matter
[03:12:16] <Hugglesworth> k
[03:12:16] <Richard_Cavell> I can't see enough to trace the wires
[03:13:10] <Richard_Cavell> but I'm pretty sure they're not going to the right pins on the AVR
[03:16:53] <Hugglesworth> one sec, cleaning up
[03:22:49] <Hugglesworth> http://msscripting.com/stuff/avr/IMG_20121021_020906.jpg
[03:22:52] <Hugglesworth> http://msscripting.com/stuff/avr/IMG_20121021_020914.jpg
[03:24:00] <Hugglesworth> Richard_Cavell: ping if you're off doing productive things
[03:27:08] <Hugglesworth> http://pastebin.com/TxqeCB0M
[03:34:30] <Richard_Cavell> can you check your ground wires?
[03:34:36] <Richard_Cavell> I can't see them exactly but I'm also not sure it's correct
[03:35:00] <Richard_Cavell> You should connect one of those red wires straight into row 26 on your breadboard
[03:35:19] <Hugglesworth> http://msscripting.com/stuff/avr/IMG_20121021_022214.jpg -- all on the programmer
[03:35:22] <Hugglesworth> uhh, sure, one sec
[03:35:58] <Hugglesworth> 26 isn't ground though, 26 is MOSI
[03:36:09] <Hugglesworth> oh, that 26
[03:36:13] <Hugglesworth> nvm, looking at wrong side
[03:37:08] <Hugglesworth> can't believe I forgot to connect the ground pin this time round >_>
[03:37:10] <Hugglesworth> getting tired
[03:37:15] <Hugglesworth> doesn't change anything though
[03:37:36] <Richard_Cavell> another pic please
[03:37:59] <Hugglesworth> hrm... odd
[03:38:05] <Hugglesworth> the programmer doesn't seem to be grounding
[03:38:34] <Richard_Cavell> it has to
[03:39:01] <Hugglesworth> running an LED off the breadboard to the isolated programmer/chip and it's not lighting up
[03:40:33] <Richard_Cavell> you mean between Vcc and gnd?
[03:40:48] <Hugglesworth> http://msscripting.com/stuff/avr/IMG_20121021_022756.jpg
[03:40:58] <Hugglesworth> the VCC of my source, to the gnd of the programmer
[03:41:21] <Hugglesworth> will put one between the vcc and gnd of the programmer
[03:42:01] <Richard_Cavell> I can't see how Vcc goes into the resistor/LED
[03:43:17] <Richard_Cavell> ok now the chip connections look fine to me
[03:43:36] <Richard_Cavell> just put that LED between Vcc and GND
[03:43:49] <Richard_Cavell> forget about the fact that you're overvolting it
[03:43:57] <Richard_Cavell> and try to program the chip and see if the LED lights
[03:44:29] <Richard_Cavell> or else take the leg of that resistor that's in one of the power rails and shove it in row 23, far side
[03:44:33] <Hugglesworth> it flashes quickly twice
[03:44:42] <Richard_Cavell> well then your programmer's supplying power
[03:44:46] <Richard_Cavell> remove the LED/resistor
[03:45:40] <Richard_Cavell> does your programmer have an adjustable voltage output?
[03:45:41] <Richard_Cavell> Mine does
[03:45:46] <Richard_Cavell> It has to be between 4.5 and 5.5 v
[03:45:46] <Hugglesworth> nope
[03:46:03] <Hugglesworth> box came with jack-all for docs too
[03:46:15] <Richard_Cavell> now you haven't changed any of the fuses on the avr, right?
[03:46:26] <Hugglesworth> there's no way it's 5V judging from the brightness of the led though
[03:46:33] <Richard_Cavell> forget about that
[03:46:43] <Richard_Cavell> it's not a sensitive enough test to determine voltage
[03:46:45] <Hugglesworth> just pulled it right out of the packaging
[03:46:54] <Hugglesworth> haven't touched anything but what I'm doing right now
[03:47:02] <Hugglesworth> (the avr)
[03:47:06] <Richard_Cavell> what computer are you using to program with?
[03:47:22] <Hugglesworth> archlinux tower PC
[03:47:35] <Richard_Cavell> did you compile avrdude from source?
[03:47:40] <Hugglesworth> Linux koganusan 3.4.4-2-ARCH #1 SMP PREEMPT Sun Jun 24 18:59:47 CEST 2012 x86_64 GNU/Linux
[03:47:44] <Hugglesworth> nope
[03:47:51] <Hugglesworth> binary from the package manager
[03:48:05] <Richard_Cavell> can you pastebin the exact stuff on your terminal including the command you used?
[03:48:18] <Hugglesworth> http://pastebin.com/TxqeCB0M
[03:48:28] <Hugglesworth> udo avrdude -P /dev/ttyACM0 -c stk500v2 -p t12 -v -F
[03:48:31] <Hugglesworth> sudo*
[03:49:26] <Richard_Cavell> what's with the /dev/... stuff?
[03:49:32] <Richard_Cavell> why not
[03:49:42] <Richard_Cavell> sudo avrdude -P usb -c stk500v2 -p attiny12 -v
[03:50:07] <Hugglesworth> avrdude: usbdev_open(): did not find any USB device "usb"
[03:50:32] <OndraSterver> lsusb
[03:50:50] <Hugglesworth> Bus 001 Device 005: ID 15ba:000c Olimex Ltd.
[03:50:56] <Richard_Cavell> I don't know anything about this programmer - is it supposed to work with Linux?
[03:51:20] <Richard_Cavell> I have a programmer (Tom's) that works out of the box on Windows and Linux but just doesn't work with OS X
[03:51:34] <Hugglesworth> yes
[03:51:35] <Hugglesworth> https://www.olimex.com/Products/AVR/Programmers/AVR-ISP500/
[03:52:07] <Richard_Cavell> you've installed the drivers?
[03:52:17] <Richard_Cavell> https://www.olimex.com/Products/AVR/Programmers/_resources/AVR-ISP500_linux_driver.zip
[03:54:15] <Richard_Cavell> he's gone silent :)
[03:54:59] <Hugglesworth> installing the drivers now
[03:55:20] <Richard_Cavell> the README.txt is pretty clear
[03:56:37] <Hugglesworth> having lib issues
[04:02:34] <Hugglesworth> too late for weird compile errors
[04:02:44] <Hugglesworth> thanks for the help so far though. I'll try again tomorrow
[04:02:46] <Hugglesworth> sleep time though
[04:13:08] <specing> I hate my uni >_>
[04:13:43] <OndraSterver> lol
[04:14:43] <RikusW> what for ? too much homework ? :-P
[04:17:09] <specing> mandatory programming basics laboratory excercises at dumb times of day
[04:17:49] <specing> public motherfucking static void main(String []dumbness)
[04:18:02] <specing> ^ You know what this is, right?
[04:18:07] <RikusW> yep
[04:18:19] <RikusW> almost forgot about it again :-P
[04:18:30] <specing> submitted all my homework in ANSI C
[04:18:37] <specing> lets see how that goes...
[04:19:11] <specing> Its interesting how math excercises are optional but the programing ones are
[04:19:21] <RikusW> like you can't program :-P
[04:19:24] <specing> (doing two faculties)
[04:20:06] <RikusW> at uni they didn't like my brothers coding style too much
[04:20:13] <RikusW> he did unorthodox stuff
[04:20:30] <RikusW> and usually his programs were much faster than average too ;)
[04:21:12] <RikusW> but it seems that most people do have a hard time learning how to program, I can't imagine why...
[04:23:05] <specing> I do my coding as per the Linux kernel coding guidelines
[04:23:27] <specing> meaning no camelCase or dumb stuff like that
[04:24:00] <Richard_Cavell> So does the linux kernel do_it_like_this() ?
[04:25:24] <Xark> Richard_Cavell: Pretty much -> http://www.kernel.org/doc/Documentation/CodingStyle
[04:26:16] <inflex> lo folks
[04:26:38] * inflex feels that consistency is more important than actual style in most situations
[04:31:14] <Richard_Cavell> Xark: thanks for that link, that's interesting
[04:32:18] <Richard_Cavell> Now folks I'm sorry for harping on this but if I connect a GPIO pin of one AVR (set as output) to a GPIO of another AVR (set as input), through a 220 ohm resistor, can I always assume that when the output pin is high it will be read as high, and when the output pin is low it will be read as low?
[04:32:28] <Richard_Cavell> Do I need to ground the wire at all?
[04:32:44] <RikusW> both need to share the same ground
[04:33:49] <Richard_Cavell> yes they do
[04:35:57] <RikusW> should be fine then
[04:36:24] <Richard_Cavell> http://i.imgur.com/netgh.png Look at the lower right
[04:36:29] <Richard_Cavell> The master circuit is similar
[04:36:29] <RikusW> if you can be sure that one pin will always be input the resistor is not required
[04:36:54] <Richard_Cavell> Also this is supposed to be hot pluggable so I'm accounting for potential spikes
[04:37:18] <RikusW> well 220R is safer then
[04:37:35] <Richard_Cavell> Ground is the only wire that's not resisted
[04:37:47] <RikusW> as it should be
[04:38:10] <RikusW> (meaning there should be no resistor there)
[04:38:53] <Richard_Cavell> Now take a look at the 47k resistor at lower right
[04:39:16] <Richard_Cavell> What I want is that if there's nothing connected to master present, it will read as low but if +5 volts comes into master present it will read as high
[04:39:20] <Richard_Cavell> is that about right?
[04:39:50] <RikusW> yes
[04:40:09] <RikusW> if you do it the other way you could use the builtin pullup in the AVR
[04:40:09] <Richard_Cavell> The 47k won't drain away the voltage before it hits the AVR
[04:40:36] <RikusW> 4k7 on the data lines is a bit big...
[04:41:06] <Richard_Cavell> we were discussing that earlier and I'm not going to put any resistors at all there
[04:41:54] <RikusW> if you do just make sure there won't be 2 or more outputs on the line at any time
[04:42:47] <Richard_Cavell> well I want it to be as safe as possible
[04:42:53] <Richard_Cavell> If I put the 4k7s there would it be safer?
[04:42:58] <Richard_Cavell> I don't really need speed
[04:45:27] <RikusW> 220 is better
[04:45:58] <RikusW> 5V / 220 = 22.7mA
[04:46:06] <RikusW> quite acceptable
[04:46:26] <RikusW> so even a dead short won't damage the IO pins
[04:46:51] <Richard_Cavell> well what we were considering before is that apparently hardly any current actually flows
[04:46:58] <Richard_Cavell> you only get 100 mA per port and 200 mA per chip
[04:51:04] <RikusW> its hopefully unlikely that you'll short more than one pin at once :-P
[04:51:14] <RikusW> or even any pins at all
[04:53:29] <OndraSterver> <RikusW> 4k7 on the data lines is a bit big...
[04:53:30] <OndraSterver> huh?
[04:53:36] <OndraSterver> 7pF or w/e was the capacitance
[04:53:41] <OndraSterver> and avg is 3.3GOhm :)
[04:53:44] <OndraSterver> or was it 33GOhm..
[04:53:54] <OndraSterver> 4k7 does exactly nothing
[04:53:58] <OndraSterver> unless you are talking faaaaaast
[04:54:59] <OndraSterver> with 4k7 and 10pF you can do waaay above 5MHz
[04:55:03] <OndraSterver> I used 5T as the time
[04:55:04] <RikusW> ok
[04:55:06] <OndraSterver> but logic high is much sooner
[04:55:30] <RikusW> 1k might be better to use ?
[04:55:49] <OndraSterver> I would use 4k7 just because I have got reel of them here
[04:56:01] * RikusW don't like almost broken designs ;)
[04:56:41] <OndraSterver> doesn't*
[04:56:42] <RikusW> OndraSterver: you'll use 4k7 for everthing even when you need 10k you'll just use 2 instead
[04:56:48] <OndraSterver> yep
[04:56:49] <OndraSterver> I will
[04:57:02] <RikusW> 0603 0r 0805 ?
[04:57:02] <OndraSterver> I use 4k7 pullups everywhere instead 10k
[04:57:05] <OndraSterver> 0603
[04:57:12] <OndraSterver> just as I have got two reels of 100nF 0603 :)
[04:57:24] <RikusW> I have some of those too
[04:57:31] <RikusW> maybe 100 or 200
[04:57:36] <OndraSterver> they go out fairly quickly :P
[04:57:50] <RikusW> what did the reel cost and how much , 5000 ?
[04:57:52] <OndraSterver> on the xmega a1u with 100 pins you have got 8 or so (A)VCC pins
[04:57:59] <OndraSterver> 4k caps on the reel, about $17 I think
[04:58:01] <Richard_Cavell> OndraSterver: Well mate are we sticking with the original idea of just a single 220 ohm resistor between these pins? Because I need to make a decision
[04:58:17] <OndraSterver> I still don't know what is your problem
[04:58:41] <RikusW> Richard_Cavell: 220 will at least prevent damage
[04:58:45] <Richard_Cavell> if you have no objection then I don't have a problem
[04:58:57] <Richard_Cavell> yeah and remember these are hot pluggable so there might be some random spikes
[04:59:43] <OndraSterver> ESD spikes? :P
[05:00:58] <OndraSterver> damn 10uF for >10V are ridiculously expensive
[05:01:04] <OndraSterver> ceramics
[05:01:10] <OndraSterver> 0.15€
[05:01:16] <OndraSterver> vs 0.05€ for 10V
[05:01:27] <OndraSterver> 0.074€ for better precision*
[05:21:57] <RikusW> OndraSterver: have a look at tantalum ;)
[05:36:56] * inflex tends to get 10uF 16V 1206's fairly cheap, X5R
[05:38:32] <inflex> TAIYO YUDEN CAPACITOR CERAMIC, 10UF, 16V, X5R, 10%, 1206 6.4c/pc @100+
[05:47:54] <OndraSterver> 16V is not enough
[05:48:04] <OndraSterver> I need 25V ones :)
[05:48:22] <Amadiro> OndraSterver, you complainin' about 0.05€? How many do you need
[05:48:22] <OndraSterver> higher would be even better, but they do not probably exist
[05:48:37] <OndraSterver> I am complaining about 0.15€ and they are still not enough
[05:48:44] <Amadiro> oh
[05:48:48] <Amadiro> yeah, that is a bit expensive
[05:49:12] <OndraSterver> tantalums :/
[05:50:05] <OndraSterver> tantalums cost even more :P
[05:50:39] <OndraSterver> damn, 35V ceramic 10uF X5R is in 1210 package and costs 0.198€
[05:50:48] <OndraSterver> 25V ceramic is "just on the edge"
[05:50:55] <OndraSterver> because input is allowed upto 24V
[05:51:03] <OndraSterver> I know they will take much more, I have abused them in the past :D
[05:52:01] <Richard_Cavell> why are they called ceramics? Do they have ceramic material between two metal plates?
[05:52:03] <Amadiro> OndraSterver, I guess you're kinda verging into what would normally be electrolyte territory... it'll probably be hard to find good prices for those specs
[05:52:28] <Amadiro> Richard_Cavell, yes, the dielectric is ceramic
[05:52:49] <Richard_Cavell> so I have a capacitor that claims to have a polyester ceramic. Does the dielectric affect the capacitance at all?
[05:53:08] <Amadiro> the dielectric is the main important thing for the capacitance
[05:53:19] <OndraSterver> Amadiro, but elytes and SMPS!
[05:54:50] <Amadiro> OndraSterver, ESR and ESL not low enough?
[05:54:58] <Amadiro> I've never build an SMPS myself
[05:55:28] <OndraSterver> well, all the datasheets say CERAMIC CERAMIC CERAMIC CERAMIC
[05:55:35] <OndraSterver> so there must be reason for that
[05:56:46] <Richard_Cavell> Amadiro: so the type of dielectric does in fact change the capacitance? I'm not talking about its thickness, I mean the substance itself
[05:57:17] <Amadiro> Richard_Cavell, yes, the substance itself plays a role.
[05:57:34] <Richard_Cavell> OndraSterver: I think I'm going to need some more resistors after all. See, I have one output line that gets split in two directions. Each direction goes through a 220 resistor before going into the input of the slave AVR. By my calculations that could carry 45 mA out of one AVR pin. That's too much, right?
[05:58:16] <OndraSterver> 10 AVE106M35C12T-F 3.5 0.12 19.89 34 C 5x5.3 1000
[05:58:21] <OndraSterver> the 19.89 is ESR
[05:58:24] <OndraSterver> @ 120Hz
[05:58:30] <OndraSterver> what about ESR @ 1.something MHz?
[05:59:34] <Amadiro> Richard_Cavell, the equation is Capacitance = Dielectric_Constant*(some other stuff)/distance_of_plates
[05:59:43] <Richard_Cavell> right
[06:00:00] <Amadiro> Richard_Cavell, so the DiCo is a linear factor in the capacitance
[06:00:02] <Richard_Cavell> so where does ceramic fit on that scale?
[06:00:28] <Amadiro> Richard_Cavell, I think that largely depends, there are different types of ceramic caps
[06:01:11] <OndraSterver> ceramics = smaller capacity, low esr, high currents
[06:02:03] <Richard_Cavell> ok
[06:02:23] <Richard_Cavell> I'm going to take this to ##electronics
[06:02:44] <OndraSterver> and much much more precision
[06:03:00] <Amadiro> http://en.wikipedia.org/wiki/Ceramic_capacitor#Classes_of_ceramic_capacitors for an overview
[06:21:17] <RikusW> Richard_Cavell: look on wikipedia for capacitors and dielectric constant
[06:21:29] <Richard_Cavell> sure
[06:22:05] <RikusW> then there is breakdown voltage too, usually we try to avoid that :-P
[06:22:27] <Richard_Cavell> well the ceramics I have are rated up to 50 volts
[06:22:33] <Richard_Cavell> I'm not giving them anything over 5 v
[06:27:10] <Richard_Cavell> OndraSterver: So if an AVR can receive input of 5 volts after going through a 4k7 resistor, that means that it can sense about 1 mA of current
[06:30:11] <OndraSterver> input leakage current is 0.001uA
[06:30:13] <OndraSterver> typical
[06:30:31] <Richard_Cavell> ****ing hell
[06:57:59] <OndraSterver> well this was an easy homework
[06:58:02] <OndraSterver> palindrome finding
[06:58:03] <OndraSterver> in C
[06:58:09] <OndraSterver> and always reverse the number etc
[06:58:22] <OndraSterver> smart Ondra converts it to string, compares, converts back to long long int and adds the number :LP
[06:58:23] <OndraSterver> :P
[07:05:30] <AuroraX> hi guys, I have an Atmel ATMEGA168PV-10PU, looks like it works at 10Mhz, I know how to mount it solo (not in arduino but something like this http://upvector.com/aux/misc/atmega_circuit_schematic.png), but with a 10MHz crystal instead of 16MHz. My question is, can I still do everything with this that i do with a 16MHz version? Can i still connect it by USB, use arduino IDE and so on?
[07:09:57] <Thetawaves> arduino uses a regular usb->serial converter right
[07:10:06] <Thetawaves> if so, then yeah totally
[07:10:55] <Thetawaves> your software for baudrates and such will change though
[07:10:58] <Thetawaves> but that's obvious
[07:21:40] <Casper> AuroraX: an arduino is nothing more than a plain avr with their bootloader on it. You can do the same thing with a 10 or 16MHz xtal, except it will be slower
[07:22:04] <Casper> and if it use an usb-serial converter chip, then yes the usb will still work
[07:22:29] <Casper> you will need to recompile the bootloader if you want to use it to set the new speed however
[07:35:08] <AuroraX> Casper: OK
[07:35:11] <AuroraX> thanks
[07:35:12] <AuroraX> ;)
[07:44:28] <OndraSterver> 0K
[07:44:49] <OndraSterver> -273.15K
[07:44:51] <OndraSterver> err
[07:44:54] <OndraSterver> -273.15°C
[08:18:25] <RikusW> OndraSterver: what do you need 0K for ?
[08:36:15] <OndraSterver> <AuroraX> Casper: OK
[08:36:23] <OndraSterver> 0 and O are verys similar
[08:36:32] <OndraSterver> in this font
[08:41:33] <jadew> 0 and 0 are even more similar
[08:55:42] <RikusW> well I'd say its not OK to be at 0K
[08:56:13] <jadew> 0rly?
[08:57:58] <jadew> wonder what's the percentage of linux users in this hobby
[08:58:19] <jadew> trying to find a reason why absolutely nobody tried out my OLS client :/
[08:58:34] <jadew> it's been there for almost 2 days now
[08:59:26] <RikusW> If I had the hw I would have tried it
[08:59:29] <jadew> with this level of interrest I'll probably stop the project, since I already reached my goal, it fullfiled its purpose
[09:00:06] <jadew> I guess it's possible there aren't many OLS owners that frequent the forums tho
[09:00:48] * RikusW is reading a GMS-U1LP GPS appnote
[09:01:04] <RikusW> the newer version PA6H use even less power
[09:01:15] <jadew> what are you building?
[09:01:19] <RikusW> tracker
[09:01:35] <Amadiro> jadew, what's an OLS client
[09:01:35] <jadew> nice
[09:01:43] <RikusW> I'll combine the Globaltop PA6H with a SIMcom SIM900 modem
[09:01:56] <jadew> Amadiro, a logic analyzer that works on top of the open bench logic sniffer
[09:02:28] <RikusW> jadew: that GPS got a builtin antenna and its only like 16x16x4mm
[09:02:39] <RikusW> less than 20mA
[09:02:44] <RikusW> or about that
[09:02:59] <jadew> nice
[09:03:26] <Amadiro> jadew, ah. I considered getting the openbench one, but I already have a pretty good logic sniffer lying around, and I don't really use it that frequently
[09:03:29] <RikusW> the SIM900 even supports voice, keypad and lcd...
[09:03:37] <jadew> RikusW, I was planning to build a gps radio and decode the data, as a learning project
[09:03:58] <RikusW> jadew: that would be a lot of research and effort...
[09:04:02] <jadew> I don't know much about radio, so I figured this would make me familiar with several things regarding radio
[09:04:09] <RikusW> the PA6H is like $20
[09:04:12] <jadew> RikusW, that's the point :D
[09:04:23] <RikusW> yeah, but I don't have that kind of time
[09:04:27] <RikusW> not right now anyways
[09:04:31] <jadew> Amadiro, what la do you own?
[09:04:58] <jadew> RikusW, the gms module is interresting tho
[09:05:04] <jadew> how much does it cost?
[09:05:06] <RikusW> jadew: it seems the GPS signals are 1575.42MHz
[09:05:25] <Amadiro> jadew, don't remember the name right now, I don't use it that frequently... I think it's by texas instruments or national semiconductors and goes up to 50MHz or so...
[09:05:39] <jadew> Amadiro, nice
[09:05:41] <Amadiro> jadew, our lab got it for free from the distributor, I think
[09:06:10] <RikusW> jadew: about $20 ^^
[09:06:13] <jadew> RikusW, yeah, I'm holding back on that project tho, I want to get a good radio first, so I can test stuff, but my g/f won't let me
[09:06:23] <Amadiro> jadew, does the openbench one work well under linux in general, and is there software to view and parse the results?
[09:06:44] <RikusW> the dev kit is more like $100
[09:06:50] <jadew> Amadiro, yeah, it should work fine under linux, my client is windows only tho, at least for now
[09:07:18] <Amadiro> jadew, I guess I'll put it on our to-buy list and play around with it
[09:07:45] <RikusW> jadew: get the ARRL handbook
[09:08:00] <RikusW> there should be a few in a library somewhere
[09:08:42] <jadew> I think you're getting ripped off on the SIM900
[09:08:59] <jadew> the shop I'm buy stuff from sells them for about 5-7 $
[09:09:22] <jadew> (with out that board tho)
[09:09:53] <jadew> ah, scratch that
[09:10:10] <RikusW> both SIM900 and PA6H is close to $20
[09:10:10] <jadew> dumb site is showing prices in a different currency since I'm not logged in
[09:10:19] <RikusW> though more like $15 in bulk
[09:10:29] <jadew> yeah, $20 sounds right
[09:10:31] <RikusW> USD
[09:11:15] <jadew> how big is the SIM900?
[09:11:25] <jadew> would it fit inside a usb stick?
[09:12:06] <jadew> 24x24mm
[09:12:48] <jadew> kinda big for a stick
[09:13:16] <jadew> my boss had an idea for a product and I thought it would be cool to build the hardware ourselves, at least just for the kicks at first
[09:14:08] <jadew> the company has nothing to do with electronics tho
[09:14:28] <jadew> so I was wondering how cheap you could go on a custom usb dongle that does gsm
[09:14:58] <OndraSterver> huh
[09:15:03] <OndraSterver> depends on your parts supplier :)
[09:16:38] <jadew> that module seems decently priced, but it's too big for a usb dongle
[09:20:40] <jadew> I'm out of freaking projects...
[09:20:43] <Horologium> jadew, have seen you talking about it but never really knew what it was, nor what the OLS was.
[09:22:25] <jadew> Horologium, heh, to be honest, I thought it's a more common piece of hardware
[09:22:50] <jadew> but it looks like altho appealing, people are avoiding it for different reasons
[09:22:56] <Horologium> I built a logic shrimp myself.
[09:23:08] <Horologium> does everything I need in that type of hardware.
[09:23:30] <Horologium> specially considering I was able to get the chips for it as free samples.
[09:24:02] <jadew> nice
[09:24:10] <Horologium> but your software might work with it if it is SUMP type interface.
[09:24:10] <jadew> I like the memory on that thing
[09:24:15] <Horologium> me too.
[09:24:48] <Horologium> have generated 640x480 VGA (kindasorta) with them by basically reversing the logic and using that system for output rather than input.
[09:25:24] <jadew> nice
[09:25:27] <Horologium> only doing 320x480 really but still matching the 640x480 timing, just pixels are twice as wide.
[09:26:16] <jadew> the OLS's drawback is the memory
[09:26:29] <Horologium> so, as I haven't paid attention, where would one get your software to test?
[09:26:45] <jadew> http://dumb.ro/lafront/
[09:27:04] <jadew> but it's limited to 24k samples, since it's made specifically for the OLS
[09:27:11] <Horologium> I'm also working on doubling the amount of ram on my logic shrimp along with doubling the sample rate by interleaving the sram chips.
[09:27:20] <Horologium> open source though?
[09:27:36] <jadew> nope
[09:27:55] <Horologium> then guess I won't be modding it for the LS
[09:28:32] <Horologium> and not working under wine it says.
[09:28:40] <jadew> if it's working with the LS, I will make something to allow more samples
[09:28:54] <Horologium> linux user here.
[09:29:10] <OndraSterver> RikusW, were you here when I talked about making "simple" oscilloscope with atxmega?
[09:29:22] <OndraSterver> tying the two ADCs so they run always one two one two
[09:29:24] <OndraSterver> and you get 4MSPS :P
[09:29:30] <jadew> one big problem with wine is that I don't know if I can connect to the serial ports
[09:30:00] <jadew> if it's possible I'll most likely make it work
[09:30:21] <Horologium> sometime in the next week I should be going to the dungeon to play and will dig it out.
[09:31:34] <Horologium> doesn't even seem to be wanting to launch under wine.
[09:31:47] <jadew> it launches for me
[09:32:02] <Horologium> ray@rayws:~/downloads/OLSFront-0.1.1.544-alpha$ wine OLSFront.exe
[09:32:03] <Horologium> fixme:heap:HeapSetInformation (nil) 1 (nil) 0
[09:32:08] <Horologium> and locks.
[09:32:40] <jadew> weird, last time I tried it it worked
[09:33:21] <jadew> hmm, might make it work under wine today
[09:33:28] <jadew> I don't feel like doing anything else anyway
[09:33:47] <Horologium> running latest debian stable with default wine install..nothing special.
[09:34:57] <jadew> I'm fairly sure it works on my wine, but I haven't tried it since a few revisions ago
[09:35:12] <jadew> will reboot now to try to make it work with the serial ports
[09:35:16] <jadew> and will let you know how it goes
[09:35:23] <Amadiro> jadew, does ols use libusb to communicate with the device?
[09:35:30] <Amadiro> or is there some kernel driver exposing an interface
[09:35:39] <jadew> Amadiro, no, it identifies itself as a CDC device
[09:35:43] <Amadiro> ah
[09:35:44] <jadew> so it shows up as a com port
[09:36:00] <jadew> brb, rebooting
[09:36:04] <Amadiro> I've never tried having a program read a com port under wine, I guess it could work
[09:36:18] <jadew> apparently, it should: http://www.winehq.org/docs/wineusr-guide/misc-things-to-configure
[09:36:27] <jadew> brb in 2 minutes
[09:41:30] <jadew> it opened up for me
[09:42:22] <Horologium> could be my wine config.
[09:42:33] <OndraSterver> stop drinking it
[09:42:36] <Horologium> I only used it for one app. generally I avoid windows apps.
[09:42:39] <OndraSterver> it might start working
[09:42:51] <Horologium> drinking diet DEW!
[09:51:03] <jadew> it fails to open the com port
[09:59:22] <jadew> yeah, it's not working
[09:59:32] <jadew> I can't get it to open that com port
[10:08:31] <jadew> Horologium, if you get a chance to test it under windows and it works, let me know please
[10:11:00] <jadew> Horologium, does it support RLE?
[10:29:44] <Horologium> no way I will get a chance to test it under windows.
[10:29:55] <Horologium> only windows box I have is a work laptop and it doesn't come in the house.
[10:30:04] <Horologium> 100% linux only here.
[10:30:12] <Tom_itx> so sad
[10:30:34] <Horologium> I don't need windows for anything at home so no reason to buy it.
[10:32:33] <Erlkoenig> need a VM? :D
[10:32:41] <Horologium> not really.
[10:33:16] <Horologium> I have a win2kpro disk here somewhere and can throw it on virtualbox if I really need windows for anything.
[10:33:16] <jadew> it's funny, I only use linux for work
[10:34:14] <Horologium> the three games I play all run on linux just fine.
[10:34:34] <Tom_itx> what are games?
[10:34:43] <Horologium> not even needing wine as they all three have native linux implementations, two of which are written in java, but,,,
[10:34:56] <Horologium> Tom_itx, things you use to kill time while not wanting to do work.
[10:35:04] <Tom_itx> ahh..
[10:35:30] <Horologium> kinda like irc but without the pseudo-human interaction.
[10:35:42] <jadew> come on... it's not pseudo human lol
[10:35:47] <Tom_itx> this is more like community service
[10:35:53] <Horologium> well, I wouldn't call everyone on irc human.
[10:36:02] <Horologium> myself included.
[10:36:30] <jadew> that explains why you're using linux at home :P
[10:36:47] <Horologium> and definitely can not use the term "intelligent beings" as that eliminates even more.
[10:38:17] <Horologium> I've used linux exclusively at home now for almost 12 years.
[10:38:28] <jadew> was about to ask for how long you're using it
[10:38:56] <Horologium> ever since microsoft turned me down for a job because I didn't have a degree, even though I passed all their employment tests with flying colors.
[10:39:32] <jadew> other software companies accept programmers with out degrees
[10:39:42] <jadew> adobe is one of them IIRC
[10:40:10] <jadew> I don't have a degree either, however, I wouldn't like to work in a big company
[10:40:21] <Horologium> I even flew out there twice for interviews and testing.
[10:41:02] <Horologium> the HR droid was finishing up hiring paperwork and called me to ask where I got my degree.
[10:41:06] <Tom_itx> aren't you glad it didn't work out?
[10:41:28] <Horologium> when I said I didn't have one I was told I couldn't do the job without one.
[10:41:35] <Tom_itx> university of hardknocks
[10:41:49] <jadew> yeah, that's kinda dumb, especially in this field
[10:41:53] <Horologium> not really. it would have been a nice feather in the cap to work for them even for a couple of years.
[10:42:36] <Horologium> I think my social skills were what kept me from the second interview at google too.
[10:43:25] <Horologium> so I worked as an admin for sprint for a while and now I fix copiers for a living and build custom wooden furniture for fun and profit.
[10:43:59] <jadew> since you interviewed for ms, I would think you'd know enough about the windows internals to realize it's way better than linux
[10:44:10] <jadew> so why would you give up on it?
[10:44:21] <Horologium> they pissed me off.
[10:44:24] <Horologium> plain and simple.
[10:44:50] <jadew> I guess I'd be pissed off as well hehe
[10:45:08] <Horologium> and, I really don't need to pay for windows to use a computer, so why should I?
[10:45:26] <Horologium> linux works fine for me as I am an old unix guy from way back anyhow.
[10:45:37] <jadew> I actually stopped using a company's products after they didn't call me after the interview
[10:45:55] <jadew> but I guess they didn't do it since I wasn't of legal age at that point
[10:46:19] <tld> "since you interviewed for ms, I would think you'd know enough about the windows internals to realize it's way better than linux" <-- in what way? (curious)
[10:46:38] <jadew> tld, in almost every way
[10:46:47] <jadew> for example, the api hasn't changed in decades
[10:46:55] <Horologium> as for the internals of linux vs windows, I prefer linux myself, but mostly because I like unix.
[10:47:11] <tld> I'm actually with Horologium on this one.
[10:47:26] <tld> I'm not a Linux-fanboi, but generally prefer unix.
[10:47:29] <jadew> not gonna get into an OS fight :)
[10:47:29] <Horologium> yeah, windows 8 is still using code written for win3.1 at the core.
[10:47:55] <Horologium> but, current linux is still using code written by torvolds for his college thesis.
[10:48:06] <jadew> I don't know about windows 8, but at the core of every windows post NT, it's NT
[10:48:10] <Horologium> windows has its uses, I agree with that.
[10:48:11] <jadew> the win32 api is a subsystem
[10:48:20] <tld> jadew: I just keep being open to arguments (sort of a due diligence thing on my own views or something), but never really heard any good arguments that win internals were better. Then again, most win-devs don't know a lot about win internals.
[10:48:32] <Horologium> it's not bad as a gaming platform.
[10:48:35] <jadew> however, the fact that win32 api has not broken backwards compatibility in so many years, makes it programmer friendly
[10:48:45] <Horologium> and installers are nicer on windows than linux.
[10:49:29] <Horologium> I have software for work that only runs on xp or earlier. will not for its life run on 7 or 8 or vista.
[10:49:40] <jadew> well, yeah... and when you install something it doesn't get spread out across the whole directory tree
[10:49:44] <tld> jadew: POSIX has been pretty stable since 1988. ;)
[10:49:44] <Horologium> but it runs on 98, 2k, and xp.
[10:50:26] <jadew> Horologium, haven't ran into that issue yet
[10:50:31] <CapnKernel> In other news, a customer's just posted pictures of the solderpaste stencil I did for him: http://www.cusf.co.uk/2012/10/joey-r2-stencils/ :-)
[10:50:33] <Horologium> but for that I blame the programmer who wrote hooks that really shouldn't have been used in the first place.
[10:51:05] <Horologium> CapnKernel, copper stencil?
[10:51:15] <jadew> Horologium, input hooks?
[10:51:20] <jadew> like keyboard hooks and such?
[10:51:24] <CapnKernel> Laser cut stainless steel
[10:51:27] <Horologium> GUI hooks actually.
[10:51:42] <jadew> ah, so basically dll injection into other processes
[10:51:53] <OndraSterver> CapnKernel, nice :)
[10:52:01] <Horologium> the program will load, and it, kinda, mostly runs, but menus don't show or take 5 to 10 minutes(randomly) to load and show up.
[10:52:02] <jadew> yeah, I can see how that could go wrong
[10:52:18] <Horologium> along with window changes taking also randomly 5 to 10 minutes to happen.
[10:52:21] <OndraSterver> I need a glue for a paper
[10:52:26] <OndraSterver> anybody can pls offer? :D
[10:52:34] <jadew> Horologium, that sounds like poorly coded hook
[10:52:36] <Horologium> CapnKernel, nice. wish I had a laser cutter.
[10:53:08] <Horologium> jadew, it is. works on xp and back to 98,,havent tested farther.. but vista, 7, and 8, no flippin way..
[10:53:13] <CapnKernel> Now people without laser cutters can have stencils :-)
[10:53:51] <jadew> tld, I don't have much to comment about POSIX, it's ok
[10:54:23] <jadew> except for the fact that I can't connect to my serial devices under linux, unless I'm using one of the retarded, standard baudrates
[10:54:31] <jadew> that in this day and age make little sense
[10:54:36] <Horologium> I've used my wife's plastic(correct word escapes me at the moment) cutter to do stencils when I need them but don't use them very often at all.
[10:54:51] <OndraSterver> hmm I need a 3D printer
[10:55:10] <jadew> OndraSterver, I think the makerbot reached v2 or something like that
[10:55:19] <Horologium> OndraSterver, I need a plastic extruder head then I will have everything for a 3D printer.
[10:55:45] <Horologium> thinking of just going with modding a hot glue gun and using hot glue for the first experiments.
[10:55:54] <OndraSterver> jadew, I ofc know about makerbot and reprap and everything
[10:56:09] <OndraSterver> but... money yo
[10:56:13] <jadew> I'm dreaming about one of those myself
[10:56:15] <jadew> yeah...
[10:56:20] <OndraSterver> regular printers start at $30
[10:56:24] <OndraSterver> why not 3D ones too? :P
[10:56:28] <OndraSterver> just stack the ink!
[10:56:34] <Horologium> have also considered doing a laser scintering(think that's the right word) system.
[10:56:46] <Horologium> that's what I am looking at doing OndraSterver
[10:56:50] <Horologium> only, not ink
[10:56:51] <Horologium> toner.
[10:56:55] <OndraSterver> uh huh
[10:57:02] <Horologium> toner is powdered plastic.
[10:57:07] <OndraSterver> yes
[10:57:18] <Horologium> spread a thin film of it on a substrate, then melt it with laser.
[10:57:29] <Horologium> drop substrate a tiny bit, spread more toner, laser
[10:57:33] <jadew> thing is it needs to get hot
[10:57:38] <Horologium> repeat a few million times as nessary.
[10:57:40] <jadew> kinda hard to keep the previous layer firm
[10:58:00] <Horologium> toner melts at 320 to 360 degF depending on the brand.
[10:58:18] <Horologium> they did it with sugar and hot air nozzle.
[10:58:22] <Horologium> in the candyfab.
[10:58:55] <jadew> yeah, but I guess they were pouring it already melted
[10:59:01] <Horologium> no.
[10:59:24] <Horologium> sprea and heat, lower, spread and heat, lower, ad-nauseum.
[10:59:48] <jadew> and the previous layers don't suffer?
[10:59:56] <Horologium> not badly.
[11:00:14] <jadew> nice
[11:01:27] <Horologium> http://en.wikipedia.org/wiki/CandyFab
[11:02:54] <Horologium> http://www.flickr.com/photos/oskay/sets/72157594553416374/
[11:04:18] <Horologium> but I'm thinking that the laser out of a blueray player should suffice for heating toner enough to make it stick together.
[11:04:33] <Horologium> just need to steal a blueray player and take the laser out.
[11:04:35] <jadew> pretty cool, I'd like to see some candy PCB enclosures now
[11:04:43] <Horologium> hehe.
[11:04:59] <Horologium> sorry teacher. I made that device but the ants ate my homework.
[11:05:13] <jadew> haha, sounds plausible
[11:06:10] <Horologium> Consider this model of a wood screw that we fabricated out of sugar: It’s 20 inches long, with the head diameter of 4.5 inches, and it weighs about 2.5 pounds, so the total media cost is about $0.93.
[11:06:20] <Horologium> http://farm1.static.flickr.com/223/490968325_7158b24224_m.jpg
[11:06:27] <Horologium> talking about that in the image.
[11:06:49] <Horologium> haha...the candyfab 4000 holds over 100 pounds of sugar.
[11:07:27] <Horologium> http://www.evilmadscientist.com/2007/solid-freeform-fabrication-diy-on-the-cheap-and-made-of-pure-sugar/ official site for it.
[11:08:44] <jadew> I bet that guy's kids are sick of sugar: "and for desert we have a sugar knife, a sugar screw and a sugar ball"
[11:09:16] <Horologium> make your plates and silverware out of sugar.....ok kids, eat all your vegetables and THEN you can eat your fork and plate.
[11:11:22] <Horologium> http://www.flickr.com/photos/oskay/893845346/in/set-72157594553416374
[11:11:30] <Horologium> http://www.flickr.com/photos/oskay/892998259/in/set-72157594553416374
[11:11:37] <Horologium> now that's some sweet bling!
[11:11:38] <Horologium> [:
[11:13:27] <Horologium> http://www.flickr.com/photos/oskay/1406395655/in/set-72157594553416374 and it does plastic
[11:14:09] <jadew> that one looks nice
[11:15:38] <Horologium> HDPE plastic pellets.
[11:16:12] <Horologium> wonder why their main website is down...hmmm.
[11:16:48] <Horologium> so, yeah, if they can do it with sugar and a hot air nozzle, why not something finer like toner and a laser diode?
[11:17:30] <jadew> it's worth trying I guess
[11:17:44] <jadew> it's not for everyone tho, tonner is messy and toxic
[11:17:52] <Tom_itx> UV cureable plastic
[11:17:55] <Tom_itx> dentists use it
[11:18:18] <Horologium> sharp toner is just pvc with some coloring, a little bit of oil, and some carbon black.
[11:18:53] <Horologium> xerox toner is polyester rather than pvc...lower melting point.
[11:19:03] <CapnKernel> I've been wondering if you could print layers out of "something", then stack the layers, like pancakes
[11:19:38] <Horologium> CapnKernel, just print them in layers so they adhere to each other as they are printed, so, yeah.
[11:19:42] <CapnKernel> Print them on a non-stick surface (or sinter/fuse powder) then flip them
[11:19:53] <Horologium> run the same piece of paper through a laser printer about 20 times, printing the same image.
[11:19:59] <Horologium> you can feel the toner building up.
[11:20:02] <CapnKernel> With my idea, you could print things that have overhang
[11:20:54] <Horologium> that's why I'm thinking using the candyfab idea and a laser diode to melt the layers. then the toner on the bed that is still powder will support overhangs.
[11:44:36] <CapnKernel> Toner is black. Black absorbs IR. I wonder if you could print toner (thicker than a laser printer) then pass it under a quartz IR lamp. Toner absorbs energy, melts, fuses into a 2d shape
[11:46:13] <Horologium> it is the handling and printing of the toner that would be a problem...in a copier or printer it is all done in very thin layers and transferred here and yon by static charges.
[11:58:27] <Horologium> http://news.virginia.edu/content/student-engineers-design-build-fly-printed-airplane
[12:53:55] <creep> h
[12:55:36] <OndraSterver> s
[12:56:36] <Horologium> q
[12:57:01] <Tom_itx> p
[12:57:08] <OndraSterver> o
[12:57:23] <Tom_itx> n
[12:57:28] <Horologium> antidisestablishmentarianism
[12:57:35] <Tom_itx> define it
[12:57:35] <OndraSterver> Tom_itx, you forgot "r"
[12:57:48] <Horologium> hell, I can't even spell it.
[12:58:32] <Horologium> the doctrine or political position that opposes the withdrawal of state recognition of an established church; - used especially concerning the Anglican Church in England.
[12:58:56] <Horologium> or so says the internet.
[12:59:22] <creep> its not that hard to make an aeroplane, really.
[12:59:40] <Horologium> creep, agreed...I've built ones that size from wood that flew.
[13:00:04] <Horologium> all they had to do was get a model kit, measure and generate the parts on the computer from the wooden ones, then print them.
[13:00:10] <creep> glue together using balsa, then cover with foil to be aerodynamic, and fill the holes
[13:01:34] <Horologium> first one I ever made was covered in rice paper actually, not foil or plastic shrink wrap that they use these days.
[13:03:49] <tld> for serial-only, it'd typically be better (but not cheaper), to use an FTDI-chip, rather than vUSB?
[13:04:06] <Horologium> tld, yes...
[13:04:32] <Horologium> vUSB is ok for serial on windows but on linux it's a hack as linux actually follows the USB standard and doesn't allow low speed CDC by default.
[13:04:39] <Horologium> also vUSB takes a lot of processor time.
[13:05:21] <Horologium> just something to take into consideration.
[13:05:24] <tld> I could solve the processor-time bit by using a dedicated chip, basically reimplenting an ftdi more or less, but…
[13:05:32] <Horologium> yes.
[13:05:36] <Horologium> I've done the same in the past.
[13:05:56] <Horologium> vUSB on one side, i2c, spi, or usart on the other side.
[13:06:09] <Horologium> just use a small attiny as a usb-serial passthrough with vUSB.
[13:06:58] <Horologium> your speed is just kinda limited as well as a few other USB features like sleep and I think disconnect in some instances, and the whole low speed USB/CDC thing.
[13:07:51] <Horologium> I have kind of broken the AVR code of conduct lately and been using PICs for USB interface.
[13:08:04] <Horologium> they do have hardware USB in a DIP package after all.
[13:08:47] <OndraSterver> tld, what chip do you want?
[13:09:04] <Horologium> and, if I can ever get it working, these new chips don't even need an external crystal or oscillator...they sync to the USB clock with the internal RC oscillator like the attiny vUSB implementations can do.
[13:09:11] <OndraSterver> beacuse tiny/mega + ft232 ~= mega u/xmega u
[13:09:20] <tld> Horologium: been thinking about the same. (PIC for USB in DIP).
[13:09:30] <OndraSterver> (size wise)
[13:09:48] <OndraSterver> there is just one issue - it is hard to (optically) isolate USB directly :P
[13:09:50] <tld> I can use the FTDIs easily enough I think though, with a breakout, but breakouts just feels a bit like cheating.
[13:10:26] <tld> OndraSterver: using a mega would be an option perhaps.
[13:10:27] <Horologium> OndraSterver, but that requires either buying a premade board with xmega on it or soldering one on...yes, I know, it's not that difficult but sometimes you just can't do the tiny solder thing.
[13:10:42] <OndraSterver> ft232 is SMD only too
[13:10:52] <OndraSterver> and 0.8mm pitch is nowhere near small :)
[13:10:59] <Horologium> that's why I went with PIC for USB interface lately.
[13:11:03] <OndraSterver> ft232 has 0.65mm even
[13:11:13] <OndraSterver> but PIC = another programmer 'n shit
[13:11:21] <Horologium> OndraSterver, it is when you are working with 8 to 12 year old kids trying to teach them electronics and microcontrollers.
[13:11:24] <tld> I think I can live with 0.5mm and up.
[13:11:30] <OndraSterver> Horologium, ah
[13:11:46] <Horologium> OndraSterver, agreed on that too. I do have a PICKIT3 and just load the chips up with USB bootloaders for the kids to work with.
[13:12:17] <Horologium> saves on a lot of hardware, both with avr and pic.
[13:12:43] <Horologium> a 4 pin crimp connector on the end of a USB cable to connect it to the breadboard, and away we go.
[13:13:04] <tld> I'm betting an USB-capable PIC can be had for less than an ftdi and less than an [x]mega u?
[13:13:08] <Horologium> got a bunch of early gen USB cables some years back for $0.10 each.
[13:13:30] <Horologium> tld, depends on where you live, but, yeah, free samples for the win!
[13:14:10] <OndraSterver> I don't like ST
[13:14:11] <Horologium> pic18f2550 is a great baseline as there is plenty of code out there for them.
[13:14:15] <OndraSterver> I wanted samples for legitimate project
[13:14:16] <OndraSterver> but they said no
[13:14:21] <OndraSterver> but people with "fake" projects keep getting samples :(
[13:14:22] <tld> electronics is a really good way to work one some of my bad habits, such as overthinking things… kinda starting to learn to just pick one solution, and go for it. ;)
[13:14:29] <tld> just too many alternatives for everything, not to do that. ;)
[13:14:40] <Horologium> I've gotten samples from freescale, allegro, maxim, atmel, microchip, pac-tec, and several others.
[13:15:20] <Horologium> microchip also has some nice serial sram chips and little mosfets
[13:15:41] <Horologium> as well as the enc28j60 chip...ethernet to spi.
[13:15:53] <OndraSterver> I want to try out enc28j424
[13:16:00] <tld> I got some of the ethernet/spi-chips.
[13:16:08] <Horologium> add a magjack, 25mhz crystal, a few caps, and away you go.
[13:16:21] <Horologium> there is a site with full schematics and code for webserver on avr..let me find.
[13:16:25] <tld> really want to get to play with them, but haven't found too much time yet.
[13:16:34] <Horologium> haven't seen the 424..must look up.
[13:16:35] <tld> I can't actually remember having been turned down for samples.
[13:16:51] <tld> maybe because I'm disgustingly honest when I ask for them.
[13:17:10] <tld> "I don't have a design in mind at the moment, but I'd like to get familiar with this part." <-- honestly seems to pay.
[13:17:22] <Horologium> don't see an enc28j424 there OndraSterver .
[13:17:40] <tld> but they always use FedEx, TNT, UPS and the like to do international door-to-door, so I always feel bad about the shipping cost I don't pay. :(
[13:18:01] <OndraSterver> it was enc<something>424
[13:18:06] <OndraSterver> or 624 for parallel version
[13:18:09] <OndraSterver> which I might try out too
[13:19:17] <Horologium> http://tuxgraphics.org/electronics/200611/embedded-webserver.shtml
[13:20:02] <Horologium> enc424j600
[13:20:18] <Horologium> 10/100 ethernet.
[13:20:28] <Horologium> with both spi and parallel interfaces.
[13:20:35] <Horologium> big brother to the enc28j60
[13:20:55] <Horologium> available in 44 pin QFN or TQFP package.
[13:20:58] <ferdna> if i wanted to read those sensors(IN RED IMG1) in this board i would need a Logic Level Converter (Link2).?
[13:21:01] <ferdna> IMG1: http://i.imgur.com/ZvEbP.jpg
[13:21:07] <ferdna> Link2: https://www.sparkfun.com/products/8745?
[13:21:24] <tld> Horologium: and crypto
[13:21:53] <Horologium> ferdna, depends on what you want to read them with.
[13:22:32] <ferdna> Horologium, an arduino.
[13:22:39] <ferdna> *uno
[13:26:15] <OndraSterver> Horologium, yes, 424j600 or 624j600 :)
[13:26:16] <Horologium> looks like it is 5V or 3.3V compatible with all the interface through the atmega8.
[13:27:17] <OndraSterver> the 424 is 100Mbit
[13:27:43] <ferdna> Horologium, you sure? i dont want to burn this thing... is really expensive...
[13:27:51] <Horologium> the sensor chips are 3.3V only but the atmega8 onboard handles interface to them and you are talking to that and not directly to the sensors.
[13:28:14] <Horologium> why would someone need an ardweeny with that board, though? It already has an AVR onboard.
[13:28:44] <ferdna> Horologium, because there is no code for it yet...
[13:29:03] <Horologium> http://code.google.com/p/ardu-imu/downloads/list
[13:29:08] <Horologium> right there is the code for it.
[13:29:54] <ferdna> Horologium, hmmm no... what i am doing is a quadrocopter... that code doesnt support it... you need to modify it your self...
[13:32:40] <Horologium> look at the schematic for the board then.
[13:32:48] <Horologium> the point you marked on the picture.
[13:32:57] <Horologium> SDA and SCL go straight to the atmega8
[13:33:32] <ferdna> Horologium, awesome! =) thank you very much.
[13:33:47] <Horologium> wait.
[13:33:50] <Horologium> just a sec.
[13:34:05] <Horologium> yes, use a level converter.
[13:34:09] <Horologium> just to be safe.
[13:34:29] <Horologium> they have one onboard it looks like.
[13:34:36] <Horologium> damn, I wish they would mark these things better.
[13:35:05] <Horologium> double checking....sda and scl go to the header, and to another chip... pca9306DC
[13:35:21] <ferdna> Horologium, are you looking at the schematics?
[13:35:25] <Horologium> yes.
[13:35:46] <Horologium> the pca9306DC is your level converter for the bus so 5V is fine on the pins out to the real world.
[13:35:53] <Horologium> http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Robotics/ArduIMU328-v3.pdf
[13:35:56] <Horologium> the schematic.
[13:36:16] <ferdna> Horologium, yeah there are here in the documents section: https://www.sparkfun.com/products/11055?
[13:36:24] <ferdna> ...
[13:36:26] <Horologium> the atmega8 is running at 5V
[13:36:29] <ferdna> oh yeah... i see it... U3
[13:36:33] <ferdna> !!!!!!!!!!!!!!!!!!!!
[13:36:35] <Horologium> u2
[13:36:56] <Horologium> at least on the pdf I have here
[13:37:00] <Horologium> top of the page.
[13:37:43] <Horologium> wish they would actually run bus lines so you could see where things go rather than having to pick out pin names over the entire page.
[13:38:27] <Horologium> u3 is down lower left corner, and not labeled as to what it is but it also looks like a level converter for SPI
[13:39:07] <Horologium> u3 is SPI level converter to feed the MPU-6000
[13:39:07] <ferdna> yeah
[13:39:30] <Horologium> u2 is level converter for the HMC5883L I2C
[13:39:53] <Horologium> so none of them are fed out of the board anywhere directly. everything through the level converters.
[13:40:15] <Horologium> still makes no sense, having a board with a microcontroller on it and not using the microcontroller.
[13:43:34] <Horologium> OndraSterver, so, the 624 and 424 differences aren't much other than one has an 8-bit parallel interface and the other has an 8 or 16 bit parallel interface.
[13:44:11] <OndraSterver> aye
[13:44:12] <OndraSterver> plus SPI both
[13:44:20] <OndraSterver> and chip size :)
[13:44:23] <Horologium> and,,,44 vs 64 pin tqfp
[13:44:26] <OndraSterver> ye
[13:44:32] <OndraSterver> I think I will go for SPI only anyway
[13:44:34] <OndraSterver> smaller, cheaper
[13:44:52] <Horologium> enc28j60 is plenty for anything I do with microcontroller ethernet.
[13:45:31] <Horologium> and I recently got a pile of non-working ethernet switches. many of them have magjacks in them.
[13:46:05] <Horologium> have also been known to pull the jack and magnetics off of old ethernet cards.
[13:46:14] <OndraSterver> have you seen my latest win?
[13:46:14] <OndraSterver> http://clip2net.com/s/2q24O
[13:46:24] <OndraSterver> it all fits on single side!
[13:46:25] <OndraSterver> all the parts
[13:46:31] <OndraSterver> decoupling
[13:47:01] <OndraSterver> I am still not decided on two things:
[13:47:04] <Horologium> you making them?
[13:47:10] <OndraSterver> input cap: something like 10uF ceramic, but they are expensive!
[13:47:12] <OndraSterver> ye
[13:47:19] <Horologium> how much?
[13:47:39] <OndraSterver> b) USB ESD protection. Now I am using expensive (0.15€ each) ESD suppressors, I am thinking about switching to complete ESD USB suppressor chip for 0.25€ (contains five ESD suppressors)
[13:47:43] <OndraSterver> this? around 25€
[13:47:46] <OndraSterver> xmega128a1u
[13:47:57] <Horologium> so, 40 USD or thereabouts?
[13:48:11] <OndraSterver> $33 or so
[13:48:25] <OndraSterver> still not completely decided
[13:48:25] <Horologium> yeah..just looked it up...was a very rough guess.
[13:48:40] <OndraSterver> I still have yet to make it and send it to fab house
[13:48:40] <Horologium> that's not a bad price really.
[13:48:44] <OndraSterver> aye
[13:48:46] <OndraSterver> for top of the range chip..
[13:48:51] <OndraSterver> if only there was 256kB one :)
[13:48:54] <OndraSterver> or at least 192kB!
[13:49:01] <OndraSterver> but hey, 80 GPIOs or so
[13:49:02] <Horologium> does that chip have an external sram interface?
[13:49:05] <OndraSterver> (including analog inputs)
[13:49:10] <OndraSterver> SRAM? more than that!
[13:49:13] <OndraSterver> 16MB address space
[13:49:16] <OndraSterver> supports external DRAMs!
[13:49:21] <OndraSterver> (SRAMs too)
[13:49:22] <Horologium> duh...forgot...xmega.
[13:49:33] <OndraSterver> I had this brilliant idea of sticking it instead of 286 onto some motherboard :D
[13:49:52] <Horologium> hehe.
[13:49:58] <Horologium> and run an x86 emulator on it?
[13:50:00] <OndraSterver> hehe
[13:50:05] <OndraSterver> that would be all the advantages gone :(
[13:50:13] <OndraSterver> 286 = 8 - 20MHz or so
[13:50:19] <OndraSterver> many cycles per instruction
[13:50:29] <OndraSterver> here 32MHz stock, mostly 1 cycle per instruction
[13:50:29] <Horologium> yup.
[13:50:34] <OndraSterver> unless using external bus/internal SRAM
[13:51:46] <OndraSterver> routing this http://clip2net.com/s/2q29T
[13:51:50] <OndraSterver> was just terrible mindfuck
[13:51:55] <Horologium> EBI is external bus interface?
[13:51:58] <OndraSterver> ye
[13:52:04] <OndraSterver> the / lines are completely killing my eyes :D
[13:52:24] <Horologium> an awful lot of jinks in those lines.
[13:52:32] <OndraSterver> jinks?
[13:52:44] <Horologium> \/\/\/\/\/\/\
[13:52:59] <OndraSterver> /|/|/|/|
[13:53:04] <OndraSterver> I needed to fit them
[13:53:07] <Horologium> I've never studied board design though...might be just fine for all I know.
[13:53:26] <OndraSterver> dude, there were right angles at 133MHz SDRAMs on some boards I had in my hands :)
[13:53:31] <OndraSterver> / | is no issue
[13:53:40] <OndraSterver> right angle adds a bit of induction
[13:53:53] <Horologium> aahh...shows what I know on it.
[13:55:37] <OndraSterver> also it is as much as possible arduino compatible
[13:55:41] <OndraSterver> BUT! 3v3 only
[13:55:42] <OndraSterver> no 5v
[13:55:55] <OndraSterver> 5v is now obsolete :P
[13:56:03] <Horologium> 18x2 connector. can use IDE cable so long as you have the ones with all 40 pins connected through and not the ones with the key pin sealed up.
[13:58:56] <Horologium> can be USB powered that board?
[13:59:39] <OndraSterver> aye
[14:01:36] <Horologium> just got a notice for the ardweeny Due arm based board here...hehe
[14:01:47] <OndraSterver> 18x2 connector
[14:01:50] <OndraSterver> compatible with arduino
[14:01:55] <Horologium> aahh.
[14:01:56] <OndraSterver> (except the extended features, I have not checked those)
[14:02:07] <OndraSterver> but no peripheral uses them
[14:02:14] <OndraSterver> because they are only on arduino mega (2560)
[14:02:20] <OndraSterver> I am making also two smaller ones
[14:02:27] <Horologium> I like to build boards that are compatible with existing cables and hardware I have on hand. build a lot of stuff to fit either floppy or ide cables.
[14:02:47] <OndraSterver> http://clip2net.com/s/2q2kz
[14:03:10] <OndraSterver> http://clip2net.com/s/2q2kR
[14:03:18] <OndraSterver> xmega256a3u / xmega32a4u
[14:05:23] <Horologium> oh man did they open up a can of flaming worms on slashdot with the ardweeny due post.
[14:06:23] <OndraSterver> yay ardweeny
[14:06:58] <OndraSterver> I have got something better :)
[14:06:58] <OndraSterver> http://clip2net.com/s/2q2os
[14:07:12] <Horologium> I prefer to use pascal stang's avrlib over arduino's libs.
[14:07:25] <Horologium> just wish he had kept on developing it.
[14:07:51] <Horologium> now that's more like what we are after in the learning world for breadboarded circuits.
[14:08:47] <Horologium> have one here somewhere with both rows of pins down one edge and it uses 2 different lengths of angled headers so it fits in the center rows of a breadboard and doesn't cover up all the other holes.
[14:09:11] <Horologium> has an atmega128 on it from way back when.
[14:09:25] <OndraSterver> hmm?
[14:09:37] <OndraSterver> this leaves 2 rows on each side
[14:10:26] <Horologium> also have a breadboard that I ran through the bandsaw so I can use wide chips on it.
[14:11:56] <Horologium> crystal is on the underside I am guessing?
[14:13:05] <OndraSterver> crys-what? :)
[14:13:08] <OndraSterver> this is XMEGA YO!
[14:13:14] <OndraSterver> 2MHz + 32MHz RCs
[14:13:17] <OndraSterver> with internal PLL and DFLLs
[14:13:20] <Horologium> sorry, haven't worked with the xmega chips.
[14:13:22] <OndraSterver> to tune and make the RCs more precise
[14:13:24] <OndraSterver> :P
[14:51:47] <grummund> Does anyone make a bare board (or kit) with just an AVR & relay ?
[14:52:23] <Roklobsta> i can if you pay me $2000 to design it
[14:52:29] <Roklobsta> how many relays
[14:52:39] <Roklobsta> and how many optos and what isolation?
[14:52:53] <grummund> 1 x AVR, 1 x relay.
[14:53:05] <Roklobsta> sounds like a job for an attuny
[14:53:17] <Roklobsta> what's the purpose?
[14:53:28] <grummund> general purpose
[14:54:16] <Roklobsta> serial control? what other control inputs?
[14:54:41] <grummund> just breakout for unused gpio
[14:54:48] <Roklobsta> the simplest would be to get a basic arduino and add a relay on a bit of veroboard
[14:55:27] <grummund> sure, i can put something together...
[14:56:35] <grummund> surprised not to find such an avrtiny board on ebay
[14:56:57] <grummund> it must have many uses
[14:58:32] <Pi3rrot> hi all
[14:59:01] <Amadiro> grummund, well, just one relay wouldn't be horribly useful
[14:59:25] <Amadiro> and what type of relay you'd use would also depend on how fast you want to switch your load, and how big the load is supposed to be
[15:00:26] <Pi3rrot> i'm just a newbie in AVR, and trying to use an atmega8535 with Avrdure
[15:01:04] <Amadiro> Pi3rrot, you'd need a programmer of some description, unless the chip already has a bootloader of some sort on it
[15:01:48] <Pi3rrot> and i have one thing i don't understand, how can i write a bootlader in my atmega?
[15:02:16] <Amadiro> Pi3rrot, if you want to put a bootloader on your atmega chip, and there isn't already one on there, you will need a programmer
[15:03:40] <Pi3rrot> what king of programmer? I have 3 different ISP cables, you think it can be OK to do this?
[15:04:00] <Amadiro> Pi3rrot, what kind of ISP cable?
[15:04:11] <Roklobsta> er as long as they work with avrdude you will be fine
[15:04:42] <Pi3rrot> i have programmed my atmega8535 with an arduino, a buffered parallel cable, and a bus pirate :)
[15:05:09] <Amadiro> Then you can just flash a bootloader on it
[15:05:12] <Amadiro> if you want one
[15:05:17] <Pi3rrot> but nothing happend
[15:05:34] <Horologium> what bootloader did you try to put on it?
[15:05:58] <Pi3rrot> i don't know
[15:06:20] <Horologium> where did you get the bootloader?
[15:06:40] <Pi3rrot> i didn't get back
[15:06:50] <Horologium> ??
[15:06:59] <Pi3rrot> the bootloader
[15:07:01] <Pi3rrot> :)
[15:07:03] <Horologium> so, you have a bootloader you tried to install on an AVR?
[15:07:14] <Pi3rrot> sorry i'm french and my english is a little bit so bad
[15:07:32] <Pi3rrot> Horologium: no i have not a bootloader to put on my AVR
[15:07:35] <Horologium> a bootloader is a program for the AVR that resides in the upper memory section.
[15:07:43] <Pi3rrot> yes ok
[15:07:54] <Horologium> so, you need a bootloader to put on it.
[15:08:02] <Horologium> there are many different ones.
[15:08:08] <Pi3rrot> you think AVRStudio and AVRDude need different bootloaders?
[15:08:17] <Amadiro> Pi3rrot, no
[15:08:22] <Amadiro> Pi3rrot, why do you want a bootloader in the first place
[15:08:24] <Horologium> there are bootloaders that work with both of them.
[15:08:38] <Amadiro> If you already have an ISP cable, there is really no need for you to have one
[15:08:46] <Horologium> if you have avrstudio and avrdude along with a programmer, you don't need a bootloader.
[15:08:48] <Pi3rrot> because i think at this time that my avr have a bad bootloader
[15:09:08] <Horologium> bootloader is not needed with the programmer, like the buffered parallel cable.
[15:09:18] <Pi3rrot> Horologium: ok
[15:09:36] <Amadiro> Pi3rrot, if you have been programming your chip with the cable so far, you do not have a bootloader on your chip at all
[15:09:40] <Horologium> so we back up once again. Are you trying to put an arduino bootloader on the chip or just program it?
[15:09:45] <grummund> Pi3rrot: bootloader is only used if you do not have a programmer
[15:10:03] <grummund> Pi3rrot: if you have a programmer then no need for the bootloader
[15:10:13] <Pi3rrot> okok
[15:10:27] <Pi3rrot> Horologium: just program it
[15:10:28] <grummund> Pi3rrot: so which programmer do you have?
[15:10:44] <Pi3rrot> grummund: actually, a bus pirate with AvrDude
[15:11:12] <grummund> Pi3rrot: ok, fine. first thing is can you read the signature OK with avrdude?
[15:11:26] <Pi3rrot> grummund: yes no problem
[15:11:43] <grummund> Pi3rrot: great. :)
[15:11:50] <Pi3rrot> i have this
[15:11:51] <Pi3rrot> http://pastebin.com/ihEA9pj8
[15:12:32] <Amadiro> Pi3rrot, looks good. You don't need a bootloader of any sort or description, you can just program your chip straight away
[15:13:14] <Amadiro> Pi3rrot, and in fact, by uploading your .hex file, you would've overwritten any bootloader that was there before (if any), so there definitely is no bootloader on the device now.
[15:13:21] <Pi3rrot> so if the chip don't do what i want, thats a problem between chair and keyboard?
[15:13:30] <Horologium> or a problem with the program.
[15:13:36] <Pi3rrot> :p
[15:13:56] <grummund> Pi3rrot: try a simple program, like flash an LED.
[15:14:48] <Pi3rrot> grummund: yes i will do this :)
[15:15:37] <skorket> would declaring main as 'int main() ...' screw things up?
[15:15:56] <grummund> skorket: no that is actually legal
[15:15:58] <Pi3rrot> thanks for informations --all
[15:16:19] <Horologium> grummund, isn't it kind of pointless though? as main() never returns.
[15:16:21] <skorket> grummund, doesn't c assume 'int' as a parameter if none is specified?
[15:16:48] <Amadiro> skorket, as return value, you mean?
[15:16:49] <grummund> nope.
[15:17:01] <skorket> no, as the passed in parameter
[15:17:10] <Amadiro> never heard of that
[15:17:27] <Amadiro> older versions of C will however assume "int" to be the type of functions and variables unless you specify a different type
[15:17:42] <Amadiro> i.e. "main(){}" would be assumed to be type int
[15:17:56] <grummund> skorket: it's best practice to prototype all functions, but they made an exception for main().
[15:18:40] <grummund> int my_function() { ... } is illegal
[15:18:51] <grummund> but int main() { ... } is ok
[15:18:57] <Xark> Using function() is pretty much the same as function(void) (for declarations, not prototypes).
[15:19:30] <skorket> grummund, weird. I swear my code wasn't working and that all I did was put a 'void' in main, as in ' int main(void) ', and now it functions properly
[15:19:40] <skorket> makes me nervous
[15:20:03] <grummund> skorket: yeah it should, because main(void) is definitely bad.
[15:20:16] <Amadiro> grummund, what's bad about it
[15:20:29] <grummund> not legal.
[15:21:02] <Amadiro> grummund, gcc with "-std=c99 -Wall -W -Wextra -pedantic -pedantic-errors -Wfloat-equal -Wundef -Wshadow -Winit-self -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wcast-qual -Wvla -Wswitch-enum -Wconversion -Wformat=2 -Wold-style-definition -Wunreachable-code -Wswitch-default -Wstrict-overflow -Warray-bounds -O3" accepts it
[15:21:05] <grummund> hmm, scratch that.
[15:21:05] * Xark thinks it is fine (you are free to ignore argc and argv - especially in freestanding implementations).
[15:21:11] <Amadiro> not even a warning
[15:21:16] <Amadiro> so I'm pretty sure it's legal
[15:21:33] <skorket> wait, what? First off, I'm saying it works with 'int main(void)' and not with 'int main()'. Second off, what is the prototype for main?
[15:22:04] <Xark> You do have to return an int from main "officially" (but even this is "bent" in freestanding implementations).
[15:23:15] <grummund> skorket: int main(int argc, char* argv[]);
[15:23:50] <skorket> grummund, how does one pass in the number of arguments and an array of strings to a microprocessor?
[15:24:27] <grummund> to a microcontroller you mean (like AVR)?
[15:24:37] <skorket> yes, sorry
[15:24:50] <Xark> skorket: "Implementation defined", however typically either it is 0, NULL or garbage (i.e. no arguments passed).
[15:24:54] <grummund> you don't, but the C language does not differentiate.
[15:25:19] <skorket> hmm, weird, ok
[15:26:21] <Xark> skorket: However, it should be totally fine to use int main() or int main(void) and "ignore" the arguments (and if those two versions differ, it would be interesting to see what the compiler is doing differently - I would expect nothing).
[15:27:04] <grummund> main(void) is not legal though, is it?
[15:27:22] <Xark> grummund: Well, it should return an int, but yes, I believe it is legal.
[15:28:13] <grummund> yes you're right, legal so long as it returns an int.
[15:28:28] <OndraSterver> OMG -PEDANTIC
[15:28:29] <Amadiro> grummund, int main(void); is a valid prototype according to the C99 standard
[15:28:43] <grummund> yes it is
[15:29:11] <Amadiro> "main(void)" is not according to C99, because C99 banned implicit types completely, but its probably legal in some of the earlier standards
[15:29:21] <skorket> ok, another question. When I declare a variable 'volatile', the compiler is presumably matching it with a register? What happens if I assign more variables than there are registers? Also, can I be guaranteed that if I declare it 'volatile' it won't be optimized out?
[15:29:22] <Horologium> OndraSterver, who you calling pendantic?!?!
[15:29:44] <grummund> skorket: volatile does not mean register
[15:29:44] <Amadiro> skorket, why would the compiler match a volatile with a register?
[15:30:04] <skorket> hmm, ok, my bad. I thought I heard that somewhere
[15:30:16] <Amadiro> skorket, there is a keyword called "register" which is kinda intended to do that
[15:30:38] <Xark> skorket: I think that is incorrect. volatile means to reload the value from memory every time it is accessed and "don't" cache it in a register.
[15:30:39] <skorket> in retrospect, a stupid question, sorry
[15:31:56] <Xark> skorket: volatile makes sense for hardware registers or any value that could be altered outside the normal program flow (in interrupt, another thread, hardware etc.).
[15:32:09] <grummund> skorket: without knowing anything about your code i'd say you have a bug! :P ... but a bug which only sometimes manifests as a failure.
[15:32:13] <Amadiro> Xark, neither, really, it just means the compiler can't apply certain optimizations that would make operations on the variable appear non-atomic under multiple threads et cetera
[15:32:20] <Amadiro> it may still be kept in a register
[15:32:44] <grummund> try turning ogg optimisations -O0 and see what happens
[15:32:47] <grummund> *off
[15:33:09] <skorket> grummund, it's working fine now, but I was sure it wasn't at some point
[15:33:25] <grummund> oh, probably a loose wire then :P
[15:33:28] <skorket> but more to the point, I have a ton of variables that I need to access in my timer ISR
[15:33:34] <Xark> Amadiro: I don't think it has anything to do with atomic. I agree it can be in a register but should be reloaded every sequence point. In truth I think the spec is a bit vague on *exactly* what volatile does (but in practice, reloading from memory is the main effect).
[15:34:33] <grummund> volatile just says to the compiler that this variable might change in memory without you knowing (so the compiler is not allowed to use cached copy)
[15:34:47] <grummund> nothing to do with atomic
[15:35:00] <Xark> skorket: Volatile won't matter inside the ISR, but if other code access variables altered by the ISR then volatile may be useful.
[15:36:25] <skorket> I make sure to access relevant variables used in the ISR in an atomic block
[15:37:57] <grummund> skorket: still need to be declared volatile though
[15:38:18] <skorket> grummund, yes, I understand, thank you
[15:41:14] <Xark> Since C can't cache a global over a function call, often volatile is not needed even for values altered in ISR (only when you will check the value in a loop - without function call). However, potentially a good documentation/safety practice anyways.
[15:41:55] <grummund> Xark: that's not a fair assumption, the compiler could inline the function without you knowing.
[15:42:17] <Xark> grummund: It can inline, but it cannot cache a global over that inlined call per the spec.
[15:42:30] <grummund> seraiusly?
[15:42:43] <grummund> seriously, even?
[15:42:46] <Xark> grummund: That is my understanding (and I care about stuff like this). :)
[15:43:06] <specing> reserve some registers for use only in interrupt routines
[15:43:29] <specing> Its much faster because there are no pop/push happening
[15:44:12] <grummund> Tom_itx: ping?
[15:45:32] <Tom_itx> yes?
[15:45:42] <Xark> specing: But be sure to "inform" the C compile you have done this (or you may be surprised when it trashes your "reserved" registers unexpectedly). :)
[15:45:50] <grummund> Tom_itx: howdy
[15:45:52] <Xark> compiler*
[15:46:28] <Tom_itx> what's up grummund
[15:46:50] <grummund> Tom_itx: is that an LED with no series resistor? - http://tom-itx.dyndns.org:81/~webpage/how_to/atmega168/mega168_howto_main_index.php
[15:47:04] <Tom_itx> i have some that have builtin resistors
[15:47:23] <Tom_itx> probably shouldn't have used them in a tutorial
[15:47:23] <grummund> i thought so, but it doesn't say.
[15:47:46] <grummund> ya, that's gonna cause some head scratching :P
[15:51:17] <specing> Xark: u8 int_temp1 asm ("r15");
[15:51:33] <specing> Xark: Im not from yesterday
[15:51:53] <Xark> specing: Yep. For sure can be a handy technique. I figured you knew that... :)
[15:59:03] <jnd> hey guys, how it's going? I haven't been here for a long time
[16:00:32] <jnd> I was playing with ATTiny4 and that little bugger seems to have ADC even when it's supposed to be cut down version of Tiny10
[16:01:36] <jnd> I'll have to explore more, maybe it's just the same die, only relabeled package and ID :)
[16:02:41] <OndraSterver> eh
[16:02:54] <OndraSterver> I always wanted to do something with tiny4 or tiny5
[16:02:57] <OndraSterver> but never knew what :/
[16:03:59] <grummund> 4-channel, 8-bit Analog to Digital Converter (ATtiny5/10, only)
[16:04:15] <OndraSterver> aye
[16:04:18] <OndraSterver> I think he got attiny5
[16:15:56] <OndraSterver> anybody has any nice idea for tiny4/5? :)
[16:16:54] <grummund> yeah, a mini relay board.
[16:17:47] <OndraSterver> mm
[16:17:51] <OndraSterver> with serial?
[16:17:57] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/avr/tiny10/
[16:18:12] <Tom_itx> there's a little ap there someone wrote that's a siren and led blink
[16:18:37] <Tom_itx> not sure which one it is
[16:18:52] <OndraSterver> grummund, wait, how would tiny with serial option differ from 74 595? :P
[16:19:13] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/avr/tiny10/goodies/pwm/
[16:19:15] <Tom_itx> that one
[16:19:20] <grummund> OndraSterver: no serial, just bare i/o
[16:19:33] <OndraSterver> huh?
[16:19:40] <grummund> general purpose
[16:19:44] <OndraSterver> yes
[16:20:04] <grummund> say if you want a lamp timer, or whatever...
[16:20:14] <OndraSterver> oh
[16:20:36] <OndraSterver> so, has anybody done TPI programmer using ft232 or similar?
[16:20:47] <OndraSterver> or hardware rs232 + max232? :P
[16:20:47] * grummund can't seem to find anything like that
[16:20:51] <OndraSterver> 'tis just half duplex
[16:21:01] <OndraSterver> with 2 stop bits
[16:24:37] <OndraSterver> although using some cheap attiny with vUSB would be even cheaper than FT232 :D
[16:25:48] <Amadiro> OndraSterver, 8u2 is quite cheap too
[16:26:56] <OndraSterver> xmega32a4u is even cheaper :)
[16:27:22] <Amadiro> how much is the ftdi rs232?
[16:27:32] <OndraSterver> more than 8u2
[16:29:01] <Tom_itx> that's what uno was banking on
[16:29:23] <OndraSterver> arduino uno?
[16:29:31] <Tom_itx> yes
[16:29:39] <OndraSterver> using 16u2 instead ft232?
[16:29:43] <OndraSterver> (yes)
[16:29:45] <Tom_itx> 8u2
[16:29:50] <OndraSterver> r3 has 16u2
[16:30:01] <Tom_itx> maybe they figured out it was too small
[16:30:39] <OndraSterver> meh, I am happy with xmega a*u series :)
[16:30:40] <Amadiro> Tom_itx, dunno why that would be, the 8u2 had plenty of space to spare after adding on the arduino firmware
[16:30:51] <Amadiro> I think it only used like half the space or so?
[16:31:02] <Tom_itx> wonder why they changed then
[16:34:30] <Amadiro> Tom_itx, just took a look at the one they have on the 16u2 (I had that one lying around), it's 4k
[16:34:36] <Amadiro> so I guess they must've found something to fill the space
[16:35:19] <Amadiro> I don't remember how much the 8u2 they use has
[16:36:33] <Amadiro> hm, according to atmel the 8u2 has 8k of flash... weird, I remembered it to have far less... are there different versions?
[16:39:08] <OndraSterver> no
[16:40:37] <Amadiro> well, beyond me why they need the 16u2 then
[16:42:37] <SuperMiguel> so vmware workstation 9 vs virtualbox 4.2?? for avr studio?
[16:43:27] <Amadiro> SuperMiguel, emacs & avrdude
[16:44:00] <Amadiro> (+ gcc)
[16:48:19] <OndraSterver> Dear internet
[16:48:24] <OndraSterver> why did you just disconnect me
[16:48:27] <OndraSterver> and stopped working!
[16:59:55] <jnd> OndraSterver: I do have tiny4, that's the interesting thing
[17:05:44] <zuloyd> hi
[17:06:23] <zuloyd> is it correct that most microcontrollers execute their program in an endless loop? i.e. if the code has reached its end, it is executed again?
[17:06:35] <zuloyd> in particular, I need to know whether this is true for the avr 644
[17:06:57] <jadew> it's true for all of them
[17:07:23] <jadew> if you don't have a loop in there, it starts, it does whatever you tell it to do and then it stops
[17:08:19] <jadew> I would suspect you want it to do stuff long after you powered it up
[17:10:40] <zuloyd> so again, does it run in an endless loop or not? you said in your second line that it starts, does its thing and then stops
[17:10:47] <zuloyd> but you also said that what I said is true
[17:11:29] <jadew> ok... then the answer is no
[17:11:33] <jadew> you have to create the loop
[17:11:43] <jadew> while (1) { do your stuff here }
[17:11:53] <zuloyd> okay, thanks
[17:12:06] <jadew> np
[17:45:05] <jnd> jadew: it doesn't stop unless you tell it to stop. If there is no loop, the program counter eventually overflows and goes from start again
[17:48:30] <jadew> jnd: you mean the end of the main function means nothing?
[17:50:04] <jnd> you mean in C? it probably has some endless loop in the end which the mcu executes but generally without loop it goes away
[17:50:37] <jadew> let me check a datasheet, it would be weird if it didn't have a stop command
[17:51:03] <jnd> it doesn't, what kind of mcu has stop command?
[17:51:22] <jnd> the closest to it is break for debugging
[17:51:35] <jadew> yeah, that crossed my mind
[17:51:53] <jadew> but a stop command would make sense
[17:52:01] <jadew> what if you need it to run when a device powers up?
[17:52:18] <jadew> just so it does initialization and device testing or something
[17:52:22] <jadew> then it goes to sleep
[17:52:44] <jadew> ah
[17:52:45] <jnd> well you must tell to go to sleep or even power down sleep
[17:53:03] <jadew> yeah, I think there's no stop command because of that
[17:53:14] <jnd> I bet most programs end with endless loop anyway
[17:53:20] <jadew> and because you can do a jump on -1
[17:53:27] <jadew> yeah
[18:17:52] <Horologium> jadew, there is a SLEEP command in AVR assembly that puts the machine to sleep and stops code execution. depending on how things are set up it might put the chip into "half-sleep" which means the thing still responds to timers and other hardware interrupts.
[18:21:35] <Horologium> if the processor does continue on without hitting a sleep or loop, eventually the program counter will roll over to zero, executing the reset vector which will take it back to the start of the program that was loaded I do believe...I could be totally wrong on this but I remember reading something on that.
[18:22:06] <Horologium> if you are using gcc for avr and your program ends with no loop I do believe it just goes into a dead loop.
[18:22:14] <Horologium> I think it goes into a dead loop anyhow.
[18:39:19] <jadew> Horologium: yeah, if you'd write it in asm, that would be the expected behavior, however, for a c program you have other expectations
[18:39:26] <jadew> one of them would be that it stops :)
[18:39:50] <Roklobsta> is someone having trhouble with the simulator?
[18:41:34] <Casper> there is no simulator that work well
[18:41:51] <jadew> I never used a simulator
[18:42:04] <jadew> I would if you could simulate an entire circuit and the avr inside it
[18:42:09] <Roklobsta> apparently the universe is a simulation
[18:42:09] <jadew> now that would be helpful
[18:42:34] <Roklobsta> nvidia and intel do that on super computers verifyinf their chip designs
[18:43:54] <jadew> I'm sure they do, but AVRs are not GPUs :) so you wouldn't need a super computer for that
[18:44:23] <jadew> as far as I know, they're actually using GPUs inside super computers nowdays
[18:45:24] <jadew> because they're able to do a lot more math than a regular cpu
[18:46:21] <Roklobsta> probably. eat your own dogfood, as they say
[19:06:50] <jadew> alright, I think there are high chances I'll make the olsfront work under wine
[19:07:14] <jadew> I managed to communicate over the serial port, which is great
[19:07:18] <jadew> brb, reboot
[19:15:57] <Tom_itx> if you didn't loop, the program would just stop executing instructions
[19:16:27] <Tom_itx> or try to execute the next random byte in memory which could be an illegal command etc
[20:59:08] <vicatcu> hi all
[20:59:19] <Horologium> hi vicatcu
[20:59:44] <vicatcu> i'm trying to put a few floating point operations in some code i've written for the attiny88
[21:00:52] <vicatcu> but when i add one line my data size at compile time (i.e. stack) jumps from 139 bytes to 403 bytes
[21:01:04] <vicatcu> something seems fishy about that
[21:01:07] <Horologium> not surprising.
[21:01:22] <Horologium> floating point does suck a lot of memory and stack space.
[21:01:45] <vicatcu> crap so that's normal
[21:02:06] <vicatcu> i think i'm getting stack overflow with that instruction
[21:02:39] <vicatcu> any way to reduce the stack and not throw away the floating point math?
[21:02:45] <Horologium> as it only has 512 bytes of ram, very possible.
[21:02:54] <vicatcu> yea
[21:03:03] <Horologium> do you really need floating point math?\
[21:03:14] <Horologium> or can you use fixed point?
[21:03:41] <Horologium> in other words, how many digits of precision do you need?
[21:04:46] <vicatcu> fixed point is possible but more complicated
[21:05:09] <vicatcu> i'm trying to communicate information over a defined interface
[21:05:32] <Horologium> http://lists.gnu.org/archive/html/avr-libc-dev/2009-01/msg00021.html
[21:05:42] <vicatcu> i would at least need to convert the fixed point value to floating point to send it
[21:05:44] <Horologium> patch for fixed point math on there.
[21:06:35] <Horologium> you are sending it as raw fixed point or sending it as text?
[21:06:59] <vicatcu> sending raw data
[21:07:07] <vicatcu> so 4 bytes of IEEE floating point data
[21:07:24] <Horologium> does make it more difficult.
[21:07:34] <vicatcu> ... ya
[21:08:39] <Horologium> shouldn't be too difficult to write a small routine to convert fixed point to IEEE floating point I wouldn't think.
[21:10:03] * vicatcu sighs heavily... back to the drawing board
[21:10:15] <Horologium> does tend to put a damper on things.
[21:10:37] <timemage> vicatcu, what does the calculation do?
[21:10:48] <jadew> Horologium, the issue you had running olsfront was caused by wine, it's not working on my debian install either
[21:11:07] <Horologium> jadew, figured it might have been.
[21:11:08] <jadew> because debian keeps a version from the early paleolitic
[21:11:12] <Horologium> haven't dug into it.
[21:11:17] <vicatcu> timemage: a division 1.0 * integer / float
[21:11:48] <jadew> Horologium, works fine on mint, I'm compiling the stable version of wine now on debian, we'll see where that takes me
[21:11:58] <timemage> vicatcu, heh, i meant more specifically.
[21:12:27] <vicatcu> timeage: oh, it's normalizing a resistance