#avr | Logs for 2016-05-21

Back
[01:01:32] <rue_shop5> Casper, there is no "welder plug" they tend to use anything
[01:02:00] <rue_shop5> I used a 3 prong twistlock, with an adapter to a 4 pin twistlock that I can use for 120 or 240 things
[01:02:10] <rue_shop5> (I made other adapters)
[01:11:43] <Valen> we filed the earth pin down on our 15A plug to 10A size so we could plug it into regular points ;->
[01:15:11] <cehteh> slightly unrelated, anyone of you know some very small socket which has 4 switching contacts (+1 gnd) .. like a 3,5mm headphone jack, but 4 rings with switches and tip
[01:15:35] <cehteh> (just needs to be small, otherwise the form factor is irrelevant)
[01:17:31] <rue_shop5> yea, they make 4 ring 3.5mm jacks
[01:17:53] <cehteh> yes but usually only one switch, but i need 4
[01:18:14] <WormFood> add a switch :P
[01:18:22] <rue_shop5> you only need 1 wire, use resistors and an adc
[01:18:42] <cehteh> idea is: a safety plug for a quadcopter, when inserted it disconnectes the motor signals and pulls them to ground
[01:18:53] <cehteh> when removed its life
[01:19:13] <cehteh> http://www.amazon.de/Schlüsselanhänger-REMOVE-BEFORE-beidseitig-bestickt/dp/B00MMGQD4M
[01:19:18] <cehteh> w/ that
[01:19:30] <WormFood> use a reed switch, and a magnet
[01:19:59] <cehteh> need 4 SPDT then .. and problem is that it must be very vibration resistant, reed switches are not
[01:20:33] <cehteh> i ordered some spdt microswitches
[01:20:37] <rue_shop5> I need an automatic wire stripper
[01:20:47] <rue_shop5> insert wire and it pulls the insulation off the end
[01:20:52] <cehteh> will work, but just thinking about making it simpler/smaller
[01:21:05] <WormFood> Someone here said, that USB inputs are 5 volt tolerant, but I forget who it was that said it. That was the old specs, the new specs do not require the data lines to be 5 volt tolerant
[01:21:41] <rue_shop5> arg, I have enough spare parts from building a cnc to build another one
[01:22:38] <Valen> rue_shop that seems like a problem in search of a solution
[01:24:24] <rue_shop5> I have to finish some of these projects!
[01:24:47] <rue_shop5> the cnc machine and the start of the other cnc, and the unfinished reprap are taking up TOOO much space!
[01:50:29] <cehteh> http://www.henri.de/media/image/61/49/fc/40-900-00800_2015_01_600x600.jpg .. something like those but briding the opposite contacts when nothing is inserted .. anyone knows any?
[01:53:27] <cehteh> hah tae sockets
[01:54:23] <cehteh> now with more poles pls
[02:16:27] <wasim> how to findout which oscillator is need to connect to which chip?
[02:17:10] <wasim> and which chip is support which range of oscillator, how to find that?
[02:24:10] <Jartza> from datasheet
[02:42:45] <wasim> could someone help please, I think something is wrong with my oscillator setting, here is my code and all combination of oscillator I have tried, but led is not blinking !!! http://prntscr.com/b6lwj1
[02:50:40] <cehteh> xmega?
[02:51:12] <cehteh> and you dont ping the wdc .. better turn it off
[02:56:19] <cehteh> (which compiler/devel environment sets that with #pragma anyway?)
[05:14:04] <eszett> hi twnqx, wie stehts
[05:14:12] <eszett> Sammelbestellung now ? =)
[08:45:54] <eszett> I bought a green 3mm LED, leaded, and its more like light mint green, than deep green, is that default?
[09:28:42] <CasperAtWork> eszett: there is different colors/tint
[09:28:51] <CasperAtWork> so it may as well be possible
[09:31:50] <eszett> CasperAtWork: ah, Mouser has "color temperature" as criteria filter
[09:31:59] <eszett> thats what im looking for
[09:33:46] <CasperAtWork> even color temperature can vary significantly
[09:34:03] <CasperAtWork> wavelenght is what is precise
[09:35:59] <eszett> the problem is.. that the product image is not very clear, how can i know how the color actually appears to be?
[09:36:02] <eszett> ex. http://www.mouser.de/ProductDetail/Kingbright/WP424GDT/?qs=%2fha2pyFaduhfiWGBIzYTzhrZd4CLwwWio2fneo%252bwykg%3d
[09:36:26] <eszett> I have no "wavelength" simulator software :-)
[09:37:46] <eszett> ah ok, below 500nm the green is more "blueish cold" and above 500nm the green is more "yellowish warm", so i need > 500nm
[09:38:04] <eszett> wikipedia helped me
[09:38:15] <CasperAtWork> there might be some wheel somewhere online
[09:38:29] <CasperAtWork> which will not be precise due to your monitor that ain't calibrated
[11:31:02] <NicoHood> I places a special function inside the bootloader that writes data to the flash. I want to call it from the user sketch, to overwrite the flash.
[11:31:03] <NicoHood> https://github.com/NicoHood/SecureLoader/blob/master/SecureLoader/BootloaderAPI.c#L39
[11:31:41] <NicoHood> I use this to test the function call. The address is correct as it returns and also returns the correct value (if an address is wrong its 1 rather than 0)
[11:31:42] <NicoHood> https://gist.github.com/NicoHood/54cbf77790e338639c02fcb61cf83ca3
[11:31:59] <NicoHood> however it does not write any data. why?
[11:34:11] <sabor> NicoHood: http://hackaday.com/2015/07/03/arduinos-and-other-avrs-write-to-own-flash/
[11:36:49] <CasperAtWork> also NicoHood.. arduino code is #arduino, avoid using their stupid brainless library and go with real C...
[11:39:06] <NicoHood> I use real c as i am coding the bootloader
[11:39:22] <NicoHood> I just try to test it real quick
[11:40:12] <NicoHood> there is nothing that is against using arduino here. cause i need the premade serial usb functions. i do not have time to setup a whole lufa project to see it is not working in the end. its not that i am a beginner.
[11:40:29] <NicoHood> I just do not understand why my function call takes no effect, even though it seems to be called.
[11:41:10] <CasperAtWork> have you checked the lock bits (fuses)
[11:41:16] <Jartza> evening
[11:44:06] <NicoHood> fuses are set to 3C, so only isp reading is disabled
[11:45:05] <NicoHood> also it should work, as the bootloader itself works. it does not use the function itself, but it is able to program the flash with another function. the function i used was still tested though, i just manually merged this last address into a different bootloader hex file
[15:14:44] <rue_shop5> anyone written a hayes like parser? ATH0?
[15:15:19] <rue_shop5> OK?
[15:22:29] <RikusW> I've done some gps parsing a few years back
[15:45:35] <Cracki_> cheers. what's the recommended way to move all my constant stuff (strings, tables, etc) into flash *and* do it with C++?
[15:46:05] <Cracki_> I'd like to use templates because preprocessor macros kinda have their limitations
[15:46:18] <Cracki_> (which is why I'm looking at C++ for atmegas)
[15:46:51] <Cracki_> I hear that C++ won't get things like __flash, so what do people do there?
[15:48:19] <RikusW> read the avr-libc docs
[15:48:30] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/abcminiuser/articles/progmem_basics_index.php
[15:48:37] <RikusW> It explains how to put strings in flash
[15:49:01] <Tom_itx> or: http://tom-itx.no-ip.biz:81/~webpage/abcminiuser/articles/avr_eeprom_index.php
[15:49:03] <RikusW> gcc and g++ should both work with that
[15:49:07] <Tom_itx> *and
[15:49:15] <Cracki_> it doesn't mention c++ specifically. I'd like to have the convenience I have in C, where I label things __flash and I access is handled by the compiler
[15:49:34] <Cracki_> I don't want to use functions to access flash
[15:49:40] <Cracki_> (not explicitly)
[15:50:07] <Cracki_> do you know what I mean?
[15:50:27] <Cracki_> I already know about progmem, but that's outdated because of the __flash attribute
[15:50:34] <Cracki_> (kinda outdated)
[15:58:00] <Lambda-Aurigae> kinda outdated but not fully explored by most people.
[15:58:10] <Lambda-Aurigae> I consider it experimenta.
[15:58:12] <Lambda-Aurigae> l
[15:58:24] <Cracki_> progmem experimental? Oo
[15:58:40] <Cracki_> I'm waiting to get something like __flash for eeprom
[15:59:34] <Lambda-Aurigae> not progmem
[15:59:39] <Lambda-Aurigae> direct program memory access.
[15:59:44] <Cracki_> ah yes
[15:59:53] <Lambda-Aurigae> https://gcc.gnu.org/onlinedocs/gcc/Named-Address-Spaces.html
[16:00:06] <Cracki_> in atmel studio 6.2, i got compiler errors, something about isns. in 7.0 (with gcc 4.9) they were gone
[16:01:16] <Lambda-Aurigae> what gcc was atmel stucio 6.2 using?
[16:01:26] <Cracki_> on AS6.2 I looked at the assembly of flash access once, when I tried to move stuff into the second 64k of an atmega128a
[16:01:36] <Cracki_> it was wrong, but doesn't matter now.
[16:02:04] <Cracki_> it seems to work alright on gcc 4.9
[16:02:17] <Lambda-Aurigae> the named address spaces should work with C or C++.
[16:03:03] <Cracki_> if they work in c++, it's a generous compiler extension. standard C++ doesn't have address spaces. they don't believe in harvard architectures
[16:04:15] <Cracki_> looks like I'll have to just try it
[16:05:20] <Cracki_> the %S format specifier for printf is something I only discovered recently
[16:05:22] <Cracki_> it's awesome
[16:05:33] <Cracki_> (for flash strings)
[16:10:25] <Chillum> harvard architecture has its place
[16:12:15] <Lambda-Aurigae> is useful on occasion.
[16:26:01] <LeoNerd> Does anyone know offhand (or where in the datasheet to find) the USART minimum setup time for a pre-START idle condition?
[16:26:12] <LeoNerd> I.e. how long the line has to be in idle state before it will detect a start bit?
[16:26:23] <LeoNerd> I'm suffering issues where sometimes I'm too quick
[16:26:48] <LeoNerd> Hmm.. Ohwait I suppose I could add a pullup resistor
[16:27:21] <LeoNerd> Actually that might help
[16:30:38] <Lambda-Aurigae> it should be in the datasheet if anywhere.
[16:30:57] <Lambda-Aurigae> under the USART section
[16:31:07] <Lambda-Aurigae> look at the timing diagrams in the usart section.
[16:33:00] <LeoNerd> Hmm.. nothing conclusive
[16:33:21] <LeoNerd> Related question:is there an easy way to know what peripherals will override my PORTx settings?
[16:33:38] <LeoNerd> I.e. if Iwant to try to give the RX pin a pullup, can Ido it with PORTB or will the UART override me?
[16:34:44] <LeoNerd> Er.. PORTD even.
[16:35:00] <Lambda-Aurigae> dunno on that one.
[16:35:40] <LeoNerd> Ah.. seems like I can
[16:36:21] <LeoNerd> PD2 (which is RX) says PUOE=RXEN1 (which I have set), and PUOV=PORTD2
[16:36:29] <LeoNerd> So Ishould just be able to PORTD |= _BV(PD2); as normal
[17:40:19] <LeoNerd> OK... all is in fact solved
[17:40:35] <LeoNerd> Iwas foolishly using a MAX481 prebuilt module, instead of a standalone chip
[17:40:51] <LeoNerd> Turns out the module had some surface-mount resistors on it to bias the RS-485 line. The wrong way. :(
[17:40:56] <LeoNerd> Key word: *had*
[17:41:25] <LeoNerd> Now I've removed those, the line idles in high state, as required for the UART, and it can detect START conditions just fine now
[19:16:13] <Lambda-Aurigae> that's good.