#avr | Logs for 2016-08-22

Back
[10:24:17] <gabru> Are 2 npn transitors for logic level shift (5V to 3.3V) fast enough for SPI communications? say for 8 MHZ
[10:25:02] <LeoNerd> Depends on the transistor, surely
[10:25:51] <Thrashbarg> if you're using resistors in that mix, I'd expect not. The miller capacitance in the transistors will reduce the bandwidth (RC time constant)
[10:26:11] <gabru> i am thinking to use 2N3906
[10:27:54] <Thrashbarg> 8MHz *might* work but it'd be approaching the upper limit. It'd be much more reliable to use a level shifter IC
[10:29:50] <carabia> First of all, is there like a really really particular reason why you're going with a bjt instead of a fet?
[10:30:56] <gabru> no reasons. i was just curious.
[10:39:13] <_ami_> Thrashbarg: i was just wondering, what are the factors/features of a transistor involved in deciding the speed?
[10:40:40] <_ami_> t_r and t_f time factors
[10:40:45] * _ami_ checks 2N3906 Ds
[10:41:42] <Thrashbarg> _ami_: I go on the faster-is-better theorem :P
[10:42:08] <twnqx> i just throw chips at that :X
[10:42:28] <Thrashbarg> yup
[10:46:26] <carabia> if you wanna go down that route just get one of those _high_ speed fets (gaas and the likes) :)
[10:54:18] <carabia> but there's 74hcs that do the job cheap, and they're so much nicer not having to fiddle with icky and dubious tranny datasheets
[10:56:15] <Thrashbarg> 74HC buffers work nicely if they have 5V tolerant inputs off a 3.3V Vdd
[10:56:54] <Thrashbarg> going from 3.3V to 5V is easier with them
[10:57:19] <carabia> Oh wait I read it backwards.
[10:58:09] <carabia> And it's still kind of backwards. going _to_ 3v3
[10:58:38] <bss36504> why not just use a voltage divider if you're going down?
[10:58:56] <bss36504> or use a shottky to clamp to 3.3V.
[10:59:11] <Thrashbarg> if you want to go cheap, just use a single resistor and rely on the input clamp diodes to limit the voltage
[10:59:17] <bss36504> That too
[10:59:38] <bss36504> there are lots of ways to skin this cat that don't require sourcing a fast transistor
[10:59:39] <carabia> series resistor might work, depends on device
[11:00:07] <carabia> 74hc125 (which is a tristate though), works easily up to 10 MHz. Going 5 to 3v3.
[11:00:28] <gabru> yeah, found the link which describes this. http://codeandlife.com/2012/04/06/level-shifting-101/
[11:01:46] <bss36504> Low to high is a much more annoying translation, though 3.3 to an AVR is fine, since 3.3 is above the Vih min on most devices.
[11:01:53] <carabia> Yeah.
[11:02:09] <vpcd> i want to connect a device to an SPI bus that will also be used for programming the AVR. there is contention without the series resistors on the data lines of the slave and i can't program the avr. putting the resistors resolves the problem. it was mentioned somewhere that putting the series resistor on only the MISO line would be enough. can someone confirm?
[11:03:05] <carabia> vpcd: what's the slave?
[11:03:18] <vpcd> enc18j60 ethernet controller
[11:04:59] <bss36504> The issue is probably that the slave devices MISO line isnt tristated when its SS line is de-asserted, which is common. Since during ISP programming the AVR is actually the slave of the programmer, the MISO pin of the AVR's slave is actually pulling that line either to VDD or GND.
[11:05:39] <bss36504> So putting a resistor in there works because now instead of that line being shorted to a supply, it's actually connected to a resistor to a supply.
[11:06:22] <carabia> yeppaaaaaah.
[11:14:10] <vpcd> bss36504, that makes sense, thank you for the explanation. how about the other lines?
[11:17:25] <bss36504> vpcd, no problem. The other lines will be fine. During programming, SCK and MOSI will be inputs on both the AVR and the AVR's slave, so the slave's presence doesn't affect programming
[11:33:28] <vpcd> bss36504, oh, right! so only if the device could act as both the slave and the master would those additional resistors make sense
[11:35:58] <bss36504> correct
[11:37:50] <bss36504> Just be careful to not use too big of a resistor value, otherwise the signal on the MISO line will start to degrade. The resistor forms a low-pass filter with the AVR's input capacitance.
[11:40:14] <bss36504> whoops, meant MOSI ^
[11:40:27] <LeoNerd> I usually use 220R
[11:41:07] <LeoNerd> A 5V short across that is just over 22mA
[11:41:39] <bss36504> That seems pretty low.
[11:42:54] <bss36504> especially since if the programmer has 10mA drive at 5V, it's output impedance is 500 ohms. So you'd be getting a little less than 2.5V at the AVR (if the AVR's slave is driving low)? Of course, you also have to sum the AVR slave's output impedance into that if you want an accurate number
[11:43:27] <bss36504> (oh and the 10mA drive was just a guess in the case that it is not being driven by a buffer and is just a MCU IO)
[11:56:07] <vpcd> my AVR is an 3.3 V one and i used 330 ohm resistors that i have at hand. is that low enough?
[11:57:03] <bss36504> Most likely. What SPI speed are you trying to achieve?
[12:01:39] <vpcd> at the moment i am not worried by speed all that much, just want to make it work first as this is my first experience with SPI :)
[12:03:49] <bss36504> Oh gotcha
[12:23:52] <carabia> SPI is like buttsex, at first...
[12:24:08] <LeoNerd> *eyebrow*
[12:24:09] <carabia> Well actually SPI is super simple.
[12:24:50] <carabia> Just devices that don't behave nicely even when deselecting them are a bit of apain, but you can get around that.
[12:24:53] <carabia> a pain, even
[12:29:39] <LeoNerd> Ahyes... Good ol' 74HC1G125
[12:29:50] <LeoNerd> (SOT-23-5 sized hiZ buffer chip :) )
[12:30:23] <carabia> 23-5, single?
[12:30:31] <LeoNerd> That's the "1G" in the part name
[12:30:42] <LeoNerd> There's a few 74-series chips like that.. little tiny single-gate SOT sized chips
[12:30:49] <LeoNerd> So handy :)
[12:31:20] <carabia> mmmmm
[12:32:04] <carabia> at least if doing by hand it's nice. otherwise i'd prolly get a quad, you always need more than one!
[12:32:31] <carabia> think they come in ssop16s
[12:35:38] <carabia> Right. Time to start cooking with this wolfson dac. wm8994.
[12:36:02] <carabia> or i guess it's cirrus nowadays
[12:37:53] <carabia> Well, didn't even check. Apparently it has dacs and adcs. It just came as a freebie along this board.
[12:41:33] <carabia> This is veeeeewy fancy.
[12:55:51] <twnqx> nah
[12:55:59] <twnqx> i needed exactly on and and one nand
[12:56:05] <twnqx> and i used those :P
[13:02:51] <carabia> generalizations are a breed known to work rarely. Much like most immigrants in my neighborhood.
[13:03:04] <carabia> My bad.
[13:05:08] <twnqx> that was for address decoding
[13:05:57] <carabia> Aaaaaaaah.
[13:06:23] <twnqx> three quarter to one chip, on quarter to another :P
[19:33:01] <rue_house> I wonder if atmega88 serial code will work on a mega8
[19:35:11] <Lambda_Aurigae> code should but will likely need recompiled
[19:35:14] <Lambda_Aurigae> for the most part.
[19:35:16] <rue_house> yea
[19:35:22] <Lambda_Aurigae> unless you use pin change interrupts
[19:35:28] <Lambda_Aurigae> as the mega8 doesn't have them.
[19:35:40] <Lambda_Aurigae> I think there are a couple of other features that they added too.
[19:35:58] <Lambda_Aurigae> I know mega8 software will compile and run just fine on mega88.
[19:36:11] <Lambda_Aurigae> going backwards can be troublesome if you use the new features.
[19:36:18] <rue_house> just serial code, porting over peices I need for a new project
[19:36:20] <Lambda_Aurigae> however, it should throw fits on compile if you did.
[19:37:40] <Tom_itx> i should send you the 8515 i've got here
[19:37:52] <rue_house> is that like a 8051?
[19:37:58] <rue_house> oh, no right, nevermind
[19:37:58] <Tom_itx> old avr
[19:38:00] <rue_house> yes
[19:38:03] <rue_house> sure
[19:38:04] <Tom_itx> 44 pin
[19:38:07] <Lambda_Aurigae> 8515 is a fun old avr chip.
[19:38:07] <Tom_itx> iirc
[19:38:15] <rue_house> I think I have one somewhere, its alot like the 8051
[19:38:20] <Tom_itx> rue likes antiquated chips
[19:38:23] <rue_house> with the pullup input things
[19:38:41] <Lambda_Aurigae> in fact, I think the 8515 has the external ram interface, yes?
[19:38:55] <Tom_itx> i dunno, i honestly don't think i've ever used it
[19:38:57] <Lambda_Aurigae> I love my 8052 chips.
[19:39:02] <Tom_itx> someone traded me something for it ages ago
[19:39:16] <Lambda_Aurigae> yeah...it can access up to 64K of external memory.
[19:39:23] <Lambda_Aurigae> ram, rom, memory mapped I/o.
[19:39:30] <Tom_itx> i did that on the 6811
[19:39:33] <Lambda_Aurigae> the interface is very similar to the 8051 external ram interface.
[19:39:45] <Tom_itx> with extra mapped io too
[19:40:23] <Tom_itx> i'm not ever sure i'd remember how to program one of those now
[19:40:43] <Lambda_Aurigae> I've mapped 8255 chips on an atmega8515 and atmega128 before.
[19:41:13] <Lambda_Aurigae> that was a fun project.
[19:41:41] <Lambda_Aurigae> those chips are now mounted on an 8052 board along with a 128Kx8bit nvsram module and a ds89c450
[19:42:14] <Tom_itx> rue_house, you think i'd be ok with one of those parport pci cards from china for a dos app?
[19:42:31] <Lambda_Aurigae> with the ram done in 32K blocks that can be mapped to program or data space and controlled through one of the 8255 chips.
[19:42:41] <rue_house> I was playing with some 8051 that had a nice serial boot loader with auto baud detection
[19:43:00] <Tom_itx> i can get one for $3
[19:43:00] <Lambda_Aurigae> rue_house, yeah...that's one nifty part of the maxim/dallas 8052 chips..
[19:43:05] <rue_house> it was working great, had a legacy mode you could turn off and get 8x the normal speed
[19:43:10] <rue_house> NXP iirc!
[19:43:16] <rue_house> but they dont make it anymore
[19:43:16] <Lambda_Aurigae> Tom_itx, long as it is a true parallel port card and not some hacky thing.
[19:43:33] <Lambda_Aurigae> yeah...nxp had nifty ones too.
[19:43:48] <Lambda_Aurigae> maxim-ic.com still makes the ds89c450 I believe but it is a bit pricy.
[19:43:49] <Tom_L> http://www.ebay.com/itm/DB25-Parallel-Port-IEEE-1284-Printer-PCI-Controller-Card-Adapter-Black-DT-/262540313865?hash=item3d209f4509:g:WV8AAOSw4s9Xkt88
[19:43:53] <Tom_itx> what do you think?
[19:44:02] <Lambda_Aurigae> looks like a real one.
[19:44:11] <rue_house> Tom_itx, any pci parport card if you have a pnp bios
[19:44:12] <Lambda_Aurigae> in fact, looks like it has option for serial ports on the board.
[19:44:46] <Tom_itx> wish it had a short hanger
[19:45:04] <Lambda_Aurigae> that's what a dremel is for.
[19:45:08] <rue_house> I got some at89S51, but dont know how to program them, I dont think they have a built in bootloader
[19:45:12] <Tom_itx> yeah
[19:45:32] <rue_house> Tom_itx, you havn't said if its a pnp bios
[19:45:36] <Tom_itx> this guy in Canada said he had some but i've not heard back from him since
[19:46:07] <rue_house> maxim and dallas 8051 have built in serial bootloader?
[19:46:09] <Tom_itx> actually it'd be cheaper to get that one than to pay shipping from rue
[19:46:15] <Lambda_Aurigae> rue_house, it looks an awful lot like an AVR ISP programming interface.
[19:46:25] <rue_house> Tom_itx, as per anything from canada
[19:46:37] <Lambda_Aurigae> rue_house, the ds89c450 and related chips do.
[19:46:40] <rue_house> Lambda_Aurigae, yea, so, I dont know
[19:46:46] <Lambda_Aurigae> and they are high speed core too.
[19:47:16] <rue_house> the 12' mecha was gonna use 8051 for the main servo loops, but the plan has changed a bit and fast serial io might work
[19:47:33] <rue_house> I need to operate a lot of digital valves quickly
[19:47:41] <Tom_L> http://www.ebay.com/itm/New-PCI-I-O-Parallel-Port-DB25-25Pin-IEEE-1284-Printer-Card-Controller-Adapter-/380801587270?hash=item58a98b1846:g:JjUAAOxyYSdTD42q
[19:47:52] <Tom_itx> wonder why that one has a cd with it
[19:48:16] <rue_house> but I'v reduced it, right now each controller only needs to operate 32 valves
[19:48:26] <Tom_itx> looks like the same card
[19:48:37] <rue_house> Tom_itx, it all depends on the bios having pnp
[19:48:54] <Tom_itx> yeah and i dunno if it does
[19:49:02] <Tom_itx> it's a fairly recent itx board
[19:49:03] <rue_house> if the bios has a setting called "non-pnp OS" your fine
[19:49:03] <Lambda_Aurigae> just use the IDE port!
[19:49:15] <rue_house> cause the bios will do all the pnp mapping on boot
[19:49:26] <Tom_itx> i'll check it later
[19:49:33] <rue_house> Lambda_Aurigae, your just uttering my suggestions now
[19:49:40] <Lambda_Aurigae> of course.
[19:49:48] <Tom_itx> i'm fairly sure my newest itx would be
[19:50:10] <rue_house> it would be really easy to use an ide port, the hard part would be mapping the io port to the lpt
[19:50:26] <rue_house> which I'm sure is just a few bios calls, dont know which ones
[19:52:59] <Tom_itx> rue, where's that normally listed in the bios?
[19:53:13] <Tom_itx> i don't see it yet
[19:54:04] <Lambda_Aurigae> Tom_itx, there should be an entry that talks about installed OS.
[19:54:10] <Tom_itx> it's an intel D525MW board
[19:54:17] <rue_house> under advanced, pnp
[19:54:53] <rue_house> I just read an article that says that the pci bus is not allpwed to use the legacy port addresses... odd
[19:55:23] <Tom_itx> i don't see it on that one
[19:55:28] <Tom_itx> maybe this pc has it
[19:55:36] <Tom_itx> same board as one i have in the box
[19:55:56] <Tom_itx> but i'd need a pcie card instead i think
[19:57:12] <Tom_itx> maybe not, they're identical but one is a itx and one is a mini atx
[19:57:18] <Lambda_Aurigae> Advanced/Boot Configuration
[19:57:25] <Lambda_Aurigae> Plug & Play O/S
[19:57:41] <Lambda_Aurigae> http://www.intel.com/content/dam/support/us/en/documents/motherboards/desktop/sb/biosglossaryalpha_v13.pdf
[19:58:05] <Tom_itx> i'm not seeing it
[19:58:18] <rue_house> oh yea, under boot
[19:58:26] <Tom_itx> wonder if i did a bios update..
[19:58:41] <Lambda_Aurigae> that's supposed to be for all modern intel chipsets.
[19:58:49] <rue_house> the machine has no isa slots?
[19:59:34] <Tom_itx> no
[19:59:47] <Tom_itx> what's UEFI Boot?
[19:59:57] <Tom_itx> i don't see any os options in there
[20:00:13] <rue_house> its the new harddrive boot thing
[20:00:19] <rue_house> encoded boot secot
[20:00:24] <rue_house> r or some crap
[20:00:29] <Lambda_Aurigae> UEFI is the encoded secure boot for win8/10/whatever.
[20:00:37] <Tom_itx> seems something to avoid :D
[20:00:53] <rue_house> wait, that has to be a new motherboard then
[20:01:00] <rue_house> I thought you said it was like a P100 or soemthing
[20:01:03] <Lambda_Aurigae> UEFI is like what mac uses for booting..
[20:01:10] <Tom_itx> rue_house, different pc
[20:01:12] <Lambda_Aurigae> replacement for traditional bios.
[20:01:21] <Casper> uefi is junk
[20:01:31] <Casper> unfinished piece of junk
[20:01:45] <Lambda_Aurigae> it's definitely still beta software,,,maybe even alpha.
[20:02:03] <rue_house> there must be an option for old operating systems or non-pnp os
[20:02:11] <Casper> I'ld say beta, but some manufacturers break it so much
[20:02:51] <Lambda_Aurigae> rue_house, if it's made for windows 8 or windows 10, it's possible that doesn't exist anymore.
[20:02:54] <Casper> I mean, I worked on a computer... that POS can NOT boot from cd or usb key from the bios, can only do that from windows boot from X screen!
[20:03:17] <Tom_itx> bios ver MWPNT10N.86A.0069.2010.0913.1432
[20:03:19] <Casper> however, it can boot on the network no issue
[20:03:35] <Casper> http://i.imgur.com/34HZF7v.jpg <=== that kind of pos
[20:03:38] <Tom_L> https://downloadcenter.intel.com/product/48952/Intel-Desktop-Board-D525MW
[20:03:46] <Tom_itx> can't tell if those are any newer
[20:04:14] <Lambda_Aurigae> I'll stick with my gigabyte boards.
[20:04:15] <Tom_itx> would it be coded in the 0913 2010?
[20:04:24] <Tom_itx> Lambda_Aurigae, i have one too and love it
[20:04:28] <Lambda_Aurigae> Tom_itx, possibly.
[20:04:29] <Tom_itx> but i like these too
[20:04:44] <Lambda_Aurigae> Tom_itx, mine is about 3 years old now and even has parallel and serial port headers on it.
[20:04:49] <Tom_itx> i can leave it on all the time and not hear it or use much power
[20:05:04] <Lambda_Aurigae> that's why I do most of my work with this laptop.
[20:05:04] <Tom_itx> i think mine does as well
[20:05:09] <Tom_itx> parallel at least
[20:05:16] <Lambda_Aurigae> and the dual bios on the gigabyte boards rocks.
[20:05:21] <Lambda_Aurigae> screw one up, just boot to the other.
[20:05:31] <Tom_itx> are they all that way?
[20:05:38] <Lambda_Aurigae> not all gigabyte boards.
[20:05:49] <Lambda_Aurigae> it will say dual-bios specifically on the board somewhere.
[20:06:07] <Lambda_Aurigae> and in the bios you can select...there is also a jumper to select as I recall but never had to use that.
[20:06:25] <Tom_itx> this one is a HM110-S2H-GSM
[20:06:26] <Lambda_Aurigae> maybe that was older ones and newer ones use a key press on power up.
[20:07:31] <Lambda_Aurigae> http://www.gigabyte.us/products/product-page.aspx?pid=5618#ov
[20:07:34] <Lambda_Aurigae> that one?
[20:07:50] <Lambda_Aurigae> or older version?
[20:07:57] <Tom_itx> not that one
[20:08:44] <rue_house> no, it looks like the atmega88 code isn't happy on the mega8 for serial
[20:09:50] <rue_house> ah, I'll bet all the register names are slightly out
[20:09:51] <Lambda_Aurigae> maybe H110M-S2H-GSM?
[20:10:03] <Lambda_Aurigae> http://www.gigabyte.us/products/product-page.aspx?pid=5607&kw=H110M-S2H-GSM#ov
[20:10:21] <Tom_itx> yeah that's it... my bad
[20:10:35] <Lambda_Aurigae> different from the first post..
[20:10:40] <rue_house> hmm closer...
[20:11:04] <Lambda_Aurigae> and, not dual bios
[20:11:04] <Tom_itx> added an extra M in the partno
[20:11:13] <Lambda_Aurigae> you just had the M in the wrong place.
[20:11:19] <Lambda_Aurigae> H110M rather than HM110
[20:11:56] <Tom_itx> plenty happy with it though
[20:12:04] <Tom_itx> probably not the state of the art..
[20:12:33] <Lambda_Aurigae> and no parallel port.
[20:12:43] <Tom_itx> mine does i'm sure
[20:12:51] <Tom_itx> err pretty sure..
[20:12:53] <Lambda_Aurigae> there's a com port
[20:12:56] <Lambda_Aurigae> and TPM port
[20:13:00] <Lambda_Aurigae> but no parallel.
[20:13:00] <rue_house> haha I got it with wild guessing
[20:13:13] <Lambda_Aurigae> TPM is trusted program module or something like that.
[20:13:16] <Tom_itx> ahh you're right again :D
[20:13:27] <Tom_itx> i got too many pc's around here..
[20:14:23] <Lambda_Aurigae> ok..bedtime for bonzoids here.
[20:14:32] <Tom_itx> wait!!
[20:14:38] <Lambda_Aurigae> what?
[20:14:44] <Tom_itx> what about the ASRock Q1900M PRO3
[20:14:46] <Lambda_Aurigae> wifey is naked in bed...can you offer more?
[20:15:11] <Tom_itx> wonder if it has the OS thing in the bios
[20:15:13] <rue_house> how about a 72Mhz microcontroller for $3?
[20:15:20] <Lambda_Aurigae> that has 2 com ports and a parallel port
[20:15:29] <rue_house> its got more than that
[20:15:30] <Lambda_Aurigae> rue_house, what microcontroller?
[20:15:33] <Tom_itx> yeah
[20:16:13] <Lambda_Aurigae> only 2 ram slots though.
[20:16:15] <Lambda_Aurigae> icky.
[20:16:25] <Tom_itx> for what i use those for it's fine
[20:16:25] <Lambda_Aurigae> won't buy a big system mainboard unless it has 4 slots.
[20:16:42] <Tom_itx> just wondering about adding the parport to it
[20:16:47] <Tom_itx> if dos would see it
[20:16:48] <rue_house> I'v migrated a lot of thigns to usb
[20:16:52] <Lambda_Aurigae> dunno.
[20:16:52] <rue_house> like sound cards
[20:17:02] <Lambda_Aurigae> would have to look through the manual for the pnp os thingie.
[20:17:05] <rue_house> ugh 1 slot!?
[20:17:08] <rue_house> WTF!
[20:17:15] <Tom_itx> i'll have to dig it outta the box to see..
[20:17:28] <Tom_itx> i've got it's cousin in this one, the bios is likely the same
[20:17:42] <Lambda_Aurigae> but, it already has parallel port.
[20:17:47] <Lambda_Aurigae> or do you need multiples?
[20:17:53] <Tom_itx> asrock Q1900B itx
[20:18:00] <Tom_itx> i need one more
[20:18:18] <Tom_itx> that's what's in this pc
[20:18:27] <Tom_itx> i leave it on all the time
[20:18:41] <rue_house> someone should make a pcie legacy card with ide, floppy, parallel, and serial ports
[20:18:50] <rue_house> and joystick!
[20:18:52] <Tom_itx> the spare i'm working on is the intel D525
[20:19:03] <Tom_itx> heh
[20:19:19] <Tom_itx> rue_house, i was kinda surprised to find a pcie parport card
[20:20:15] <Lambda_Aurigae> rue_house, old analog/digital DB15 joystick port!
[20:21:12] <rue_house> hell yea
[20:22:03] <Lambda_Aurigae> do it all as a usb device and write a device driver to map to the old hardware ports.
[20:22:17] <rue_house> w? you cant?
[20:22:27] <Tom_itx> there is a new bios update for it
[20:22:41] <Tom_itx> i remember when you had to order the bios chips and plug em in
[20:23:40] <Tom_itx> i wonder if you can save the old one before you update just in case
[20:24:04] <Lambda_Aurigae> not usually.
[20:24:14] <Lambda_Aurigae> at least, not without some external hardware to read the bios chip.
[20:24:40] <Tom_itx> i kinda hesitate to do it then
[20:25:54] <Tom_itx> ok Lambda_Aurigae, you're off the hook now... i gotta go pick up my kid
[20:28:45] <Tom_itx> i did see a parport card that said it came with DOS drivers
[20:28:49] <Lambda_Aurigae> just don't drop it on it's head.
[20:28:53] <Tom_itx> wonder if it would be any safer
[20:29:12] <Tom_itx> he's taller than me, not likely
[20:29:15] <Lambda_Aurigae> no..dropping the kid on the head is not safe.