#avr | Logs for 2015-09-07

Back
[02:00:03] <O0ddity> where can I find avrlibc in my file system?
[02:04:09] <gorroth> so, making an assumption that my clock is 10 Mhz (1/f = .1us) and that i'm using phase-correct pwm with non-inverting compare output mode, if i want to setup a PWM such that OC1A is high for 1000us and low for 2000us, how exactly would i do that? the TCNT1 is going to count from BOTTOM to TOP, where TOP should,, i guess, be defined by the 16-bit ICR1 (WGM13:0 = 10) so that it is 15000 (for 15000*.1us = 1500us), and then i should set OCR1A to 5000 so that OC
[02:04:16] <gorroth> or should i just use the fast PWM?
[02:04:30] <gorroth> i thought the PC PWM was useful for motors, but i'm just having some trouble figuring out the math
[02:13:53] <gorroth> Casper: and you're right, after i've read the datasheets, it sounds like everything is going to be done behind the scenes, and i don't need ISRs. i would only need an ISR if i want to handle overflows or something
[02:16:07] <Casper> yup
[02:16:44] <Casper> and depending on the pwm mode, you can tell it when to update the value, now, at top or at bottom
[02:16:50] <Casper> and I forgot which one is better...
[02:17:58] <gorroth> fast pwm seems to make the most straightforward sense to me, since i could set OCR1A to something like 10000 (1000us at 10 MHz) and ICR1 (TOP) as 30000 so that it is on for 1000us and off for 2000us
[02:18:04] <gorroth> i just don't know exactly how to do that in the PC PWM
[02:18:15] <gorroth> the sheets, however, say that PC PWM is preferred for motor control
[02:19:56] <gorroth> with PC PWM, i was going to have it update values when it crossed OCR1x
[02:20:33] <gorroth> maybe i just need to read the sheets more to find something i missed
[02:20:39] <gorroth> i'll hit the sack now... late here
[02:39:12] <Casper> same
[07:25:58] <hetii> Hi :)
[07:30:44] <hetii> Any idea or project for pico psu supply for mini itx board based on E450 ?
[07:31:22] <hetii> I think about using few of LM 2576
[07:31:36] <LeoNerd> 2576s are nice
[07:31:43] <hetii> but its just for 3A
[07:32:24] <hetii> not sure if it will be ok for this board. Its https://www.asus.com/pl/Motherboards/E45M1I_DELUXE/HelpDesk_Manual/
[07:32:47] <hetii> and from manual I read that need power supply at 350W :D
[07:33:02] <hetii> wonder why when this cpu TDP is 18W
[07:36:37] <zoomslon> Maybe when u add another devices such a sound, video cards, hard drives and so on, maximum of power you will can use is 350W. One cristal ofcourse needs less than 350W
[07:37:13] <LeoNerd> I seem to recall a 2576 can do up to 5A...
[07:37:18] <LeoNerd> But you'd have to check the DS
[07:38:07] <Lambda_Aurigae> 3A
[07:38:16] <LeoNerd> Hmm
[07:38:23] <LeoNerd> Ohright, but you can double them up
[07:38:28] <Lambda_Aurigae> 4V to 40V, 3A low component count step down switching regulator.
[07:40:13] <hetii> I have some old ATX PSU board maybe it is possible to use transformet from it and drive it by tl494, then I could use PSU from notebook. 19.5v 4.75 a ?
[07:40:29] <hetii> but this is a bit challange for me
[07:43:27] <Lambda_Aurigae> hmm..that lm2576 is available in to-220 package.
[07:43:31] <Lambda_Aurigae> and for sampling!
[07:44:15] <LeoNerd> Cheapest way to buy LM2576s is to buy those premade modules on eBay
[07:44:30] <LeoNerd> I can't find the chip from *any* supplier, even in volume, as cheaply as I can find one-off modules on eBay
[07:44:52] <Lambda_Aurigae> seems I can get them as free samples...at least a few of them.
[07:45:15] <Lambda_Aurigae> are those genuine chips or counterfeit though?
[07:45:28] <LeoNerd> No idea
[07:45:54] <Lambda_Aurigae> they come in adjustable, 3.3V, 5V, and 12V apparently.
[07:46:00] <LeoNerd> Yah
[08:05:32] <Lambda_Aurigae> mmmm...breakfast.
[08:05:50] <Lambda_Aurigae> hash made with homegrown potatoes and leftover prime rib from last night.
[08:07:23] <hetii> Hmm I found also: http://obrazki.elektroda.net/59_1247936291.jpg
[08:07:34] <hetii> from: http://www.elektroda.pl/rtvforum/topic1373073.html
[08:07:51] <hetii> so someone did it and wrote that works fine at 12~15v of input
[08:48:02] <hetii> Hmm I dismount transformer from old atx but his ferrit corp break in one additional place :(
[08:48:23] <Lambda_Aurigae> oops.
[08:49:04] <hetii> Its clean brake, without small elements
[08:49:15] <hetii> question if I can still use it
[08:51:19] <Lambda_Aurigae> breaking the toroid does tend to change the inductance of the coil.
[08:51:51] <hetii> it looks like this: http://postimg.org/image/54g8v8tm3/full/
[08:52:49] <hetii> btw The author of this project car accu as a power so from 12~15v, I plan to use 19v
[08:53:08] <hetii> should I change something in this circuit ?
[08:53:17] <Tom_itx> you're a real rebel
[08:55:52] <hetii> well I`m not a expiriance much in such design, thats why I ask :)
[09:45:01] <hetii> Could someone explain me why each output is terminated by 100ohm to ground? http://obrazki.elektroda.pl/2877471200_1299015368.jpg
[09:46:52] <Lambda_Aurigae> no clue.
[09:46:57] <Lambda_Aurigae> I suspect that's incorrect though.
[09:50:41] <Lambda_Aurigae> 100 ohm resistors would do nasty things to that power supply at those points.
[09:50:46] <Lambda_Aurigae> 10Kohm maybe.
[09:51:59] <hetii> on other circuit also small values are used: http://320volt.com/wp-content/uploads/2010/02/uc3843_sunny_atx230_smps_devresi.gif
[09:52:37] <Lambda_Aurigae> yeah....no clue
[09:52:46] <Lambda_Aurigae> power supply design is black magic.
[10:15:47] <twnqx> SMPSs often need a minimal current flow to not blow up :P
[10:16:44] <Lambda_Aurigae> twnqx, yeah, but 100 ohm between power and gnd?
[10:17:24] <twnqx> 5V / 100R = 50mA
[10:17:54] <Lambda_Aurigae> yeah, I suppose.
[10:18:00] <twnqx> so not that much
[10:18:11] <twnqx> value sounds small, but the current is not exactly large, either
[10:18:23] <Lambda_Aurigae> just, for some reason I think of 100 ohms to be not far off from a dead short.
[10:18:50] <Lambda_Aurigae> guess that's why power supply design has always been black magic to me.
[10:21:02] <twnqx> hetii: do you need explanations for the other question marks, too?
[10:40:06] <hetii> twnqx: well i prepare transformer now, wonder what will be better, cause I have not such large wire that was oryginal.Now I have two option to cross 6 wire togheter and then put then on transformer or have them flat, one aby one and then put them on it
[15:27:27] <ambro718> Hey, is there a program-memory version of memchr?
[15:32:41] <learath> progmem won't work?
[15:33:40] <ambro718> huh? .. I guess the answer is no judging from the docs.
[15:34:45] <learath> What exactly are you trying to do
[15:35:13] <learath> oh wow. that's weird.
[15:36:28] <ambro718> I'm trying to find a certain character in a prog-string, obviously
[15:38:09] <learath> oh wow. that's weird.
[15:38:54] <learath> Out of curiousity, why?
[15:40:02] <ambro718> need to insert some header in front of every line when sending the response of a command to the serial port (not sure if it means much to you without context...)
[15:40:19] <ambro718> some part of the output may be generated via prog-strings
[15:40:22] <learath> interesting.
[15:40:36] <learath> And it's not easy to split the lines up beforehand?
[15:40:43] <learath> or insert the header in advance
[15:42:00] <ambro718> it's not easy because it's behind a layer of abstraction, commands may come directly from the serial port in which case the responses are unchanged, but if commands come from a command stream on an SC card, all responses (normally errors) need to go on the serial port with something like a //SdEcho prefix.
[15:42:03] <ambro718> (context: https://github.com/ambrop72/aprinter :)
[15:42:57] <ambro718> all looks like this on the high level, I may need to find newlines in there pstr's, https://github.com/ambrop72/aprinter/blob/master/aprinter/printer/BedProbeModule.h#L395
[15:42:59] <learath> hm. copy the string to a buffer
[15:43:00] <learath> ?
[15:43:23] <ambro718> a buffer is what I'm trying to avoid :) no problem anyway not like I can't do a loop to locate the newline
[17:48:52] <TechIsCool> So what is everyones favorite cheap Ethernet based chip?
[17:50:19] <Casper> My pc? oh nm :D
[17:50:49] <TechIsCool> haha
[18:08:03] <Lambda_Aurigae> TechIsCool, enc28j60
[19:09:07] <rue_school> is there an avr library?
[19:09:17] <rue_school> that works?
[19:09:30] <rue_school> properly?
[19:09:57] <Tom_itx> yours?
[19:12:34] <rue_school> hah
[19:13:28] <rue_school> I havn't written a library for that thing
[19:19:38] <Lambda_Aurigae> rue_house, tuxgraphics has a nice tcp/ip lib for avr and enc28j60.
[19:19:57] <Lambda_Aurigae> both client and server modes even.
[20:18:19] <toddpratt> I'm reading the ATTiny datasheet. I'm not sure I understand. Can I use all six PB pins as GPIOs?
[20:18:57] <toddpratt> I know PB5 is also reset
[20:20:50] <Lambda_Aurigae> yes
[20:20:51] <Lambda_Aurigae> and no
[20:21:14] <Lambda_Aurigae> if you have a high voltage serial programmer then you can change the reset enable fuse so the reset line only works for high voltage programming
[20:21:20] <Lambda_Aurigae> then you can use that pin as a gpio pin.
[20:21:44] <Lambda_Aurigae> once you set that fuse the normal ISP no longer works.
[20:21:51] <Lambda_Aurigae> you have to use HVSP instead.
[20:22:24] <Lambda_Aurigae> unfortunately you can't have it both ways...
[20:22:59] <toddpratt> I have the sparkfun tiny programmer
[20:23:21] <toddpratt> I guess that's normal ISP?
[20:23:34] <Lambda_Aurigae> correct.
[20:23:38] <Lambda_Aurigae> that does not do HVSP
[20:23:51] <Lambda_Aurigae> you can use a fusedoctor to reset the fuses so it can work for programming once again
[20:23:51] <Lambda_Aurigae> or
[20:24:11] <Lambda_Aurigae> you can use something like an avr-dragon or stk500 or other programmer capable of HVSP.
[20:25:22] <Lambda_Aurigae> and, I would love to go into more but it's bedtime here.
[20:25:24] <Lambda_Aurigae> laters all.
[20:26:12] <toddpratt> hm, I was hoping I could fit PISO and SIPO shift registers on there.
[20:29:24] <toddpratt> hm. I suppose I could use pins from the SIPO to talk to the PISO
[20:30:09] <toddpratt> Am I making any sense?