#avr | Logs for 2013-09-14

Back
[00:02:34] <jadew> w|zzy, I was only asking because I haven't included that in my PSUs, only current limitting
[00:02:36] <w|zzy> ahh. good fun
[00:03:08] <jadew> felt I could do with just limitting
[00:03:17] <w|zzy> over current is cool..like an adjustable fuse
[00:03:18] <jadew> I guess I could cut the output off digitally, but it's not the same
[00:03:23] <jadew> yeah
[00:03:59] <w|zzy> sounds interesting.. if I had more time.
[00:06:01] <w|zzy> if ocp is set above current limiting it isn't hit
[00:07:11] <jadew> yeah
[00:07:32] <w|zzy> obviously.. :-P
[00:50:13] <tzanger> wow building a simple 7-switch, 9 LED connector breakout should NOT have taken that long
[00:56:29] <Roklobsta> no that was too long.
[00:56:35] <Roklobsta> erm, how long was it?
[05:33:47] <Anaphaxeton> in case i make something that i want to connect to my computer
[05:33:59] <Anaphaxeton> how do i interface with pcie?
[05:34:08] <twnqx> ummm
[05:34:10] <twnqx> "not"
[05:34:17] <Anaphaxeton> huh?
[05:34:26] <Fornaxian> you buy a pcie interface board.
[05:34:32] <twnqx> even the slowest pcie has 2.5ghz signals
[05:34:39] <Fornaxian> that's one of those questions, which, if you have to ask, you can't do it.
[05:35:07] <twnqx> you can in theory use some philips transceiver + fpga for gen 1
[05:35:13] <twnqx> or larger and more expensive fpgas for newer PCIe specs
[05:35:17] <MarkX> are there even avr chips at 2.5ghz?
[05:35:21] <twnqx> of course not
[05:35:24] <Fornaxian> PCI is difficult...PCIe is even worse.
[05:35:33] <MarkX> didn't think so
[05:35:52] <Roklobsta> I did a PCI bus once. PITA.
[05:36:05] <twnqx> Anaphaxeton: you will want to use USB
[05:36:12] <GargantuaSauce_> or ethernet
[05:36:19] <twnqx> yeah, or that
[05:36:22] <Anaphaxeton> good suggestions
[05:36:26] <Fornaxian> http://www.advantech.com/products/PCIE-1756/mod_D82B814B-742F-41F9-89A2-3ABC8B59120B.aspx
[05:36:30] <Roklobsta> although if you follow the guidelines in the honkin' PCI spec it's OK.
[05:37:03] <Roklobsta> when I read it I was impressed it uses 1.5V reflections to boost the signal to 3v
[05:37:24] <twnqx> then you realized what a nightmare it is to implement that? :P
[05:37:49] <Anaphaxeton> what i was thinking was the epiphany chip actually... since nobody else could respond i decided to ask here
[05:38:02] <Anaphaxeton> i may need an mcu the epiphany and pcie
[05:38:24] <Anaphaxeton> and i am trying to think how it could be done
[05:38:35] <twnqx> an external mcu?
[05:38:44] <Anaphaxeton> without a 1000e fpga
[05:38:52] <Anaphaxeton> external in what sense?
[05:38:59] <twnqx> i would say use a spartan 6 fpga with one pcie lane transceiver
[05:39:11] <twnqx> it far less than 1k
[05:40:01] <twnqx> cheap would probably be around this chip: http://ics.nxp.com/products/pcie/phys/
[05:40:11] <twnqx> that can interface with a spartan 3
[05:40:15] <Anaphaxeton> how does a typical pcie board interface with the mobo?
[05:40:29] <twnqx> hard gold plated finger
[05:41:01] <twnqx> carefully impedance controlled differential signal traces
[05:41:46] <twnqx> of course that involves BGA components, too
[05:42:07] <Fornaxian> PCIe is basically a high speed serial interface....like sata, only worse....x1 is one channel, x4 is 4 channels, and x16 is 16 channels..
[05:43:11] <Fornaxian> what is the epiphany chip anyhow?
[05:45:53] <w|zzy> Anyone oven the ds3232 RTC a go?
[05:46:14] <twnqx> i wonder if i could find the schematics for my http://www.xilinx.com/products/boards-and-kits/HW-S3PCIE-DK.htm somewhere
[05:47:06] <Fornaxian> w|zzy, huh?
[05:50:21] <Xark> twnqx: Why that board? How about something open like Papilio http://forum.gadgetfactory.net/index.php?/files/file/43-papilio-one-source-files/ or Xula-200 http://www.xess.com/prods/prod048.php
[05:50:43] <twnqx> because i do have that board
[05:50:55] <Xark> twnqx: I see.
[05:50:59] <twnqx> also, because PCIe was the point of it
[05:51:35] <Xark> twnqx: Gotcha. I got a nice $99 Lattice ECP3 PCIe board, but now they are back up to ~$260.
[05:56:53] <w|zzy> sorry Fornaxian. has anyone used the ds3232 rtc chip?
[08:07:43] <ColdKeyboard> Guys what do you think about that little thing Red Pitaya that is curently funded on Kickstarter? :)
[08:07:48] <ColdKeyboard> Looks interesting
[08:07:59] <ColdKeyboard> http://www.redpitaya.com/
[08:11:48] <GargantuaSauce_> 125 MS/s?
[08:12:09] <GargantuaSauce_> sounds like a $360 toy
[08:12:58] <GargantuaSauce_> Input channel gain: FIXED (improved dynamic range by means of 14 bit granularity )
[08:20:19] <GargantuaSauce_> and they wave around the "open" term but it's closed hardware
[08:20:21] <GargantuaSauce_> not impressed!
[08:28:53] <w|zzy> I wasn't either when i saw it
[08:34:55] <w|zzy> What regulator would you guys use to get 5v from a 6-12ish V dc power supply?
[08:35:04] <w|zzy> 200mA would probably be overkill.
[08:35:54] <soul-d> me neither lol
[08:36:02] <soul-d> the second video is hilarious
[08:36:22] <soul-d> especialy near an expensive xray whatever thingy
[08:36:48] <soul-d> the device has allot of applications but he can't think off one except reapting himself :')
[08:37:05] <w|zzy> its an interesting idea.
[08:37:15] <soul-d> not realy
[08:37:21] <w|zzy> Its not a new idea..
[08:37:23] <soul-d> that speed is like
[08:37:28] <soul-d> 50$ in components
[08:38:15] <w|zzy> It would be handy in a roving toolkit.
[08:38:24] <w|zzy> but i doubt i would use it often at all
[08:38:29] <w|zzy> I prefer to do stuff at my desk
[08:38:42] <soul-d> get a fpga kit slap on some adc's and you'r done for 1/5th the price
[08:38:48] <soul-d> and 100x more options
[08:39:49] <w|zzy> I didn't think kickstarter allowed "multiple packs" as a valid kickstarter tier.
[09:47:59] <ambro718> anyone knows how many cycles it takes to convert an integer to a float?
[10:32:59] <_DiMitarG_> you mean something like this (int) some_float variable ?
[10:33:57] <_DiMitarG_> ?
[13:49:52] <abcminiuser> Damnit Tom_itx
[13:50:18] <abcminiuser> It's impossible to get the programmer into bootloader mode via the hole in the case when one has a glass of rum at hand
[13:50:51] <OndraSter__> lol
[14:27:06] <ambro718> is it possible to right-shift-by-4 a 24-bit signed integer in less than 12 cycles? It can be done for unsigned (http://ideone.com/bFT5tO ) but for signed if I add sbrc+ori to fix the sign bits, I'm back to 12 cycles
[15:13:58] <ColdKeyboard> What cheap, LogicAnalyzer for begginers would you suggest? :)
[15:21:53] <abcminiuser> Saleae
[15:23:19] <jadew> ColdKeyboard, or the OLS, or the cheap chinese ones
[15:23:33] <ColdKeyboard> OLS?
[15:23:48] <jadew> http://dangerousprototypes.com/docs/Open_Bench_Logic_Sniffer
[15:24:38] <Enma_Hinobara> Are there AVR-C functions to do fast 8x8=16, 16x8=32, and 16x16=32 multiplies?
[15:24:55] <Enma_Hinobara> Just doing (uint32_t)uint16_t_value * uint8_t_value generates a full 32x32 multiply
[15:35:59] <ambro718> Enma_Hinobara: could you check https://github.com/ambrop72/aprinter/blob/master/avr-asm-ops/mul.h
[15:36:08] <ColdKeyboard> Is there some Logic Analyzer Software that reads data over UART? I might be able to frankenstein my own hardware just to read this damn IR codes :\
[15:36:13] <ambro718> Enma_Hinobara: I can write missing ones, which ones are these?
[15:37:10] <ambro718> Enma_Hinobara: oh wait. of the no-right-shift ones, I only have signed16 x unsigned16
[15:37:11] <jadew> ColdKeyboard, the OLS one, if you implement the SUMP protocol, it will work
[15:37:23] <jadew> however, it would be easier to make your own software and spit the data into a file
[15:37:33] <jadew> then import it into the decoding software
[15:37:37] <ambro718> Enma_Hinobara: do you need this for all unsigned arguments?
[15:42:46] <jadew> ColdKeyboard: https://github.com/jawi/ols/wiki/OLS-data-file-format
[15:43:42] <jadew> ColdKeyboard, here's a chopped example: http://pastebin.com/J1GtC5yE
[15:43:55] <jadew> last line is: 00000000@173418
[15:45:18] <ColdKeyboard> jadew: So basicly you send PIN state(s) and @ time of change
[15:45:28] <jadew> @sample number
[15:45:36] <jadew> but yes, and the values are in hex
[15:45:42] <jadew> 4 channels in that particular example
[15:45:54] <jadew> 4 groups
[15:45:55] <ColdKeyboard> What is sample number? :)
[15:46:02] <jadew> each group has 8 channels
[15:46:24] <jadew> consider this: you're sampling at 1Mhz
[15:46:34] <ColdKeyboard> If you sample at x speed, you sample y samples per second. so if sample number is 8y it mean's it's sample for 8s :)
[15:46:35] <jadew> that means that you're going to take a sample at each 1uS
[15:46:43] <jadew> so sample 1 is at 1uS
[15:46:49] <jadew> sample 2 is at 2uS
[15:46:54] <jadew> if you'd be sampling at 2Mhz
[15:47:00] <jadew> sample 1 would be at 0.5uS
[15:47:07] <jadew> sample 2 would be 1uS
[15:47:08] <jadew> etc
[15:47:09] <jadew> but you'
[15:47:22] <jadew> so you're not sending times, you're sending sample numbers
[15:48:24] <jadew> in that case it's RLE encoded, but you don't have to worry about that, just send each sample
[15:48:51] <jadew> you can RLE encode it if you want to tho
[15:49:17] <jadew> as in: if the current sample is the same with the previous one, don't write it down :)
[15:49:40] <ambro718> Enma_Hinobara: if you still need that multiplication, http://ideone.com/JH0rtg (untested)
[15:54:58] <abcminiuser> Anyone think this will be useful? https://twitter.com/abcminiuser/status/378980216275611649/photo/1
[15:55:58] <ColdKeyboard> jadew: Ok, but I have to recieve all of these samples via UART, write them down to some file and then open it software?
[15:59:46] <Steffanx> could be useful, if i used avr studio abcminiuser :)
[15:59:52] <abcminiuser> :P
[16:02:06] <ColdKeyboard> jadew: Oh, I opened OLS software now and I see it has ability to read from serial port... Very nice. :D
[16:20:39] <ColdKeyboard> jadew: Could you send me the example of OLS format that I can open inside the software? This one from pastebin reports error :\
[16:30:38] <jadew> is it working?
[16:31:04] <jadew> I guess not
[16:31:23] <jadew> http://pastebin.com/xPNdqn7R
[16:33:52] <ColdKeyboard> Thank you. :)
[16:38:40] <jadew> np
[16:42:25] <jadew> what IR codes are you trying to decode?
[16:54:08] <ColdKeyboard> From some IR remote
[16:54:20] <ColdKeyboard> I have Vishay IR receiver but I can't seem to find out how does it work
[16:54:44] <ColdKeyboard> http://www.image-tmart.com/images/E/E00632/FM-Transmitter-Beetle-Car-MP3-Player-Short-Card-with-Remote-Control-Blue-05A.jpg
[16:54:45] <ColdKeyboard> This one
[18:30:33] <ryan-c> how bad of an idea is iit to directly drive an led with an atmega chip?
[18:30:55] <Tom_itx> you need a current limit resistor
[18:30:59] <Tom_itx> or an led with a built in one
[18:31:51] <ryan-c> I'm hacking a product that has LEDs in it that are being directly driven from a microcontroller, and I have no idea what value resistor would be appropriate.
[18:32:16] <dunz0r> ryan-c: Do you know the voltage?
[18:32:32] <ryan-c> the main circuit runs off 6v
[18:32:34] <Tom_itx> what voltage is the µC working at?
[18:32:42] <ryan-c> (4x AA)
[18:32:45] <Tom_itx> (not 6v)
[18:32:53] <ryan-c> didn't appear to have a voltage regulator
[18:33:05] <Tom_itx> what about dropping diodes etc
[18:33:34] <ryan-c> hard for me to tell, all surface mount. The data sheet for the stock microcontroller said it'd run fine on 6v
[18:33:43] <dunz0r> ryan-c: It depends on the voltage, but it's better to have too large than too small, so start high.
[18:33:53] <Tom_itx> not an avr?
[18:33:53] <dunz0r> Like 2k
[18:34:02] <ryan-c> Tom_itx: no, some elan chip?
[18:34:20] <Tom_itx> figure out the forward voltage of the led
[18:34:32] <Tom_itx> then you can figure what r you need
[18:34:32] <ryan-c> any way to measure that?
[18:34:42] <ryan-c> I guess a multimeter while it's on?
[18:34:47] <Tom_itx> maybe a volt meter across it?
[18:35:08] <ryan-c> Not sure I can get it to turn on while measuring
[18:35:24] <ryan-c> the led would have to be in circuit?
[18:36:00] <Tom_itx> unless you can find a data sheet for it
[18:36:23] <ryan-c> which would be hard given that it doesn't have any markings indicating a model number
[18:36:44] <Tom_itx> try some low value and work your way up
[18:37:04] <Tom_itx> put a current meter in series and keep it below 20ma
[18:37:30] <ryan-c> I think I can manage that.
[18:37:46] <Tom_itx> start around 1k
[18:37:54] <ryan-c> makes sense
[18:38:34] <Tom_itx> work your way down to 330 or 220 ohm
[18:39:11] <ryan-c> *nod*
[18:39:29] <ryan-c> i think the hard part is going to be physically connecting the meter
[18:40:15] <ryan-c> at least the manufacturer was nice enough to make all the board-to-board connections (over which the led is driven) detatchable ribbon cables.
[18:40:30] <Tom_itx> just touch the lead to it and use axial resistors until you find what you want
[18:42:04] <ryan-c> if i can do an in circuit voltage measurement and an in series current measurement, i should be able to calculate the resistor value from that, though, right?
[18:42:22] <Tom_itx> i'd think so
[18:42:38] <ryan-c> will try that then
[20:19:18] <ambro718> how do I divide a multi-byte signed integer by a power of two? asr+ror is not right, I think it "rounds" away from zero not towards zero
[21:31:03] <tzanger> jadew: I finished it... now to build a couple: http://www.mixdown.ca/dump/picjug.png
[21:35:59] <jadew> nice, so jtag and uart?
[21:36:27] <jadew> what's u1?
[21:36:28] <tzanger> and gpio
[21:36:49] <jadew> did you go for the mcp or a different chip?
[21:36:50] <tzanger> just mosfets for grounding a signal out (like RESET# or maybe a relay if that's your thing)
[21:37:06] <tzanger> I used the 16F1454
[21:37:19] <jadew> nice :)
[21:37:55] <tzanger> I stuck a little LDO on the front of it with an optional shorting resistor (add resistor, remove regualtor) = 5V I/O. with regulator (and depending on which one) 3.3, 2.5 and 1.8V I/O :-)
[21:38:19] <tzanger> I was going ot go with an adjustable regulator and swap out resistors but that's more problematic for prone to error
[21:38:31] <jadew> awesome
[21:38:42] <tzanger> and the regulator is SOT25 so it's changeable by mere humans :-)
[21:38:45] <jadew> yeah, I wanted to make a real variable PSU on my design
[21:39:03] <jadew> but I just went with 3.3v and added some mosfets to switch between the voltages programatically
[21:39:49] <tzanger> yep
[21:40:17] <tzanger> this thing is 25mm x 38mm
[21:40:41] <tzanger> was running out of room since I stuck with 0805 and SOT23 components for the R/C and fets
[21:40:59] <tzanger> the LEDs are 0603 only because I have them handy, 0805 would work too
[21:41:09] <jadew> I went for 1206 :P
[21:41:14] <jadew> leds and everything
[21:41:22] <jadew> I hate soldering smaller stuff
[21:41:37] <jadew> they keep falling off from my tweezers
[21:41:45] <tzanger> I find 1206 so HUGE now
[21:42:04] <jadew> up until refcently, I was only using THT :P
[21:42:43] <tzanger> :-)
[21:42:50] <tzanger> I usually mix the two
[21:52:04] * jadew is in the process of shielding his power supply
[21:52:31] <jadew> I really wonder if there'll be any noticeable change on the output
[21:52:51] <tzanger> depends on what your trouble is
[21:53:01] <Tom_itx> jadew, on my cnc i did
[21:53:11] <Tom_itx> i shielded everything and my problems went away
[21:54:22] <jadew> http://dumb.ro/files/ps2/noise_before_shield1.png
[21:54:24] <jadew> http://dumb.ro/files/ps2/noise_before_shield2.png
[21:55:00] <jadew> Tom_itx, hopefully that'll be the case here as well
[21:55:27] <jadew> thing is I have a SMPS in here that powers the digital circuitry, I think that's where all the noise comes from
[21:56:01] <Tom_itx> put localized filter caps on it
[21:56:04] <Tom_itx> .1uf
[21:56:19] <Tom_itx> or various sizes
[21:56:30] <jadew> they don't seem to help much, which makes me think the noise is all over the place
[21:56:51] <jadew> so if I put caps in point x, the noise will be picked up in point y
[21:58:00] <Tom_itx> better ground planes or better power trace routes
[21:58:16] <Tom_itx> star grounds
[21:58:20] <jadew> kinda hard to get good ground plane on a one layer board :)
[21:58:25] <Tom_itx> haha
[21:58:33] <Tom_itx> wrap it in foil
[21:58:39] <jadew> I will
[21:58:42] <jadew> but that's the last step
[21:58:43] <Tom_itx> maybe it's just one big antenna
[21:59:40] <Tom_itx> tzanger i got some 1206 i'd give you
[22:00:03] <jadew> right now I'm making the oven out of metal sheet, some extra shielding on the voltage reference and the important voltage divisors won't harm, then I'll wrap the smps in metal sheet and then I'll use aluminium foil for the entire case
[22:00:21] <Tom_itx> what are you making?
[22:00:36] <jadew> me or tzanger?
[22:00:39] <Tom_itx> u
[22:00:48] <jadew> already did it, a lab power supply
[22:00:53] <Tom_itx> ahh
[22:01:08] <jadew> http://dumb.ro/files/ps2/psu1.jpg
[22:01:29] <jadew> the smps is on the left side
[22:01:41] <jadew> http://dumb.ro/files/ps2/psu2.jpg
[22:04:09] <jadew> http://dumb.ro/files/ps2/psu3.jpg
[22:04:14] <tzanger> that's quite the power supply :-)
[22:04:38] <jadew> it's really nice :)
[22:04:49] <Tom_itx> nice one
[22:04:57] <tzanger> I like the picture in the back
[22:05:08] <jadew> lol, yeah, I noticed it too
[22:05:22] <jadew> didn't re-do it tho :P
[22:05:30] <jadew> I think it's from games of thrones
[22:05:59] <tzanger> heh
[22:06:13] <tzanger> how does it regulate with a step response?
[22:06:24] <tzanger> (say throwing a 10 ohm load across and removing it)
[22:06:43] <jadew> I could check that
[22:07:02] <jadew> give me a sec, I will
[22:07:37] <tzanger> you'd need a scope to really measure that
[22:07:58] <jadew> I have
[22:08:31] <jadew> I'm pretty sure I tried several similar scenarios
[22:08:47] <jadew> mainly testing the current limitting tho
[22:08:55] <tzanger> you can also try fucking with it (switching the load rapidly to try to get it to oscillate)
[22:09:32] <jadew> I got it to oscillate with my home made electronic load :P
[22:09:39] <jadew> but I guess that's to be expected
[22:10:05] <jadew> same parts, similar design
[22:10:09] <tzanger> :-)
[22:10:12] <jadew> so they end up having the same frequency response :)
[22:11:30] <jadew> hmm, .5 * 5 = 2.5W
[22:11:40] <jadew> I need a beefy resistor
[22:11:47] <jadew> give me a sec
[22:15:37] <GargantuaSauce_> if it explodes in your hand that generates a useful test condition
[22:15:39] <jadew> only found a 0.6W one @ 10Ohm
[22:15:58] <jadew> GargantuaSauce_, that's why I have my goggles on :P
[22:16:49] <jadew> I should use a micro switch
[22:17:00] <jadew> so I get as little bouncing as possible
[22:17:37] <jadew> gets hot :D
[22:18:55] <learath> ok. I'm doing something dumb. Can anyone tell me the correct way to pass an eeprom address to void eeprom_read_block (void *__dst, const void *__src, size_t __n);
[22:23:20] <tzanger> I have a resistor bank waiting for some load testing
[22:23:49] <tzanger> 10 10 ohm 20W resistors standing off the vectorboard with phenolic standoffs
[22:24:14] <tzanger> that should be ~200W
[22:24:44] <GargantuaSauce_> at that power why not just use a toaster or something?
[22:24:54] <tzanger> I remember back in my previous life we had large wirewound resistors in a 55gal barrel of running cold water
[22:24:57] <jadew> tzanger, it doesn't do too well, it takes about 2ms to stabilize when adding the 10ohm load while running
[22:25:25] <jadew> I'm pretty sure it hits the current limitting as well
[22:25:30] <tzanger> we'd take the 460V through a bigass transformer down to 9V .. .not much voltage but buttloads of current :-)
[22:26:02] <Casper> why not a smps? small transfo! :D
[22:26:12] <tzanger> 3x550MCM per phase
[22:26:36] <tzanger> jadew: 2ms? are you doing the current regulation in software?
[22:26:39] <tzanger> er voltage regulation
[22:27:04] <jadew> tzanger, no
[22:27:11] <jadew> I'll show you what it looks like on the scope
[22:27:53] <jadew> http://dumb.ro/files/ps2/NewFile59.png
[22:27:59] <tzanger> might have to use a relay contact to do it propelry so there's no spikes
[22:28:01] <jadew> it clearly overshoots
[22:28:10] <jadew> when it's trying to compensate
[22:28:17] <jadew> that's when I think it also hits the current limit
[22:28:22] <tzanger> hm, that's a little odd
[22:28:32] <jadew> which then kicks in and adds more nasty behaviour, because it cuts voltage
[22:28:51] <jadew> also
[22:28:54] <tzanger> you're dropping 2V on the initial contact and it looks like it recovers nicely in 600us but then something goes a little funny
[22:28:55] <jadew> I connected the wires by hand
[22:28:59] <jadew> I touched them in air
[22:29:06] <jadew> so that might have something to do with it too
[22:29:08] <tzanger> oh that's probably the bouncing then
[22:29:43] <jadew> the reason why it doesn't recover back to 5V is probably because of the resistance of the leads
[22:30:21] <jadew> but I'm positive it puts 5V out
[22:31:56] <jadew> even if it wasn't bouncing, I wouldn't mind it anyway
[22:32:00] <jadew> that's good enough for me
[22:32:21] <jadew> if I'd power something that would go off and on and would eat that much power in small bursts, I'd use a big ass cap anyway