#avr | Logs for 2013-11-04

Back
[01:37:27] <juri_> has anyone here used 3.3v SPI devices on a 5.0V AVR?
[01:37:41] <juri_> i'm having reliability issues reading my device.
[01:53:20] <Casper> you need level shifter chip/circuit
[01:57:40] <juri_> i'm using a level shifter on all pins from the microcontroller to the device. i'm not on the way back for MISO.
[01:58:16] <juri_> according to the datasheet, this should be fine. i'm also leaving the pull up off on my miso pin.
[03:33:48] <x29a> hey there, i have seen the notation for register adresses like $19 and 0x20 (atmega32 and atmega1284P datasheets). when is which used and why?
[03:52:26] <kdehl> Wth is the difference between VISA and SCPI? SCPI is the communication protocol which does not define the underlying medium, but VISA is the API? API for what?
[03:53:25] <tld> VISA is generally used for instrumentation, isn't it?
[03:53:41] <tld> NI-stuff for interacting with oscilloscopes and DAQ-systems?
[03:53:53] <kdehl> Right.
[03:53:58] <kdehl> But so is SCPI?
[03:54:42] <kdehl> I tried Wikipedia but it didn't make me any smarter.
[03:55:44] <tld> IIRC, you could view SCPI as a sort of subset of VISA, or rather, VISA uses SCPI-commands, but VISA goes into more bits on both API and link-levels (GPIB, LAN etc)
[03:56:14] <tld> don't consider me an authoritative source though, I'd read up on the topic a bit, but I'm not exactly experienced with this stuff (yet anyway, working on it)
[03:56:22] <kdehl> Maybe one could say that SCPI is a way of representing VISA commands?
[03:56:52] <tld> Sounds about right.
[03:57:18] <tld> One thing I'm not entirely clear on, is if the "wire format" is SCPI, or typically encoded in some other way.
[03:57:40] <kdehl> Yeah, no idea...
[03:59:22] <tld> From what I understand, you're supposed to send SCPI over the physical layer, but a lot of devices come with drivers, and so I don't know if they typically implement it as actually sending SCPI through the driver to the device, or considering that you're talking "to the device" when talking with the driver, and then that does it's own thing. I *think* SCPI should go over the physical, but wouldn't be on it.
[03:59:48] <tld> Hoping to order a DSO with SCPI in a week or two, at which point I should know more. :)
[04:00:15] <carabia> which one
[04:00:48] <tld> Rigol DS1074Z, if everything goes according to plan, and I don't find any showstoppers.
[04:01:20] <tld> (Was considering the DS2074, but DS1074Z is significantly cheaper (2/3 or so), and 4 channels vs. 2)
[04:02:06] <carabia> nice
[04:02:39] <tld> then again, knowing my luck, it's not impossible that something'll come up and I'll need to wait with ordering, but… we'll see.
[04:05:06] <carabia> where are you getting it from
[04:05:45] <tld> most likely from batronix
[04:06:09] <tld> http://www.batronix.com/shop/oscilloscopes/Rigol-DS1074Z.html
[07:42:55] <beaky> hello
[07:43:00] <beaky> is the atmega1284 the most featureful avr
[07:43:05] <beaky> in TH
[07:43:10] <beaky> or are there others
[07:44:23] <specing> new day
[07:44:26] <specing> old beaky
[07:44:34] <specing> :repeat:
[07:48:09] <beaky> i love avr
[08:00:15] <beaky> How do i ethernet?
[08:00:31] <beaky> is it advisable to use the enc28j60
[08:00:37] <beaky> with my arduino
[08:01:03] <specing> Damn beaky
[08:01:08] <specing> DO YOU EVEN PACKET!?!?
[08:02:18] * timemage lends beaky a couple of .
[08:04:30] <beaky> i guess there are better chips than enc28j60
[08:04:45] <beaky> maybe atmel has an avr with layer-2
[08:05:01] <specing> the WIZNET is apparently better
[08:05:32] <timemage> it should be a lot better if you want tcp.
[08:05:33] <specing> enc28j60 is microchips part (they make the PIC architecture chips)
[08:06:01] <specing> I have yet to figure out why atmel has no ethernet-enabled parts
[08:06:06] <beaky> yes I need UDP
[08:06:17] <beaky> ok i will buy wiznet
[08:06:20] <beaky> but it is smd :(
[08:06:23] <specing> yap
[08:06:36] <specing> the better it is, the worse it is packaged
[08:07:07] <timemage> beaky, you can find breakout boards for it.
[08:08:42] <timemage> beaky, the arduino ethernet shield seems to be based on it.
[08:47:01] <RikusW> $30000 for a high speed 12Gsps picoscope ?! ouch
[08:48:25] <specing> such scopes are usually bought by Intel and other giants
[09:39:02] <mdorenka> does pwm output continue when the mcu is within an ISR?
[09:52:46] <RikusW> mdorenka: it will
[09:53:04] <RikusW> that is if you use a timer to generate PWM
[09:53:04] <mdorenka> ty :)
[11:37:19] <kdehl> Okay, I'm totally ordering som 30-pins SIMMs on ebay.
[11:37:53] <kdehl> You wouldn't be able to interface a 72-pins SIMM, would you? IIRC they have a 32-bit bus...
[11:38:22] <kdehl> Could use a shift register, but it feels kinda overkill.
[11:38:44] <kdehl> Or wait, maybe you could run them in some retro-half-bus mode...
[11:38:50] <kdehl> Or did I just make that up...?
[11:39:09] <specing> buy a 16-bit DDR3 chip from mouser
[11:39:44] <kdehl> Wutt?
[11:39:54] <kdehl> I didn't know that existed.
[11:40:31] <specing> you can even get 8 bit ones
[11:40:51] <specing> How do you think they are interconnected on the (SO-)DIMM modules?
[11:42:16] <kdehl> Hm. Yeah. But on the other hand, 30-pins SIMM are simple to interface, I think I'll start there.
[11:42:49] <specing> http://eu.mouser.com/Semiconductors/Memory/DRAM/_/N-4bzp3/
[11:44:56] <kdehl> Nice!
[11:45:11] <kdehl> Maybe next time.
[11:45:27] <specing> packaging is meh? :D
[11:46:22] <kdehl> Heh. Yeah. And voltage.
[11:47:04] <specing> are the SIMM's 5V?
[11:47:07] <specing> or 3.3V?
[11:47:32] <kdehl> 5V. So it's very simple.
[11:47:59] <specing> yeah, but it is going to be expensive and you'll only get a few hundred kilobytes
[11:48:50] <kdehl> Up to 16 MB.
[12:25:16] <mdorenka> is it in general better to have a higher system frequency and a bigger prescaler at timers or should i go with an lower frequency and smaller prescaler?
[12:35:18] <Raazeer> hi all
[12:36:48] <Raazeer> I could use an opinion on this code: http://pastebin.ca/2473719
[12:37:14] <Raazeer> it's my first assembley in a long time, I think I better get a second opinion
[13:18:53] <Raazeer> anyone here?
[13:28:34] <specing> Raazeer: look at what the stack pointer points to at reset -- you can shave 8 bytes
[13:33:12] <specing> also what is "spi" @ 28?
[13:33:49] <specing> naming a register after an instruction is kinda bad practice @4
[13:36:09] <specing> rmjmp reset???
[13:36:16] <specing> rmjmp?
[13:36:19] <specing> wat
[13:38:20] <Raazeer> specing, spi is supposed to enable interrupts if I've got it right, rmjmp is a typo.
[13:38:56] <ambro718> sei
[13:39:40] <ambro718> Raazeer: you can replace "inc counter1; cpi counter1,0x00" with "subi counter1,0xff"
[13:39:47] <ambro718> same for counter2
[13:40:10] <Raazeer> ambro718, I'll look it up
[13:40:47] <ambro718> subi can be abused in wonderful ways ;)
[13:41:39] <ambro718> same for sbc, like: sbc R,R <-- sets R to 0 if carry is not set, sets it to 0xff if carry is set
[13:42:18] <Raazeer> why not just inc? it sets the V bit if I read the docs correctly.
[13:42:23] <specing> Raazeer: you didn't even test-assemble it before pastebining
[13:42:26] <specing> lazy slacker.
[13:42:51] <Raazeer> specing, no I didn't, I wanted an opinion on it first.
[13:43:05] <specing> the assembler would give you one
[13:43:11] <Raazeer> you can run a lot of things past the assembler that don't make an ounce of sense.
[13:43:28] <ambro718> Raazeer: oh yes, inc sets *Z* bit (this is the one you want I believe). I must have confused it with the C bit which inc and dec dont' set
[13:43:29] <specing> not rmjmp reset
[13:43:32] <specing> and not spi
[13:44:12] <N1njaneer> I still want to make a Visual Assembler to help assist in writing useful assembler code by helping to figure out what options you have, rather than a menacingly-blank, blinking cursor in an empty file :)
[13:44:18] <Raazeer> ambro718, right, the Z bit is the one brne and breq check, it sets that doesn't it?
[13:44:36] <ambro718> Raazeer: yes, google "avr instruction set", you get a pdf on the first hit
[13:44:38] <Raazeer> specing, admittedly it would have caught SOME of my errors, but not the systemic ones, which are what counts
[13:45:17] <Raazeer> ambro718, yes doc0856
[13:45:21] <Raazeer> looking at that now
[13:46:02] <Raazeer> that's the one without an index.
[13:46:36] <ambro718> my pdf viewer shows a sidebar with chapters (one for each instruction)
[13:46:58] <Raazeer> my pdf viewer (chrome) doesn't
[13:47:21] <N1njaneer> Raazeer: Get a better pdf viewer :)
[13:47:32] <Raazeer> I guess I should, shouldn't I?
[13:48:53] <ambro718> well I use Chromium not Chrome so I don't get the crappy pdf viewer ;)
[13:52:22] <Raazeer> wtf? avra won't accept the .inc files that came with it
[13:53:58] <Raazeer> on account of it containing c-style preprocessor directives
[13:55:11] <ambro718> why are you writing assembly in the first place? is this some attiny with no ram?
[13:56:21] <Raazeer> ambro718, actually I wanted to brush up on my assembly.
[13:56:46] <Raazeer> also I already know that, even if I'm kinda rusty atm. I'd have to learn avr-c from scratch
[13:57:19] <Raazeer> what I have in mind eventually isn't such a big deal I can't do it in assembly either, so I guess the answer is "why not? it's fun!"
[13:57:32] <ambro718> cool :)
[13:57:47] <N1njaneer> Raazeer: The latter is probably a much better use of your time if you are intending to be productive in use with AVRs vs simply for purely research/theory/fun of working with the processor at a lower level :)
[13:58:47] <Raazeer> I always kinda liked assembly. I never found it difficult, the main difficulty for most people is to break their thinking down into tiny enough baby steps
[13:58:53] <ambro718> me, I just go to assembly when I need the speed, like some arithmetic (sqrt, div) I wrote. Otherwise I'm completely on the other side, with C++ template metaprogramming all over the place, lol
[13:59:32] <Raazeer> also it helps a lot if you have a concept of what's going on down on the bare metal when your fancy python/ruby/java code gets executed
[13:59:34] <N1njaneer> Raw assembler has its place and is very useful in squeezing out every ounce of performance from a device, but assembler familiarity tends to be most useful more in a "interpretation" capacity in lookig at what the compiler is cranking out for a given section of code, and being able to fine-tune what you are handing to the compiler to get it to produce better code. Or at the end of the day writing
[13:59:34] <N1njaneer> a chunk of in-line assembler to do something specific.
[14:00:31] <Raazeer> N1njaneer, mostly it's just fun to do it. Also it draws some attention from the right girls if you can say you code in assembly
[14:00:33] <N1njaneer> Also important to remember is that mediocrely-written C/C++ code will run absolute circles around poorly written assembler code.
[14:01:19] <Raazeer> N1njaneer, what requires more driver skill, a hoy-paloy high tech Porsche or a bare-metal F-40/
[14:01:22] <Raazeer> ?
[14:01:25] <N1njaneer> It can be fun, yes, which is why it's important to understand the over-arching motivation for why you are doing something a particular way :)
[14:02:11] <Raazeer> Also, which of the two cars will get you the better-quality girls?
[14:02:44] <N1njaneer> Raazeer: If you want to be really impressive, you design one completely from scratch. (i.e. code the AVR instruction set in to an FPGA, then you'll REALLY know it intimately, and the girls will go much more wild over your madskillz)
[14:03:37] <Raazeer> N1njaneer, I don't know that I'd want to go that far just to impress the girls ;)
[14:04:42] <N1njaneer> I don't know cars, so it's a bad comparison to ask me. In the words of Mitch Hedberg "If my car won't start, and the needle isn't on 'E', I'm fucked. But if it is on 'E' I get all cocky, because I'm all 'Let me go get the toolkit - AKA wallet'. I would be a shitty auto mechanic. 'My car won't start...' / 'Well... Maybe there's a killer after you?'"
[14:05:15] <Raazeer> N1njaneer, ok, bad example then.
[14:05:26] <N1njaneer> Raazeer: Unless the girls are assembler-coders too, they'd probably find it more impressive that you make a working application with the Atmel at the end of the day.
[14:05:29] <N1njaneer> HOLY SHIT
[14:05:32] <N1njaneer> I JUST FIGURED IT OUT
[14:05:44] <N1njaneer> THAT is why everyone hates the Arduino community
[14:05:59] <Raazeer> Maybe this will work: what will get you the better quality girls, a brand-new mac book air or a 1980 Commodore PC-I?
[14:06:03] <N1njaneer> They do stuff with their easy-to-use toolchains and shield boards, and they GET GIRLS
[14:06:40] <Raazeer> N1njaneer, they can HAVE the kind of girls that gets them.
[14:06:53] <Raazeer> I can buy them dime a dozen - litteraly
[14:06:55] <N1njaneer> See, it's all about the quality. :)
[14:07:20] <Raazeer> See, a modern Porsche is just about a limousine with a fancy airflow and a better engine
[14:07:34] <Raazeer> an f-40 is so bare-metal it doesn't even have door liners
[14:08:04] <Raazeer> so if you're willing to get quantity over quality, you buy a porsche and drive up to the nearest club.
[14:08:59] <Raazeer> if you get there with an F-40, you'll probably convince one girl in 1000 to drive with you (once they've seen the inside), but those will probably want to see the motor first and go halvsies on the driving.
[14:09:27] <N1njaneer> (phone)
[14:34:28] <kdehl> Hm. Am I stupid if I solder wires directly to the SIMM modules?
[14:34:57] <tzanger> kdehl: nah, just desperate. ;-)
[14:35:09] <kdehl> The damn sockets cost more than the memory itself...
[14:35:11] <kdehl> Heh.
[14:36:43] <N1njaneer> kdehl: Nope, hobbiests do it with SDCARDs all the time. You just have to watch your speeds and such as wires are far from ideal connections vs a PCB with power planes in regard to signal integrity.
[14:37:51] <kdehl> N1njaneer: But I'll have soldered wires sooner or later anyways in the circuit... is there any difference?
[14:38:03] <kdehl> I think I found one seller though.
[14:38:07] * kdehl mails about shipping costs
[14:38:57] <N1njaneer> kdehl: Depends on the kinds of speeds you're running and the length of your wires, really. And sometimes the pin-outs of the connection. Is this actual memory, or is it something just using a SIMM/DIMM connection profile?
[14:41:14] <kdehl> N1njaneer: It's just an experiment, making an AVR access a SIMM module.
[14:41:44] <kdehl> I'm really not concerned with making it efficient or anything.
[14:42:10] <kdehl> But I'll get a module anyway. It feels nicer than soldering directly to the memory.
[14:43:23] <MrMobius> like SIMM chips from PC RAM?
[14:44:35] <kdehl> Yup.
[14:45:26] <MrMobius> there is a guy who made an ARM assembler from an AVR. did you see? i think he just soldered directly to the RAM stick itself.
[14:45:48] <MrMobius> assembler=emulator
[14:46:11] <N1njaneer> lol crazy :)
[14:46:12] <kdehl> The one who ran Linux on it?
[14:48:56] <MrMobius> ya
[14:55:13] <Raazeer> kdehl, why don't you get an old motherboard and pirate a simm connector from there?
[14:55:16] <Raazeer> I do it all the time
[14:55:49] <Raazeer> N1njaneer, kdehl that's the guy
[14:56:10] <Raazeer> I get the old "but you can run linux on avr, I seen it on the internetz" about once a month.
[14:56:48] <Raazeer> now it looks I have to upgrade my avra
[14:57:21] <N1njaneer> Beaky was porting Linux to an ATTINY, because they're so awesome :D
[14:57:35] <rlc> Anyone knows if there exist an avr code that can clone with its own code another avr?
[14:57:36] <Raazeer> yesterday the usbasp, today the avra, is there anything avr-related that works out of the box?
[14:57:48] <Raazeer> N1njaneer, THAT I'd pay money to see...
[14:58:18] <N1njaneer> :)
[14:58:48] <N1njaneer> rlc: Yes, it's called an ISP programmer :)
[14:59:00] <MrMobius> Raazeer, what simm connector do you speak of?
[14:59:17] <N1njaneer> rlc: Doing that from a code basis on the actual micro is difficult since there are a lot of things that can affect the ability for such a thing to work.
[14:59:36] <Raazeer> MrMobius, kdehl wanted to connect a simm module and said they were expensive from the distributors - which they are.
[15:00:25] <Raazeer> to quote the famous inventor Dietrich Drahtlos: "If the inventor's out of cash, he builds his stuff from scrap and trash
[15:00:27] <Raazeer> "
[15:02:59] <MrMobius> Raazeer, interesting. after you get the simm connector what do you do? solder it to an mcu so you can use dram?
[15:03:35] <rlc> N1njaneer: I would need a small code that can read its own flash and sent it through spi to another same microcontroller
[15:05:29] <rlc> N1njaneer: The target then becomes another ISP programmer
[15:06:51] <N1njaneer> Personally I'd just spend the $30 USD and buy a working ISPMK2 programmer, but that's just me. :)
[15:12:56] <rlc> N1njaneer: Any good ISP programmer code out there that you know?
[15:14:07] <Raazeer> MrMobius, don't ask me, ask kdehl
[15:23:59] <abcminiuser> Partial GDP success: can incorrectly program three different source formats through a AVRISP-MKII now
[15:24:00] <abcminiuser> :P
[15:43:29] <N1njaneer> abcminiuser: I'm polyilliterate -- I can't speak in at least 50 languages!
[15:44:52] <Raazeer> N1njaneer, 50, that's a lot.
[15:45:01] <Raazeer> how many of them fluently?
[15:55:35] <timemage> Raazeer, fluency applies to illiteracy? =)
[17:08:14] <Raazeer> timemage, sure, why not, if there is such a thing as polyilliteracy, why shouldn't fluency apply to it?
[17:08:47] <Raazeer> also I'm outa here, g'night folks. long day tomorrow.
[17:08:52] <timemage> Raazeer, i suppose it could. so if i speak broken japanese does that mean i'm not fluently illiterate in it?
[17:09:40] <Raazeer> timemage, probably not, but you're probably fluently illiterate in swahili and urdu.
[17:09:57] <timemage> Raazeer, heh, swahili was the example i was going to use.
[17:10:31] <Raazeer> timemage, see, I wasn't since I'm not really fluently illiterate in it.
[17:10:41] <Raazeer> I am in urdu though.
[17:15:25] <Raazeer> ok, and what I also am is tired, so g'night folks
[17:41:51] <beaky> how do i drive a tiny with a mega
[18:01:28] <BusError> anyone good with gcc asm keyword on avr? Trying to write a 5 liners to set the stack pointer, but fighting witht he gnu asm pure lameness syntax :/
[18:03:03] <timemage> BusError, if it's the at&t syntax that's annoying you, you can switch to intel.
[18:03:10] <ambro718> BusError: pastebin your code
[18:04:37] <N1njaneer> beaky: You set the Tiny to external clock, attach the clock pins to the mega, and then bit-bang the mega's output to generate clock for the tiny.
[18:05:05] <beaky> lol
[18:05:15] <beaky> i will try that someday
[18:05:46] <N1njaneer> The Tiny then goes "Wheeeeee!!!" and feels like it is part of something larger and more important than itself, and it winds up running it's instructions in a slightly less existential mode of execution, which actually consumes less power.
[18:07:47] <BusError> http://pastebin.com/dfFSeuEg <- _set_stack(void * stack)
[18:10:30] <BusError> error is "error: inconsistent operand constraints in an 'asm'"
[18:10:51] <ambro718> BusError: ld loads sram to register
[18:11:04] <ambro718> I think you want mov, or maybe even movw
[18:11:07] <BusError> I tried quite a few other methods/syntax BTW... including 'mov'
[18:12:59] <ambro718> BusError: why do you want to set the stack pointer from a C function?
[18:13:30] <BusError> small context switch
[18:13:40] <ambro718> you can't do that, since the compiler doesn't expect it
[18:13:47] <hjohnson> that will break things, badly.
[18:13:54] <hjohnson> BusError: what you need are naked functions
[18:14:09] <ambro718> I think you should write your task switching code as pure assembly function
[18:14:48] <hjohnson> yeah... I was looking at FreeRTOS's context switch stuff... just a quick asm hunk that pushes/pops things
[18:15:02] <BusError> hrms. that code works on x86*, arm (thumb and arm) and mips. using gcc; I really just need the basic "set the blooming stack ptr"
[18:16:02] <hjohnson> BusError: your only option is inline assembler...
[18:16:40] <BusError> well, thats /supposed/ to be inline assembler here :-)
[18:17:36] <BusError> static inline works, it won't try to call it. my problem is not that, it's the asm syntax from hell. despite having like 4 other implementation of it, can't get get avr one to work ;-)
[18:19:58] <beaky> if i program my chip to have external clock, do i need to put the clock to reprogram it back to use internal clock
[18:20:07] <beaky> i am using isp
[18:24:14] <BusError> http://pastebin.com/ihec43w0 <- that works, thanks for reminding me of movw. ambro718
[18:25:14] <ambro718> BusError: why cli+sei?
[18:25:56] <BusError> cut and paste. it's no longer needed here
[18:26:27] * BusError should know better, he wrote simavr :-)
[18:27:20] <N1njaneer> beaky: Yes, ISP needs a valid clock to function
[18:27:56] <beaky> maybe i can use an external avr as a clock!
[18:28:02] <beaky> wow i've saved my avr
[18:28:10] <N1njaneer> Yes, that's what I mentioned above :)
[18:28:30] <BusError> beaky, you can,. saved my ass many, many times; use a PWM output of a random arduidiot as clock input of a bricked avr :>
[18:28:53] <beaky> https://www.youtube.com/watch?v=nPZISRQAQpw wow i didnt know you can power microcontrollers from potatoes
[18:28:57] <N1njaneer> BusError: Just keep a nice 1Mhz TTL clock-in-a-can around for that :)
[18:29:47] <N1njaneer> beaky: You can power anything with potatoes. It just may take a whole lot of the,
[18:29:50] <N1njaneer> +them
[18:36:47] <Fornaxian> N1njaneer, russians proved that a long time ago..the powered most of russia with potatoes...made into vodka of course...
[18:38:38] <Casper> hmmm
[18:38:59] <N1njaneer> Fornaxian: Wow, touche on that! :D
[18:38:59] <Casper> wouln't vodka be an efficient thing to run a motor on?
[18:39:19] <N1njaneer> You could - it combusts!
[18:39:19] <Casper> the alcohol content should be high enought to provide the explosion
[18:39:23] <Fornaxian> motors, heaters, russians...whatever.
[18:39:31] <Casper> and the water would then vaporise and expend?
[18:39:42] <Fornaxian> or expand
[18:39:55] <Casper> or that yeah
[18:40:05] <Casper> cooling the engine while providing a bit more power?
[18:41:38] * hjohnson imagines a potato powered car.
[18:42:32] <hjohnson> 80 proof isn't really all that useful as a fuel.
[18:42:49] <hjohnson> the germans used potato alcohol for the V2 rocket, IIRC
[18:44:17] <Fornaxian> hjohnson, problem with car powered by potatoes is the time you need to refuel...dicing the potatoes, fermenting, distilling, etc..
[18:44:26] <hjohnson> you could power a V2 off of bacardi 151 though
[18:44:48] <hjohnson> Fornaxian: eh, I was just thinking about using them like batteries a la elementary school science fair project.
[18:45:16] <Fornaxian> better to use lemons I think.
[18:45:21] <Fornaxian> or grapefruit.
[20:52:46] <jadew> so.. on which chinese site should I be looking for a cheap ssd?
[21:09:00] <rue_house> there isn't one
[21:09:11] <rue_house> no solid state memory is cheap right now
[21:09:25] <rue_house> even usb is going for $1/G
[21:11:57] <jadew> rue_house, yeah, it looks like you're right
[21:12:42] <jadew> I was expecting it to be a bit cheapper by now
[21:13:04] <rue_house> aparently one of the two main factories just burned down a few months ago
[21:13:49] <jadew> that's unfortunate
[21:26:20] <Casper> rue_house: maybe they burned down the factory just to keep the price high?
[21:26:33] <Casper> and claim insurances to get brand new equipment
[21:26:36] <jadew> Casper, I was thinking the same
[21:26:50] <Casper> so they can make it even cheaper and still sell at high price?
[21:27:03] <jadew> they probably figured the odds for a tsunami to trash the factory are pretty slim so they decided not to wait
[21:27:19] <N2TOH> what burned down now?
[21:27:26] <jadew> another hdd factory
[21:27:28] <jadew> ssd
[21:27:55] <N2TOH> typical, I recall DRAM factories burning down all the time back in the mid 90's
[21:28:50] <N2TOH> friends used to call it "Jewish lightning" I forgave them cause they were of the same.
[21:29:02] <jadew> haha
[21:31:44] <beaky> if i had a choice, would i use the internal 1.1v vref or the external 5v vref?
[21:31:55] <jadew> for adc?
[21:31:57] <jadew> 5v
[21:31:57] <beaky> yes
[21:32:00] <Casper> depend on what you need to sample
[21:32:04] <beaky> why 5v
[21:32:05] <jadew> the higher the better
[21:32:09] <Casper> not always
[21:32:16] <Casper> the closer to your sampling source the better it is
[21:32:21] <jadew> because you get more resolution
[21:32:32] <Casper> if you sample 0-1V then go with 1.1V internal vref
[21:32:36] <jadew> yeah, but you're more prone to noise
[21:32:41] <N2TOH> you can always scale with an opamp, or resistor deivider.
[21:32:47] <Casper> if you sample 0-5V go with the external 5V
[21:32:51] <beaky> ok i will go with 5v because my sources are in the range of 12-24v
[21:33:13] <Casper> yeah go with 5V
[21:33:32] <beaky> who would ever use the internal one that is prone to noise?
[21:33:40] <jadew> 0.02V noise is a lot more for a 1v ref than it is for a 5v one
[21:33:43] <N2TOH> I used to make plug in modules so I swap the configs around during the prototype stages
[21:33:47] <jadew> at least that's how I see it
[21:34:45] <N2TOH> with that logic, why not use an ultra low noise op amp and "scale" the range?
[21:35:04] <beaky> or just a resistor
[21:35:08] <beaky> divider
[21:35:29] <jadew> N2TOH, how would the opamp help?
[21:35:46] <jadew> or what exactly do you mean?
[21:36:10] <N2TOH> the opamp can be used to amplify or attenuate the input signal
[21:36:15] <jadew> oh right
[21:36:24] <jadew> that would actually work
[21:37:16] <jadew> because an opamp has a lot more "resolution"
[21:37:20] <N2TOH> you just have to watch out for noise levels
[21:38:00] <N2TOH> more so it's analog nature where is can scale signals to fit within your ADC range
[21:38:08] <jadew> yeah
[21:38:38] <N2TOH> it could also allow you to deal with minus polarity signals
[21:38:49] <beaky> why not just use a resistor divider
[21:38:50] <N2TOH> or even bias them
[21:39:19] <jadew> beaky, the idea is to have a high reference
[21:40:47] <N2TOH> what do you do with an input signal that is both positive, and negative. more so then they are not equally above and below zero volts
[21:41:06] <N2TOH> jadew, yeah I understand the noise issue
[21:42:32] <N2TOH> reminds me years ago when high impedance/ high voltage circuits were susceptible to noise from leakage currents and such.