#avr | Logs for 2013-04-17

Back
[05:04:06] <langoliers> is it a common practice to turn on weak pull-up for adc inputs?
[05:38:01] <twnqx> ugh
[05:38:12] <twnqx> i'd rather say it will get you wrong results
[05:42:09] <langoliers> oh, i was thinking about it will prevent the input from floating
[05:42:20] <RikusW> http://imgur.com/gallery/ALnxha6
[05:42:21] <RikusW> heh
[05:42:39] <langoliers> one could add a resistor to gnd also. but that requires a resistor
[05:43:29] <twnqx> also
[05:43:45] <twnqx> keep in mind that vref is not necessarily vcc
[05:43:56] <twnqx> e.g. internal reference would make it 2.56V
[05:44:25] <twnqx> internal pullup would be to 3v3 or even 5v or whatever vcc is
[05:44:41] <twnqx> if you're afraid of floating diable the digital logic on the pin
[05:44:46] <twnqx> disable*
[05:48:34] <langoliers> too bad there is no solution for everything
[05:49:08] <langoliers> if i use 0-5V system, then 3.3V (or 1.8V) supplied microcontroller will fail to comply
[05:49:50] <langoliers> and it is not cool to have a trimmer at adc inputs
[05:50:17] <langoliers> a PGA input would solve this partially
[05:51:38] <twnqx> i use a voltage divider on my 5V system with the 2.56V reference :P
[05:53:55] <langoliers> and how about 1.8V systems?
[05:54:06] <langoliers> 1.25V reference ?
[05:58:07] <langoliers> RikusW<= chinese or italians eaten it! for reference: http://www.billdamon.com/wp-content/uploads/2013/03/Horsehead.png
[05:58:45] <RikusW> langoliers: the horse is standing behind him
[05:58:50] <RikusW> look carefully
[05:58:54] <RikusW> under his arm
[05:59:09] <langoliers> i can't now maybe weekend
[06:00:01] <RikusW> jacket + horse is black
[06:00:12] <RikusW> so the piece of horse showing is nearly invisible
[06:00:39] <RikusW> only the ribs are visible
[06:02:41] <langoliers> fuck chrome, killing it right now, i can't work if my work computer has seconds of lag when i zoom or scroll
[06:04:49] <RikusW> ugh
[06:05:08] <RikusW> even my XP 3200+ seems better :)
[06:05:23] <RikusW> (old pc with 512MB ddr1)
[06:09:39] <langoliers> this pc has 1GB ram and linux
[06:09:47] <langoliers> and chrome likes to eat 10-100MB/blank tab
[06:10:01] <langoliers> and run some worms in bg
[06:29:45] <langoliers> for usb lovers: High speed data is clocked at 480.00Mb/s with a data signalling tolerance of ± 500ppm.
[06:30:05] <langoliers> thanks
[06:34:32] <vsync_> thanks
[07:03:35] <megal0maniac> RikusW: Got another nano :P
[07:04:06] <megal0maniac> Going to try and avoid sending it to you through the post office :/
[07:06:37] <RikusW> Ahmm
[07:06:53] <RikusW> PO likes to lose stuff
[07:07:06] <RikusW> and leave this one's DWEN fuse alone ;)
[07:07:25] <megal0maniac> :D
[07:07:30] <megal0maniac> This is how we learn
[07:07:43] <RikusW> http://imgur.com/gallery/ALnxha6
[07:08:02] <Steffanx> déjà vu
[07:08:34] <RikusW> Steffanx: reminds you of a movie ?
[07:08:51] <Steffanx> No something posted here before
[07:09:01] <Steffanx> Weird uh?
[07:09:19] <RikusW> yep
[07:09:23] * megal0maniac solders on ICSP headers
[07:09:26] <RikusW> look under the guy's arm
[07:09:40] <RikusW> the horse is standing behind him
[07:09:51] <Steffanx> photoshop
[07:09:52] <Steffanx> :P
[07:10:00] <RikusW> no photoshop
[07:10:11] <RikusW> look carefully
[07:10:27] <RikusW> right under the elbow
[07:10:35] <megal0maniac> I see it
[07:10:37] <Steffanx> yeye, it's there, but still :P
[07:10:53] <megal0maniac> 2nd comment is what you want to think
[07:12:18] <RikusW> or http://www.billdamon.com/wp-content/uploads/2013/03/Horsehead.png
[07:12:58] <RikusW> Steffanx: seems mr stumbleupon is getting forgetful, pasting the same link twice :-P
[07:13:09] <Steffanx> Yeah. And in #avr .. :S
[07:13:22] <RikusW> lol
[07:13:36] <RikusW> thought it was another channel...
[07:32:42] <megal0maniac> Yay! It works
[07:42:45] <megal0maniac> Thank you China
[08:13:09] <RikusW> what the nano ?
[08:15:08] <megal0maniac> Yip
[08:15:37] * RikusW is on the way out
[08:58:47] <jadew> what's a nano?
[08:59:38] <theBear> it's a thousandth of a micro
[08:59:50] <jadew> nono chip? nano robots? are they in your blodstream megal0maniac_afk???
[09:00:35] <jadew> theBear, oh, that sounds about right, so he got a thousandth of a micro from china? I bet he ordered a full milli
[09:01:32] <Tom_itx> it's half of a nano nano
[09:01:36] <Tom_itx> ask Mork about that
[09:01:47] <jadew> I think it's a fake nano
[09:05:10] <seldon> I suspect he was talking about an arduino nano.
[09:05:34] <jadew> what chip does that have?
[09:05:51] <seldon> atmega328, I think.
[09:06:14] <jadew> cool
[09:07:05] <jadew> thought it's some chip from the tiny series
[09:07:34] <jadew> like tiny4, but I guess main() {} wouldn't fit
[09:08:04] <jadew> or if it did, it would generate a stack overflow
[09:08:07] <seldon> Only enough room for main;
[09:08:54] <seldon> Seriously though, I don't think there are attiny arduinos.
[09:10:24] <jadew> I don't really know how the library works, but they could be
[09:10:31] <jadew> 1 function chips
[09:10:35] * twnqx wonders why he's losing CAN frames if sent at 500kbps wire speed
[09:10:36] <jadew> main()
[09:11:00] <seldon> Can't stackoverflow on attiny11/12, so better use that.
[09:20:48] <megal0maniac> jadew: Arduino nano... (technically just a nicely laid out 328P breakout with FTDI-based USB)
[09:21:54] <jadew> any reason why you didn't make your own?
[09:22:53] <megal0maniac> It's for another project I was busy with. It's designed to take an Arduino nano as-is. It would cost me more to etch the board than to buy the finished product, shipped
[09:23:31] <jadew> how much was it?
[09:24:18] <megal0maniac> $11
[09:24:28] <megal0maniac> Or thereabouts
[09:25:39] <megal0maniac> If you look at the price of the FTDI and the 328P alone, you're already approaching that
[09:26:13] <jadew> yeah, it's not bad
[09:41:37] <twnqx> has any of you ever used those hc-05 (or similar) bluetooth serial modules?
[09:55:08] <tzanger> I've used a number of bluetooth serial modules
[09:55:12] <tzanger> not specificall HC-05
[09:55:15] <tzanger> er specifically
[10:03:56] <twnqx> oh boy
[10:04:15] <twnqx> now the original english-written-by-chinese hc-05 datasheet isn't.. easy to grasp
[10:04:30] <twnqx> but this german ebay seller seems to have used google translate on top of it
[10:08:17] <Malinuss> twnqx, why in the world would you buy from a german seller? Just buy parts from the chinese :)
[10:08:35] <twnqx> they don't have it on ebay atm :P
[10:08:43] <twnqx> but yeah, i bought it from the chinese
[10:08:47] <twnqx> or well, ordered.
[10:19:35] <tzanger> they're all pretty much the same. they implement fixed PIN (0000) and SPP (serial port profile) only
[10:19:55] <tzanger> look at bluegiga or a7eng or anything on adafruit and see if it responds to those commands
[10:29:00] <tzanger> found something else
[10:29:11] <tzanger> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=117121&start=0
[10:29:40] <tzanger> apparently dragon drops VCC for about 25ms before applying 12V to reset, and if the design has enough capacitance across the rails the avr won't "die"
[10:29:53] <tzanger> I'm collecting all of these little nuggets: https://www.mixdown.ca/redmine/projects/mixdown/wiki/AVR_Dragon
[10:51:11] <theBear> and i always just thought dragons were overpriced, now i see they're a whole lot more trouble than just the price :)
[10:53:45] <RikusW> zlog
[10:57:21] <RikusW> twnqx: having trouble reading chinglish ?
[10:58:11] <twnqx> nah, it's ok
[10:58:20] <twnqx> but chinglish machine translated to german...
[10:59:09] <RikusW> tzanger: you're not supposed to use HVPP in circuit
[10:59:33] <RikusW> though I did once and got away with it, but I did check every single line on the circuit first
[11:19:41] <RikusW> tzanger: iirc you need to connect vcc on 2x3 header to vtg on ISP when using HVPP/HVSP on the dragon
[11:34:31] <geoforce> ?? If I push some stuff to stack, then call a sub can I just pop off the return addresses to 2 registers then get my stuff off and push the ret address back and get back where I was?
[11:35:50] <RikusW> should work
[11:36:19] <RikusW> or load SP into X Y or Z and use that to load your data
[11:36:56] <RikusW> or just pass it in the registers in the first place
[11:36:58] <geoforce> seems that would give me more versatility than relative jump since I could use the sub from several places
[11:37:42] <RikusW> in r30,SPL in r31,SPH
[11:37:53] <RikusW> ld r16,Z+2
[11:38:11] <RikusW> or adiw r30,2 ld r16,Z+
[11:38:20] <geoforce> if I load SP into Z I can call out my pushed stuff but then I think I'd have to adjust Z to get back my Ret address
[11:39:28] <RikusW> what for ?
[11:39:35] <RikusW> Z got nothing to do with returning
[11:39:41] <RikusW> its just a pointer register
[11:39:49] <geoforce> and I want to get all the crap off the stack to avoid inflating it
[11:41:03] <RikusW> thats the problem of the code that pushed it before the call
[11:41:21] <RikusW> I'd just use registers to pass the parameters
[11:41:49] <geoforce> Only prob is I have to pass 18 bytes
[11:41:56] <RikusW> ah
[11:42:13] <RikusW> pass it in Z as a pointer ?
[11:43:47] <geoforce> Seems I could set up a dummy set of bytes in Program area then point to that in X, Y, or Z to store them, but I haven't tried that approach
[11:45:54] <RikusW> if its in flash you'll need to use LPM
[11:47:12] <geoforce> Yeah, I'll look at a bunch of options
[11:47:15] <geoforce> Thanks
[12:02:13] <tzanger> RikusW: HVSP can be used in circuit if you take precautions
[12:02:38] <tzanger> RikusW: I know about the VTG line, still isn't working, gonna try getting rid of the bypass cap next
[12:05:51] <RikusW> with precautions yes
[12:05:59] <RikusW> but its not recommended
[12:06:16] <RikusW> I did HVPP in circuit....
[12:06:32] <RikusW> to rescue a bricked m128
[12:06:36] <RikusW> tqfp...
[12:06:45] <tzanger> the precautions are pretty easy. "MCU must be powered from dragon", "RESET# pin net MUST withstand 12V without problem/consequence"... and that's about it
[12:07:15] <tzanger> the one I didn't know about and don't know if it's the solution yet is that VCC net must be able to be quickly switched on/off
[12:07:24] <RikusW> and the other circuitry shouldn't interfere...
[12:07:44] <tzanger> right, that's the problem/consequence I mentioned
[12:08:31] <tzanger> ok
[12:08:32] <tzanger> http://www.edn.com/design/analog/4411932/Two-ICs-form-F-V-converter
[12:08:33] <tzanger> that is neat
[12:08:57] <tzanger> using the current draw of an inverter to create an F/V converter
[12:16:03] <twnqx> "quickly sut down vcc net" lol
[12:16:23] <twnqx> i actually had problems powering down my system when it was intended once
[12:16:36] <twnqx> too much capicitance :P
[12:17:28] <tzanger> twnqx: do I have a typo?
[12:17:37] <twnqx> no, i do
[12:17:52] <twnqx> capacitance would be right
[12:18:24] <twnqx> but my designs usually do not shut down with 25ms power off :P
[12:18:58] <twnqx> i once got into a loop where one would shut down its own voltage regulator
[12:19:23] <twnqx> then brownout reset kicked in, which reduced power draw so much the chip successfully reinitialized and turned the power back on
[12:19:28] <twnqx> >_>
[12:20:13] <tzanger> haha
[12:20:18] <tzanger> I've seen that only once before
[13:29:35] <TechIsCool> Anyone have an idea how a ftdi chip could cause my avr to run slow?
[13:30:37] <OndraSter_> sending garbage over serial with UART RX interrupts turned on?
[13:30:50] <TechIsCool> OndraSter_: yes interupts are turned on
[13:31:57] <TechIsCool> I guess I could check it with a scope and see. I connected my external usb to serial to the tx line and it works fine but when I enable the ftdi it hangs basically. The weird part is I should see the isr/signal in the debug from my dragon if I am stepping through I thought
[13:34:34] <Aleks> anyone know why might avr-gcc 4.8.0 and/or avr-libc 1.8.0 break arduino's Serial()-stuff ?
[13:35:37] <langoliers> hmm, there is new avr-gcc ?
[13:36:09] <langoliers> that could save a few bytes
[13:36:53] <RikusW> ahttp://edn-mail.com/portal/wts/cgmciv2dAy4qeewEvairnge6-PBc3Va
[13:37:08] <RikusW> 10 steps to selecting a microcontroller
[14:33:13] <twnqx> step 8 is overrated
[14:33:21] <twnqx> for 100€ i can just build my own devel kit :P
[14:33:49] <twnqx> and step 9 is what breaks me all the time :(
[14:37:08] <Tom_itx> step 10. Go to step 1
[14:37:39] <RikusW> PSoC http://www.youtube.com/watch?feature=player_embedded&v=mgDoOytbhi8
[14:51:59] <powderhound> Any thoughts on why an xmega32a4u would suddenly stop in the middle of my initialization routine (printing "Starting..." to USARTD1)? It worked before with same code, leading me to think its a board issue
[20:24:37] <TechIsCool> OndraSter_: So my bug was a windows 8 bug fail. I hate that some times
[20:30:48] <R0b0t1> Isn't it so satisfying when you prove something BESIDES yourself wrong, though?
[20:44:45] <TechIsCool> R0b0t1: Every day It seems to still be having an issue but it seems less like a bug now and more like a code issue
[21:30:50] <tzanger> there we go
[21:30:55] <tzanger> the cap was the issue
[21:31:44] <tzanger> avrdragon hvsp working with the tiny13 now. it fails at closing saying bad response to GO command: RSP_ILLEGAL_EMULATOR_MODE but that's after it's already done whatever you've asked it to do
[21:32:08] <tzanger> so now I have to add a mosfet ot the design to "detach" the cap from the micro when the power isn't coming from the cap