#avr | Logs for 2013-01-27

Back
[00:16:39] <blocky> seldon?
[00:18:45] <seldon> Ah, good. There's a problem with the circuit I laid out; it'll fry your chip. Not hard to fix, though.
[00:18:52] <blocky> i don't have the resistors to keep working on this anyway
[00:19:02] <blocky> lol, really?
[00:19:29] <seldon> The problem is that when you display an eight, you'll be shoving 70mA (7 times 10 mA) into a single pin.
[00:19:51] <seldon> Which is nearly twice the maximum.
[00:19:57] <seldon> So you'll also need four fets.
[00:20:01] <blocky> i thought that was the maximum per diode
[00:20:13] <seldon> No, I mean the pins on the attiny.
[00:20:18] <seldon> On PORTD.
[00:20:28] <blocky> oh i see
[00:20:58] <blocky> but i don't see how fets would help
[00:21:10] <seldon> So you'll need four transistors, connect gate to portd, source to the display and drain to gnd.
[00:21:28] <seldon> And invert the bitmask on portd in the software, which makes it prettier in any case.
[00:21:33] <seldon> assuming n-channel fets.
[00:21:33] <blocky> so when the pin goes high, the fet saturates
[00:21:59] <seldon> Yes, and the display's out pin is connected to gnd.
[00:22:11] <seldon> Which means a current flows through the diodes and they glow.
[00:22:25] <blocky> cool
[00:23:54] <blocky> even though the display was only about a dollar it took 3 weeks to arrive... never ordering from sparkfun again
[00:24:09] <blocky> would be too bad to burn it out :P
[00:24:28] <seldon> Oh, the display would survive that, but the attiny might not.
[00:27:31] <blocky> right, do you know offhand what the current limit is?
[00:27:36] <seldon> You can see in the datasheet for the attiny2313 under Electrical Characteristics/Absolute Maximum Ratings: DC current per I/O Pin: 40 mA. So if you shove 10 mA each through seven parallel diodes and back into one pin on the attiny, the attiny is operating way out of spec.
[00:28:33] <seldon> You should generally try to stay below the absolute maximum rating by a comfortable margin.
[00:28:37] <blocky> 40 mA?
[00:28:49] <blocky> okay
[00:29:09] <blocky> ty
[00:29:38] <seldon> If you use four fets for ~5 cent a piece, they shouldn't have a problem handling 70 mA, though.
[00:31:04] <blocky> can't say ive ever bought any fets, other than a J201 for a guitar pedal
[00:32:12] <seldon> Just order fets for a dollar next time you go buy electronics.
[00:33:31] <seldon> I hold in my hand a 2N7000 that can handle up to 200mA continuously and 500mA pulsed. They cost me 5 cent a piece. That's Euro cent, so maybe six or seven US cent, but it's not terribly expensive stuff.
[00:34:26] <blocky> cool :)
[00:40:15] <dioxide> the mosfet of hackers everywhere
[00:44:23] <seldon> I'm sure there's a joke to be had here about hackers and the fets.
[00:46:00] <blocky> lol
[04:34:42] <Gerald_> hi whats the most power efficient multicore microcontroller/processor?
[04:36:47] <theBear> probly whatever is in the latest phones
[04:37:03] <OndraSter> aye
[04:37:06] <OndraSter> new Exynos octacore
[04:37:17] <OndraSter> not in phones yet, but there are prototypes with prototype phones :P
[04:37:24] <geri> hi!
[04:37:33] <OndraSter> (maybe final chips in dev phones)
[04:37:34] <OndraSter> hi
[04:39:35] <geri> OndraSter, ?
[04:39:46] <OndraSter> what what?
[05:07:20] <specing> geri: you must define what "power efficient" exactly means
[05:07:33] <specing> because the Exynosses are by no means power efficient
[05:48:00] <OndraSter> oh most efficient
[05:48:06] <OndraSter> I only read most and multicore :D
[06:06:58] <specing> most efficient chips:
[06:07:07] <specing> a) Don't have a MMU
[06:07:14] <specing> b) Don't have caches
[06:13:53] <wakko> http://hackaday.com/2013/01/26/extracting-data-with-usb-hid/
[06:54:38] <mashk> hi
[06:54:39] <tobbor> Hello mashk
[06:54:52] <mashk> how to program attiny with arduino lenardo as ISP
[06:54:56] <mashk> I connected everything
[06:55:07] <mashk> uploaded modified ArduinoAsISP to Leonardo
[06:55:16] <mashk> its connected correctly to my ATiny85
[06:55:29] <mashk> but I cant get the right target board from menu
[06:55:44] <mashk> I tried many links by now, and none of them compile
[06:55:55] <mashk> always something is wrong, header missing, or some error
[06:56:19] <mashk> where to get core files?
[06:57:37] <theBear> try #arduino maybe
[06:57:41] <mashk> thx
[07:01:32] <GuShH> theBear: I see what you did there
[07:01:36] * GuShH nods
[07:02:09] <theBear> heh, i was just thinking, it's kinda amazing they even know to come here, considering most of them don't know what makes a arduino 'go'
[07:02:24] <theBear> and lets be honest, we don't know what half of those words mean
[07:04:12] <GuShH> maybe so
[07:04:48] <GuShH> theBear: my regular finger swipe technique doesn't seem to apply to this reader... it has better biometrics...
[07:05:19] <theBear> ok
[07:05:24] <GuShH> o.o
[07:05:36] <GuShH> isn't that strange
[07:05:57] <GuShH> something actually becoming better for a change
[07:06:02] <theBear> i guess, i just think it's cool to login without typing
[07:06:11] <GuShH> lol
[07:06:15] <GuShH> or come out of hibernation
[07:06:27] <GuShH> I wonder what's the quiescent on that
[07:07:41] <GuShH> can't seem to get more than 60mbps through wifi though, weird. I'm just meters from the router
[07:07:46] <tomatto> is somehow avcc and agnd separated from vcc and gnd?
[07:08:17] <theBear> erm, kinda depends what you connect to them
[07:08:27] <theBear> they're used for things like a-d references
[07:10:49] <tomatto> theBear: i want to connect to it power supply with different ground potencial
[07:11:04] <theBear> different or floating ?
[07:14:15] <OndraSter> theBear, avcc is not used for references :)
[07:14:18] <OndraSter> aref is :P
[07:14:21] <OndraSter> avcc is supply for analog circuitry
[07:15:16] <theBear> oops :)
[07:15:41] <theBear> i wonder, does gnd and agnd get connected internally ? if not i suppose normal clamp diodes/rules apply ?
[07:15:50] <theBear> if i felt less lazy i'd go measure
[07:15:55] <OndraSter> I think they are connected
[07:15:59] <theBear> but i don't feel like that, i feel dizzy
[07:16:06] <OndraSter> avcc is connected to vcc too somehow
[07:16:16] <OndraSter> but the best way to connect is to connect it externally via some LC filter
[07:16:31] <tomatto> OndraSter: so different supply and gnd for analog part is kind of useless?
[07:17:53] <OndraSter> define different supply
[07:17:56] <OndraSter> it should be filtered supply
[07:18:17] <tomatto> OndraSter: i mean different ground
[07:18:22] <OndraSter> not really worth it
[07:19:18] <tomatto> i have analog part on different ground :(
[07:19:45] <theBear> and if you do ever have seperate supplies, something has probly 'you doing it wrong'ed for the grounds to be at anything more than slightly different potentials
[07:20:00] <OndraSter> grounds should be always on the same potentials
[07:20:02] <theBear> don't be sad, we're all fairly sure they're connected internally
[07:20:05] <OndraSter> remember, the chips are not internally optically isolated
[07:21:12] * theBear takes a note
[07:21:41] <tomatto> when i connect analog and digital potential i hear noise from reproductors
[07:21:59] <OndraSter> connect... analog... digital... potential?
[07:21:59] <OndraSter> wtf
[07:22:13] <OndraSter> afk
[07:22:24] <theBear> lol
[07:22:39] * theBear is literally struggling to breathe laughing at that sentence
[07:22:47] <theBear> wtf is a reproductor
[07:23:11] <theBear> you mean like a furry front bum ?
[07:24:04] <GuShH> his analog audio source
[07:24:18] <soul-d> you are pressing right buttons if you hear noise from that it's fine continue
[07:24:48] <theBear> bip bop booop
[07:24:58] <tomatto> theBear: sorry, i ment speakers :)
[07:26:06] <GuShH> pfffffft
[07:26:16] <tomatto> it is around 50/100Hz noise
[07:26:30] <GuShH> I bet you've got ground loops as big as my hatred for dave
[07:28:05] <theBear> lol
[07:28:25] <GuShH> updating system... wait, your update software needs to be updated first
[07:28:27] <GuShH> sigh
[07:28:41] <GuShH> and who updates the updater updater?
[07:28:50] <GuShH> THIS IS MADDNEEEEESSSS
[07:29:58] <theBear> THIS IS AVR!!!!
[07:33:41] <GuShH> :O
[07:45:48] <Tom_itx> then your firmware will require an update to run the updated software on the system requiring the updates
[08:09:59] <geri> specing, power efficient: < 1 W
[08:10:24] <specing> That is the silliest definition of power efficiency I've ever heard
[08:11:00] <specing> My ARM9 devkit running Linux takes less than 1W and it has a LDO in it
[08:14:49] <OndraSter> hehe
[08:14:56] <OndraSter> imagine the power consumption with SMPS!
[08:15:34] <specing> well the LDO is quite warm
[08:15:41] <OndraSter> exactly
[08:15:41] <specing> SoC not much
[08:15:58] <specing> I think LEDs take the majority of current
[08:16:08] <specing> they are too bright anyway
[08:16:13] <specing> going to unsolder them
[08:18:05] <specing> I don't understand why they put such bright LEDs in them in the first place
[08:18:27] <specing> Like you are going to hack on them under noon sunlight on some havaiian beach
[08:18:34] <MrMobius> yeah its like a competition now days
[08:18:36] <specing> nuts.
[08:18:48] * OndraSter always uses 1k resistor with 3.3v power supply
[08:18:48] <MrMobius> i always put at least a 1k resistor on mine
[08:18:48] <geri> LD0?
[08:19:03] <specing> geri: Go do your goddamn fucking research already
[08:19:08] <specing> GOOGLE
[08:19:29] <geri> LDO!
[08:20:30] <specing> OndraSter: those resistors have such small value I can't even read it
[08:20:54] <vsync_> Tom_itx: yo dawg we heard you like updates so we put an update in your update so you can update while you update
[08:21:36] <MrMobius> i have some with 3k resistors soldered on to their legs and they are really bright. i dont know how thats even possible at 3.3v
[08:21:55] <specing> OndraSter: 470 Ohm
[08:22:47] <specing> OndraSter: 230 ohm on one ACTION led
[08:22:56] <specing> 1000 Ohm on PWR LED
[08:23:20] <specing> the ACTION one is off all the time and only blinks, so I guess 1kOhm is appropriate
[08:23:34] <specing> even 1kOhm seems too little
[08:23:42] <specing> I'd put 2k2 on it
[08:23:46] <specing> or 4k7
[08:28:55] <specing> Also accidentaly pressed the reset button while trying to cover the LEDs so I could see the resistor markings
[08:29:07] <specing> fsck is going to bitch on next boot again :X
[08:37:47] <OndraSter> lol specing
[08:37:50] <OndraSter> 1k is fine
[08:37:57] <OndraSter> (I presume they are on 3v3 rail?)
[08:44:23] <creep> [070350] <seldon> So you'll need four transistors, connect gate to portd, source to the display and drain to gnd. <<< incorrect, an N-FET's source is normally on gnd, and it switches source onto drain, unless you are building a synchronous rectifier
[08:44:28] <specing> Idk but they are f*king bright
[08:44:36] <specing> Or my eyes are hyper-sensitive
[08:44:38] <specing> OR BOTH
[08:50:42] <creep> haha lcd device on linux :) http://blog.vinu.co.in/2012/02/linux-device-driver-for-16x2-lcd-module.html
[08:51:56] <OndraSter> oh god parallel port
[08:52:01] <OndraSter> WELCOME TO THE WORLD OF 90s
[08:59:39] <theBear> pretty sure ks0118 (or something like that, common graphic small lcd driver) has a standard in-kernel driver that can work on parport these days
[09:03:25] <specing> I'd be more interested in GPIO bangers
[09:04:34] <specing> I was thinking about updating 2.6.38 patches for 3.x.x kernels
[09:05:10] <specing> that means device tree support, PINCTRL support (for dynamically reconfiguring GPIOs) and other stuff
[09:06:52] <theBear> pretty sure the framework can work with in-kernel gpio interfaces too, never looked into it too hard cos i'm bitter i accidentally left behind my sexy old alpha-server lcd display with those drivers when i moved a few years back
[09:13:37] <creep> yeah, pretty lame that PC still does not have a dedicated IO port and maybe ADCs and DACs
[09:14:23] <creep> it would be much simpler and better to make STEP-DIR cnc control then
[09:15:23] <theBear> i suppose it's still the idea that a pc is kinda for normal/desktop use
[09:15:44] <theBear> tho most modern chipsets seem to have at least a few gpio, just usually not broken out to anything accessible
[09:15:50] <theBear> intel ones anyway
[09:16:51] <creep> for flashing leds or something slow stuff, anything will do, like shift registers on serial port
[09:16:56] <theBear> and you got low freq adc and dacs in soundcards that are standard now
[09:17:14] <creep> that is only AC
[09:17:18] <theBear> and if you got bt878 chips the gpio abuser on them seems good
[09:17:18] <specing> Most PCs have SPI and LPC ports
[09:17:23] <specing> you can hang your stuff there
[09:17:26] <creep> and not really meant to be used for anything else
[09:17:29] <theBear> mmm, spi/i2c
[09:17:42] <theBear> otherwise you can hack or use a dummy ram module
[09:17:45] <specing> oh, not to mention I2C (or SMB)
[09:17:47] <theBear> if there no header
[09:18:07] <specing> theBear: Good luck registering 1600 MHz ram signals
[09:18:14] <creep> :)
[09:18:16] <creep> hahaha
[09:18:17] <Horologium> use floppy port!
[09:18:19] <theBear> not ram signals, i2c eeprom
[09:18:22] <creep> yeah i should really do that
[09:18:23] <theBear> silly :)
[09:19:00] <creep> it would be a fast cnc controller if i use the last 32 bytes of memory for port output input in a DDR3 memory
[09:19:02] <theBear> pretty sure rue got something working with the floppy port a while back
[09:19:15] <theBear> yeah, faster than anything i'm ever likely to make at home :)
[09:19:38] <specing> Well all the computers I bought to (maybe) hack on are hackeable
[09:19:53] <Horologium> even a relatively cheap pci i/o card would be good.
[09:20:04] <creep> Horologium<< hmm, floyppy port, if your board still has it, though i have it and currently t is unused ;/
[09:20:04] <specing> PCI is 33 MHz
[09:20:17] <creep> is it simple and straight forward like prallel port?
[09:20:17] <Horologium> there are many things out there on using the floppy port for i/o
[09:20:17] <specing> you'd need a FPGA for that
[09:20:29] <specing> or a MCU with PCI device built-in
[09:20:39] <creep> anybody got some links for linux hacks on flashing leds on 144 floppy cable?
[09:21:42] <creep> yeah i was thinking about pci, but it needs device driver, dedicated PCI card ;/
[09:22:00] <Horologium> creep, I haven't played with it in a looong time, not since the dos days...
[09:22:03] <creep> and , a parallel port is "good enough"
[09:22:05] <Horologium> there used to be a lot out there on it.
[09:22:39] <creep> Horologium<< my question would be if it can be used to switch logic states instead of just transfer data
[09:22:49] <Horologium> yes
[09:22:52] <Horologium> I'm sure it can.
[09:22:53] <creep> o cool :)
[09:23:11] <Horologium> just don't remember how.
[09:23:11] <creep> my next will be to put leds on it then
[09:23:15] <Horologium> it has been a looong time.
[09:23:33] <creep> can this be done with IDE too?
[09:23:37] <creep> ^^
[09:23:46] <Horologium> http://wiki.osdev.org/Floppy_Disk_Controller#PIO_Data_Transfers
[09:23:53] <Horologium> http://en.wikipedia.org/wiki/Floppy_disk_controller
[09:23:56] <creep> sata has replaced it, so ATA will be unused too
[09:24:19] <Horologium> I think so. I seem to remember seeing something rue_ did a while back with the IDE port.
[09:30:52] <Horologium> man...I haven't looked at this stuff in a long time....there used to be a page that had all the ports listed with interfacing information...background was a sickly yellow...
[09:31:01] <Horologium> can't for the life of me remember that page's url.
[09:32:31] <Horologium> http://eds.dyndns.org/~ircjunk/circuits/ide2isp.png ide interface
[09:32:44] <Horologium> looks like an avr programmer on an ide port.
[09:33:18] <Horologium> http://eds.dyndns.org/~ircjunk/tutorials/elex/ata2isp/main.html
[09:42:03] <Horologium> http://www.isdaman.com/alsos/hardware/fdc/floppy.htm info on programming floppy drive controller.
[09:42:22] <Horologium> wish I could find that old site with the dos floppy port interface....it must be gone.
[09:54:07] <creep> Horologium<< sounds fun thanks :) i think i will use PATA control if it can be used as a general IO port too
[09:55:07] <creep> i don't really care if i need to put some buffers/FETS on it and put connectors to back of computer ;>
[09:55:31] <creep> with parallel port, it bothers me it is already "outside"
[09:55:49] <creep> and no +5V going out
[09:58:33] <Horologium> tap the ps2 keyboard port for power
[09:59:00] <creep> i could just grab a red wire from ps, but its hacking ;/
[09:59:07] <creep> i like plugin things
[09:59:40] <creep> like a neat connector at back of pc for a stepper motor
[09:59:46] <Horologium> I have an old old parallel port interfaced ethernet adapter that uses the keyboard port for power.
[10:00:59] <Horologium> a usb avr plugged to an internal USB port with some kind of connector on the back would work.
[10:01:09] <Horologium> USB just has some latency issues.
[10:02:49] <creep> awesome for PLC... no good for step-dir control
[10:04:29] <creep> that needs the lowest possible latency and parallel data output
[10:05:10] <Horologium> the guys on the cnc channels don't like it when I mention usb.
[10:05:20] <creep> :)
[10:05:38] <creep> because it would need a complicated motion controller
[10:05:50] <creep> using FPGAs
[10:06:04] <Horologium> I've done it with AVR.
[10:06:52] <creep> you do miling stuff on usb with an avr ?
[10:06:56] <creep> milling
[10:07:20] <Horologium> yes, but I use the avr to do stops rather than feeding it back to the PC all the way.
[10:07:35] <creep> it does not need feedback
[10:07:46] <creep> it needs a buffer, and a motion control input
[10:07:50] <Horologium> if it hits a limit switch the avr handles feedback
[10:08:28] <Horologium> also played with a full gcode interpreter on avr
[10:09:24] <creep> nice
[10:09:28] <Horologium> http://www.contraptor.org/grbl-gcode-interpreter
[10:09:55] <theBear> whenever i think cnc or gcode i only think of avr
[10:09:59] <Horologium> drop the g-code onto an SD card, stick it in the box, hit the button, and away it goes till it hits an error condition.
[10:10:02] <creep> that means you make a CNC machine, plug in a pendrive, and do not need a PC to control it
[10:10:14] <theBear> ooh, that's cool with the sdcard
[10:10:34] <creep> :)
[10:10:51] <creep> yeah, well a CNC machine really don't need a PC if the machine gets G-CODE
[10:10:55] <Horologium> just use a simple fat file system and no subdirectories and have to have the file named something specific.
[10:11:25] <theBear> yerp, easy, 'common knowledge' code (the sd/fat part)
[10:11:35] <Horologium> yeah.
[10:12:02] <Horologium> one of the things I'm working on doing is adding something to the gcode so it can include subfiles.
[10:12:03] <creep> so it is easier ot make a g-code cnc machine than to make a PC controlled motion controller? :)
[10:12:19] <theBear> i still wanna try my raw-sd-data idea (i got a specific app in mind, but that's by the by) ... should work fine and saves all that fat overhead at the expense of perhaps some pc-side processing, but depending on the data dd to the device alone might work
[10:12:25] <Horologium> creep, not necessarily easier, just different...and I've stolen other peoples' work for it.
[10:12:35] <Horologium> theBear, done that...
[10:12:46] <Horologium> raw sector writes from the avr.
[10:12:51] <Horologium> only, I did it with harddrive.
[10:12:58] <Horologium> IDE drive.
[10:13:07] <theBear> i never done a pc-cnc interface (or a full working machine, just various bits that could go together for one <grin>) but i think gcode is not uncommonly used as the transport for pc -> hardware 'realtime' control
[10:13:07] <Horologium> then plugged it into a PC and used DD to read it.
[10:13:25] <theBear> Horologium, ooh nice, gotta admit i'm lazy and prefer less wires tho :)
[10:13:37] <Horologium> gotta go outside in the ice..be back soon, I hope.
[10:13:42] <theBear> oh backwards, my one would be (at least primarily) pc data -> avr
[10:13:51] <theBear> don't jump on any lakes
[10:15:49] <creep> all the cool stuff getting used on PC are phased out
[10:16:08] <creep> ISA slot... parallel port... and noww IDE
[10:17:17] <theBear> heh, they only seem cool cos they slow enough for us to interface, and when they were hitech we didn't have the technology to interface them <grin>
[10:19:54] <creep> theBear<< ok, i have no clue now how would i map a DDR3 memory region to be my io port :(
[10:20:14] <creep> i'd happily hack a memory to do this
[10:21:15] <theBear> that still isn't what i was talking about, just an easy access point for i2c bus, but i suppose you'd mask it with a memmap= boot cmdline, and umm, actually, maybe some kinda mlock thing, but i dunno about that side of c/in os programming
[10:22:02] <theBear> or if you can lock/request a given mem address/area you could use the memory whatsit device to abuse that area
[10:22:22] <creep> it is possible to reserve an address space
[10:22:24] <theBear> /dev/kmem or something
[10:22:33] <creep> mark as bad
[10:23:04] <theBear> mark as bad with memmap ? i suspect that would stop you accessing it thru kernel, but maybe the raw mem device still sees it
[10:23:14] <creep> but then some magic is needed for 1600MHz dataflow interception
[10:23:23] <theBear> for reference badmem stuff is in the past, if you wanna badmem now you use memmap
[10:23:34] <theBear> err badram
[10:24:41] <creep> how cool it would be to write/read bytes at the end of the ramstick to control/read io ports :)
[10:25:22] <specing> creep: It is called ARM
[10:25:33] <specing> And it is cool
[10:25:38] <theBear> heh
[10:27:36] <creep> are there fpgas that could intercept an 1600MHz ddr3 ?
[10:27:49] <specing> yes
[10:27:54] <specing> Are they cheap? No.
[10:28:01] <creep> or i can do this with a 400MHz ddr-1 only?
[10:28:20] <specing> Go for an ARM
[10:28:46] <creep> and put linux on it, use as PC ?
[10:33:05] <specing> Sherlock
[10:33:20] <theBear> wiring would be tricky without making your own ram-pcb methinsk
[10:36:55] <creep> [171834] <lautriv> creep, would be more expensive than a PCI-I/O card
[10:36:56] <creep> [171853] <creep> i think it would have lower latency and be simpler
[10:36:56] <creep> [171855] <creep> ;/
[10:36:56] <creep> [171907] <creep> i have a write command, address, and data
[10:41:47] <tzanger> creep: I think a cyclone IV could do it, but that's no small project
[10:42:12] <tzanger> intercept as in sit between RAM and the controller?
[10:42:22] <creep> yes :)
[10:42:35] <creep> just listen
[10:42:53] <creep> or if input needed, then write too...
[10:43:33] <Horologium> memory mapped i/o...
[10:43:40] <Horologium> worked great on the 6502
[10:43:41] <creep> now with an FPGA i could map 1024 leds onto the last 1MB of ramstick
[10:44:07] <Horologium> works on the atmega128 too.
[10:44:32] <Horologium> hmm...lights are flickering.
[10:44:36] <creep> :)
[10:44:49] <Horologium> we have a bit of an ice storm going on here.
[10:45:03] <creep> hehe
[10:45:05] <creep> use leds
[10:45:21] <creep> capacitor wwill hold up voltage and stop flicker
[10:45:32] <Horologium> would have to rewire for DC power.
[10:45:33] <creep> also they are better in every aspect
[10:45:37] <creep> no.
[10:46:18] <Horologium> problem is, tv, computer, and washer are all 110V AC mains powered too.
[10:46:25] <creep> you can drive the led from 230VAC, simplest way is to use a graetz, series capacitor, peak limit resistor,
[10:47:42] <creep> best way is to use a CCCV switching power supply
[10:51:43] <theBear> graetz ? that's not an actual term for the old series cap ac voltage drop supply trick is it ?
[10:52:01] <theBear> cos a term would be handier than what i just said
[10:52:10] <creep> that is 4 diodes full-wave rectifier
[10:52:13] <theBear> oh
[10:52:57] <creep> so the capacitor provides the magic to achieve current generation according to line frequency
[10:53:30] <theBear> yeah, basically riding the knee on a hipass filter
[10:53:34] <creep> cheap chinese 230V leds use this
[10:53:45] <theBear> genius, doesn't waste anything, just ignores a lot of the voltage
[10:53:56] <theBear> first saw it in valveamps
[10:54:28] <creep> well, it lets through some charge over the capacitive susceptance
[10:57:29] <theBear> like a hipass filter, c-r style
[11:01:39] <Horologium> http://www.usbchainsaw.com/
[11:02:57] <Richard_Cavell> that is essential
[11:02:58] <Tom_itx> you callin that a saw??
[11:03:57] <Tom_itx> maybe for pruning but that's about it
[11:04:37] <Horologium> it's a farce
[11:04:49] <Horologium> an ad for a sound program to make your computer sound like a chainsaw.
[11:05:08] <Tom_itx> even if it were true it would be a farce
[13:24:46] <abcminiuser> Man, multi-arch code looks like ass
[13:24:46] <abcminiuser> http://pastebin.com/aGQrAdTM
[13:24:56] <OndraSter> hey abc
[13:24:59] <OndraSter> 'sup
[13:25:41] <abcminiuser> I've got some LUFA demos working in AS6 now, with XMEGA
[13:25:45] <OndraSter> #if defined(BOARD_HAD_BUTTONS)
[13:25:48] <OndraSter> HAD?
[13:26:00] <abcminiuser> Whoops
[13:26:05] <OndraSter> line
[13:26:08] <OndraSter> 107
[13:26:11] <Steffanx> LOL
[13:26:13] <abcminiuser> Ja, fixed
[13:27:01] <abcminiuser> Takk
[13:27:14] <Steffanx> Yay @ almost 20% of the lines is license bullshit abcminiuser :)
[13:27:20] <OndraSter> more
[13:27:21] <abcminiuser> Not sure the ugly preprocessing makes it worth it :(
[13:27:31] <abcminiuser> Steffanx, :(
[13:57:10] <Horologium> I prefer to separate architectures to different files and preprocess include them.
[13:57:26] <Horologium> it does require some duplication, granted, but easier to work with far as I'm concerned.
[14:04:58] <abcminiuser> Indeed, but that's a LOT of duplication for only a few lines
[14:04:59] <Horologium> http://www.i-programmer.info/news/169-robotics/5392-a-robot-with-a-chainsaw.html
[14:05:11] <abcminiuser> The init code will disappear once I fold it into a Board_Init()
[14:05:21] <abcminiuser> So it's only the clock setup and the board UI that will be conditional
[14:07:23] <Horologium> now THAT is a CNC machine!
[14:12:43] <timemage> Horologium, we just need to mount it on one of google's self-driving cars.
[14:14:21] <Horologium> just mount it on a segway!
[14:16:31] <timemage> Horologium, have you read "daemon" by swarez by any chance?
[14:16:34] <Horologium> nope.
[14:16:48] <timemage> if this idea appeal to you, you might like that book. =)
[14:17:07] <Horologium> anything that destroys humanity in a horrific manner appeals to me.
[14:18:20] <timemage> well, this isn't so much horrific, well, you'd have to read it. in the book there are "razor backs" at least, i think that's what they were called. basically a motorcycle with an articulating arm holding a katana. they'd go upright sometimes, sort of like a segway.
[14:20:09] <Horologium> I could see that arm/chainsaw thingie being programmed to do artistic carvings.
[14:20:30] <Horologium> like the guys who carve logs into bears with chainsaws.
[14:22:19] <creep> Horologium<< well, it is a robotic arm ;/
[14:22:37] <creep> that is more difficult to control than a 3 linear axis
[14:22:54] <Horologium> just more math.
[14:23:56] <creep> i have the parts for a few small robot arms, but i was hesitating to build it
[14:24:51] <creep> even a meter long arm would need very stiff first joint, and very precise positioning
[14:25:00] <Horologium> yup.
[14:26:01] <creep> no problem if you give it a laser or plasma cutter though, that requires zero force
[14:29:15] <creep> too bad i can't just parallel up cd writer lasers :(
[14:29:43] <creep> i have about 40 cd writers
[14:29:59] <Horologium> a 5 meter diameter solar collector!
[14:30:14] <Horologium> just need some optics to get a nice thin beam.
[14:30:21] <creep> :)
[14:30:46] <Horologium> I should get started on my next "bot"
[14:31:09] <Horologium> have had a request for multicolor chalk bot.
[14:31:30] <Horologium> that will draw in chalk dust on a driveway or parking lot.
[14:31:54] <creep> i'd rather spray-paint
[14:32:07] <Horologium> this is for kids art project thingie.
[14:32:18] <Horologium> draw an outline then let the kids color it in.
[14:37:15] <theBear> heh, collector that big you wanna be careful you don't cook the kids
[14:37:35] <theBear> actually, chalkbot is kinda cool
[14:39:03] <Horologium> can't decide if I want to do it pixel style or vector style.
[14:39:21] <creep> vector
[14:39:31] <Horologium> vector is more difficult.
[14:39:44] <creep> why?
[14:39:47] <theBear> vector would tend to be better and easier, just that getting the 'art' ready isn't as simple as grabbing a bitmap
[14:39:54] <Horologium> yeah.
[14:40:03] <theBear> i suppose you could do little strokes for bitmap style
[14:40:08] <creep> vector is simpler and better
[14:40:08] <Horologium> I could take a bitmap and just drive back and forth across the area.
[14:40:10] <theBear> or twist
[14:40:20] <Horologium> vector would be faster overall.
[14:40:21] <creep> infinitely scalable
[14:40:41] <Horologium> but more MATH!
[14:40:59] <creep> pixels are a waste of space and junk quality
[14:41:16] <theBear> mmm maybe, if you did the same image vector or bitmap (assuming something fairly simple) and did shortcuts in yer bitmap code so you didn't just scan empty space, i think it would be similar time
[14:41:25] <Horologium> I think they want me to scan in coloring book pages and draw them.
[14:41:34] <creep> oh
[14:41:40] <theBear> i dunno, i think vector would be less, the source-vector-image tells you what to do
[14:41:44] <theBear> less math
[14:42:16] <creep> well if the source is bitmap then you have to decide how to draw it
[14:42:19] <Horologium> but easier to just drive back and forth, effectively scanning, and drop chalk where there is a pixel.
[14:42:31] <Horologium> I have software to take line drawings and convert them to vectors.
[14:43:17] <creep> drop some toner and burn it with a laser
[14:43:19] <creep> :)
[14:43:22] <Horologium> hehe.
[14:43:33] <Horologium> have enough waste toner for that too.
[14:43:39] <Horologium> but I don't think they want these things permanent.
[14:43:44] <creep> wind will not blow it away ;>>
[14:44:13] <Horologium> looking at those crayola spray chalk units for the drawing source.
[14:44:50] <creep> Horologium<< make it draw this and you'll be godlike http://www.telegraph.co.uk/expat/expatpicturegalleries/7078965/Pavement-art.html
[14:45:28] <creep> http://blog.grisd.net/wp/grjh-art/2011/05/26/sidewalk-art/
[14:45:34] <Horologium> have seen some of those.
[14:46:24] <creep> http://thewondrous.com/3d-pavement-art-huge-hole-in-the-ground/
[14:46:27] <creep> :)
[14:46:46] <theBear> heh, seen that one, like it a lot
[14:48:09] <Horologium> they look odd from the wrong angles too.
[14:48:50] <seldon> No need for chalk or toner on that last one. Just for a much stronger laser.
[14:49:38] <theBear> heh
[14:54:04] <creep> haha http://www.urbburbblog.com/mind-blowing-3d-sidewalk-art/ http://koikoikoi.com/2012/02/30-impressive-3d-sidewalk-chalk-artworks/
[15:17:38] <creep> Horologium<< if i make a little CNC arm and use a linear voltage feedback for accurate positioning, and i have 50V/mV gain with 60deg movement, and i assume i can servo 0.1mV i have about 0.0072 deg precision
[15:18:00] <creep> plus the errors caused by temperature change and mechanical deformations
[15:18:23] <Horologium> k
[15:18:25] <Horologium> ok
[15:18:32] <creep> that sounds good?
[15:18:35] <creep> ;/
[15:18:57] <creep> for let's say <80cm arm
[15:22:01] <creep> i think it will be not as near accurate as a 3 linear axis leadscrew type stuff
[15:24:05] <creep> http://rainbowlazer.com/3d/rhino/diy-3-axis-cnc-millenhanced-machine-controller/
[15:50:03] <creep> Horologium<< some stuff to try out your gerber avr :) http://www.instructables.com/id/Easy-to-Build-Desk-Top-3-Axis-CNC-Milling-Machine/
[15:50:39] <creep> or http://www.instructables.com/id/DIY-CNC/
[16:01:33] <Exiles_> where can I get some avr's to learn with for free/almost free?
[16:07:36] <Tom_itx> where do you live?
[16:07:40] <Tom_itx> get samples if you can
[16:20:55] <methods> arduino nano's on ebay are like 11$
[16:21:11] <Tom_itx> mega2560's are like 22
[16:21:49] <Tom_itx> if you can't spring for that you're in the wrong hobby
[16:25:25] <creep> lady self defense shirt :) http://www.adafruit.com/blog/2013/01/23/hedgehog-dress-deploys-spikes-wearablewednesday/
[16:27:21] <Tom_itx> wash separately
[16:32:50] <creep> wow, what a delta design http://www.3ders.org/articles/20130124-clean-and-elegant-deltamaker-personal-3d-printer.html
[22:06:18] <dhiltonp> I've seen some code that reads ADCL then ADCH, but it seems that you can just read ADC and get the same info - is this a recent option that most web pages are unaware of as yet?
[22:06:49] <Tandoori> okay I want to get started programing some avrs
[22:13:41] <Xark> Tandoori: The topic has some good links...
[22:25:34] <dhiltonp> looking at iomx8.h (I'm on an atmega168pa) line 417, it looks like ADC is a 16-byte alias to the same address as ADCL, which should work assuming the AVR is little endian
[22:27:14] <dhiltonp> I guess most tutorials are a little skewed on that; maybe avr-gcc recently added the support for 16 bit reads, or some avr chips don't support it at all
[22:31:26] <Xark> dhiltonp: AFAIK, AVR is generally little endian (addresses were already that way).
[22:32:26] <dhiltonp> ok
[22:39:14] <seldon> ADCH and ADCL are registers, not memory. If you use ADC, the compiler will generate code that juggles the two to do 16-bit calculations, as it does for all 16-bit calculations.
[22:40:56] <dhiltonp> ok
[22:41:04] <dhiltonp> right, registers, I shouldn't have said address
[22:43:04] <dhiltonp> my code ends up 10 bytes smaller when saving ADC instead of ADCL and ADCH: https://github.com/dhiltonp/hexbright/commit/f131892827c649def7f6602d7c888d14a470b090#libraries/hexbright
[22:43:31] <Tom_itx> don't save the regs individually
[22:43:34] <Tom_itx> use them as one
[22:44:31] <dhiltonp> as I am now, you mean?
[22:44:55] <seldon> Yes.
[22:45:09] <dhiltonp> ok
[22:45:30] <seldon> Unless you want to pull sneaky optimisations (such as ignoring some low bits), let the compiler sort that stuff out.
[22:45:32] <dhiltonp> I was a little confused, because all of the tutorials I could find used the two registers separately, then merged them
[22:45:33] <seldon> It's better at it than you.
[22:45:35] <dhiltonp> ah, right
[22:47:45] <seldon> Maybe the code for the tutorials was originally written in asm and only translated or something.
[22:48:06] * Xark notes there are a few cases to be aware of, e.g., TIM0L,TIM0H where reading the low latches the high (so you kind of have to read low before high).
[22:49:00] <seldon> Oooh, yes. That would be an evil thing to debug.
[22:49:48] <Xark> seldon: It was a bit confusing (asm and I was new to AVR). :)
[22:49:51] <dhiltonp> the tutorials said something about the ADCL locking ADCH, but I'm guessing that because ADC is explicitly referrenced as a 16 bit value in the header it should be fine
[22:51:29] <seldon> It should.
[22:51:45] <Xark> dhiltonp: Hmm, not familiar with those registers but sounds very similar to my timer example. The chip needs to provide a way to "atomically" get the 16 bit counter (as opposed to the value changing between low and high read).
[22:52:46] <dhiltonp> what sort of problems did you see when you were bit by it?
[22:54:50] <seldon> Well, imagine a 16 bit timer that you query when it's at 255. You get the high byte as zero, then when you get the low byte it's one clock further and has overflowed, giving you a timer value of zero instead of 255 or 256.
[22:55:00] <Xark> dhiltonp: Well, in my case I was using a system clock speed timer to adjust for interrupt jitter (for 100% cycle accuracy generating NTSC video), I reorganized (optimized) the code and it quit working. I knew it was something fishy (since my code looked OK) so hitting datasheet I saw the latching and it made sense.
[22:55:51] * Xark notes in his case it kept reading the "stale" high byte which never updated because I wasn't polling low byte (and hung)
[22:56:30] <dhiltonp> ah, TIM is a counter
[22:56:36] <dhiltonp> *TIM0
[22:56:50] <dhiltonp> yeah, I can see that being problematic
[22:56:58] <Xark> dhiltonp: Yes, 16 bit counter.
[22:57:05] <Xark> er, timer counter. :)
[22:57:16] <seldon> TCNT1 usually, isn't it?
[22:57:30] <Xark> seldon: Probably, I am making up the register name. :)
[22:57:43] * Xark works with too many MCUs. :)
[22:58:08] <dhiltonp> this is my first foray into development on embedded systems
[22:58:28] <Xark> dhiltonp: Neat.
[22:58:32] <seldon> Godspeed, then. :P
[22:58:52] <dhiltonp> :) thanks
[22:58:57] <seldon> Start with something that can blink, to get instant satisfaction.
[22:59:04] <dhiltonp> yep
[22:59:06] * Xark started when the "beefiest" computers he could afford were pretty much non-integrated MCUs. :)
[22:59:19] <dhiltonp> I'm programming a library for the hexbright
[22:59:26] <dhiltonp> it's all about the lights!
[23:03:09] <seldon> Also, start with something that's not so expensive you'll kick yourself if it breaks.
[23:04:53] <dhiltonp> currently a lot of it is written in arduino, but I plan on refining it and porting it to avr-gcc
[23:05:26] <dhiltonp> I'm sure I'd kick myself if I broke it, but I can live with it
[23:09:23] <seldon> I think the arduino ide uses avr-gcc.
[23:09:28] <dhiltonp> yeah
[23:09:48] <dhiltonp> but because I'm on a specific platform, I don't need the generality
[23:12:34] <seldon> Well, platform independence between AVRs has to be rather limited, anyway. Your xmega stuff isn't going to run on an attiny11.
[23:13:00] <dhiltonp> there are also some timing issues that can cause flicker
[23:13:09] <dhiltonp> I'm hoping to solve those
[23:13:27] <dhiltonp> also, arduino seems to chew up over 1/3rd of the available ram
[23:14:26] <seldon> What's in the hexbright?
[23:14:58] <Xark> dhiltonp: I don't think Arduino is responsible for that. Keep in mind on AVR, generally if you have foo("whatever"); the "whatever" will be copied to RAM on boot (since const char * ptr is not in program flash).
[23:15:39] <Xark> dhiltonp: It will use a bit of RAM, but not too much (and a few KB of flash).
[23:15:46] <dhiltonp> atmega168pa, 3-axis accelerometer, thermal sensor, cp2102 serial-usb converter, cree u2 led (500-600 lumens), red and green tail cap leds
[23:16:11] <seldon> 500-600 lumen? O.o
[23:17:30] <dhiltonp> yep, basically a 60 watt bulb in the flashlight
[23:17:35] <dhiltonp> it'll run for an hour at that brightness
[23:17:52] <dhiltonp> or 30 hours or so around 150 lumens
[23:19:21] <dhiltonp> http://pastebin.com/1Hq34Q2n
[23:19:38] <dhiltonp> that's a minimal example, it takes up 200 bytes of ram
[23:20:42] <Xark> dhiltonp: Well, minimal with serial. :) The issue here are the serial buffers. You can reduce their size if RAM is an issue.
[23:20:49] <dhiltonp> a valid point
[23:21:11] <dhiltonp> I've printed the values without serial, and it saves about 100 bytes of ram
[23:21:17] <Xark> dhiltonp: I believe 64 byte xmit/recv by default.
[23:21:28] <dhiltonp> still, we have about 400 bytes free for user-space programs right now
[23:21:32] <dhiltonp> which isn't so great
[23:22:19] <Xark> dhiltonp: No argument it could be leaner, but I don't think it uses 100 for (e.g.) blink last I checked.
[23:22:29] <dhiltonp> fair enough
[23:22:48] <dhiltonp> we'll see how small we end up
[23:25:10] <dhiltonp> oh, the code has no print capability when not in debug mode (no Serial, no strings)
[23:52:09] <seldon> Well, I'd expect them to put string literals into progmem, where they belong.
[23:59:21] <dhiltonp> the code = my library
[23:59:23] <Xark> seldon: The problem is C requires one to seamlessly cast const char * to char * (or vice versa). Since the AVR requires an actual different opcode to read program memory or SRAM, gcc assumes SRAM always (and so init routine copies arrays to ram). You can avoid this, but you need special extions.
[23:59:25] <dhiltonp> idk what arduino itself does
[23:59:27] <Xark> extensions*