#avr | Logs for 2013-12-23

Back
[00:06:27] <Casper> rue_house: look like I'ld need a bending machine :(
[00:06:37] <Casper> I really need more like 22.5 degree...
[00:06:45] <Casper> 45 is a bit too much I think
[04:21:51] <megal0maniac> http://xkcd.com/1296/
[04:50:34] <twnqx> megal0maniac: can't confirm :P
[04:52:20] <megal0maniac> twnqx: Can confirm
[04:53:18] <twnqx> http://pastebin.com/S4m8VYiA :P
[04:56:36] * twnqx goes to install stellarisware
[04:57:19] <megal0maniac> Oh fun
[04:57:35] <megal0maniac> Been messing with mplabx this morning. Not happy
[05:01:02] <twnqx> weee
[05:01:05] <twnqx> just in time for christmas
[05:01:14] <twnqx> my 320x240 TFT with touch interface arrived :3
[05:01:22] <megal0maniac> Nice!
[05:05:24] <megal0maniac> RikusW: Tell us about the project!
[05:05:39] <RikusW> hi megal0maniac
[05:06:02] <RikusW> still waiting for parts, the package arrived with only half the parts in it :S
[05:06:09] <RikusW> and some wrong ones...
[05:06:16] <megal0maniac> Which project is that?
[05:06:21] <RikusW> gps logger
[05:06:27] <megal0maniac> Still?
[05:06:39] <RikusW> m32u4 should have been in the order...
[05:06:44] <RikusW> yep... :(
[05:06:49] <megal0maniac> Order sample!
[05:06:56] <RikusW> arrow seems to be dragging their feet
[05:07:08] <RikusW> should have gotten the prototype parts from RS
[05:07:20] <megal0maniac> Or the sample center :D
[05:07:39] <RikusW> arrow is the sample center for Atmel ;)
[05:08:06] <RikusW> (arrow-altech)
[05:08:22] <megal0maniac> I've ordered from Atmel directly before..
[05:08:29] <megal0maniac> Never dealt with arrow
[05:08:52] <RikusW> they offer m32u4 for R28 in singles
[05:08:59] <RikusW> and xm32a4u for R20
[05:09:20] <RikusW> RS asks R70
[05:10:02] <megal0maniac> Ouch
[05:10:54] <megal0maniac> They're pushing xmega by making it cheaper
[05:11:01] <RikusW> indeed
[05:11:32] <RikusW> I used mega because no regulator required for use with lipo batteries
[05:12:23] <RikusW> the regulator would use more quiescent current than the avr sleep mode :/
[05:13:37] <megal0maniac> Ah, good point
[05:50:20] <Epsilon-Auriga_> http://www.befuddledstranger.com/wp-content/uploads/2013/12/Holiday-Tree-Final.jpg
[07:06:31] <antto> how is this thing called exactly? http://lh3.ggpht.com/-dy8m1IZ9ceM/S--NgtWxIeI/AAAAAAAAAeM/QVjE-oVUnxc/s236/3pin_head.jpg
[07:08:02] <xorm> that is a 3-pin header
[07:08:08] <xorm> with a locking ramp
[07:09:19] <Tom_itx> http://www.digikey.com/product-search/en?x=0&y=0&lang=en&site=us&KeyWords=WM4201-ND
[07:09:38] <Tom_itx> close enough?
[07:10:02] <xorm> Tom_itx, i was literally in the process of finding him that link :p
[07:13:39] <antto> Tom_itx yes, that
[07:13:54] <antto> but imma look for it on ebay
[07:14:12] * Tom_itx kicks antto
[07:14:15] <Tom_itx> you didn't say that
[07:14:18] <xorm> hahaha
[07:14:26] <xorm> you can also scavenge them from broken motherboards
[07:15:36] <antto> i don't want to order from digikey/mouse due to the funky shipping tax
[07:17:14] <Casper> well, then order from somewhere else and pay with extra shipping time or higher base price :D
[07:18:26] <xorm> you can make it yourself from bits of brass stock and clay
[07:21:32] <megal0maniac> This makes me smile: http://i.imgur.com/EK2oKOD.png
[07:21:42] <megal0maniac> It's a PICKIT3
[07:25:38] <megal0maniac> Woah! Atmel no longer does dataflash. It has been aquired by "Adesto"
[07:26:47] <specing> whatever
[07:26:52] <specing> it sucked anyway
[07:26:54] <specing> ;P
[07:27:09] * specing ducks
[07:27:34] * megal0maniac throws pickit3 at specing
[07:29:29] <megal0maniac> Oh wow. That happened last year already
[09:01:25] <rue_house> Casper, a bunch of plywood, screws, and a router, and your set
[11:58:06] <hetii> Hi ;)
[11:58:38] <bss36504> hi
[12:00:02] <hetii> I use atmega8 with powerswitch project from v-usb. I notice that when i few time switch off /on my relay i got : usb 3-2: >usbfs: USBDEVFS_CONTROL failed cmd powerSwitch rqt 128 rq 6 len 256 ret -71
[12:00:17] <hetii> and i need to replug my device to host.
[12:01:28] <hetii> any clue what can cause this issue ?:)
[12:13:04] <bss36504> sorry for the delay. How are you driving your relay? Can you show us a schematic?
[12:17:25] <bss36504> oh hey
[12:37:57] <bss36504> hetii: Are you still around?
[12:41:46] <hetii> yep
[12:43:27] <bss36504> oh did you see my question about how the relay was hooked up? Can you provide a schematic?
[12:43:43] <hetii> well i just use such mosfet http://pdf1.alldatasheet.com/datasheet-pdf/view/127683/IRF/IRFL024ZPBF.html, gate is directly connected to uC and additional 1n4148 diode is added parallel for relay.
[12:44:56] <bss36504> ok well that seems legit. Does it work consistently if you take the whole relay circuit off?
[12:46:13] <hetii> its occur time to time when i play with relays.
[12:46:28] <bss36504> but only when you play with the relays?
[12:46:42] <hetii> yes
[12:46:58] <hetii> or at least i notice that only when i play with them :)
[12:47:25] <bss36504> Well my guess is there is some sort of inductive kick that zaps the mcu, or the power supply dips and the mcu resets
[12:48:03] <hetii> i add additional capacitors for +5v(atmega) and 12v+(relays) bus but still have this issue
[12:48:41] <hetii> both 100nF
[12:49:23] <hetii> maybe add some for usb bus ?
[12:50:15] <bss36504> Does the USB source anything?try adding like 10uF to the 5V supply. Do the 12V and 5V supplies stem from one common supply?
[12:51:12] <hetii> yep they are provided from PC power supply (its a controller that will live inside my pc).
[12:52:24] <hetii> regular or tantal?
[12:52:51] <bss36504> Ok, well that should be more than enough power and decoupling. "regular" lol. I would do 10 or 100 uf electrolytic
[12:58:13] <hetii> ok 22uF mounted:)
[13:01:44] <bss36504> Any luck?
[13:08:50] <hetii> i will test it, just need to refactor my Makefile.
[13:12:41] <hetii> ok as i tested it a while all seams works, so maybe indeed issue with power filtering.
[13:14:19] <hetii> Works enough stable to mount it inside :)
[13:14:42] <hetii> thx for tips :)
[13:18:09] <bss36504> No problem. And there is never anything wrong with more cap on the supply ;)
[13:21:08] <hetii> will back soon :)
[14:41:24] <mebus> My Eclipse AVR cannot find the "UBRR0H" regiser for the Atmega328P. Does anyone know why?
[14:42:27] <bss36504> eclipse
[14:42:47] <bss36504> also it might just be UBRRH
[14:42:55] <bss36504> I think that only has one USART
[14:43:21] <mebus> bss36504: it's also not working with UBRRH.
[14:43:32] <bss36504> install AS6 then.
[14:43:49] <bss36504> Eclipse is pretty terrible at everything, and AS6 works great
[14:44:02] <bss36504> how about UBRR?
[14:44:28] <bss36504> does it find that? The thing is, these are all inside the atmel header files. so if you have included avr/io.h, it should be there
[14:45:02] <mebus> bss36504: no, also doesn't find UBRR
[14:45:12] <mebus> I have included avr/io.h
[14:45:45] <bss36504> well then i'm not sure. I tried eclipse with avr for like 10 minutes once. It was as bad as eclipse always is, so I went back to as6
[14:46:38] <mebus> "#define UBRR0 _SFR_MEM16(0xC4)"
[14:46:47] <mebus> shouldn't this work?
[14:47:56] <bss36504> yes
[14:48:17] <bss36504> did it not compile, or are you just looking at the inline error generation?
[14:49:25] <mebus> bss36504: it did not compile.
[14:50:57] <bss36504> hmmm. Thats odd.
[14:51:16] <bss36504> does anythign else complain, or just that particular symbol?
[14:52:46] <mebus> bss36504: all the uart stuff...
[14:53:58] <bss36504> well then idk. thats an problem
[14:54:05] <bss36504> thats an odd problem*
[14:54:07] <N2TOH> so to put an AVR on the ISA bus I have considered a few options, one being an ATmega2560 with it's 86 GPIO pins
[14:54:45] <N2TOH> another thought is to use bidirectional shift registers
[14:55:02] <bss36504> N2TOH: Were you the one that was going to buy that mega ISA board from ebay a little while back?
[14:55:19] <N2TOH> maybe, a few days ago
[14:55:57] <N2TOH> I am considering building an ISA board with an ATmega 1284P on it
[14:55:58] <mebus> bss36504: I don't get it.
[14:56:05] <bss36504> I unfortunately (fortunately?) am to young to know about ISA
[14:56:20] <bss36504> mebus: me neither
[14:56:27] <N2TOH> the bus used in old PC computers
[14:56:50] <mebus> bss36504: I will try a newser version of eclipse.
[14:57:11] <N2TOH> so I can plug it into a passive backplain to use VGA cards and network cards and such from ebay for cheap
[14:58:54] <bss36504> Right, I know what it is, but not enough to provide technical insight. However, if you dont need a ton of speed, shift registers could work. you'd have to caluclate the time it takes to set/read all of the pins
[15:00:08] <N2TOH> the mega can run at 16 or 20Mhz, the original ISA bus ran at 4.77MHz
[15:09:14] <N2TOH> yes but that defeats the purpose of the project, unless your interested in emulating an AVR
[15:09:24] <N1njAway> Yes I am!
[15:09:56] <N1njAway> I wish I had a towmotor. It's a pain in the ass putting a pick and place up on to a pallet skid with just a pallet jack and a bunch of lumber and some creativity :)
[15:10:00] <N2TOH> LOL slap an FPGA with at least 88 pins on a board and have fun!
[15:10:23] <N1njAway> But now it's up there and I feel accomplished
[15:10:49] <Tom_itx> that's the trouble with kids these days... they want it all handed to them
[15:11:12] <N1njAway> The AVR, or the pick and place?
[15:11:20] <bss36504> yes
[15:11:22] <N1njAway> We could put handles on it!
[15:11:35] <N1njAway> And then we'd only need about 8 people to lift it.
[15:11:36] <bss36504> handles on an avr seem a little over the top
[15:11:48] <N2TOH> better yet an FPGA on an ISA board emulating the DEC PDP-11
[15:12:47] <N1njAway> Better yet an FPGA on an ISA board emulating the DEC PDP-11... which is then emulating an AVR!
[15:13:21] <megal0maniac> N1njAway: At Atmel they might do that, and then program it to be a coffee timer
[15:13:43] <megal0maniac> They've been known to strange things
[15:13:51] <Tom_itx> so have i
[15:14:19] <Tom_itx> maybe got my fpga timing thing fixed
[15:14:45] <N2TOH> http://www.ebay.com/itm/New-Comtrol-RocketPort-Octa-RJ45-8-port-multi-serial-adapter-ISA-card-/151055703151?pt=BI_Control_Systems_PLCs&hash=item232b9f1c6f
[15:16:30] <N2TOH> then just throw in some dumb terminals
[15:19:04] <megal0maniac> I'd still love to make a dumb terminal with an AVR. Composite video output, PS/2 keyboard and serial
[15:19:21] <N2TOH> it's been done
[15:19:57] <megal0maniac> I'm sure it has
[15:20:06] <N2TOH> there is at least one over on hack a day that uses two AVR to do it, one a serial to video, and the other PS/2 to serial
[15:20:28] <megal0maniac> xmega might be able to do it all at once
[15:20:48] <N2TOH> I don't recall what the limitation was
[15:27:10] <N2TOH> http://hackaday.com/2010/02/24/oscilloscope-doubles-as-a-serial-terminal/
[15:31:11] <megal0maniac> N2TOH: That's pretty :)
[15:32:06] <bss36504> Thats pretty badass
[15:35:20] <N2TOH> yeah at half a million dollars!
[15:41:16] * N2TOH contemplates the poor mans three headed monitor hack for older PC
[15:41:50] <N2TOH> split out the RGB signals from the video output and feed each channel to the green input on each monitor
[15:42:21] <N2TOH> with a little coding hack you now have upto three green screens
[15:46:38] <megal0maniac> I HAVE to try that
[15:58:37] <megal0maniac> Flipping bits with PIC is weird
[15:59:43] <megal0maniac> I <3 AVR
[16:01:41] <bss36504> pic is weird
[16:09:18] <N1njAway> megal0maniac: Beaky loves AVR, too!
[16:09:32] <bss36504> haha haven't seen him on here in a while
[16:09:46] <bss36504> oh, hows the weather out there N1njAway?
[16:11:10] <megal0maniac> N1njAway: Yeah, you still on holiday?
[16:12:13] <megal0maniac> Cool. Made a PIC count up to 255 and spit it out over serial. My work here is done
[16:12:19] <megal0maniac> Goodnight
[16:14:52] <megal0maniac_afk> I find myself using typedefs and defines to pretend that I'm still using AVR :P
[16:24:37] <megal0maniac_afk> Oh hang on. I have an avr question. Does (1 << SPIF) return the current state of the bit, and clear it if set?
[16:25:43] <megal0maniac_afk> Because I've seen that used in while loops. Something similar for checking whether a peripheral is ready for more data
[16:26:01] <bss36504> yes
[16:26:22] <bss36504> writing to SPIF clears it IIRC
[16:26:53] <megal0maniac_afk> It does. That much I do know
[16:27:21] <megal0maniac_afk> The main question is what it returns when used in a while loop
[16:27:43] <bss36504> oh, not unless it was being & with SPSR
[16:28:25] <megal0maniac_afk> How does that work?
[16:29:04] <megal0maniac_afk> Why would you & it?
[16:29:23] <specing> ambro718: Look what I found
[16:29:28] <specing> ambro718: http://www.boost.org/doc/libs/1_53_0/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/cpp_int.html
[16:29:54] <specing> Using boost on AVR? I say hell yeah!
[16:30:15] <bss36504> megal0maniac_afk: just a sec
[16:30:27] <ambro718> nice, lol
[16:39:47] <bss36504> megal0maniac_afk: You use while(!SPSR & (1<<SPIF)) to check for a transaction complete. Not sure if that sets it low automagically when SPIF goes high.
[19:57:59] <rue_house> anyone here speak chinese to any level?
[20:26:17] <w|zzy> rue_house: there are a couple in #hackvana
[20:26:34] <w|zzy> with an electronics background yup
[20:26:37] <w|zzy> too
[20:30:07] <hackvana> rue_house: 我会说中文,我怎么帮你?
[21:06:11] <rue_house> hackman, yes, some help translating would be nice
[21:06:18] <rue_house> back in a bit!
[21:17:58] <w|zzy> hackvana: It was a ploy to get him into #hackvana :P
[21:30:39] <hackvana> w|zzy: I'll pay you later
[21:30:59] <w|zzy> You've done more than enough for me :)