#avr | Logs for 2013-04-09

Back
[01:23:00] <R0b0t1> Do atmega32u2/u4 parts require an external crystal to provide USB functionality?
[01:38:16] <specing> R0b0t1: yes
[01:38:33] <specing> R0b0t1: though it could work on internal, provided you calibrate it properly
[02:10:48] <Valen> Anybody used a ufbga package?
[08:33:32] <JumboCoDeC> hello
[08:37:52] <langoliers> hi
[08:38:40] <langoliers> do you think i should solder the ps2 cable to my microcontroller board? if the user plugs the gold plated pin connector in backwards like in a cheap mouse it will get reverse polarity
[08:38:48] <langoliers> and a connector is another source for error
[08:39:19] <theBear> huh ? you can't plug minidin in backwards
[08:39:24] <tzanger> connectors are good
[08:39:25] <langoliers> noo
[08:39:27] <langoliers> the other end
[08:39:28] <langoliers> :)
[08:39:38] <tzanger> add a poly fuse and a reverse protection diode if it's super important
[08:39:49] <theBear> what other end ? it's ps2, it uses the same plugs at all ends
[08:40:02] <langoliers> mouses have the tiny 4 pin connectors
[08:40:18] <langoliers> so you can just pop the cable off and replace with a new if broken
[08:40:36] <theBear> so ?
[08:40:47] <langoliers> so users plug it in backwards, or any way
[08:41:09] <langoliers> or plug wrong things in that ;/
[08:41:13] <theBear> for a start, those are keyed, and not ps2 connectors, and in no way standardised or common
[08:41:20] <langoliers> no they are not
[08:41:25] <langoliers> ^^
[08:41:29] <langoliers> it is a jumper 4
[08:41:38] <theBear> you been looking in some really stupid cheap mouses then
[08:41:44] <langoliers> $0.5
[08:41:45] <langoliers> :)
[08:42:01] <theBear> i still don't see how what is inside SOME mice effects you using a ps2 connector
[08:42:09] <theBear> aka 4pin minidin
[08:42:27] <langoliers> that is the computer end of cable.
[08:43:46] <theBear> you're doing it wrong
[08:44:00] <langoliers> no i'm cool
[08:44:18] <langoliers> i just got a few junk mouses for the cables
[08:44:54] <langoliers> original packaging, unused ^^
[08:45:20] <theBear> connectors like that inside mouses are for qualified technicians to use, but they never get used because mouses aren't worth repairing and NOONE sells the cables, remembering that every brand and often different models pin them differently
[08:45:41] <theBear> they are supposed to be a permanent part of something, ps2 uses minidin connectors, male AND female as needed
[08:46:23] <langoliers> yeah, so if i solder the cable to my board and put silicone reinforcement on it i'm good then right?
[08:46:49] <langoliers> it does not need to be removed
[08:47:08] <theBear> you wanna firmly secure the cable, a ziptie or knot before a hole in a panel is more appropriate
[08:47:54] <langoliers> but i think i still put 5V tvs diode in it
[08:48:21] <langoliers> the micro would die above 6V spike
[08:48:23] <JumboCoDeC> can anyone help me with isp with avr dragon ... question about power supply
[08:51:05] <theBear> avrs got internal protection diodes, probly just a resistor would do
[08:51:37] <langoliers> theBear<= for power supply they dont
[08:52:11] <theBear> why tvs then ? just a series regular diode should be fine
[08:52:35] <theBear> hangon, why would there be more than 5v anyway
[08:52:42] <langoliers> a tvs diode clamps 600W - 1500W peak power surges.
[08:53:01] <theBear> you expecting to get 600-1500w surges into your 4 pin header eh ?
[08:53:04] <langoliers> yes
[08:53:14] <theBear> you're doing it wrong
[08:53:39] <langoliers> i call it safety margin
[08:54:25] <theBear> you're doing it wrong
[08:55:51] <langoliers> it is optional...
[08:57:17] <langoliers> but if it protects my board from a bad power supply, than $0.1 is worth it no?
[08:58:13] <langoliers> it costs much to go to the desert and replace the whole thing
[09:05:56] <Valen> I am debating putting a TVS on my new product
[09:06:11] <Valen> it goes into a USB charger chip rated for 2kv
[09:06:14] <Valen> but still
[09:06:54] <jadew_m> What goes?
[09:07:20] <Valen> sorry, external USB plug
[09:07:27] <Valen> hooked to internal USB charger IC
[09:07:38] <Valen> its for a keyring torch
[09:08:01] <jadew_m> Nice
[09:08:18] <Valen> I'm tossing up if a TVS is going to be worth it
[09:11:53] <tzanger> you can always add it to the design and not populate it
[09:14:59] <Valen> my board is about the size of a thumbnail
[09:16:36] <twnqx> langoliers: ever heard of the mosfet reverse protection? it also eliminates the diode forward voltage drop
[09:17:15] <langoliers> twnqx<= yeah i know the synchronous rectification
[09:17:35] <langoliers> but that won't really protect against over-voltage
[09:17:42] <twnqx> no, of course not
[09:18:09] <twnqx> hm, right, that was something i wanted to look into for my upcoming design, too :P
[09:18:28] <langoliers> hm, but i would have to use p-fet to be correct, grounds should be joined
[09:19:23] <twnqx> welcome to the world of "need to increase voltage over input to make the p-fet switch"
[09:19:27] <langoliers> data is referenced to ground in computers
[09:19:41] <langoliers> :)
[09:20:16] * twnqx killed the problem with a super wide range input voltage power supply last time
[09:20:27] <twnqx> input: 3-28V, output: 5V
[09:20:55] <twnqx> a few shottky diode losses don't matter any more.
[09:22:01] <twnqx> and i think i used lots of overkill. seems the PSU is running at barely 10% of design capacity :(
[09:22:24] <langoliers> no need to overcomplicate the design if the atmega168pa goes from 1.8V to 5.5V
[09:22:40] <langoliers> fan1117 ?
[09:22:42] <twnqx> the other chips don't :P
[09:23:02] <langoliers> it has a 12V limit usually but, sounds al right
[09:23:18] <langoliers> motherboards, video cards use it
[09:23:33] <twnqx> as TVS?
[09:24:25] <twnqx> yuck, LDO
[09:26:04] <langoliers> noo, this is just an LDO regulator
[09:26:29] <KebabBob> Anyone here know a clever 3wire connector I can use for 1wire devices? I'm looking for something so I can easily expand my 1wire network and replace dead devices without soldering etc
[09:26:55] <KebabBob> I've seen a lot of people use cat5 connectors, but I would prefer something a little more compact
[09:27:33] * twnqx uses switching power supplies 80% of the time theses days (or 100% for the primary voltage)
[09:28:12] <twnqx> KebabBob: use something like the fan headers on mainboards?
[09:28:23] <KebabBob> Yeah that's actually not too bad
[09:28:28] <KebabBob> What's those connectors called?
[09:28:42] <KebabBob> 3pin molex?
[09:28:59] <twnqx> ummm
[09:29:27] <theBear> fan headers are just 3pin headers with clips, the little tiny ones like some cdrom audio uses are made by some company with a name like jrc or jmc or kmc or something
[09:29:49] <langoliers> twnqx<= http://www.st.com/web/catalog/sense_power/FM142/CL1015/SC312/PF63470?s_searchtype=partnumber
[09:30:50] <twnqx> langoliers: i just generally like their losses and heat dissipation if vin - vout difference gets too large
[09:30:58] <twnqx> don't like
[09:30:59] <langoliers> yes
[09:31:28] <twnqx> and usb->3.3v is easy 33% loss
[09:31:28] <cluelessperson> hey guys
[09:31:35] <cluelessperson> I keep getting this error in Atmel Studio
[09:31:36] <cluelessperson> USB driver initialization failed: Internal system error
[09:31:44] <twnqx> theBear: thinking of PSK?
[09:31:54] <theBear> i dunno, maybe
[09:31:59] <langoliers> twnqx<= does that really matter for usb?
[09:32:06] <langoliers> your computer eats like 150W
[09:32:08] <cluelessperson> and when I try to connect to the target through device programming
[09:32:13] <cluelessperson> I get a time out
[09:32:43] <twnqx> langoliers: most of the not, but it could
[09:33:18] <theBear> doesn't look like it
[09:33:33] <twnqx> KebabBob: btw, while the PCB connectors are ok, the cable connectors suck (crimping the cables)
[09:34:01] <KebabBob> Yeah I just realized that
[09:34:25] <KebabBob> I've had so much trouble crimping servo connectors I'm not sure I'm willing to bet my mental health on those damn connectors :D
[09:35:03] <twnqx> 3.5mm audio plugs!
[09:35:35] <KebabBob> Yeah that might be just the best connector.. or mini xlr
[09:35:58] <megal0maniac> twnqx: I'm always worried that something will short. Mini xlr I like the sound of though
[09:39:08] <KebabBob> yeah with audio jacks you can be pretty sure things will short, for at least a moment
[09:40:50] <twnqx> hm
[09:41:01] <twnqx> i still want to build this 12V power supply
[09:41:18] <twnqx> that can make use of the 55V/12A supplies i have here
[09:41:34] <twnqx> so, 12V/50A
[09:41:42] <twnqx> :]
[09:43:48] <megal0maniac> KebabBob: Which isn't such a great idea with power
[09:44:57] <KebabBob> yeah :)
[09:45:05] <KebabBob> Not the best of ideas
[09:45:27] <langoliers> twnqx<= http://www.ti.com/lit/ds/symlink/lp2980-adj.pdf :)
[09:45:40] <langoliers> for low power.
[09:46:18] <langoliers> even meets usb specs lol
[09:50:32] <twnqx> still aheat generator
[09:51:04] <langoliers> sure 300 milliwatts at most
[09:51:16] <twnqx> TI TPS62203 is what i used on my last USB powered board to get 3.3V :P
[09:52:23] <twnqx> chip + 2 capacitors + 1 tiny coil
[09:58:23] <langoliers> usb has 5V +-0.5V spec
[09:58:46] <langoliers> switcher for 100mA is overkill
[09:59:22] <langoliers> ofc a battery charger could benefit...
[10:01:33] <langoliers> keyboard specs are 250mA btw :)
[10:01:47] <langoliers> my keyb has 25mA max current stated on it
[10:02:47] <geoforce> ? from real noob
[10:03:17] <geoforce> any assembler simple from text file to hex file available out there?
[10:03:50] <geoforce> looked around but all seem to be a real learning curve at present
[10:08:59] <megal0maniac> geoforce: You'll probably need a make file first
[10:09:52] <megal0maniac> But then I presume (and someone correct me if this is wrong) that you can just type "make" if you have a suitable compiler. Namely winavr or similar
[10:10:05] <twnqx> yum. n-channel mosfets, 100V/195A
[10:10:20] <megal0maniac> twnqx: Heat-sunk like a mofo
[10:10:42] <twnqx> probably
[10:11:34] <geoforce> like I may have mentioned,
[10:12:12] <geoforce> in my time assembly was very simple since they pointed to only one platform
[10:12:31] <geoforce> still not up to steam on these
[10:13:18] <geoforce> uede to just type directly into the assembler editor and it did it LOL
[10:16:04] <megal0maniac> geoforce: What OS are you using?
[10:17:09] <geoforce> im on an intel Mac so I have both sides of the force
[10:17:21] <geoforce> like Mac best
[10:17:37] <megal0maniac> Do you have an AVR / programmer?
[10:17:47] <geoforce> Installed Atmel studio, but it looks a real handfull
[10:18:09] <megal0maniac> It really isn't :)
[10:18:13] <megal0maniac> You'll want http://www.obdev.at/products/crosspack/index.html for mac
[10:18:29] <geoforce> I'm probably gettint the tiny one from Adafruit to start as its cheap
[10:18:30] <megal0maniac> And I mean a hardware programmer
[10:18:48] <geoforce> being retired gives me time but not so much $
[10:19:11] <megal0maniac> Keep in mind that Atmel Studio will only work with the STK500 and AVRISP MKII based programmers
[10:19:36] <megal0maniac> USBASP Tiny won't work, but you can use it with avrdude (which is command line, but cross platform)
[10:20:33] <geoforce> don't mind CL programs I write them as simplest route mostly
[10:21:47] <megal0maniac> Do you have a link to the programmer you're looking at?
[10:22:55] <geoforce> http://www.adafruit.com/products/46
[10:23:16] <geoforce> my son uses this one
[10:23:44] <geoforce> mainly to write mod chips and stuff
[10:24:16] <megal0maniac> I shall gracefully point you in the direction of this: http://www.pololu.com/catalog/product/1300
[10:25:14] <megal0maniac> The USBTiny based ones don't work on every machine since they use bit-banged USB. Macs are especially finicky from my experience and this one is cheaper
[10:26:01] <geoforce> loops similar I assume it runs from AVRdude also
[10:26:15] <geoforce> does Atmel studio support it?
[10:27:39] <megal0maniac> Rikus' board is a similar price and it can emulate either device. The Pololu one is STK500 based, so it works everywhere. Supports mac as well and it has some other nice features
[10:28:12] <megal0maniac> avrdude is a pc-side application used to program devices, but it has the widest support for programmers
[10:28:17] <geoforce> TY I'll order one then
[10:28:31] <megal0maniac> Back to the original question :)
[10:29:08] <geoforce> I have avrdude on this mac
[10:29:20] <megal0maniac> I reckon the only thing you might need to read up on is makefiles. Other than that, if you have crosspack or winavr or atmel's toolchain installed, it's as simple as typing "make"
[10:30:24] <geoforce> I tried DL on crosspack but got a nosuch when I tried
[10:30:30] <geoforce> will retry
[10:43:34] <megal0maniac> For anyone who has downloaded AS6.1 beta and can't use their STK500 programmer, see this: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=1045963#1045963
[12:39:59] <langoliers> so, from the datasheet i have calculated the stated SOA frequency for 3.3V for atmega168pa, that gives 13.333MHz @ 3.3V
[12:40:59] <langoliers> this means it is safe to use it at with a 12MHz xtal at 3.3V with an LDO regulator ( or maybe 3.6V :)
[12:41:10] <megal0maniac> Yessir
[12:41:36] <langoliers> good news i think ^^
[12:41:39] <megal0maniac> I've run 16mhz at 3v3 quite happily. I'm just not allowed to cry about it if it breaks :)
[12:41:50] <langoliers> haha yeah
[12:42:44] <langoliers> btw if extrapolate the curve above 4.5V we get 25.555MHz @ 5.5V
[12:44:09] <langoliers> or 24MHz @ 5.22V
[12:44:38] <megal0maniac> But the device limit is 20mhz :)
[12:44:45] <megal0maniac> Or maybe even 16 on the 168
[12:45:11] <langoliers> 168pa is rated 20MHz tops
[12:45:33] <langoliers> cool thing is it can operate from 1.8V to 5.5V
[12:45:40] <megal0maniac> Push it further. I dare you :P
[12:45:40] <langoliers> i already like it
[12:45:51] <langoliers> ds says it dies at 6V
[12:45:54] <megal0maniac> 1.8V @ 8mhz iirc
[12:46:13] <megal0maniac> Give it 5.2V and 24mhz
[12:46:16] <langoliers> 4MHz @ 1.8V ...
[12:46:25] <megal0maniac> Ooh
[12:46:39] <langoliers> it is low power
[12:46:57] <langoliers> it would probably eat much more microampers if it could do 8MHz at 1.8V
[12:48:00] <langoliers> xilinx can do 300MHz at 1.8V, but dies above 2V :)
[12:49:38] <langoliers> and intel celeron 600 can do 933MHz @ 1.85V
[12:50:04] <langoliers> it has a good SOA rating
[12:50:05] <Tom_itx> megal0maniac, on the same topic.. i posted a new firmware update to support my programmer under as6.1
[12:50:19] <Tom_itx> seems studio want's to update any firmware that appears too old
[12:50:51] <megal0maniac> Tom_itx: Good to know
[12:50:55] <Tom_itx> also has anyone here used mine under windows 64bit?
[12:51:12] <Tom_itx> clueless is having some connect issues with his
[12:51:17] <megal0maniac> It was a stupid registry entry which the installer failed to create if more than 1 COM port was present
[12:51:28] <megal0maniac> Tom_itx: Yours is 32u2 right?
[12:51:41] <Tom_itx> megal0maniac, on mine i just updated the minor firmware release number
[12:52:01] <Tom_itx> megal0maniac, the early ones were at90usb162 and later ones are atmega32u2
[12:52:08] <megal0maniac> It only affected STK500, so you dodged that bullet ;)
[12:52:25] <megal0maniac> Is clueless' 32u2? I can test with Rikus' board if that would help
[12:52:28] <Tom_itx> i tested the firmware on 4 and 6.1 and both work
[12:52:34] <Tom_itx> i presume anything inbetween will too
[12:53:53] <Tom_itx> megal0maniac, the quickest way to find out what chip you have is to start FLIP with at90usb162 and if it won't connect, use the other one
[12:54:10] <Tom_itx> no need to recompile the firmware, it works on both
[12:54:26] <megal0maniac> I don't have your programmer though
[12:54:35] <Tom_itx> just putting it out there...
[12:54:44] <megal0maniac> Okay :)
[13:01:24] <megal0maniac> Keep getting "Unknown Device" and USB3 ports don't detect anything at all
[13:09:01] <megal0maniac> Tom_itx: What did he say was wrong?
[14:43:22] <kdehl> So, um, using USART instead of UART is incompatible with RS-232?
[14:43:44] <kdehl> I don't get it, where is the clock sent? On a separate line, or instead of start and stop bits or what?
[14:44:33] <megal0maniac> Please don't tell me there's a wire from your avr to your PC...
[14:44:42] <megal0maniac> (PC's serial port)
[14:45:17] <kdehl> Hehe. No. No worries.
[14:45:46] <kdehl> I have UART working, made myself a serial terminal. I just don't understand the S in USART, and how that works.
[14:46:23] <jadew> it stands for simple
[14:46:33] <kdehl> Hah. Right.
[14:46:38] <megal0maniac> I thought it was for SPI mode
[14:46:42] <kdehl> So, I do have a connection from my avr to the PC, but no serial port is involved. Only USB to RS-232 TTL.
[14:47:10] <megal0maniac> I.e. SPI is synchronous
[14:47:26] <megal0maniac> kdehl: That sounds fine. As long as baud rates match up, you're golden
[14:47:26] <jadew> megal0maniac, it could be, I remember reading something about simple, I could be wrong
[14:47:36] <kdehl> There are three modes: Asyncronous USART (which I assume is the same as UART), synchronous USART (which is real(?) USART), and "Master SPI".
[14:47:43] <kdehl> According to the data sheet.
[14:48:05] <kdehl> No, S is synchronous.
[14:48:16] <jadew> how do you know that?
[14:48:39] <megal0maniac> Well I just checked the Google
[14:48:47] <jadew> yeah, it's synchronous
[14:48:59] <megal0maniac> 10 points for guesswork
[14:48:59] <jadew> Universal Synchronous and Asynchronous serial Receiver and Transmitter
[14:49:21] <tzanger> USART = can do both sync and async functions, depending on configuration
[14:49:27] <tzanger> UART = async only
[14:49:37] <jadew> thanks for clearing it up
[14:49:40] <megal0maniac> tzanger: Which is why it can be used for SPI, correct?
[14:50:01] <tzanger> megal0maniac: depends on the specific USART. they're not all the same
[14:50:39] <kdehl> tzanger: Right. The clock is sent along with the data, no start or stop bits are used, as I understand it, but how is the clock signal sent?
[14:50:40] <tzanger> I usually find them used for high speed TDM links, where what you'd call SS# for SPI is actually a frame sync with about eleventy different possibilities
[14:50:46] <kdehl> Is there a separate line for that?
[14:50:48] * megal0maniac just got Arduino working for Rikus' board, at last
[14:51:03] <jadew> kdehl, in synchronous serial, start and stop bits are used all the time
[14:51:16] <tzanger> kdehl: tx/rx/clk are separate lines and there is usually also a frame signal as well (for I2S, TDM and several other formats)
[14:51:19] <megal0maniac> I'm hurt by how bloated it is... ~1kb for a blink
[14:51:20] <jadew> the clock is there only to insure that the data gets transmitted properly
[14:51:35] <tzanger> there are a dozen competing and incompatible variants of sync serial
[14:52:10] <kdehl> tzanger: Ah, thanks. That's exactly what I wanted to know!
[14:52:14] <jadew> well, the real one has start and stop bits
[14:52:28] <tzanger> and some of them are maddenningly close to each other that they trick you into thinking that you can get them talking if you could only configure the damn thing right
[14:52:30] <jadew> it's just like normal async usart, but with a clock
[14:53:03] <tzanger> jadew: depends on the implementation. I don't think there is such thing as a "real" sync serial
[14:53:31] <tzanger> TDM, SPI, I2S are all sync serial and each of them has their own sub-configurations as well
[14:53:47] <kdehl> And no start and stop bits are used in synchronous mode, right?
[14:53:54] <jadew> yeah, but those are different protocol
[14:53:57] <jadew> *protocols
[14:53:58] <tzanger> and none of those three uses start or stop bits. start bits are usually associated with async because you need to detect the first transition reliably
[14:54:05] <jadew> we're talking about UART
[14:54:13] <tzanger> with sync serial you either have a frame sync or a slave select or *something* to do the same function
[14:54:34] <kdehl> Ah, right.
[14:55:03] <jadew> I guess I shouldn't use the term serial so loosely
[14:55:09] <tzanger> USART can do any of those because it's got the capability to do the sync side (as long as it also has the ability for a frame and maybe select signal as well)
[14:55:12] <jadew> usually when I say the serial protocol I mean USART
[14:55:25] <tzanger> hell PCIe is async serial but definitely not UART
[14:55:53] <jadew> I think the name stuck with me from the com ports
[14:55:55] <tzanger> I blame the industry for mucking up the terms so badly. :-)
[14:55:58] <tzanger> yeah
[14:56:00] <jadew> you either had paralel or serial :P
[14:57:07] <kdehl> tzanger: Is RS-232 compatible with synchronous USART?
[14:57:16] <tzanger> no
[14:57:30] <tzanger> well RS232 defines both an electrical and logical layer
[14:57:47] <tzanger> but let's simplify; the RS232 electrical spec describes an async serial protocol
[14:57:56] <jadew> aka UART
[14:57:56] <kdehl> Right.
[14:57:57] <tzanger> which is what every UART and USART can handle
[14:58:03] <kdehl> Right.
[14:58:29] <jadew> and then there's the level which you'll have to convert down to your MCU's voltage
[14:59:13] <tzanger> async UARTs generally have a clock that is 16x the desired baudrate and sample the line to find the edge of the start bit. once that is seen it then "knows" it can now look for the first bit 24 ticks from that and each bit 16 ticks from the first bit
[14:59:21] <kdehl> Okay. Well, I think I get it now. And since I'm mostly playing around with serial terminals, I just skip that S in USART completely for now.
[14:59:31] <kdehl> Aha.
[14:59:40] <kdehl> Man, you know this deeply.
[14:59:54] <tzanger> and the better uarts (which is pretty much all of them now) will actually gather a number (3-5) samples and "vote" on whether the bit is a 1 or 0 to try and improve reliability of comms by ignoring noise
[15:00:02] <tzanger> kdehl: exactly
[15:00:20] <tzanger> kdehl: no, I'm just old. I've also been doing this for 20ish years
[15:00:37] <kdehl> Haha. I'm old too, but I don't know half of this stuff.
[15:01:36] <jadew> I wonder how tzanger came across the info on how the sampling gets done :P
[15:02:16] <kdehl> School?
[15:02:17] <tzanger> jadew: it's commonplace now. it was even described in the old PIC 16C (not F!) 84 docs
[15:02:47] <jadew> personally I thought it's an event based thingie (that's how I implemented my soft usart lib)
[15:02:51] <tzanger> lots of info on the old 16450 and 16550, I've written a few UARTs in VHDL too
[15:02:59] <jadew> kdehl, I don't think they teach this kind of stuff in school
[15:03:00] <tzanger> there are lots of different implementations
[15:03:31] <tzanger> lots of software UARTs too, you can get kind of fancy there if you need, but generally a UART is so basic these days that people just throw them at you in their designs :-)
[15:05:43] <jadew> speaking of which, after work that's the only thing left to do for my PSU, I have to make the serial interface and then I can close the box
[15:09:45] <jadew> then I get to clean my room, cuz it's been a mess since I started this project
[15:10:39] <jadew> if I'll need a new PSU, I think I'm gonna just buy it, so many freaking issues when doing it yourself
[15:12:57] <tzanger> :-) there's something to be said for not having to worry if the problem is your own supply
[15:13:26] <tzanger> having said that I think I'm going to be taking one of my old trusty supplies and "computerizing" it so that I can do voltage sweeps, remote poweron/off etc
[15:13:49] <tzanger> just replace the pots with digital pots and add a shunt to measure current, the supply itself won't change
[15:13:58] <jadew> mine is already supposed to do that, except for the turning on / off part
[15:14:05] <jadew> but it can set the output to 0
[15:14:41] <jadew> oh, and I'm using rotary encoders, I don't think I like pots much
[15:15:32] <jadew> they have better resolution tho (pots)
[15:15:36] <tzanger> yes, my takeover of the power supply will use rotary encoders as well, something with an "ignore" mechanism so my 4yo can twist them all he wants and not fry my shit
[15:15:48] <tzanger> better resolution? just require more counts. :-)
[15:16:05] <jadew> my dacs are only 12bit :(
[15:16:22] <tzanger> not abotu DACs
[15:16:23] <jadew> I did design it with the posibility of an extension board
[15:16:30] <tzanger> I mean the quadriture encoders
[15:16:35] <jadew> so I can use better dacs if I want to
[15:16:54] <jadew> ah, I don't mind that, they're 24clicks ones or something like that
[15:16:59] <tzanger> or you mean the DAC to set the reference voltage for the power supply
[15:16:59] <jadew> I love the way they turn
[15:17:08] <jadew> the dac to set the reference voltage
[15:17:35] <tzanger> 4096 counts over a 30V range is what, 7mV/count, I think you have plenty of resolution
[15:17:36] <jadew> I only get 5mV resolution with the current ones, it's a 0-20V
[15:17:58] <jadew> well, I made this PSU so it's mV stable
[15:18:14] <tzanger> I'm also pretty sure that unless you're REAL good about your design practises you won't get stability that low over temp and load
[15:18:17] <tzanger> depends on the PSU though
[15:18:32] <jadew> it actually is stable in the 100mV range, but I don't have the DAC to set it with that kind of precision
[15:18:52] <tzanger> my little analog ones only do 0-1A and 0-30V so they're pretty good, but I'd like something that can do 25A minimum with excellent current regulation
[15:19:08] <jadew> tzanger, I put the voltage reference on a raised board and it's supposed to be closed inside a shielded box
[15:19:17] <jadew> it also has temperature regulation inside
[15:19:34] <tzanger> nice
[15:19:56] <jadew> I don't have the shielding box tho :P
[15:20:08] <jadew> couldn't make one from coke cans, those things are a PITA to work with
[15:21:04] <jadew> oh, and the current regulation turned to crap once I replaced the voltage output transistor with a fet
[15:21:32] <jadew> the opamp is oscillating a bit, used to be super stable with the BJT
[15:41:13] <Pe3k> hello, I have attiny45 with bootloader and want to delete it, but I am not able to do that ... I can read chip signature, but that is all ...any idea how to do it? thanks
[15:56:49] <twnqx> Pe3k: send a chip erase
[16:21:16] <[w_w]> sometimes when flashing 8bit chips with avrdude and usbprog the programmer will get to 90% and then stall forever. anyone also have this problem?
[19:26:08] <cluelessperson> JESUS
[19:26:14] <cluelessperson> so many "has quit" s
[19:42:10] <Tom_itx> bad connections
[19:57:16] <antto> that's what happens when you play with +5V
[19:57:24] <antto> you get ZAPPED sometimes ;]
[19:59:46] <cluelessperson> can someone tell me what this command does?
[19:59:47] <cluelessperson> PORTD |= (1 << 4);
[19:59:52] <cluelessperson> just so I know I'm right?
[20:00:01] <cluelessperson> and actually, it'll be portb
[20:01:18] <antto> portb | 0b00010000
[20:01:26] <antto> whatever that may do
[20:01:50] <cluelessperson> antto, turn PORTB Pin 3 high?
[20:02:26] <antto> i don't know sh*t about MCUs, i just code a bit
[20:03:20] <antto> if portb is an 8bit variable and represents some 8 "legs" then i guess so
[20:03:43] <antto> but better wait for someone that *does* know
[20:05:10] <cluelessperson> would 0b00000001 turn on PORTB1 ?
[20:05:23] <cluelessperson> or is it 0b10000000
[20:05:34] <cluelessperson> antto, I know that each bit controls a pin..
[20:05:51] <antto> well, then i don't know how they count them
[20:06:05] <antto> "1" is 0b00000001
[20:06:32] <antto> "128" is 0b10000000
[20:08:13] <antto> the | (or) part would switch that bit ON if it wasn't
[20:09:26] <cluelessperson> antto, I just found it in a search. each bit is a pin 1-8
[20:09:54] <cluelessperson> antto, so PORTB | 0b00000001
[20:10:01] <cluelessperson> in my case, turns on arduino pin 13.
[20:11:59] <cluelessperson> antto, do you know how to make sure your program was "uploaded" to the device?
[20:12:21] <antto> no idea
[20:30:33] <Tom_itx> cluelessperson, it sets pin 4 high
[20:30:56] <Tom_itx> enabling the pullup on the pin also i believe
[20:32:09] <Tom_itx> they're numbered from 0..7
[20:50:45] <Tom_itx> cluelessperson, did you get that ^^
[20:51:20] <cluelessperson> Tom_itx, I see. Thank you!
[20:51:39] <Tom_itx> DDRB sets the direction register for in or out
[20:52:02] <Tom_itx> PORTB sets the pin high or low and i believe sets the internal pullup
[20:52:22] <Tom_itx> PINB is used to read the port
[20:55:46] <Tom_itx> there are macros you can use for setting and reading port pins too
[20:55:59] <Tom_itx> in that c bit manipulation page i linked
[20:56:12] <Tom_itx> and generally all over the web
[21:11:37] <DrLuke> Tom_itx: you're correct about the pullups
[21:13:19] <Tom_itx> i don't think that's something that is very clear in the data sheets
[21:13:30] <Tom_itx> or at least i've never payed attention to it
[21:14:20] <DrLuke> I don't know about their specifics aswell
[21:14:41] <DrLuke> I believe to remember something about them being 20k or something thereabouts
[21:14:53] <Tom_itx> no they're weaker than that
[21:15:03] <Tom_itx> i don't personally rely on them
[21:15:37] <DrLuke> I've found them to work well in i2c applications
[21:18:59] <Tom_itx> If PORTxn is written logic one when the pin is configured as an input pin, the pull-up resistor is activated. To switch
[21:19:00] <Tom_itx> the pull-up resistor off, PORTxn has to be written logic zero or the pin has to be configured as an output pin
[21:20:36] <Tom_itx> 20 to 50k
[21:20:52] <Tom_itx> on IO pins
[22:08:09] <tzanger> 20k is a pretty weak i2c pull-up
[22:29:05] <Valen> atmel say AVR has an internal pullup on reset
[22:29:10] <Valen> think i should trust it?
[22:33:24] <Valen> stuff it I'll disable the reset pin
[22:43:52] <Tom_itx> Valen, i noticed that.. it's 30 to 60k but i'm not sure if it's enabled or how you enable it
[22:44:34] <Valen> I'm wondering if diasbling it is going to be more robust, it should never be needed by my customers
[22:44:34] <Tom_itx> Rrst
[22:44:49] <Valen> and hopefully it'd use less power then too
[22:45:16] <Tom_itx> the sheet i looked at doesn't say much about it