#avr | Logs for 2013-01-02

Back
[05:57:26] <OndraSter> no way!
[05:57:32] <OndraSter> FTDI drivers are already on Windows Updae
[05:57:33] <OndraSter> Update
[06:00:13] <OndraSter> I need to make simple arduino shield with secondary serial so I can easier debug stuff
[06:15:17] <OndraSter> arrg
[06:15:19] <OndraSter> h
[06:15:21] <OndraSter> I rewrote the USB stack
[06:15:26] <OndraSter> and it keeps doing the same thing yet again :(
[06:19:18] <yunta> not receiving second packet?
[06:19:48] <OndraSter> I have actually added to send me "Resetting" events on my debug serial too
[06:19:50] <OndraSter> and I am getting
[06:20:02] <OndraSter> http://pastebin.com/CrsXEbuS
[06:20:04] <OndraSter> this
[06:20:20] <OndraSter> for some reason it is resetting the bus
[06:22:31] <yunta> oh, so many resets
[06:22:36] <OndraSter> I know
[06:22:40] <OndraSter> and now it does only resets! lol
[06:22:44] <OndraSter> I installed USBTrace
[06:22:49] <OndraSter> and it does not show anything I could recognize
[06:22:57] <OndraSter> and nothing like on screenshots lol
[06:23:43] <yunta> I remember having similar stupid resets before
[06:23:53] <yunta> for me there were 2 causes I remember:
[06:24:23] <yunta> - printing shit to usart in usb interrupts - apparently it takes too much time, and pc sends reset
[06:24:30] <OndraSter> hmm
[06:24:39] <OndraSter> let me try plugging it into the laptop
[06:24:41] <OndraSter> where it last time worked
[06:25:05] <yunta> - having RC32K enabled - makes usb fail (multiple resets) on some machines
[06:25:58] <OndraSter> hmm?
[06:26:05] <yunta> seriously
[06:26:10] <yunta> can't figure out why
[06:26:13] <OndraSter> I am using RC32K to make the 2MHz RC more precise
[06:26:41] <OndraSter> oh well, let's disable the DFLL
[06:26:44] <OndraSter> for 2M RC
[06:27:52] <OndraSter> hmm still resetting as crazy
[06:28:15] <OndraSter> yunta, what chip were you using?
[06:28:28] <yunta> 192a3u
[06:28:30] <OndraSter> a1u series has got a big bugger USB module compared to a3u/a4u -- ZLP does not work there
[06:28:30] <OndraSter> ok
[06:28:57] <OndraSter> I am doing manually all the ZLP/multipacket transfers because I want it to work even on a1u chips in the future
[06:29:07] <OndraSter> (just as atmel's code does)
[06:29:08] <yunta> nice
[06:30:01] <yunta> for me having rc32k enable always breaks usb, regardless of DFLL being used or not (for 2M osc)
[06:30:09] <yunta> weird shit
[06:30:17] <yunta> s/enable/enabled/
[06:31:45] <OndraSter> well in order to use DFLL you need some source for it
[06:31:47] <OndraSter> I was using the RC32k
[06:31:52] <OndraSter> since I haven't got external xtal
[06:32:19] <OndraSter> also I am first ACKing endpoints before sending data over serial
[06:34:39] <OndraSter> so the data can flow
[06:34:52] <yunta> yes, I was also using internal one as reference, but in the end had to resign from dfll to get rid of rc32k
[06:35:31] <yunta> had to switch my time-keeping to low-power 32kHz :(
[06:36:34] <yunta> but are you sending out of interrupt? acking before sending is better, but you may still be blocking incoming new interrupt (I don't think so though..)
[06:36:59] <yunta> uh, stupid sentence
[06:37:03] <yunta> I hope you know what I mean
[06:37:05] <OndraSter> yes
[06:37:22] <OndraSter> also when I reset the chip without AS connected to PDI debug it does not receive any setup packets at all
[06:37:23] <OndraSter> wtf!
[06:37:35] <OndraSter> it just sees four or five resets
[06:38:24] <yunta> wow
[06:38:49] <OndraSter> it is completely random what it does
[06:38:51] <OndraSter> holy cow
[06:39:04] <OndraSter> sometimes it tries to get device descriptor 3 times, sometimes 10 times..
[06:42:02] <yunta> I'm really happy disabling rc32k fixed that for me
[06:42:02] <yunta> :D
[06:42:04] <yunta> now I'm getting beautiful enumeration sequence, exactly as usb spec says
[06:42:06] <yunta> save for some underruns if I print to much to usart in interrupts
[06:42:09] <yunta> (1 character per interrupt is enough to cause small underruns)
[06:42:34] <OndraSter> I have put return; to the usart_send so it does not print a single character there
[06:42:40] <OndraSter> still does not enumerate
[06:43:25] <yunta_> are you on a3u?
[06:43:29] <OndraSter> a4u
[06:43:38] <OndraSter> right now
[06:43:42] <yunta_> opensource code?
[06:43:46] <OndraSter> no
[06:43:49] <OndraSter> my own
[06:44:03] <OndraSter> http://pastebin.com/VgubPTX8
[06:45:08] <yunta_> a bit too much to read at work
[06:45:13] <OndraSter> ah
[06:45:15] <yunta_> I'll take a look at home
[06:45:16] <OndraSter> nvm then
[06:45:17] <OndraSter> thanks
[06:45:43] <OndraSter> it is filled with macros that are trying to help you read the code
[06:46:02] <yunta_> also, you may want to use linux+usbmon
[06:46:59] <OndraSter> the weirdest part is that on laptop it enumerates just fine (it did with the previous code, but did the same thing on my PC as of right now with the new code)
[06:47:55] <yunta_> for me it always worked on one laptop, and always failed on 2 other
[06:48:04] <yunta_> before disabling rc32k (stupid)
[06:48:24] <yunta_> usbmon shown me that those other 2 laptops were receiving short packets
[06:48:46] <yunta_> of different lengths, but usually cut after several first bytes
[06:48:52] <yunta_> so, pc was naturally resetting bus
[06:49:18] <yunta_> maybe the real reason is not really rc32k
[06:49:34] <yunta_> and we may really have the same problem
[06:52:40] <OndraSter> hmm
[06:52:46] <OndraSter> but... what is the cause!
[06:52:54] <yunta_> exactly :)
[06:53:06] <yunta_> would be nice to have hw usb debugger, eh?
[06:53:12] <OndraSter> yes
[06:53:13] <OndraSter> very nice
[06:53:21] <OndraSter> it can't be that hard
[06:53:28] <OndraSter> just sample at some speed and send it to the PC for analysis :)
[06:54:05] <yunta_> exactly
[06:54:13] <yunta_> what was full speed usb? 12MHz?
[06:54:20] <yunta_> that should be trivial with our megas
[06:54:49] <OndraSter> yes
[06:54:57] <OndraSter> it should be sampled at least at 48MHz
[06:55:13] <OndraSter> (that is why xmega's USB is clocked at 48MHz )
[06:55:21] <yunta_> so.... serial -> parallel shift register + xmega
[06:55:44] <OndraSter> serial -> parallel?
[06:55:47] <OndraSter> why?
[06:56:18] <yunta_> so you feed it with usb at 48MHz and receive 8 bits at a time on xmega side at 6MHz
[06:56:30] <OndraSter> hmm
[06:56:41] <OndraSter> it would be actually 12MHz serial
[06:56:41] <yunta_> you know, to collect bits into byte
[06:56:49] <OndraSter> since you need both data lines
[06:56:58] <OndraSter> I'd rather just get small CPLD or FPGA for that :)
[06:57:07] <yunta_> uh, too complex for me
[06:58:28] <yunta_> did you ever play with io port -> memory DMA transfer on xmega?
[06:58:40] <yunta_> I wonder how many cycles is need for that
[06:58:41] <OndraSter> nope
[06:58:49] <OndraSter> it should run at fCPU
[06:58:55] <OndraSter> err, fper
[06:59:26] <OndraSter> hmm usblyzer does not show any enumeration being done at all!
[07:00:08] <yunta_> don't know that tool
[07:00:28] <OndraSter> it is probably the most known windows usb analyzer
[07:00:34] <OndraSter> right along with wireshark probably
[07:01:58] <yunta_> I'm too lazy to setup windows just for usb tools :(
[07:02:42] <OndraSter> after lunch I will grab laptop and try it there
[07:12:13] <yunta_> OndraSter: you aren't memcpy-ing shit in USB_Send_Data, are you?
[07:14:01] <OndraSter> no
[07:48:06] <Malard_Office> hi, does this channel have a recruitment site where i can post looking for avr programmers looking for work?
[07:49:29] <Steffanx> The sort of related avrfreaks.net has a subforum for that..
[07:49:38] <Steffanx> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewforum&f=8
[07:54:57] <OndraSter> Malard_Office, UK only?
[07:55:08] <OndraSter> err I mean
[07:55:17] <OndraSter> err I thought that you were looking for AVR programmers
[07:55:24] <Malard_Office> i am
[07:55:29] <jacekowski> Malard_Office: what exactly are you looking for
[07:55:42] <Malard_Office> i'm just writing up a bit on the forum
[07:55:51] <OndraSter> don't forget to post link here :)
[07:55:52] <Malard_Office> let me finish it, will link to it save me double typing
[07:55:56] <jacekowski> Malard_Office: where?
[07:56:23] <Malard_Office> Peterborough, UK on a short term basis, we are potentially looking for full time but in a different location (south coast)
[07:56:47] <jacekowski> south coast UK?
[07:57:35] <Malard_Office> yes, long term yes
[07:57:45] <Malard_Office> basically need short term help
[07:57:53] <Malard_Office> and long term (or mid maybe as you look at it)
[07:57:58] <OndraSter> what about middle european help? :)
[07:58:08] <Malard_Office> we are opening an R&D facility around the dorset/poole area
[07:58:15] <OndraSter> central european to be precise
[07:58:22] <Malard_Office> well, for short term happy to have remote working
[07:58:22] <jacekowski> i've spent past year working in poole
[07:58:30] <Malard_Office> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=1023829#1023829
[07:58:40] <jacekowski> living in hotels there
[07:58:50] <Malard_Office> hotel living can suck, but poole has some nice ones
[07:58:57] <Malard_Office> sandbanks gets expensive
[07:59:12] <jacekowski> our hotel was in bournemouth
[07:59:19] <jacekowski> but we were working in poole
[07:59:22] <jacekowski> (twin sails bridge)
[07:59:24] <OndraSter> too bad that I live so far
[07:59:36] <Malard_Office> not interested in relocation?
[07:59:37] <jacekowski> and btw. our stuff never failed
[08:00:49] <jacekowski> Malard_Office: that's office based mainly?
[08:01:22] <Malard_Office> what do you mean jacekowski ?
[08:02:49] <jacekowski> Malard_Office: is it typical developer position, as in x hours in front of the computer?
[08:04:28] <Malard_Office> err, to a degree
[08:04:35] <Malard_Office> will vary, its product development
[08:04:59] <Malard_Office> so there is prototyping, concepting, spiking, actual production code development and if you can some hands on building/prototyping
[08:05:16] <Malard_Office> basically if you got skills that are useful, will use them :)
[08:05:56] <OndraSter> why are you so far away :(
[08:06:43] <Malard_Office> have you seen our website?
[08:07:46] <jacekowski> i've ordered stuff from you
[08:07:54] <Malard_Office> our cec-adapter?
[08:07:57] <jacekowski> yeah
[08:07:57] <Malard_Office> cool stuff btw
[08:08:00] <jacekowski> through amazon
[08:08:06] <Malard_Office> ah, shame, you paid more :P
[08:08:07] <jacekowski> because your website had problems with my email
[08:08:11] <Steffanx> haha
[08:08:13] <Malard_Office> oh? what was wrong
[08:08:27] <jacekowski> i use addresses with +
[08:08:34] <Malard_Office> right, i think i fixed that a while back
[08:08:45] <Malard_Office> it was a bug with the underlying engine i was using
[08:08:45] <jacekowski> i even got email from Martin Ellis
[08:08:49] <Malard_Office> thats me :P
[08:09:14] <darknite> :E
[08:09:18] <darknite> :D*
[08:10:02] <Malard_Office> so basically what i need short term help with, is developing the front panel interface of our new product, and also assisting the main developer developing the bare metal OS for libCEC
[08:10:20] <jacekowski> i've never got to using it
[08:10:23] <Malard_Office> err essentially there is an LPC1768 handling web serving, firmware updates and other control
[08:10:37] <Malard_Office> and then it pokes avr's to control some other functions around cec handling
[08:10:47] <jacekowski> i've planned on using it with aTV2 but with adapter plugged in into my synology NAS
[08:10:58] <jacekowski> and communicating over network
[08:11:11] <jacekowski> but i tested it on my laptop
[08:11:26] <jacekowski> i've done the mods to xbmc to accept the commands over the network
[08:12:01] <jacekowski> but then when it came to using it in real life i've realised that kernel in that NAS has no usb-serial drivers
[08:12:51] <Malard_Office> ah that wont work sadly
[08:12:55] <Malard_Office> atv2 doesnt have a host usb port
[08:13:05] <jacekowski> yeah, that's where the NAS came in
[08:13:09] <Malard_Office> right
[08:13:15] <OndraSter> LOL yunta_
[08:13:18] <OndraSter> I had wrong completely something else
[08:13:29] <OndraSter> I have fixed endpoint # from FIFO calculation
[08:13:33] <OndraSter> and it has enumerated :D
[08:13:44] <OndraSter> there is bazilion of errors in the console on the serial but it enumerated! :D
[08:16:44] <jacekowski> Malard_Office: that stuff on your website, is it made by you?
[08:16:49] <jacekowski> Malard_Office: designed*
[08:17:39] <yunta_> OndraSter: lol
[08:18:08] <Malard_Office> everything is
[08:18:11] <Malard_Office> except the TVonics boxes
[08:18:25] <Malard_Office> although we now make them
[08:18:31] <Malard_Office> but we never originally designed them
[08:20:06] <jacekowski> those HTPCs are bit on the expensive side
[08:20:12] <Malard_Office> we're dropping them
[08:20:15] <Malard_Office> not many left
[08:21:56] <jacekowski> can you run XBMC on those tvonics boxes?
[08:22:01] <Malard_Office> not yet
[08:22:32] <OndraSter> yunta_, http://clip2net.com/s/2FmCI
[08:22:32] <OndraSter> finally on PC!
[08:23:00] <OndraSter> too bad that the driver is on another HDD which is not connected right now
[08:23:12] <OndraSter> and I don't have the DDK here to sign the driver again.. arrgh
[08:24:37] <jadew> hey, any suggestions on removing the tonner from a PCB, when something from the paper got stuck on it and it doesn't come off with acetone?
[08:25:00] <jacekowski> jadew: try warming it up
[08:25:08] <Malard_Office> OndraSter where are you based?
[08:25:09] <jadew> jacekowski, how hot?
[08:25:15] <jacekowski> jadew: toner melting hot
[08:25:21] <OndraSter> Malard_Office, central europe :(
[08:25:28] <Malard_Office> can't you work from home?
[08:25:29] <jadew> guess I could do that
[08:25:31] <OndraSter> I can
[08:25:42] <Malard_Office> can you send me your cv then?
[08:25:47] <Malard_Office> and jacekowski if your interested?
[08:26:09] <OndraSter> I don't have (almost) anything to put on CV yet, I am 1st semester student on a university :)
[08:27:04] <yunta_> OndraSter: usb serial is yours?
[08:27:10] <OndraSter> that is ft232
[08:27:22] <OndraSter> mine is XBoar dMini
[08:27:25] <OndraSter> XBoard Mini*
[08:27:55] <OndraSter> the one without driver
[08:28:06] <yunta_> OndraSter: put http://www.myxboard.net/ there
[08:28:14] <OndraSter> on the CV?
[08:28:23] <yunta_> yes
[08:28:35] <OndraSter> I can also put there 5 months while I was working in world-wide company as an IT technician... but that is pretty much it :)
[08:28:38] <yunta_> it's your design, right?
[08:28:40] <OndraSter> yes
[08:28:41] <jadew> Malard_Office, what are you hireing for? (not interrested in a job, just out of curiosity since I just dropped in the conversation)
[08:28:42] <OndraSter> all hw and sw
[08:28:54] <yunta_> so it's very good thing for cv
[08:29:11] <OndraSter> I actually should be learning for the upcoming 3 tests
[08:29:35] <OndraSter> exams!
[08:30:13] <Malard_Office> avr developer
[08:30:51] <Malard_Office> front panel i/o control (lcd/rotary encoder etc) which is minor stuff, then main area is libCEC modification, adaption and bridging interface over i2c to another micro for controlling a large system
[08:30:55] <yunta_> also, don't forget short description of the project, what you did there (hw design, building, software: usb stack etc.). there is just *so* much to brag about there :)
[08:31:04] <OndraSter> yeah
[08:31:05] <OndraSter> :)
[08:31:21] <OndraSter> and this http://www.youtube.com/watch?v=jGRlGT1iK_U&feature=player_embedded
[08:31:25] <jadew> doesn't sound like a big deal
[08:49:54] <hetii> hi :)
[08:53:08] <hetii> I use rfid cards with uniqe standards. From reader i got hex value, then in card i have printed two string. First is the 10 digit number, second is in form xxx.xxxxx. i suppose they should have some names in RFC did some of you know how they are called ?
[10:19:08] <amee2woof> if i have a 1-wire bus with a bunch of DS1822 temperature sensors, can i power the sensors off 5V, but have the bus pulled high to 3.3V ?
[10:20:06] <OndraSter> datasheet, maybe?
[10:20:10] <OndraSter> oh
[10:20:13] <amee2woof> the MCU is 3.3V only, and powered by a local LDO. i already have 5V and 12V rails in the system and trying to avoid having to run a third rail everywhere
[10:20:17] <OndraSter> as in, Vcc = 5V ...
[10:20:20] <OndraSter> yes you can I'd say
[10:20:36] <amee2woof> well, i'm reading that. but can't figure out which specs are relevant to deciding that
[10:20:47] <OndraSter> Vhi
[10:20:50] <OndraSter> high level
[10:21:10] <amee2woof> yes, i'd put the VDD pin of the DS1822s on +5V, and the 1-wire pull-up to the 3.3V LDO on the MCU
[10:23:22] <amee2woof> hmm Vih is specified as "min. 2.2V" when running with local power
[10:23:58] <amee2woof> that *seems* to be independent of the supply voltage from what i can see
[10:24:33] <amee2woof> cool, thanks OndraSter :D
[10:24:37] <OndraSter> np lol
[10:24:48] <OndraSter> damnit, I don't get it. If I reset the chip via PDI the USB works
[10:24:52] <OndraSter> if I reset it via button, it does not
[10:25:06] <OndraSter> and I am pretty sure I have not written such thing anywhere in the code! lol
[10:26:16] <Steffanx> but i did
[10:41:56] <Tom_itx> different kind of reset
[11:22:17] <OndraSter> Tom_itx, but they both start executing at offset 0
[11:22:28] <OndraSter> and they both reset all the registers
[12:47:51] <OndraSter_> ARRGH
[12:47:54] <OndraSter_> like I said
[12:47:58] <OndraSter_> on my laptop it enumerates just fine ALWAYS
[12:48:15] <OndraSter_> on my PC I don't get single packet rx :(
[12:48:22] <OndraSter_> if I do not launch it through PDI
[12:48:28] <OndraSter_> and even then it is a bit.. random
[12:49:57] <OndraSter_> now it works even on PC !!!
[12:49:58] <OndraSter_> wtf
[12:50:19] <Steffanx> magix
[12:51:32] <OndraSter_> I do not believe in magic
[12:51:56] <Steffanx> Ok, call it cosmic interference
[12:52:35] <OndraSter_> *not anymore*
[12:52:42] <OndraSter_> it does not work
[12:52:45] <OndraSter_> after another reset
[13:32:54] <theseb> Is there any simple web pages on general idea of what gcc does when converting object files to ELF executables? I did that for my (arduino) microcontroller program with gcc. I compared the asm of each for fun. There was almost no relation?? What in the world does gcc do to make an a.out ELF?
[13:39:42] <prpplague> just a reminder, the Call for Participation for the Embedded Linux Conference 2013 ends friday! https://events.linuxfoundation.org/events/embedded-linux-conference/cfp
[14:11:50] <tzanger> hm, are there any recommended practices for using the JTAG pins for analog input?
[14:12:03] <tzanger> JTAG is normally disconnected so it's not a big deal I don't think
[14:13:12] <tzanger> or do I have to blow the JTAG fuses to use PF4-7 for analog?
[14:45:08] <OndraSter_> tzanger, setting it in the firmware is enough
[14:52:46] <OndraSter_> and safer
[14:57:34] <tzanger> OndraSter_: nice. that solves this issue nicely
[14:58:02] <tzanger> I also found AVR042 which details a bit of the hardware requirements for muxing JTAG+ADC
[14:58:17] <ph1l> Anybody knows how do i identify my crystal regarding "start-up time", fast or slow rising power etc. in order to get the fuses bits right?
[14:58:34] <tzanger> ph1l: just go for slow startup time unless you have really crazy (and impractical IMO) startup issues
[14:59:28] <ph1l> tzanger: and what about BOD enable? what's this?
[14:59:59] <OndraSter_> Brown Out Disable
[15:00:03] <OndraSter_> brown out = undervoltage condition
[15:00:09] <hackvana> It's in the manual.
[15:00:27] <OndraSter_> that too
[15:00:47] <tzanger> ph1l: I like brownout detection. keeps the chip in reset when the supply rail(s) are out of spec to prevent screwy operation
[15:02:11] <ph1l> tzanger: thank you much.
[15:02:39] <OndraSter_> also startup time is good not just for xtal
[15:02:41] <OndraSter_> but also for power supply
[15:03:00] <OndraSter_> eg if you are using SMPS the chip can start at 1.6V but before it reaches required voltages it can lock up or so
[15:04:01] <ph1l> OndraSter_: Something like BODLEVEL=100 for 5v?
[15:04:19] <OndraSter_> that works too :)
[15:05:59] <ph1l> One last thing, what is "1K CK + 0ms" ? 1000 ClockCycles + 0ms?
[15:07:50] <tzanger> yeah, the details in there are all in the datasheet
[15:07:56] <tzanger> I just select the longest one and forget about it
[15:08:11] <tzanger> if you're doing deep sleep or superfast startup stuff you might have to pay more attention
[15:08:14] <tzanger> but that's it
[15:09:01] <ph1l> tzanger: OndraSter_: Thanx you very much for your help and time. This should get me starting :-)
[15:10:37] <tzanger> yep just get an LED blinking. the rest is just details
[15:13:32] <asteve> blink blink blink
[15:14:09] <dunz0r> tzanger: Remember to also get an LED blinking without using delay-functions :)
[15:14:22] * dunz0r is looking in to realtime OSs for his avr.
[15:14:45] <tzanger> dunz0r: I never do that. :-) timer0 ftw
[15:15:20] <dunz0r> tzanger: I agree. You feel extra cool when your main for-loop is empty :)
[15:15:41] <ph1l> tzanger: led is blinking like crazy @1MHz, i'm just wondering how it looks like @ 16MHz :-)
[15:16:10] <dunz0r> ph1l: Are you blinking your LED at 1MHz?!
[15:16:22] <dunz0r> Duh... you're running the mcu at 1MHz...
[15:16:56] <tzanger> you may THINK you're blinking the LED at 1MHz but I'm pretty sure neither hte port pin nor the LED itself will actually run at that speed
[15:17:35] <dunz0r> I doubt you could see an LED blinking at 1MHz, unless you have super eyesight.
[15:18:33] <ph1l> dunz0r: tzanger: shure, i cant count to 1M wihthin 1s :-). seriously, i'm talking about clockspeed
[15:18:59] <dunz0r> ph1l: I realised that as you can see above :)
[15:19:16] <dunz0r> FemtoOS seems nice... anyone here used it?
[15:22:27] <tzanger> I just use your mom
[15:23:54] <dunz0r> tzanger: My mom won't fit in RAM
[15:24:12] <tzanger> lol
[15:24:26] <tzanger> that's why I had to P_STR access her
[15:37:11] <Tom_itx> i bet you could see the pin flipping on a scope or LA
[15:38:39] <Tom_itx> tzanger this is a channel full of highly skilled avr professionals and enthusiasts. yo mama jokes are not welcome
[15:39:23] <tzanger> that's funny, it's usually the professionals which enjoy a little humour injected into the technical stuff
[15:39:38] <Tom_itx> i just felt like saying that
[15:39:39] <Tom_itx> ;D
[15:39:49] <tzanger> at 1MHz I don't know if you'd come close to either rail on the pin
[15:39:56] <tzanger> mind you I ahven't looked at the datasheet
[15:40:00] <tzanger> maybe the i/o really can do 1MHz
[15:40:08] <Tom_itx> why couldn't it?
[15:40:28] <Tom_itx> 1Mhz is slow by today's standards
[15:45:38] <dunz0r> tzanger: Iirc it only takes one or two operations to flip a pin.
[15:48:17] <Tom_itx> SBI PINB, PB2
[15:48:26] <Tom_itx> rinse and repeat
[15:49:25] <Tom_itx> SBI DDRB, DDB2 ;make PB2 output
[15:49:26] <Tom_itx> loop:
[15:49:26] <Tom_itx> DEC r16
[15:49:26] <Tom_itx> BRNE loop ;inner loop
[15:49:26] <Tom_itx> DEC r17
[15:49:26] <Tom_itx> BRNE loop ;outer loop
[15:49:26] <Tom_itx> SBI PINB, PB2 ;toggle PB2
[15:49:27] <Tom_itx> RJMP loop
[16:01:51] <Tom_itx> want 15% off newark this month?
[16:03:19] <tzanger> I got that email too
[16:03:37] <Tom_itx> i'm sure anybody that's ordered from them did
[16:04:03] <Tom_itx> they're usually too high for me
[16:05:51] <tzanger> I don't often order from there
[16:06:05] <tzanger> digikey and mouser, in that order usually, although I'm finding mouser has MUCH better pricing on some parts
[16:06:12] <tzanger> relays come immediately to mind
[16:10:25] <Tom_itx> i get most of my stuff from mouser
[16:11:19] <MrCurious_> has anyone used a atmega8u2 with the arduino ide via usb? i am trying to get a lead on which boot loader to use
[16:11:46] <Tom_itx> it was on early unos
[16:11:57] <Tom_itx> they went to a mega16u2 later
[16:12:44] <OndraSter_> <tzanger> at 1MHz I don't know if you'd come close to either rail on the pin
[16:12:45] <OndraSter_> I am sure you would
[16:12:58] <OndraSter_> you can shove tens of MHz on SPI..
[16:13:17] <OndraSter_> DDR/SDR interface on xmegas is clocked on 64MHz :)
[16:19:36] <tzanger> actually you're right
[16:19:38] <tzanger> I forgot about that
[16:19:55] <tzanger> I was doing 50MHz SPI for a quad DAC laser pointing system a few years abck and that was ancient hardware
[16:20:13] <r00t|home> quad?
[16:20:18] <tzanger> and yeah, I know you can get hardware to do it easily, I just wasn't sure about what the AVR limits were
[16:20:24] <tzanger> yes, +/- x and y
[16:21:05] <r00t|home> x/y obviously, but +/-?
[16:21:09] <MrCurious_> tom_itx: i have some 16u2's too. do you know the name of the bootloader that i seek?
[16:24:26] <Steffanx> Isn't that bootloader somewhere in lufa?
[16:24:33] <Steffanx> *LUFA
[16:26:55] <OndraSter_> there is burned in bootloader even
[16:26:59] <OndraSter_> into ROM flash
[16:27:13] <OndraSter_> by connecting HWB pin to high/low on start or something you can make it boot into it
[16:28:46] <Steffanx> That bootloader is in flash afaik
[16:29:43] <Steffanx> I mean, in 'normal' flash. Not 'burned in"
[16:29:55] <OndraSter_> it cannot be erased from what I know
[16:30:03] <OndraSter_> it can be forced to overwrite itself into the main flash
[16:30:04] <OndraSter_> I think
[16:30:11] <OndraSter_> (I have never used any of the mega*u* chips)
[16:30:45] <MrCurious_> hmmm. i just have the raw chips from digikey.
[16:31:03] <OndraSter_> they still have BL inside them
[16:34:31] <jadew> are there any diy pdi programmers out there?
[16:37:01] <OndraSter_> U2S
[16:37:05] <OndraSter_> well
[16:37:06] <OndraSter_> define DIY
[16:37:13] <OndraSter_> LUFA has got PDI support
[16:37:13] <OndraSter_> I think
[16:37:24] <jadew> as in I want to get it working in an hour
[16:38:58] <tzanger> r00t|home: either direction from origin
[16:39:04] <MrCurious_> thanks, i will start the reading on the LUFA site
[16:39:08] <tzanger> as in +/-x and +/-y
[16:39:19] <tzanger> DAC=0 = centered at origin
[16:39:34] <tzanger> -DAC=max, +DAC=0 = max negative x deflection
[16:39:43] <tzanger> -DAC=0, +DAC=max = max positive x deflection
[16:43:16] <r00t|home> tzanger: and if both have a non-zero value, they cancel eachother out? or: why two dacs not not just a sign bit
[16:43:43] <tzanger> r00t|home: the actual deflection circuit was four electrostatic actuators
[16:44:16] <tzanger> a HV op amp drove them with the output of the DACs to achieve full deflection
[16:44:26] <tzanger> DACs output 0-3V, opamp gave a 0-180V servo
[16:44:56] <tzanger> there was a lot of software filtering/preprocessing to give accurate positioning
[16:49:39] <r00t|home> still don't see why you wouldn't just multiplex the dac somehow...
[16:49:47] <r00t|home> open-loop?
[16:53:07] <OndraSter_> USB, YOU PIECE OF SHIT
[16:53:14] <OndraSter_> why you do not send single packet when I reset the device by button
[16:53:18] <OndraSter_> but you do when I reset it via PDI?
[17:24:22] <jadew> Tom_itx, are you around?
[17:38:49] <Tom_itx> jadew?
[17:39:06] <jadew> are you from europe?
[17:39:28] <Tom_itx> US
[17:39:44] <jadew> ah, ok
[17:40:31] <jadew> was considering buying a programmer from you, but you'd have to be in europe
[17:43:33] <Tom_itx> why?
[17:43:43] <Steffanx> Romania has issues with the US i guess :P
[17:43:53] <Tom_itx> i think i've shipped there before
[17:44:11] <jadew> no, regular post is too slow and I can't use the address I'm staying at
[17:44:24] <Tom_itx> oh
[17:44:31] <jadew> so I'd have to use my g/f's address and she'd make the whole process even slower
[17:44:36] <Tom_itx> well wait til you get where you're goin
[17:45:01] <Tom_itx> where are you?
[17:45:06] <jadew> romania
[17:45:21] <Tom_itx> lemme see if i have sent any there, i probably have
[17:45:40] <jadew> ah, I'm sure the delivery will be fine
[17:45:54] <jadew> just too slow
[17:46:49] <Tom_itx> Bucharest
[17:46:53] <jadew> yeah
[17:46:56] <Tom_itx> just one it appears
[17:47:06] <Tom_itx> and they didn't reply so i don't know how long it took
[17:47:09] <tzanger> .ro has issues with .us?
[17:47:15] <jadew> nope
[17:47:17] <tzanger> I'm in .ca, married to a .ro woman (who lives in .ca with me)
[17:47:26] <jadew> tzanger, nice
[17:47:26] <Tom_itx> Steffanx is just spouting off again
[17:47:27] <tzanger> I wasn't aware of any issues, and many romanians immigrate there
[17:47:38] <jadew> there are no issues
[17:47:43] <jadew> I'm gonna visit ca soon
[17:47:56] <tzanger> in fact if I remember what she said, the second most popular place to immigrate to is Texas IIRC
[17:48:03] <tzanger> my area is the most popular
[17:48:21] <Steffanx> tzanger, :P
[17:48:24] <jadew> tzanger, which area is that?
[17:48:31] <tzanger> kitchener/waterloo, ontario
[17:48:35] <Tom_itx> i could even ship it to ca for you if you wanted
[17:48:49] <tzanger> Tom_itx: which is your programmer?
[17:49:06] <jadew> Tom_itx, hehe, it's not gonna be that soon, in a few months :)
[17:49:43] <Tom_itx> tzanger, the one i made
[17:49:57] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[17:51:27] <tzanger> oh, it does TPI as well
[17:51:40] <tzanger> ship it to me, I will be "away" when he comes to pick it up. :-)
[17:52:07] <jadew> hehe
[17:52:20] <yunta_> oh, cute
[17:53:07] <Tom_itx> it does all 8bit avrs faik
[17:53:44] <yunta_> how much do you sell it for?
[17:54:28] <Tom_itx> there's a link on the menu
[17:55:13] <tzanger> so that'll program the little tinyavrs which is great, that's what I"m looking for, and it works with avrdude
[17:55:48] <tzanger> and $23 is a decent price for sure
[17:55:59] <yunta_> unbelievably cute, all of them
[17:56:53] <Tom_itx> i've got a board for the t10 etc to do the high voltage programming on them so you can use the reset as io
[17:57:12] <tzanger> so I'm only familiar with jtag -- can I use avarice to drive gdb with real hardware with these other modes (isp/pdi/tpi) ?
[17:57:18] <Tom_itx> tiny 4 5 9 and 10
[17:57:41] <Tom_itx> probably just jtag
[17:57:55] <yunta_> Tom_itx: do you solder them yourself?
[17:58:32] <Tom_itx> yes
[17:58:51] <yunta_> hot air / wave / iron / ?
[17:58:57] <Tom_itx> i did the first couple hundred by hand then made a toaster oven
[17:59:29] <yunta_> ah
[17:59:34] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/toaster_oven/toaster_oven_index.php
[18:00:20] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/reflow/cooking.JPG
[18:00:32] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/reflow/cooling.jpg
[18:01:04] <tzanger> I've got an old toaster oven waiting for similar treatment
[18:01:08] <soul-d> you made this pid controll stuff method or how was it called again so you get the correct temeratures along the line
[18:01:21] <tzanger> no need for PID for heating in most cases
[18:01:45] <yunta_> *so* cool :D
[18:01:59] <tzanger> straight bang-bang or thermostat control is generally sufficient, the heater element just isn't that powerful to need to be controlled continuously
[18:02:19] <Tom_itx> no but it follows a reflow profile
[18:02:38] <yunta_> Tom_itx: but pcbs you just buy, right?
[18:02:45] <Tom_itx> bakes off the moisture then ramps up to cook
[18:02:53] <Tom_itx> i have them done yes
[18:03:58] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/Stencils/stencil_form3.jpg
[18:04:02] <tzanger> Tom_itx: sure, but again pid isn't needed for that
[18:04:05] <Tom_itx> the stencils for the solder paste
[18:04:13] <tzanger> depends on the oven I suppose though
[18:04:22] <tzanger> how fast does your heater element change the temp when it's full-on?
[18:04:31] <Tom_itx> pretty quick
[18:04:44] <Tom_itx> it takes approx 8 min to do a batch
[18:05:00] <Tom_itx> the bake off takes the longest i think
[18:05:08] <Tom_itx> but it needs the time
[18:05:16] <soul-d> yeah they are darn hot touched a bar by mistake with knuckle
[18:05:30] <Tom_itx> 4 element work best
[18:05:37] <Tom_itx> more uniform heat
[18:05:42] <yunta_> where did you get those?
[18:05:49] <Tom_itx> which?
[18:05:53] <Tom_itx> the boards?
[18:05:54] <OndraSter_> <Tom_itx> i did the first couple hundred by hand then made a toaster oven
[18:05:54] <soul-d> got one of those but no relais to controll it
[18:05:56] <OndraSter_> by hand = hotair?
[18:05:58] <yunta_> stencils
[18:06:07] <Tom_itx> OndraSter_, by hand. soldering iron
[18:06:10] <OndraSter_> oh
[18:06:12] <OndraSter_> absolutely by hand
[18:06:32] <Tom_itx> yunta_, http://www.ohararp.com/Stencils.html
[18:06:33] <OndraSter_> oh hey there yunta_ -- so appearantly if I reset the chip via PDI it connects to PC nearly perfectly. When I reset it via button/power on it does not receive single packet
[18:06:40] <Tom_itx> OndraSter_, yeah that's what i said :)
[18:06:41] <OndraSter_> but it works on laptop anytime
[18:07:27] <yunta_> I wonder if I could use 3d printer for stencils....
[18:07:36] <Tom_itx> laser
[18:07:50] <yunta_> OndraSter_: like, pc is not trying to re-enumerate?
[18:08:08] <OndraSter_> yep
[18:08:12] <OndraSter_> but when I reset it via PDI it works just fine
[18:08:25] <yunta_> OndraSter_: is it possible that your reset is quick enough for pc not to notice usb downtime ?
[18:08:33] <Tom_itx> yunta_, i made a hand pick n place using a fishtank air pump and hypo needle
[18:08:43] <OndraSter_> yunta_, it is not, I hold the button for a second or two at least
[18:08:57] <soul-d> if you have 3d pritner why not then just make it a paste dispencer :P
[18:09:01] <yunta_> Tom_itx: is it your main source of income or what ? :D
[18:09:08] <Tom_itx> no
[18:09:41] <Tom_itx> but i do them all myself
[18:09:46] <yunta_> soul-d: I don't, but I'm planning to convince my employer to buy one :D
[18:09:49] <Tom_itx> including milling the boxes for the blue ones
[18:10:35] <Tom_itx> http://www.youtube.com/watch?v=-CEqokrtFI4&feature=youtu.be
[18:10:39] <yunta_> OndraSter_: crazy shit, build a logic analyzer, check what happens on cables and then opensoruce it :P
[18:10:48] <OndraSter_> heh
[18:11:11] <OndraSter_> wasn't there opensource USB analyzer in the works by somebody?
[18:11:20] <Tom_itx> yeah
[18:12:09] <yunta_> using already made one is no fun :D
[18:12:20] <OndraSter_> wow ohararp -- $25 stencil... but $18 shipping to europe :D classic stuff :(
[18:12:28] <Tom_itx> heh
[18:12:32] <yunta_> but I have oscilloscope ui I could share
[18:12:34] <OndraSter_> yunta_, I could simply grab FPGA and use built-in logic analyzer into quartus
[18:12:41] <Tom_itx> OndraSter_, send it to me and i'll send it in an envelope
[18:12:52] <Tom_itx> he does a good job
[18:12:55] <OndraSter_> I have got many friends who can do that :)
[18:13:00] <OndraSter_> or hackvana does stencils too :)
[18:13:07] <Tom_itx> oh
[18:13:52] <OndraSter_> but first = all the boards to be made and tested
[18:14:29] <Tom_itx> i had a couple spares made for the same price
[18:17:26] <Tom_itx> OndraSter_, i like the saleae though
[18:18:20] <OndraSter_> :)
[18:18:21] <OndraSter_> software?
[18:19:02] <Tom_itx> did you look at it?
[18:19:11] <OndraSter_> I had the v1 clone
[18:19:21] <OndraSter_> which ran for... few hours
[18:19:30] <OndraSter_> before dying
[18:19:49] <OndraSter_> does it do USB decode?
[18:19:51] <Steffanx> lol
[18:20:04] <OndraSter_> because capturing USB data without automatic analysis is pretty much useless
[18:20:10] <OndraSter_> it is too complex for a human brain
[18:20:27] <Steffanx> pen and paper ..
[18:20:31] <OndraSter_> I'd rather not.
[18:20:51] <Tom_itx> http://www.seeedstudio.com/depot/open-workbench-logic-sniffer-p-612.html?cPath=174
[18:21:28] <OndraSter_> that it still not the USB analyzer
[18:21:31] <OndraSter_> that I remember seeing
[18:21:41] <Tom_itx> no, those cost quite a bit more
[18:21:49] <Tom_itx> $400 for a cheap one iirc
[18:21:55] <OndraSter_> it was low cost opensource stuff
[18:22:17] <Tom_itx> i missed that one then
[18:22:29] <OndraSter_> I didn't bookmark it or anything :(
[18:22:43] <OndraSter_> it was maybe on kickstarter even
[18:22:57] <yunta_> saleae rulez :D "Tragically, your cart is empty. "
[18:23:14] <OndraSter_> http://www.kickstarter.com/projects/bushing/openvizsla-open-source-usb-protocol-analyzer?ref=live
[18:23:18] <Tom_itx> http://www.kickstarter.com/projects/bushing/openvizsla-open-source-usb-protocol-analyzer
[18:23:30] <Tom_itx> :)
[18:32:15] <jadew> it looks like they raised the money since 2010 and didn't deliver anything yet
[18:32:18] <jadew> where did that money go?
[18:32:28] <OndraSter_> :)
[18:32:33] <Steffanx> They're still working on it jadew
[18:32:35] <OndraSter_> it is like governments!
[18:32:48] <jadew> Steffanx, I bet they do
[18:33:05] <Steffanx> My sources told me the discussion board is pretty active the last few days
[18:33:24] <Steffanx> And the "For backers only" were pretty positive iirc
[18:33:39] <Steffanx> *For backers only-messages
[18:34:00] <OndraSter_> for backers only-massage.
[18:34:00] <jadew> so did they develop the thing or not?
[18:34:15] <Steffanx> They're still working on it
[18:34:23] <jadew> so no
[18:34:38] <Steffanx> There are prototypes :)
[18:34:47] <jadew> for 80k I can make a usb analyzer in less than 3 months
[18:34:54] <jadew> and I'm a freaking electronics noob
[18:35:00] <jadew> (software included)
[18:35:02] <Steffanx> Sure
[18:35:10] <theseb> Does avrdude reload boot loader onto arduino over and over or does boot loader exist in Flash of Arduino when you buy it immediately?
[18:36:03] <OndraSter_> it is in flash in the first place
[18:36:07] <Tom_itx> it stays there
[18:36:12] <Tom_itx> unless you screw up
[18:36:45] <jadew> Steffanx, in case that "sure" was sarcastic :) I'm actually serious
[18:37:04] <Steffanx> It was a "i dont believe you"
[18:37:27] <theseb> OndraSter_: ok..weird ..i swear I thought I read that avrdude copies boot loader to chip somewhere
[18:37:41] <theseb> OndraSter_: thanks
[18:37:44] <OndraSter_> np
[18:37:49] <OndraSter_> hmm I do wonder
[18:37:53] <OndraSter_> how long should be tx buffer on serial?
[18:37:55] <OndraSter_> serial USB..
[18:37:57] <OndraSter_> err
[18:37:58] <OndraSter_> rx buffer
[18:38:00] <jadew> Steffanx, took me a month to come up with a decent LA software for the OLS, it can be done to do USB and if that was the target, it would have been easier in so many ways, since it would be targetted only at one protocol
[18:38:03] <OndraSter_> PC -> device
[18:38:34] <jadew> Steffanx, now the device is stupid simple, it just needs to be fast and have a lot of ram
[18:38:57] <jadew> RLE encode it and you have an USB analyzer
[18:39:07] <jadew> again, 3 months tops for a working product in beta
[18:39:13] <Steffanx> Isn't the pc-OLS connection way too slow to send a 480mbit stream?
[18:39:26] <Steffanx> *capture + send
[18:39:28] <jadew> Steffanx, you don't send it in real time
[18:39:28] <Steffanx> real time
[18:39:32] <Steffanx> Yes you do
[18:39:36] <jadew> that's impossible
[18:39:47] <jadew> you can't send capture USB over USB
[18:39:49] <jadew> in real time
[18:39:54] <Tom_itx> that's what the big buffer is for
[18:39:55] <jadew> *captured
[18:39:58] <Steffanx> but still. Even when you don't do it in real time/ You need some memory
[18:40:04] <Steffanx> and afaik the buffer of the ols is pretty small
[18:40:22] <jadew> Steffanx, yeah that's why OLS wouldn't be suitable
[18:40:31] <jadew> but with a decent buffer it could easily decode USB 2.0
[18:41:02] <Steffanx> Anyway, you would probably quit your daily job. They didn't
[18:41:04] <jadew> at least I think it might...
[18:41:12] <jadew> Steffanx, yeah, that's for sure
[18:41:14] <jadew> but just saying
[18:41:23] <jadew> 80k, 2 years later
[18:41:35] <Steffanx> I don't know the exact history either
[18:43:58] <Steffanx> You can read that in the "Updates" on their ks page
[18:53:48] <jadew> I hope they'll finish it
[18:53:56] <jadew> it would be a cool project
[21:55:11] <enbloc> I'm trying to pare down my program to fit (arduino/cmake). looking for a binutils primer on finding bloat.