#avr | Logs for 2015-06-06

Back
[00:34:03] <theBear> i invented a superior function to sin(deg)=opp/hyp ... it's basically the same, but it's vegetarian and dresses like a hipster and knows how to spell keen-wah AND knows wtf it means !
[00:34:33] <theBear> i call it err, "hipster sin" heh, yeah, i like the sound of that
[00:51:24] <hypermagic> :)
[04:03:27] <inflex> How hard is it to make a PCIe card (linux), I want to create a card with 2 relays to control power internally
[04:03:44] <inflex> ( I realise tehre's no shortage of external port power control cards )
[04:04:20] <specing> a PCI-e card that talks via PCI-e?
[04:04:38] <specing> or a PCI-e card as in the PCI-e form factor/connector?
[04:04:46] <inflex> talks via PCIe
[04:04:51] <inflex> right now I do it using USB or serial
[04:05:08] <inflex> just thought it might be nice to make it a small PCIe card itself with proper device driver etc
[04:05:27] <inflex> then again, maybe it's just a bit of an overkill
[04:05:45] <antto> what's wrong with usb/serial?
[04:06:25] <inflex> antto: feels *slightly* hackish :D
[04:07:09] <antto> using linux feels slightly hackish too, so why not make myself an OS.. x_x
[04:07:11] <specing> inflex: you need a 3 gbit differential pair for PCI-e
[04:07:28] <specing> and two of them
[04:07:30] <antto> holy batman
[04:07:33] <specing> (full duplex)
[04:08:10] <hypermagic> inflex, sounds cool, if you make one let us know
[04:08:31] <antto> specing the communication in that thing goes as fast as 3gbit?
[04:08:41] <inflex> hypermagic: hah, there's plenty on the market already.. but yeah, basically I'm building a HDD data recovery system, and I need to be able to power-cycle the HDDs under test.
[04:08:42] <antto> that's like.. 3GHz?
[04:08:53] <specing> PCI-e 2.0 is 5 gigabit, PCI-e 3.0 is 10 gbit
[04:08:59] <specing> antto: yes
[04:09:07] <antto> x_x
[04:09:14] <hypermagic> inflex, it would require you to bitbang 133MHz lvds data i think on your mcu
[04:09:18] <specing> inflex: look into Altera Cyclone GX/GT lines
[04:09:48] <specing> inflex: they have 3.25/6.5 gbit transceivers and hard PCI-e cores
[04:10:26] <hypermagic> oh sorry idk now the signaling rate on pci-e
[04:10:37] <inflex> np, tx
[04:10:59] <hypermagic> a vga card does more than 2.5GB/s
[04:11:00] <specing> hypermagic: signaling rate is 2.5 Gbit/s, 5 Gbit/s, 10 Gbit/s for PCIe 1.0, 2.0 and 3.0
[04:11:04] <inflex> Maybe it'll just be saner for me to stick with the USB or serial 5x2 header I'm using now
[04:11:21] <specing> inflex: http://pinouts.ru/Slots/pci_express_pinout.shtml
[04:11:34] <specing> inflex: if you look into pinout, you can see SMBUS in there
[04:11:45] <specing> inflex: SMBUS is essentially a protocol over i2c
[04:12:06] <hypermagic> specing, so now he only needs to trigger mass storage device driver on pci-e then ;)
[04:12:18] <inflex> specing: that'd work
[04:12:20] <specing> hypermagic: ?
[04:12:28] <hypermagic> so no drivers ...
[04:12:35] <inflex> specing: since the card is only going to be turning on/off a relay, not talk to the HDD
[04:12:40] <specing> inflex: but like I said, get a Cyclone GX/GT fpga for PCI-e
[04:13:16] <specing> inflex: there are even pre-made ones
[04:13:32] <hypermagic> inflex, how many hundred thousand relays you want ?
[04:13:35] <inflex> specing: I recall seeing an Olimex one or something,b ut probably my brain
[04:13:38] <inflex> hypermagic: 2.
[04:13:39] <inflex> :)
[04:13:51] <hypermagic> only 2 hundred thousand relays ?
[04:14:01] <inflex> that should about do it... ENIAC will live again!
[04:14:14] <hypermagic> 1 bit per relay should work...
[04:14:23] <specing> inflex: http://www.mesanet.com/
[04:14:29] <hypermagic> so you need 200 000 bits then
[04:15:01] <hypermagic> rely speed will be about 10-100ms
[04:15:08] <specing> hypermagic: stop being ridiculous
[04:15:27] <antto> that's not easy ;P~
[04:15:44] <hypermagic> specing, well he wants pci-e controlled relay card :)
[04:16:05] <specing> hypermagic: so?
[04:16:41] <hypermagic> asss ume that he needs the speed.
[04:17:56] <hypermagic> parallel port works fine for a few dozen thousand Hz btw.
[04:18:14] <specing> so does SMBUS
[04:18:24] <hypermagic> where you get that ?
[04:18:37] <specing> on every PCI-e connector
[04:18:42] <inflex> SMBus / i2c would be profoundly more than sufficient anyhow
[04:18:47] <hypermagic> hmmm
[04:18:54] <inflex> since I'm switching at the absolute MOST about once every 5 minutes :D
[04:18:54] <specing> inflex: for your needs yeap
[04:19:17] <inflex> ( more frequent than that and I'll be upsetting an already upset drive )
[04:19:25] <hypermagic> you can drive an i2c lcd with a pcie slot ?
[04:19:29] <hypermagic> :/
[04:19:50] <specing> hypermagic: it would be inneficient as hell, but in theory yes
[04:19:56] <hypermagic> lol lol
[04:19:57] <hypermagic> cool
[04:20:50] <inflex> I saw an AVR based SMB/I2C project for PC's a long time ago somewhere... but hrmm... well, if I just get a PCIe PCB profile for Eagle I should be good
[04:21:09] <hypermagic> :)
[04:21:36] <hypermagic> btw motherboard has some well hidden i2c bus somewhere i think
[04:21:46] <hypermagic> where the temp sensors are connected for example
[04:22:06] <specing> you get i2c in the VGA and DVI connectors
[04:22:13] <hypermagic> edid
[04:22:16] <specing> yes
[04:22:31] <hypermagic> bu t that is only for edid no ?
[04:23:01] <specing> usually
[04:23:19] <hypermagic> or it is just hardwired to an eeprom that is i2c
[04:23:22] <hypermagic> idk
[04:23:27] <specing> usually
[04:23:57] <specing> these days monitors have CPUs inside, so it might not be an eeprom as a seperate chip
[04:24:07] <hypermagic> some dram cards have this id chip too
[04:24:15] <hypermagic> soic 8 pin smd
[04:24:57] <specing> all *DIMM modules have smbus SPD
[04:25:29] <hypermagic> i think i remember the time when spd was extra
[04:25:55] <hypermagic> in sd rams
[04:25:58] <specing> it is used for Intel XMP overclocking
[04:26:10] <specing> for DD3
[04:26:13] <specing> DDR3
[04:26:17] <hypermagic> :)
[04:26:32] <hypermagic> so only xmp ddr3 has them ?
[04:27:11] <specing> iirc all have them
[04:27:21] <specing> it is also used for CAS/RAS/... parameters
[04:27:35] <specing> the bios has to know them to init the memory controller
[04:29:54] <inflex> I'm getting too long between uses of Eagle... every time I fire it up, a new version is available :(
[04:30:25] <specing> use gEDA
[04:31:35] <inflex> I prefer EaglePCB, while it's not the greatest, I can work efficiently in it
[04:32:20] <inflex> that said, almost all PCB/schem tools seem to be inherently shitty UI experiences
[04:35:15] <inflex> and furthermore ... who ever designed the latest Eagle icons... should be SHOT, god-awful
[04:35:53] <specing> pci-e 4.0 is 16 GHz per differential pair
[04:38:30] <inflex> oh hilarious... can only find X16 PCIe connectors... wonder if just cropping it back to what's needed for X1 will suffice
[08:30:33] <pabed> hi guys, is there any ethernet module that I can send and receive email,and support icmp I ca
[08:30:51] <pabed> protocol
[08:31:22] <Lambda_Aurigae> lots of them.
[08:32:10] <pabed> I want to give it by at commands
[08:32:21] <Lambda_Aurigae> enc28j60 is a nice little ethernet to spi ship..requires a minimum of external parts to make work...like 6 or so I think...and you can connect a microcontroller to it and program it to do whatever you want.
[08:32:59] <Lambda_Aurigae> oh, so, you want a computer that you can send commands to from your microcontroller.
[08:33:10] <Lambda_Aurigae> one that has all the applications and everything made for you.
[08:33:13] <Lambda_Aurigae> try a raspberry pi.
[08:33:18] <Lambda_Aurigae> or beagleboard.
[08:33:28] <pabed> Lambda_Aurigae:it supports snap authentication?
[08:34:01] <pabed> raspberry is expensive
[08:34:19] <Lambda_Aurigae> if you want something that supports all of that, then you want a full functioning computer
[08:34:44] <Lambda_Aurigae> rPI can be had for 20 US dollars these days.
[08:36:05] <pabed> I want to send email and ping a server not anymore expectation
[08:37:00] <Lambda_Aurigae> well, no clue what your snap authentication is.
[08:38:33] <Lambda_Aurigae> but the tuxgraphics embedded stack works with avr and enc28j60 and provides icmp and a basic tcp/ip stack that can be used to do email.
[08:38:42] <Lambda_Aurigae> and, I gotta go do some work now.
[08:40:09] <pabed> have you ever sent an email by It
[08:41:01] <pabed> is there any AT command for sending and receiving email
[08:41:07] <kdehl> Hm. I have connected my controller to an external SRAM chip. The data pins are on port B, and DDRB is hence cleared to 0x00. But what about pull-up resistors? It doesn't matter whether PINB is 0x00 or 0xFF in this case, does it?
[08:51:11] <specing> pabed: rpi is cheap shit, not expensive at all
[08:52:50] <pabed> specing:unfortunately, my currency is expensive
[08:53:47] <twnqx> it's more shit than cheap though :P
[08:53:51] <sebus> it's better to have any pull-up kdehl.
[08:54:45] <twnqx> do you use you memory via external mem interface, or discrete?
[08:56:55] <kdehl> I just connect it straight to the SRAM. It's a dual-port SRAM, so the interesting things will happen on the other side.
[08:59:20] <twnqx> so generally - the pullups are only active if the port is an input
[09:00:12] <twnqx> it only matters if there is a chance you could signal a write to the ram while your data pins are inputs - cmos inputs don't like to float
[09:00:52] <kdehl> Right.
[09:01:06] <kdehl> Well, there will always be valid data on the pins, since the RAM is always active.
[09:01:15] <kdehl> So I guess the pull-ups don't matter in this case.
[09:02:05] <specing> pabed: ah you are from Iran
[09:02:28] <pabed> twnqx:yes
[09:02:44] <pabed> specing:yes
[09:59:34] <hypermagic> raid = redundant array of inexpensive disks, rafd - redundant array of free disks ^^
[09:59:41] <hypermagic> how would you go about distributing data on a media that has random bad sectors, and probably some burst errors ?
[10:00:56] <hypermagic> best would be to pick sectors as far as possible for ecc ?
[11:14:10] <Tom_itx> LoRez i think you're right about the linux driver
[11:14:17] <Tom_itx> firmware*
[11:16:24] <LoRez> yeah? what was I right about?
[11:17:38] <Tom_itx> either firmware should work in linux ok
[11:17:41] <Tom_itx> iirc
[11:18:07] <LoRez> ah
[11:18:24] <Tom_itx> but i know the one i posted will
[11:31:38] <LoRez> cool
[11:59:32] <kdehl> Is there any electrical difference among the ports on an AVR? I'm using a 1284p. I feed it 5 volts and output 0xFF on port A and C. The voltage on the port A pins is 4.23 volt, and 4.93 V on port C. That doesn't seem right to me...
[12:02:34] <theBear> kdehl, all the models i looked at over the years including my first usb/modern one recently, no, in port/non-special modes they are all 100% the same, even tho they make a point of introducing and explaining/ speccing each one like they were in the datasheets
[12:02:51] <theBear> but you can check your one, cos ya know, that's what datasheets are fr :)
[12:02:54] <theBear> err for
[12:04:31] <kdehl> Aight.
[12:13:56] <theBear> but to finish reading your original question... hmm, what is connected to the pins ?
[12:14:26] <theBear> and you double-checked none of those port/pins are set to special/non-port/pin functions somewhere in your init ?
[13:44:45] <vsync_> kdehl: are you setting them as outputs?
[13:45:14] <kdehl> vsync_: Yeah. I solved it. I had JTAG enabled.
[13:45:26] <vsync_> oh yeah that's a common thing
[13:48:07] <kdehl> Yea. I know I've had it before. Some things you just never learn.
[17:09:59] <sebus> is it a good idea to use 28/29 family eeprom/flash instead of outdated GAL16V8 chips?
[17:13:14] <N1njaneer> Use something more modern, like a 9500 series CPLD
[17:14:09] <sebus> 3.3V only?
[17:18:57] <Tom_itx> xc95 are ancient aren't they?
[17:20:20] <theBear> 29 is "microwire" i think
[17:20:29] <theBear> oh, xc, should read harder b4 i talk
[17:42:06] <LeoNerd> 24V supply, to drive a 328P plus a few IR LEDs, pulsed, to form a proximity sensor. How to power that? 24V->5V is 19V drop. But I doubt I'd pull very much current at all..
[17:42:17] <LeoNerd> A 7805 is happy to go up to 35V input
[17:42:27] <LeoNerd> Or should I consider a buck reg.?
[17:42:49] <N1njaneer> I would go with a buck regulator - they're cheap and you can find 7805 3-pin equivalent all-in-ones.
[17:43:25] <N1njaneer> You're going to heat it up very quickly doing 24V-5V
[17:43:59] <LeoNerd> Mm.. but don't the bucks have a minimum current requirement?
[17:44:17] <N1njaneer> Assuming you only drew 100ma, you're still looking at dumping ~2W of heat
[17:44:33] <LeoNerd> I'm thinking order of magnitude less than that at least
[17:44:46] <N1njaneer> They do, but you're talking lower than the micro. Worst-case you have to add a resistor or so.
[17:44:55] <LeoNerd> 328P running a timer and mostly idle is.. what... I'd be surprised if it was much above 10mA
[17:45:08] <N1njaneer> I've never had a problem with the CUI 78xx replacements on hundreds of boards in the field,
[17:45:18] <LeoNerd> Mmm
[17:45:38] <N1njaneer> I'd say probably 50ma-100ma typical unless you're really optimizing.
[17:45:53] <LeoNerd> .. seriously 100mA??
[17:46:03] <LeoNerd> Keeping in mind it's going to be in SLEEP 99% of the time
[17:50:30] <LeoNerd> http://www.ebay.co.uk/itm/5pcs-LM2596S-DC-DC-Buck-Converter-Adjustable-Power-Supply-Step-Down-Module-UK/141210161794
[17:50:32] <LeoNerd> Looks reasonable
[17:51:43] * LeoNerd wonders if fixed 5V ones would be any cheaper
[17:52:18] <LeoNerd> Heh.. about a billion variations on this theme on Amazon.. most of them having a 7seg voltage meter on them too
[17:53:52] <LeoNerd> I reckon I could probably desolder the adjustment pot and just put in two fixed resistors
[17:58:09] <N1njaneer> LeoNerd: http://www.digikey.com/product-detail/en/V7805-500/102-1709-ND/1828602 is what I use, both in that version for 500ma, and there's a 1000ma as well.
[18:03:07] <sebus> LeoNerd is this possible for you to implement small dc-dc reg onboard?
[18:04:17] <Lambda_Aurigae> 7805 with a big heatsink will work but will suck out a lot of current doing such a drop.
[18:06:23] <Xark> LeoNerd: Not sure about cheap, but these are easy to replace linear reg -> https://www.tindie.com/products/ddebeer/5v-1a-switch-mode-voltage-regulator
[18:06:48] <sebus> Lambda_Aurigae even with 25mA average current it's about 0,5W
[18:07:52] <Lambda_Aurigae> enough that the 7805 will want a heatsink.
[18:08:28] <sebus> http://s7.fmdx.pl/l5972.jpg i did such small boards for 3.3-5V
[18:08:38] <sebus> can draw up to 800mA from 24VDC
[18:09:07] <Lambda_Aurigae> yeah...switch mode/buck converter won't need the heatsink for that.
[18:10:06] <LeoNerd> sebus: I'm not space-constrained on this one..
[18:10:36] <LeoNerd> N1njaneer: Ohyes.. hem
[18:10:53] <LeoNerd> To be honest, I might just get an actual LM2596 to go on the eventual board
[18:11:00] * Xark notices there is a less expensive version now (with larger input voltage range) too -> https://www.tindie.com/products/ddebeer/5v-1a-switch-mode-voltage-regulator-40v-input/
[18:11:26] <LeoNerd> Also, Pololu make some really nice TO220-shaped ones
[18:11:27] <sebus> LeoNerd, so you need a heatsink or... use quite decent copper on pcb for heat dissipation if you'll pick smd version
[18:12:35] <LeoNerd> oooh wait a moment; the TO220-shaped ones are just boost-mode; to give 3V3 or 5V off smaller battery
[18:13:03] <LeoNerd> https://www.pololu.com/product/2843 though this isn't too bad
[18:16:12] <sebus> not expensive at all
[18:16:49] <LeoNerd> "expensive" for me being in the UK though - shipping costs
[18:17:16] <LeoNerd> Whereas I can buy LM2596 + inductors from local suppliers
[18:17:58] * LeoNerd wonders if there's lower-current versions of that
[18:18:21] <sebus> lm2596? lm2574HV will be enough
[18:19:07] <sebus> dip8 ic, nice pinout and very cheap
[18:20:19] * LeoNerd reads about SEPIC converters... trying not to misread "SEPTIC"
[18:21:33] <LeoNerd> Ahyes; 500mA vs. 3A
[18:22:22] <LeoNerd> Huh... 14pin SOIC but 8pin DIP
[18:22:31] <LeoNerd> Oh.. possibly for pin currents
[18:22:49] <sebus> another cheap dc-dc is mc34063
[18:23:12] <LeoNerd> I don't need a self-contained DC converter. I'm happy to build out the peripheral inductor and caps around it
[18:23:17] <LeoNerd> I'm making a board for this
[18:23:32] <sebus> it's a chip
[18:23:44] <sebus> SO8 available
[18:24:07] <sebus> also available as ka34063 and so on...
[18:24:24] <LeoNerd> Huhweird... This DIP8/SOIC14 uses the extra pins on the SOIC as electrically-isolated heat transfer
[18:27:59] <sebus> another chip i know (and I use very often) is L5972/L5973/L5973AD
[18:28:13] <sebus> so8 2A
[18:34:23] <LeoNerd> Hrm.. LM2574 are like.. £3 each on eBay :/
[18:35:35] <LeoNerd> ... or £1 and a bit on Farnell.. Odd..
[18:39:36] <sebus> inductor for this thing is under £1
[18:40:18] <sebus> MSS1260-474KLD CoilCraft
[18:48:28] <sebus> LeoNerd I forgot... Datasheet says to use bigger coil with smaller loads, so you may like to use muRata 48681SC 680uH or something like this.
[18:49:23] <LeoNerd> Mmm
[18:49:57] <sebus> or bigger like 1mH
[18:50:07] <sebus> slow switching freq ...