#avr | Logs for 2013-09-15

Back
[00:26:15] <tzanger> jadew: you need to be careful, some things do consume power in a bursty pattern and if it drives your supply into oscillation it can destroy the device or the supply (or both)
[00:26:42] <Casper> sadly, usually not in spectacular way :(
[00:55:03] <jadew> tzanger, I know, the supply should be able to handle it tho
[03:40:33] <antto> --sendq;
[06:50:55] <megal0maniac> Just came across an AT89S52. It's an 8052 based uC, so what the heck do you do with it? Don't see any links for programmer and it isn't supported in AS
[06:51:29] <megal0maniac> Is 8052 like a global architecture? (like x86 etc)
[06:58:35] <Xark> "global" it is sure a common architecure.
[06:58:47] <Xark> architecture*
[06:59:30] <Xark> megal0maniac: Dirt cheap 8052 MCUs now that run at 40Mhz with ~1 cycle per opcode (e.e., STC, or Actel).
[06:59:35] <Xark> e.g*
[07:01:11] * Xark did a little VGA project on a <$1 STC 8051 (32KB flash, 1KB RAM @ 36Mhz) -> http://imgur.com/nDceh
[07:12:59] <Fornaxian> 8052 is a modified 8051 which is a very old architecture.
[07:13:53] <Fornaxian> many 8052 chips have a built in serial bootloader too.
[07:13:57] <Xark> Yeah, 8051/8052 are pretty much interchangeable these days. It is old, but still in very common use (like smart cards etc.).
[07:14:19] <Xark> Yes, STC uses serial bootloader in hardware.
[07:14:33] <Fornaxian> and you can use the free SDCC compiler suite for most of them too.
[07:14:51] <Xark> Only annoying part is ancient Visual Basic program to flash them (but it does work). :)
[07:15:15] <Xark> Yep. That is what I used (along with asm for VGA).
[07:15:46] <Fornaxian> I love them for their ability to run code from external memory.
[07:16:13] <Xark> Fornaxian: Yeah, not that many MCUs with external memory buses anymore.
[07:16:20] <Fornaxian> yup yup.
[07:16:26] <Fornaxian> specially in the pic and avr worlds.
[07:16:39] <Fornaxian> and, double specially, in dip package
[07:19:35] <Fornaxian> combine a ds89c450 with a ds1230ab or two and you have a fun project.
[07:20:00] <Fornaxian> ds1230ab being 32k*8bit nvsram in a dip packaga.
[07:45:28] <abcminiuser> Who has AS6 installed and is feeling brave?
[07:47:23] <megal0maniac> Me!
[07:47:46] <abcminiuser> http://fourwalledcubicle.com/files/temp/StackChecker.vsix
[07:47:52] <abcminiuser> Install, open and run a project
[07:48:28] <abcminiuser> Then open Stack Checker from the View menu
[07:48:41] <abcminiuser> Click the button to add the instrumentation code, restart
[07:48:46] <abcminiuser> Then break execution and click refresh
[07:48:55] <abcminiuser> And in theory at least, it will show the maximum stack usage of your app
[07:51:25] <megal0maniac> Blinking LED uses 5/2049 (1%) on an m328p
[07:51:35] <abcminiuser> Neato
[07:51:35] <megal0maniac> 100% if you forget to add instrumentation code
[07:53:06] <kobsu> seem like it wasn't installable for AS6.0
[07:54:28] <megal0maniac> I'm on 6.1 2730
[07:55:51] <abcminiuser> Ah right yes, it's 6.1 only due to the manifest settings
[07:55:56] <abcminiuser> Update your darn install :P
[07:56:05] <abcminiuser> Thanks megal0maniac, so it works then :)
[07:56:12] <abcminiuser> It's a bit rough, but functional
[07:56:23] <megal0maniac> 'Tis :)
[07:56:59] <megal0maniac> I'm building up a collection of your mostly-ready plugins :P
[07:57:31] <Xark> abcminiuser: Maximum stack usage? That seems to be quite a trick. I assume there are some limitations. :)
[07:58:04] <abcminiuser> The instrumenting code paints the area between the end of static variables and the end of RAM on startup
[07:58:20] <abcminiuser> The extension then dumps the RAM and figures out how much of the paint area has been altered
[07:58:44] <Xark> abcminiuser: I see, so empirical. I didn't realize it was at runtime. Gotcha. :)
[07:58:46] <abcminiuser> As the stack grows it will overwrite the paint with stack data, so it will then give you the highest stack usage found in your application
[07:58:54] <abcminiuser> Yeah runtime, I'm not a wizard :P
[07:59:04] <Xark> abcminiuser: Sounds useful. I have done similar ad-hoc.
[07:59:26] <abcminiuser> Yeah this isn't new, it's just automated
[07:59:29] <abcminiuser> I like automated
[10:07:53] <ColdKeyboard> When I recieve 1 character over USART and I'm recieving 0xF8 instead of 0xFF. On 400 baudrate, I should slow down the baudrate to get the 0xFF, right?
[10:10:16] <OndraSter_> 400 bps is quite.. slow already
[10:10:27] <OndraSter_> is it intentionally that slow?
[10:10:39] <ColdKeyboard> Yes :)
[10:10:41] <OndraSter_> ok
[10:10:49] <OndraSter_> manual decoding by hand? :D
[10:11:18] <OndraSter_> is it now cheaper to decode stuff from UART in India than in hardware? xD
[10:11:23] <ColdKeyboard> Trying to get proper (or at least always the same) codes from IR remote :)
[10:11:37] <OndraSter_> ah ok
[10:12:25] <ColdKeyboard> on 400bps I get "almost" always the same code but sometimes it flips code from 0xEE to 0xEC...
[10:13:01] <ColdKeyboard> The terminator character is 0xFF (or at least it's the closes to it since it sends 0xF8 on 400bps)
[10:13:15] <ColdKeyboard> What baudrate to get 0xFF ? :)
[10:51:22] <megal0maniac> ColdKeyboard: Send 0xAA repeatedly and measure actual incoming frequency (0xAA = 10101010)
[11:05:16] <antto> 0x55 ;P~
[11:14:29] <ambro718> I wrote some signed shifting assembly if anyone needs it, https://github.com/ambrop72/aprinter/blob/master/avr-asm-ops/shift.h
[11:15:30] <ambro718> There shifting right means dividing by a power of two so there's some extra code to give that semantic. All functions have been tested on random inputs.
[11:16:13] <ambro718> very useful when doing fixed point arithmetic, especially considering how bad gcc is with shifts
[11:18:34] <jadew> tzanger, looks like that noise I'm trying to shield from is all over the room, it shows up on the scope even when it's not powered
[11:51:59] <tzanger> which noise
[11:57:47] <ambro718> I wonder why Atmel can't give its docs more descriptive names than doc8272.pdf...
[12:13:51] <Casper> ambro718: because that's how it's done
[12:14:00] <Casper> but yes, it's annoying
[12:14:57] <ambro718> I end up downloading the doc every time I need it because I can't identify which one to open, lol
[12:15:12] <Casper> hehe
[12:27:46] <jadew> tzanger: this noise http://dumb.ro/files/ps2/noise_before_shield1.png
[12:28:05] <jadew> I'm gonna try to track it down, looks like SMPS noise, 96 khz
[12:35:09] <jadew> seems to come from the PC
[12:35:42] <specing> el-cheapo PSU?
[12:39:45] <jadew> specing, surprisingly, no
[12:40:02] <jadew> IIRC it's a corsair PSU
[12:40:49] <jadew> ah, it's cooler master
[12:40:59] <jadew> Cooler Master GX Bronze, 650W
[12:41:18] <jadew> still, about $130
[12:41:20] <jadew> that's not cheap
[12:42:52] <jadew> kinda weird tho, because the entire PC case is a big, heavy RF shield
[13:03:01] <Enma_Hinobara> Atmega controllers shouldn't have anything fancy like out of order execution, should they? I've got a problem that's stumping me
[13:10:30] <learath> what's the problem
[13:10:33] <LoRez> your compiler may be optimizing things in funny ways, but it shouldn't be noticable
[13:10:53] <learath> interrupts can cause issues IIRC
[13:11:12] <learath> it's not "out of order" per say, but the result is the same
[13:11:13] <LoRez> that too, obviously
[13:11:16] <Enma_Hinobara> uint8_t status = PINA;
[13:11:16] <Enma_Hinobara> PORTG |= 0x12;
[13:11:33] <Enma_Hinobara> The second instruction disables the output of the chip, which prevents PINA from being read
[13:12:01] <Enma_Hinobara> Looking at the assembly, the compiler hasn't reordered anything
[13:12:14] <Enma_Hinobara> This is starting to feel like quantum physics
[13:12:27] <learath> or a buffer overflow :)
[13:12:28] <Enma_Hinobara> Events from the future altering the state in the past
[13:12:56] <learath> do you have a debugger/simulator?
[13:13:25] <Enma_Hinobara> I don't have a JTAG debugger. I have no idea about a simulator
[13:13:32] <Enma_Hinobara> All I have is the STK600
[13:13:50] <Enma_Hinobara> If I comment out the second line and leave the chip connected, the read works fine
[13:14:20] <Enma_Hinobara> Inserting NOPs between the two also doesn't help
[13:15:44] <Enma_Hinobara> I'm really stumped
[13:15:48] <learath> what if you insert a second read
[13:17:16] <Enma_Hinobara> Doesn't seem to help
[13:17:30] <learath> and status isn't reserved
[13:17:39] <learath> that's the other thing that comes to mind
[13:18:11] <Enma_Hinobara> Name doesn't appear to make any difference
[13:18:39] <learath> what about a delay loop? say 10ms or something
[13:19:19] <learath> can you pastebin your code
[13:24:54] <Enma_Hinobara> Hmmmm
[13:25:44] <Enma_Hinobara> Discovery: it actually DOES read it correctly. The problem appears to come from the fact that I'm reading the register in a loop (I'm still at the trial and error phase to get this chip working), and one of the subsequent reads fails
[13:25:58] <Enma_Hinobara> I could have gone to bed 2 hours earlier if I'd known that
[13:27:10] <Enma_Hinobara> That means the next question is why are things changing int he loop
[13:30:38] <learath> hah :)
[13:40:36] <Casper> Enma_Hinobara: go to bed, you'll wake up with the answer
[14:07:54] <ColdKeyboard> If I'm going to drive 12V LED strip with BS170, do I have to place a resistor between output pin and Gate or I can connect them directly?
[14:09:07] <Fornaxian> is there a current limiting resistor in the strip?
[14:10:34] <Tom_itx> may need a small r between the gate and µC pin
[14:14:37] <ColdKeyboard> I don't know. I see some resistors on the LED strip
[14:15:23] <ColdKeyboard> There are some SMD resistors with 131 and 331 on them
[14:16:01] <ColdKeyboard> 131 go from +12 to what I think is Anode of the SMD RGB LEd
[14:16:33] <ColdKeyboard> Should I put 100ohm between mcu pin and gate?
[14:20:36] <Tom_itx> http://www.diyaudioandvideo.com/Electronics/Color/
[14:42:18] <ColdKeyboard> I have Source connected to GND and Cathode of LED connected to Drain of BS170. Even when I apply 0V to the Gate, the LED is glowing... Barely but stil glowing... :\
[14:47:03] <ColdKeyboard> What am I doing wrong? :\
[14:48:19] <ColdKeyboard> In datasheet it says that Vgs treshold is minimum of 0.3V. I'm applying 0V
[14:48:34] <Tom_itx> maybe you need a pulldown on the pin
[14:50:47] <ColdKeyboard> No no, Now I have connected just LED, BS170 and jumpers together. Anode of LED is on VCC. Cathode on Drain of BS170. Source is on GND and Gate is also on GND
[14:50:53] <ColdKeyboard> But LED is glowing slightly...
[14:52:21] <ColdKeyboard> Measuring with multimeter it says that Vds is 2.5V. That is enough for LED to glow but why is it 2.5V and not 5V like it should be?
[14:59:22] <ColdKeyboard> Somehow Vgs and Vgd are both 2.5v
[14:59:35] <ColdKeyboard> *Vgd and Vds
[14:59:50] <ColdKeyboard> What am I doing wrong here?
[15:00:51] <Fornaxian> not enough magic smoke in the FET?
[15:01:46] <ColdKeyboard> ?
[15:09:54] <learath> You should always have spare Magic Smoke on hand.
[15:38:15] <abcminiuser> Hrm
[15:38:25] <abcminiuser> I have a new project for the week
[15:38:39] <abcminiuser> I'm going to make a proximity sensor for the work computer to mute the speakers
[15:38:59] <abcminiuser> So if someone comes to talk to me while I've got headphones on I can mute by holding my hand near it
[15:40:07] * Tom_itx hacks it to play a nagging female voice
[15:41:24] <abcminiuser> Oh god
[15:41:39] <abcminiuser> Well, I already have a recycled rotary encoder as a volume knob
[15:42:50] <Fornaxian> abcminiuser, use one of those microsoft motion sensor thingies and do the slit-the-neck-with-finger gesture to mute.
[15:42:58] <Fornaxian> then throw arms up in a Y to play again.
[15:44:47] <abcminiuser> Last week I was trying to perfect my new victory dance
[15:44:52] <abcminiuser> I call it "The Needful"
[15:45:02] <abcminiuser> When something works, I do the needful, and I do it hard
[15:58:57] * Casper hack it back to play porn sound over the speakers
[16:57:33] <ambro718> did you know shifting by 4 can be optimized using the swap instructions? 32bit<<4 is 14 cycles, as opposed to 4*4=16 with lsl+rol http://ideone.com/sMTXUc
[16:57:54] <ambro718> this also means 32bit<<5 is 18 cycles not 20 etc
[16:59:09] <Fornaxian> http://www.quinapalus.com/picblitz.html for those who think you can't do anything with an 8-bit microcontroller anymore.
[17:16:30] <Xark> Fornaxian: That is pretty neat. Written in PIC assembly using custom macros interpreted by C compiler instead of an assembler. That is one way to make C efficient on PIC I guess. :)
[17:17:07] <Fornaxian> yeah.
[17:17:16] <Fornaxian> was just reading up on that.
[17:32:48] <ambro718> I see that when generating code for ISRs, gcc puts push/pop for all used registers in the prologue/epilogue. But this is inefficient if the ISR doesn't actually need all those due to an early return.
[17:35:58] <GargantuaSauce_> better solve the halting problem and make a patch
[17:46:45] <Xark> ambro718: Yeah, GCC in general never "special cases" prologue/epilog for early out AFAIK (same in interrupts). I think you need to use inline asm if this is an issue for you.
[17:47:40] <ambro718> yeah, it's not an issue, just an observation ;) I see how it may need new infrastructure in the compiler to implement.
[17:49:47] <Xark> ambro718: Also, regarding your swap observation, IIRC GCC is smart enough to (e.g.) replace byte >> 4 with SWAP and AND #$0F (instead of four shifts). :)
[17:52:07] <ambro718> Xark: true, I just tried it. It also uses swap for 16bit<<4 http://ideone.com/j2XfgO
[17:52:45] <ambro718> hm it uses a different algorithm than what I did, maybe generalized to more bytes it's going to be faster than what I did
[17:53:35] <ambro718> but for 32bit<<4 it can't do that
[18:04:06] <ambro718> actually no, what gcc does with 16bit is almost the same as my algorithm, except it uses eor+eor instead of add+sub (the second instruction is used to undo the changes to the left part during the first instruction)
[18:08:18] <Xark> ambro718: Yeah, reasonable clever.
[18:08:23] <Xark> reasonably*
[18:11:06] <ambro718> I want a mov-left-nibble instruction :P
[18:11:37] <ambro718> that way you could get the after-swap fixing to 1 instruction per byte, instead of 3
[18:12:07] <ambro718> or is it mov-right-nibble
[18:13:29] <Xark> ambro718: Yeah, or perhaps a shift that takes 0-7. :)
[18:13:38] <jadew> are you guys aware of the arduino satelite?
[18:13:41] <Xark> (i.e. number of bits to shift)
[18:13:52] <Xark> jadew: Ardusat or something like that?
[18:14:00] <jadew> apparently you can upload code to a satelite filled with AVRs and play with the sensors
[18:14:05] <jadew> Xark, yeah
[18:14:33] <ambro718> Xark: I'm wondering if you can abuse mul to get faster shifts
[18:14:33] <jadew> pretty neat, I wonder if the sensors are any good tho
[18:15:38] <Xark> jadew: Looks pretty neat -> http://www.engadget.com/2012/06/18/ardusat-wants-to-put-arduino-satellite-your-experiments-into-orbit/
[18:16:11] <jadew> wish I had a satelite into space
[18:16:39] <jadew> it's totally worth it for the bragging rights alone
[18:18:02] <Xark> Hmm. I guess some were already launched? https://ardusat.org/
[18:18:37] <jadew> yeah, eevblog was just talking about it
[18:18:54] <jadew> apparently it's being deployed
[18:19:04] <Xark> jadew: Hmm, only $125-$450 to launch your experiment -> http://www.nanosatisfi.com/store/
[18:19:24] <jadew> holly crap
[18:19:27] <jadew> that's a lot of money
[18:19:57] <Xark> jadew: Seems pretty cheap to me. Like plane ticket prices.
[18:19:57] <jadew> and you can't even see the led blinking from that far away!
[18:20:11] <Xark> jadew: Depends on the LED and your telescope. :)
[18:20:15] <jadew> :)
[18:20:46] <jadew> I don't think they put a led on it, otherwise it would actually be a cool thing to do
[18:21:31] <Xark> jadew: Diode laser! :D
[18:21:47] <Xark> Pew-pew!
[18:22:16] <jadew> you could then send serial data over laser, translated to IR and control your tv set lol
[18:22:30] <ambro718> make it hack the satellite and crash it into someones house, lol
[18:22:50] <jadew> ambro718, I don't think they can take it down :)
[18:23:03] <jadew> once launched, it will keep orbitting until something hits it
[18:23:29] <ambro718> so it doesn't have thrusters for orbit adjustment?
[18:23:47] <jadew> ambro718, I think it only has a way of orientating itself
[18:24:02] <jadew> at least that's what I understood from the video
[18:24:38] <jadew> I suppose they could power all the coils (they are using them to align with the earth's magnetic field to change orientation)
[18:24:51] <ambro718> ah, very interesting
[18:25:24] <jadew> I wonder how it gets deployed?
[18:25:27] <ambro718> never heard of someone using the earth's magnetic field for motion
[18:25:30] <jadew> some astronaut throws it out?
[18:27:43] <Xark> I believe it is released from ISS resupply rocket (Y2 from Japan apparently).
[18:28:00] <jadew> ah, so not directly from ISS?
[18:28:48] <Xark> Hmm. Not sure, it might be deployed from ISS... see photo here -> https://en.wikipedia.org/wiki/ArduSat
[18:28:52] <jadew> being an astronaut must be super cool
[18:49:26] <ambro718> 32bit<<4 in 12 cycles :D http://ideone.com/dQ5Ndo
[18:49:40] <ambro718> well, 32bit<<N for any N<8
[18:52:07] <ambro718> oh wait, it's still 16 cycles :( haven't taken into account that mul takes 2 cycles
[18:59:11] <ambro718> but the final adc can be removed. Yay, I just saved one cycle!
[19:17:44] <tzanger> jadew: it looks like you have a burst every 7us. What do you have running around 143MHz?
[19:19:53] <Fornaxian> military radio beacons?
[19:29:27] <jadew> tzanger, nothing
[19:29:46] <jadew> nothing that I know of anyway
[19:30:48] <jadew> tzanger, when I turned my PC off the noise went off almost completely
[19:31:10] <jadew> I forgot to turn the supply off as well, because I was still getting some reading about 5mV in amplitude
[19:31:30] <jadew> I'll have to try again and turn the PSU off as well
[19:31:33] <jadew> brb
[19:33:51] <jadew> the noise I'm triggering on is about 100Khz
[19:33:58] <jadew> it's clearly a SMPS
[19:40:17] <jadew> just checked, it flatlines if I turn the power off on the PSU
[19:40:29] <jadew> now the question is, how the hell do I get rid of it?
[19:41:50] <jadew> and most importantly, why is it getting out of the PC case?
[19:43:53] <Casper> jadew: 67kHz or 125kHz?
[19:44:08] <jadew> let me measure it exactly
[19:44:32] <Casper> 125 would be the APF correction circuit, 67 would be the main switcher...
[19:46:26] <jadew> 7.something uS
[19:46:31] <jadew> so around 125Khz
[19:46:55] <jadew> however, when shut off (the pc is not consuming power, but it's still plugged in) I'm getting something at exactly 100Khz
[19:47:03] <jadew> but very low in amplitude
[19:47:18] <Casper> so most probably the APF circuit...
[19:47:30] <jadew> is there a way to fix it?
[19:48:09] <Casper> newer psu basically have 3 smps.... the APF one is a boost psu, which give like 400V out... may be filterable with some ferrite on the ac cord I guess... near the pc...
[19:48:25] <Casper> but... I'm unsure how well it would work..
[19:48:47] <jadew> I could try that
[19:49:06] <jadew> that's the only thing I can do?
[19:49:36] <jadew> http://dumb.ro/screenshot/4pl0Q.png
[19:50:43] <Casper> not sure, but I doubt much can be done
[19:51:05] <jadew> kinda annoying, especially since I went for a not so cheap PSU
[19:51:52] <Casper> what brand?
[19:52:16] <jadew> cooler master
[19:52:36] <jadew> "Cooler Master GX Bronze, 650W" more specifically
[19:52:55] <jadew> I'm picking the noise with a little piece of wire...
[19:53:08] <jadew> the closer I get to the PSU's location, the stronger the signal gets
[19:54:01] <Casper> good brand, but... why does that cause you problems?
[19:54:16] <jadew> the noise?
[19:54:30] <jadew> because I can't measure the noise in different circuits
[19:54:46] <jadew> instead of getting the real noise, I get that thing
[19:55:26] <Casper> ok
[19:55:37] <Casper> but I doubt that any smps in proximity will work fine
[19:56:00] <jadew> what do you mean?
[19:58:50] <Casper> smps are noisy
[19:59:07] <Casper> and does cause issues with noise...
[19:59:19] <jadew> yeah, but I'm sure they don't have to be this noisy
[19:59:32] <Casper> don't have to, but would be more expensive
[19:59:40] <Casper> and the FCC do not mandate quietter ones
[20:02:19] <tzanger> jadew: there are a number of things you can do -- you have a bunch of subsystems in your power supply... try shutting them down one at a time andseeing if you can kill it
[20:02:53] <tzanger> once you've identified it you're good. if it's the SMPS itself, then you've probably got a long loop somewhere in the switch-inductor circuit. usually a layout fix is needed for that
[20:03:19] <tzanger> 7us is 143MHz not 125kHz
[20:03:34] <tzanger> my mistake, 143kHz
[20:04:07] <jadew> so... should I take the PSU out and fiddle with it?
[20:04:16] <jadew> that sounds dangerous
[20:05:14] <jadew> I guess I could at least take a look inside and see if they populated everything, maybe they left out some capacitor or something
[20:05:32] <jadew> it still baffels me that the noise is getting out of the case tho
[20:08:04] <tzanger> wait, which PSU?
[20:08:23] <jadew> my PC's PSU
[20:09:08] <tzanger> oh sorry
[20:09:11] <tzanger> I thought it was your PSU
[20:09:31] <tzanger> no don't monkey in the PC PSU, those things are built as cheaply as possible and they do not like to be trifled with
[20:09:44] <tzanger> that and they are *very* fast and can supply a lot of current awfully fast
[20:09:53] <jadew> I know
[20:10:21] <jadew> maybe I should ask on #hamradio what kind of PSUs they are using, I'm sure those guys care about this kind of stuff
[20:10:47] <tzanger> that's a great idea
[20:11:07] <tzanger> another oddball question... is your outlet ground really grounded?
[20:11:21] <Fornaxian> get a nice IBM PC-XT with the old style power supply...no switchmode junk in there to mess things up!
[20:11:24] <tzanger> i.e. a good solid connection to earth?
[20:11:35] <tzanger> Fornaxian: the XT power supplies were most definitely switchmode
[20:12:00] <Fornaxian> even the old 75 watt ones?
[20:12:13] <Fornaxian> oh well...forget that idea.
[20:12:30] <jadew> tzanger, yep, I checked when I moved in
[20:13:04] <jadew> yeah, I don't think you can get linear supplies for a PC
[20:13:15] <jadew> they'd need a really beefy transformer
[20:14:48] <tzanger> even back in the late 80s/early 90s
[20:15:37] <tzanger> http://www.seekic.com/circuit_diagram/Power_Supply_Circuit/The_power_supply_circuit_diagram_of_IBM_PC_XT_type_display.html
[20:15:40] <tzanger> definitely a switcher
[20:15:50] <tzanger> lol tht's a display
[20:15:56] <Fornaxian> http://www.coreaudiotechnology.com/products/music-servers/atx-linear-power-supply/
[20:16:01] <Fornaxian> there ya go..
[20:16:10] <Fornaxian> a linear ATX supply.
[20:16:15] <Fornaxian> only 50 pounds.
[20:17:04] <tzanger> http://www.w4zt.com/repeater/batteries/charger2/Pc121207m.jpg
[20:17:07] <tzanger> that's what they looked like
[20:17:21] <tzanger> ELL OH ELL
[20:18:03] <tzanger> I wonder if that guy colours the side of the case with green marker to increase the fidelity of the audio too
[20:19:37] <Fornaxian> did you click on the S2 link? Series 2
[20:20:00] <Fornaxian> 6000 dollars
[20:20:09] <Fornaxian> for a 2500 watt peak linear supply.
[20:21:06] <Fornaxian> then there is Roklobsta,,,,man what a
[20:21:07] <Fornaxian> umm.
[20:21:08] <Fornaxian> nevermind.
[20:21:18] <Roklobsta> wut
[20:21:27] <Fornaxian> nothing nothing....don't mind me..
[20:21:30] <Roklobsta> i came on coz me ears were burning
[20:21:50] <Fornaxian> you should probably not power your headphones from your microwave then.
[20:46:18] <TLoFP> hi all I was wondering how many instructions the arm sam3x by atmell completes in one tick of the clock? I couldn't find the MIPS reference in the datasheet
[20:47:01] <Enma_Hinobara> SON OF A FREAKIN GOAT
[20:47:19] <Fornaxian> wouldn't that be a kid?
[20:47:33] <Enma_Hinobara> After 8+ hours tearing my hair out I've root-caused the problems I was having interfacing with this chip
[20:47:52] <Enma_Hinobara> The problem is that pins 6 and 7 of port G DON'T ACTUALLY CONNECT TO THE uC
[20:48:07] <Fornaxian> ?
[20:48:22] <Enma_Hinobara> The Atmega 2560 only has 6 pins in port G
[20:48:31] <Fornaxian> oops
[20:48:33] <Enma_Hinobara> The pins on the STK600 board don't actually go anywhere
[20:48:55] <Fornaxian> damn those datasheets and not reading themselves to you.
[20:51:11] <GargantuaSauce_> TLoFP: it's cortex-m3 so http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337h/CHDDIGAC.html
[20:52:03] <Enma_Hinobara> So, when's the Arduino Quark coming out?
[20:54:28] <TLoFP> GargantuaSauce_: just to make sure I understand, a cycle is one tick of the clock, so a chip running at 40MHz will complete 40 MIPS of one cycle instructions, yes?
[20:54:40] <TLoFP> just like the AVR
[20:55:03] <Enma_Hinobara> I imagine better than the AVR
[20:55:22] <Enma_Hinobara> Actually, does M3 have any kind of code or data cache?
[20:56:10] <Fornaxian> pretty sure it does...along with pipelining.
[20:56:11] <TLoFP> Enma_Hinobara: do you think the m3 would outperform the avr32 in calculations ?
[20:56:14] <GargantuaSauce_> it has a 3-stage pipeline but afaik no cache
[20:56:30] <GargantuaSauce_> i dont know anything about the sams so they could have a cache for the flash or something
[20:56:52] <Enma_Hinobara> I don't know much about AVR32 (though wasn't the 32-bit AVR ARM?). But I was assuming M3 had a cache
[20:57:26] <Fornaxian> no internal cache...it is possible to use external cache apparently, however.
[20:57:45] <Fornaxian> avr32 is not the same as arm....
[20:58:06] <Enma_Hinobara> My gut feeling is that ARM will outperform AVR, but I can't claim to be an expert on the matter
[20:58:40] <TLoFP> I am just trying to understand the pros/cons of the arm sam3 and avr32
[20:58:58] <Fornaxian> sam3 has much more code out there for it.
[20:59:12] <TLoFP> is there any way to get educational information on such a comparison? other then using google which seems to lead to flame wars of general ARM vs. AVR vs. PIC
[20:59:15] <Fornaxian> avr32 seems to be a backwater processor these days...at least, I don't see much of anything running it.
[20:59:15] <GargantuaSauce_> i am an stm32 fanboy so that is the cortex-m i will recommend
[20:59:30] <TLoFP> Fornaxian: I see
[20:59:41] <TLoFP> Fornaxian: backwater?
[20:59:44] <GargantuaSauce_> if performance is your main metric, the f3 or f4 is absolutely your best bet
[20:59:47] <Fornaxian> as in not mainstream.
[21:00:13] <TLoFP> Fornaxian: i see
[21:00:22] <Fornaxian> arm is everywhere...avr32 doesn't seem to be going anywhere...
[21:00:33] <TLoFP> Fornaxian: I didn't have much luck with the stm32
[21:00:35] <w|zzy> don't the avr32 chips have lower power usage.
[21:01:01] <Enma_Hinobara> I want a Quark Arduino
[21:01:15] <TLoFP> Enma_Hinobara: link?
[21:02:03] <Enma_Hinobara> An Arduino with one of these: http://arstechnica.com/information-technology/2013/09/intel-aims-another-barrel-at-arm-with-synthesizable-ultra-low-power-quark/
[21:04:02] <TLoFP> Enma_Hinobara: interesting, is this in actually in the plans?
[21:04:17] <Enma_Hinobara> I haven't heard of anything
[21:06:52] <jadew> that quark cpu does seem nice
[21:06:53] <TLoFP> Enma_Hinobara: lol would be cool though, what does "synthesiable" mean?
[21:07:02] <jadew> and it has an fpga in it too?
[21:07:16] <jadew> TLoFP, probably the fact that it has programable logic
[21:07:35] <jadew> so you can implement your own hardware peripherals
[21:07:37] <Enma_Hinobara> I assume synthesizable means they license the IP like ARM does, so people can build SOCs
[21:07:43] <TLoFP> jadew: I see
[21:08:07] <TLoFP> I wasn't sure if it meant what jadew is saying or what Enma_Hinobara is saying
[21:08:13] <jadew> Enma_Hinobara: "Quark changes that. The Quark design is fully synthesizable, with extension points to allow customers to integrate their own functional blocks onto Quark SoCs."
[21:08:21] <jadew> I think it's just a small FPGA inside the chip
[21:08:46] <jadew> or maybe it's just the IP
[21:08:49] <Enma_Hinobara> I interpreted that to mean it can be easily interfaced with other macrocells
[21:08:54] <jadew> now I don't get it either hehe
[21:10:45] <GargantuaSauce_> you're going to be hard-pressed to get real info from ars technica :V
[21:11:14] <Enma_Hinobara> Haters gonna hate
[21:12:02] <Enma_Hinobara> ALRIGHT. Now that I've got this stupid chip working, I can actually start on this project
[21:17:16] <ambro718> I'm trying to use the UART at baud rate 115200 with CPU frequency 16MHz, but I'm occasionally getting garbage in the data received from the AVR.
[21:18:08] <ambro718> I've enabled U2X so now I have UBRR=16 (as suggested by the datasheet), but that just seems to have made the errors less frequent.
[21:20:45] <ambro718> the baud rate error is 2.1%, is this too much for reliable operation?
[21:21:41] <Tom_itx> http://www.wormfood.net/avrbaudcalc.php
[21:21:43] <Tom_itx> quite a bit
[21:22:24] <Tom_itx> 115200 is more like 3.7%
[21:22:45] <Tom_itx> ubrr 16 is 57600
[21:22:55] <Tom_itx> @16Mhz
[21:23:50] <ambro718> I'm using U2X which sometimes gives more precision
[21:24:41] <ambro718> these tables don't know about U2X apparently
[21:24:59] <Tom_itx> mmm
[21:28:15] <ambro718> ah you need to check the third checkbox to get the U2X tables
[21:28:41] <ambro718> or not
[21:29:15] <ambro718> huh, who runs AVRs at 40MHz?
[21:34:06] <Tom_itx> wouldn't that be awesome
[21:34:31] <Enma_Hinobara> 40 MHz sucks. Gimme 400 Mhz
[21:38:43] <Valen> pshaw 400000000000000000000000GHZ!
[21:39:15] <ambro718> looking at Atmel's ARM uC's, SAM9XE goes to 180MHz
[21:44:29] <ambro718> so what is the problem in making it faster? why can ARMs run at 1GHz but AVRs only at 20MHz?
[21:45:33] <jadew> I'm sure they can, but it's probably more expensive
[21:47:53] <Tom_itx> the higher the frequencies the lower the internal voltages go
[21:48:17] <ambro718> but why don't we have 1GHz AVRs? surely there is a market for fast CPUs?
[21:48:27] <ambro718> MCUs
[21:48:49] <Tom_itx> where?
[21:48:55] <ambro718> instead if you want higher frequency you need ARM or something, why is that so?
[21:48:57] <GargantuaSauce_> the avr architecture is as much of a limitation as its clock speed
[21:49:03] <Tom_itx> you reach a point a cpu comes into play
[21:49:12] <ambro718> GargantuaSauce_: how does the architecture limit the clock speed?
[21:49:20] <Tom_itx> i don't need a GHz chip running my coffee pot
[21:49:21] <GargantuaSauce_> that's not what I said
[21:49:38] <ambro718> I know but it appears to be the case
[21:50:03] <GargantuaSauce_> there's no point in dumping enough power into something to run it at a few hundred mhz when it has an 8 bit bus
[21:50:33] <ambro718> but then look at AVR32, it's still just 50MHz
[21:50:55] <Tom_itx> and you need smaller tech to run those frequencies
[21:51:09] <Tom_itx> which drives the die price up
[21:52:05] <jadew> and voltages lower
[21:52:26] <jadew> it pretty much leaves the DIY land
[21:52:27] <Tom_itx> as i mentioned above
[21:52:28] <GargantuaSauce_> the whole architecture is designed around performance/$ and per watt
[21:53:28] <GargantuaSauce_> considering that power consumption is proportional to the frequency cubed, increasing the clock speed detracts from that
[21:56:40] <GargantuaSauce_> at higher clock speeds you generally want more memory too, and that is one reason why past 200MHz or a little less you see the transition from microcontrollers to SoCs
[22:08:09] <ambro718> I've written new fuses to my atmega1284p and now it's resetting itself during operation.
[22:08:24] <ambro718> I did it because avrdude reported that the fuses changed during flashing
[22:08:31] <Tom_itx> wdt?
[22:09:45] <ambro718> no, I'm feeding the wdt. It's related to receiving/processing data on the serial (I send a command and it immediately resets)
[22:10:16] <ambro718> randomly, sometimes it resets, sometimes it replies correctly to the command
[22:10:40] <Tom_itx> i ran across one that had the reset pin available on portc and if you used it, it would reset
[22:11:12] <ambro718> huh? It worked without problems before this incident.
[22:12:03] <Tom_itx> i always remember the initial fuse settings so i can refer back to them
[22:13:19] <ambro718> is it possible I have worn out the flash?
[22:13:59] <GargantuaSauce_> use avrdude to verify the contents
[22:14:19] <ambro718> it does that automatically, I just flashed it with no problems
[22:14:39] <Casper> ambro718: possible but unlikelly, the flash have a 10000 write cycle endurance
[22:15:04] <Casper> if it verify, then the flash is ok
[22:15:30] <ambro718> couldn't it be that it's written ok but it's having problems reading?
[22:16:04] <GargantuaSauce_> verifying reads it all back through the isp
[22:16:25] <ambro718> I get that, but it reads it just once
[22:16:58] <ambro718> if it was going bad couldn't it go bad in a way that reading it returns the wrong result with a small probability?
[22:17:21] <GargantuaSauce_> yes or a cosmic ray could have flipped a bit in sram and caused the crash too
[22:17:39] <ambro718> but I've reset and unpowered it several times :/
[22:18:19] <GargantuaSauce_> so if it's behaving the same way every time it wouldn't be a "small probability" and verifying the flash would have failed
[22:19:46] <Casper> ambro718: if it verify fine, but do not work fine, then you have a code or hardware problem
[22:20:13] <Casper> check the brown out detector fuse
[22:20:17] <Casper> you may have enabled it
[22:20:23] <Casper> that or the watchdog
[22:20:27] <ambro718> I tried both, same problems
[22:20:56] <Casper> you disabled both? or enabled both?
[22:21:28] <ambro718> I tried enabling and disabling it
[22:22:02] <ambro718> the brown-out. The watchdog is not the problem, it's disabled (but I enable it in software and feed it)
[22:22:28] <Casper> are you sure that you actually reset it in a timelly way?
[22:22:38] <ambro718> the crash happens immediately after receiving something from serial, not after a timeout
[22:22:53] <ambro718> yes, it was working perfectly with the same software 20min ago
[22:23:10] <Casper> then you may have a stack overflow or something
[22:23:19] <Casper> you changed the speed?
[22:23:41] <Casper> if so you changed where in the code the interrupt happend... so may be a bit deeper in the code
[22:27:36] <Casper> but ambro718... I'ld start by NOT using the WDT
[22:29:03] <ambro718> the WDT is not the problem. Actually sometimes the WDT resets it after the software crashed and stopped feeding the WDT, but sometimes the crash immediately resets it.
[22:34:25] <ambro718> I have an identical board except for a different oscillator (16MHz instead of 20), and it works all right, with the same fuses.
[23:51:38] <Valen> so how does this look as a "general purpose I/O passive block" ? http://imgur.com/6EoQm9m
[23:52:09] <Valen> I'm thinking you just populate the bits you want to make it become the circuit you are after
[23:52:33] <Valen> IE replace the LED with a resistor for a pulldown