#avr | Logs for 2015-12-28

Back
[01:11:38] <dgriffi> anyone here who groks libusb and v-usb?
[04:01:53] <dgriffi> are there any users of v-usb in channel?
[04:04:00] <Casper> the internet is slow due to the holliday... but there is some that come here normally...
[04:04:55] <theBear> i say umm, dammit, foreign-guy-name, the original and best
[04:05:00] <theBear> IGOR !
[04:05:09] <theBear> ceskywhatsit
[04:05:20] <theBear> man who changed the effing game forever
[05:50:11] <Lambda_Aurigae> MarkX, which chip do you have exactly? the whole chip part number.
[05:51:20] <Lambda_Aurigae> you only gave atmega32u4 earlier...there are more characters.
[05:53:01] <Lambda_Aurigae> dgriffi, I suggest you ask your question rather than asking who might can help.
[05:54:17] <MarkX> Lambda_Aurigae: ATMEGA32U4-AU
[05:54:24] <MarkX> https://www.digikey.ca/product-detail/en/ATMEGA32U4-AU/ATMEGA32U4-AU-ND/1914602
[05:54:27] <MarkX> this one exactly
[05:55:08] <MarkX> maybe i should start from the beginning. what is a good way to see if the chip is even on/powered?
[05:56:24] <Lambda_Aurigae> I would hook a programmer to it and read the fuses myself.
[05:58:52] <MarkX> so mosi/miso/sck -> arduino uno shoudl suffice?
[05:59:02] <Lambda_Aurigae> no clue.
[05:59:19] <Lambda_Aurigae> if your ardweeny is setup with the proper software to play ISP, I suppose.
[05:59:35] <Lambda_Aurigae> you also need the reset line included in the hookup
[05:59:41] <MarkX> ah okay
[06:00:13] <MarkX> in my infinite wisdom, i didn't create any kind of pin out for some of the required pins hahaha
[06:12:43] <Lambda_Aurigae> if you put your meter on VCC and pin 33, what do you read?
[06:13:11] <Jartza> ouch
[06:13:18] <Lambda_Aurigae> what ouch?
[06:13:20] <Jartza> can I drive oscillator through some kind of transistor? :)
[06:13:25] <MarkX> howdy Jartza ;)
[06:13:27] <Lambda_Aurigae> ummm
[06:13:31] <Jartza> seems my oscillator is 3.3V :(
[06:13:32] <Lambda_Aurigae> more info needed.
[06:13:35] <Lambda_Aurigae> oh..
[06:13:38] <Lambda_Aurigae> and your chip is 5V?
[06:13:40] <Jartza> and I need to run chip at 5V
[06:13:56] <Lambda_Aurigae> should be fine so long as you power the oscillator at 3.3V
[06:13:59] <Jartza> I was wondering why I get unstable clock
[06:14:11] <Lambda_Aurigae> it should still swing wide enough to drive the input.
[06:14:22] <Jartza> doesn't seem to :(
[06:14:35] <Jartza> or maybe I broke the osc
[06:14:41] <Lambda_Aurigae> possibly.
[06:14:50] <Jartza> feeding 5v to it
[06:15:00] <Lambda_Aurigae> 3.3V can feed 5V input but 5V will overdrive 3.3V input.
[06:15:32] <Lambda_Aurigae> we are looking at 6 to 10 inches of snow today!
[06:15:33] <Lambda_Aurigae> woohoo!
[06:16:22] <MarkX> Lambda_Aurigae: i can show you the schematic
[06:16:36] <Lambda_Aurigae> I saw the schematic.
[06:16:41] <Lambda_Aurigae> I don't care what it says.
[06:16:45] <MarkX> oh okay
[06:16:46] <MarkX> sec
[06:16:49] <Lambda_Aurigae> I want to test the actual circuit.
[06:16:54] <MarkX> gotcha
[06:17:01] <MarkX> doing it now sec
[06:17:35] <Lambda_Aurigae> if possible, measure right at the chip...pins 34 and 33
[06:17:58] <MarkX> k sec
[06:19:17] <Jartza> hmmh
[06:19:18] <Jartza> well
[06:19:40] <Jartza> oscillator says 8.000MHz Pk-Pk 3.2V Mean 1.88V
[06:19:46] <Jartza> so the oscillator looks fine
[06:21:06] <Lambda_Aurigae> hmmm...1.88V might be low to drive the AVR input.
[06:22:07] <MarkX> Lambda_Aurigae: 5v
[06:22:25] <Lambda_Aurigae> ok, so, power is there and HWB pin is pulled low.
[06:22:42] <MarkX> is it pulled low though?
[06:22:46] <MarkX> shouldn't low be 0v?
[06:22:54] <Lambda_Aurigae> it better be if you measured from VCC to that pin.
[06:23:01] <MarkX> yes i did
[06:23:05] <MarkX> used pin14 instead
[06:23:13] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxYjkwVGZ4UElPX3M/view
[06:23:19] <MarkX> but pin14 to 33 is 5v
[06:23:24] <Jartza> Lambda_Aurigae: ahh, 1.88V was "average"
[06:23:27] <Lambda_Aurigae> then you are measuring from VCC(5V) to a pin pulled to GND(0V)
[06:23:32] <Jartza> min 240mV, max 3.44V
[06:23:37] <MarkX> ahhh i see
[06:23:41] <MarkX> gotcha :)
[06:23:50] <Lambda_Aurigae> negative logic.
[06:23:55] <Lambda_Aurigae> I work with it on a daily basis.
[06:24:55] <Lambda_Aurigae> Jartza, you might have trouble driving an AVR input with that.
[06:25:10] <Lambda_Aurigae> it needs to be shifted up to positive voltage only.
[06:25:24] <Lambda_Aurigae> and squared.
[06:25:52] <Jartza> that is positive voltage only
[06:25:57] <Jartza> 13:59 < Jartza> min 240mV, max 3.44V
[06:26:00] <Lambda_Aurigae> oh.
[06:26:03] <Lambda_Aurigae> ok.
[06:26:16] <Lambda_Aurigae> still needs to be squared I would think.
[06:27:19] <Lambda_Aurigae> MarkX, at this point, a programmer is needed to check the chip.
[06:27:32] <MarkX> Lambda_Aurigae: okay cool
[06:27:39] <MarkX> that will take some work
[06:27:44] <MarkX> but i'll figure it out
[06:27:53] <MarkX> need to do some soldering
[06:27:55] <Jartza> Lambda_Aurigae: that's how most of the oscillator outputs looks like
[06:28:09] <Lambda_Aurigae> Jartza, odd.
[06:28:54] <Lambda_Aurigae> MarkX, one shouldn't work with microcontrollers without programming hardware...it's one of the reasons I consider ardweeny so evil....you end up just assuming too much and not knowing how to actually work with the hardware.
[06:29:46] <Jartza> I'm thinking if the clock input doesn't quite work the same way as gpio
[06:30:01] <Jartza> maybe it needs to go higher
[06:30:37] <Jartza> the clock works nicely if I power the mcu with 3.3V
[06:32:35] <Lambda_Aurigae> odd.
[06:32:46] <Lambda_Aurigae> you could, in theory, drive a transistor with it.
[06:32:56] <Lambda_Aurigae> need something that can switch at that frequency though.
[06:35:04] <Jartza> yea
[06:35:47] <Lambda_Aurigae> http://feedproxy.google.com/~r/Toonhole/~3/l9XiN8mHNeY/
[06:36:18] <Jartza> doesn't basic 2n3904 and 2n3906 have transition frequency about 300MHz?
[06:37:52] <Lambda_Aurigae> it seems so.
[06:38:04] <Lambda_Aurigae> or, at least, so says the datasheet from fairchild.
[06:41:44] <Jartza> yea
[06:41:57] <Jartza> should be fine for 8MHz
[06:45:28] <Jartza> ouch... no no no
[06:45:36] <Jartza> there's now something totally strange in this system
[06:45:49] <Lambda_Aurigae> there's a Jartza in the system?
[06:46:02] <Jartza> found 5V oscillator.... it outputs 3.3V too, even though when VCC is 5V
[06:46:09] <Jartza> wtf
[06:46:17] <Jartza> or at least this claims to be 5V oscillator
[06:47:53] <Jartza> ohh
[06:49:18] <Jartza> stupid usb hub
[06:49:30] <Jartza> that used to be powered
[06:49:39] <Lambda_Aurigae> oops?
[06:49:56] <Jartza> but the wall wart of it started to make high-pitch squeaking and I removed it
[06:50:05] <Jartza> except it was still connected to hub
[06:50:18] <Lambda_Aurigae> ok..time to make lunch and head for worky.
[06:50:18] <Jartza> and it seems it sucked so much power that my usb hub only outputted 3.7V
[06:50:44] <Jartza> removed that power totally and now I get 272mV <-> 4.62V swing from oscillator
[07:27:05] <MarkX> Lambda_Aurigae: http://pastebin.com/X4vs61tG
[07:28:31] <MarkX> wait
[07:28:34] <MarkX> nvm that is stupid
[07:29:04] <MarkX> i unplugged my board entirely and i still get that output >_>
[07:40:33] <Jartza> you're trying to program your arduino with avrdude?
[07:42:37] * Yoduza think about construction fpga super-fast register for arduino via spi
[07:42:54] <Jartza> -> MarkX
[07:43:40] <MarkX> Jartza: no, trying to see why my AVR won't get detected over usb. using arduino as the programmer
[07:46:13] <Jartza> MarkX: well... according to you command-line, you're trying to program your arduino :)
[07:46:26] <Jartza> MarkX: first, you need to program your arduino with "Arduino ISP" sketch
[07:46:36] <MarkX> yep i did that already
[07:46:42] <Jartza> mmkay
[07:46:48] <Jartza> then the programmer should be "avrisp" and not "arduino"
[07:47:15] <MarkX> ooohhh
[07:47:18] <MarkX> okay let me try
[07:47:32] <Jartza> avrdude -c avrisp -p m32u4 -P COM4 -b 19200
[07:47:35] <Jartza> or something like that
[07:48:14] <MarkX> k sec
[07:48:32] <Yoduza> what is it mean "-p m32u4" ?
[07:48:57] <Yoduza> is "-c avrisp" == "USBASP" ?
[07:48:58] <Jartza> -p is "part number", meaning the MCU
[07:49:06] <Jartza> m32u4 is atmega32u4
[07:49:18] <MarkX> ^^
[07:49:21] <Jartza> no. avrisp is not usbasp. usbasp and avrisp are different programmers.
[07:49:29] <Yoduza> damn
[07:49:31] <Jartza> if you have usbasp, then you say -c usbasp
[07:49:38] <Jartza> if you have avrisp, you say -c avrisp :)
[07:49:44] <Yoduza> ahh, ok, thank you Jartza !
[07:49:48] <Jartza> and if you have avr isp mk2 you say -c avrispmkii
[07:49:51] <Jartza> etc.
[07:50:08] <Yoduza> hmm, nice tool avrdude :)
[07:50:26] <Jartza> there are like 20 different programmers out there, though avrispmk2 and usbasp are the most often used, I think
[07:50:42] <Jartza> because there are chinese usbasp boards costing like "nothing" ($3 or something)
[07:50:54] <Yoduza> usbasp $1.2 on aliexpress with FREE delivery
[07:51:00] <Jartza> yep
[07:51:05] <Jartza> though they usually have crappy firmware in them
[07:51:14] <Jartza> but they work well if you have some way of updating the firmware :D
[07:51:16] <Yoduza> :O
[07:51:18] <Jartza> that's why I bought 2
[07:51:31] <Yoduza> fuck !
[07:51:48] <Jartza> I just connected them together, used them to update firmware of the other
[07:52:17] <Jartza> I couldn't get the original firmware to work with anything else than some stupid windows software
[07:52:32] <Jartza> so I used virtual windows to first flash the other usbasp clone with "real usbasp" firmware
[07:52:34] <Yoduza> i buy 1 usbasp, waiting delivery. Also I have ArduinoNano v3.0 and MapleMini (Cortex-m3)
[07:52:39] <Jartza> then that worked with avrdude and I could update second
[07:52:52] <Jartza> Yoduza: you can use arduino as programmer to update your usbasp :D
[07:53:02] <Yoduza> via spi ?
[07:53:11] <Jartza> "arduino isp" sketch
[07:53:24] <Yoduza> i know about sketch. Via SPI ?
[07:53:27] <Jartza> then avrdude -c avrisp -p m88 ....
[07:53:32] <Jartza> via ISP
[07:53:36] <Yoduza> hmm
[07:53:55] <Yoduza> I have 3x ArduinoNano v3.0 :D
[07:53:59] <Jartza> arduino isp makes your arduino effectively "avr isp" programmer
[07:54:09] <Jartza> albeit a bit slow one
[07:54:20] <Yoduza> yeah
[07:54:25] <Jartza> but anyhow that can be used for updating the firmware of usbasp
[07:54:40] <Yoduza> good news today :)
[07:54:41] <Jartza> with real firmware those chinese $1.2 clones work just fine
[07:54:43] <Yoduza> thanks
[07:55:22] <Yoduza> also I did buy Cyclone IV - 6k there is $5.28 FREE delivery :)
[07:55:31] <Jartza> heh, you know, I went the hard way when I started with avr
[07:55:50] <Jartza> I had this embedded linux board with some free gpio-pins
[07:55:58] <Jartza> and atmega... something, can't remember
[07:56:08] <Jartza> so I built avr programmer out of that atmega
[07:56:09] <Yoduza> i want to make superfast register Cyclone IV-6k based for my arduino boards :)
[07:56:27] <Jartza> and flashed the programmer-firmware via gpio pins and python script that "manually" does ISP
[07:56:45] <Yoduza> "manually" does ISP :O
[07:57:09] <Jartza> it's a bit like chicken-egg-problem.. you have MCU which you need to program with programmer but your programmer contains the same MCU so you need to first program the MCU to be able to use the programmer.... Yo Dawg!
[07:57:28] <Jartza> Yoduza: well, bit-banging the ISP with gpio
[07:59:11] <Xark> Yoduza: Have you seen https://www.tindie.com/products/Earth_People_Technology/dueprologic-fpga-development-system/
[08:00:26] <MarkX> crap
[08:00:33] <MarkX> do they have to share grounds and power?
[08:04:31] <Jartza> they?
[08:04:51] <MarkX> the arduino and the avr
[08:05:06] <Jartza> at least the ground, yes.
[08:05:19] <Jartza> what arduino you have?
[08:05:31] <Jartza> I mean, does it have 5v or 3.3v gpio?
[08:05:39] <MarkX> uno
[08:05:39] <Jartza> that's also good thing to remember between boards
[08:05:40] <MarkX> has both
[08:05:48] <Jartza> uno has 5v gpio
[08:05:58] <MarkX> oh gpio
[08:06:01] <MarkX> my bad, misread
[08:06:19] <Jartza> yes. and since the isp works via gpio, then your ISP will program with 5v
[08:06:27] <Jartza> so you should power your atmega with 5v
[08:06:38] <Jartza> otherwise the isp will overload the pins
[08:07:01] <Jartza> and ground of course needs to be shared, as ground is the referene for voltage
[08:07:44] <MarkX> k
[08:07:45] <Jartza> your voltage is only 5v when it's 5v "above the ground", but in reality the ground can also be for example +7v above some else signal.
[08:09:22] <MarkX> heh
[08:09:25] <MarkX> this probably wont work
[08:09:31] <MarkX> cause i have 22awg wire jammed into vias
[08:09:43] <MarkX> then going to the headers on the arduino
[08:13:00] <Yoduza> is www.tindie.com support free shipping ?
[08:13:18] <Yoduza> nice board, damn !
[08:21:54] <MarkX> Jartza: http://pastebin.com/3c90JECn
[08:22:00] <MarkX> got some data, dont know how reliable it is though
[08:24:37] <Jartza> hmm
[08:25:44] <MarkX> ya i'd disregard that
[08:25:53] <MarkX> i dont know how i got it considering i had reset connected to the wrong pin
[08:26:27] <Xark> Yoduza: Yeah, I like it. Interesting how it can go in a breadboard. :) Made to go with Due.
[08:26:46] <MarkX> oh no wait, it was in the right pin
[08:27:14] <Xark> Yoduza: It can take a shield and/or a Due (or other 3.3v Arduino). :)
[08:27:44] <Yoduza> $12.65 for each Due on aliexpress
[08:27:54] <Yoduza> need to buy the one :)
[09:45:19] <Jartza> lol
[09:45:22] <Jartza> this attiny5 is fun
[09:45:28] <Jartza> tried simple led blinker with C
[09:45:39] <Jartza> 21% of flash use
[09:45:44] <Jartza> :D
[09:47:21] <theBear> lol
[10:30:21] <Jartza> wtf is this c-compiler doing
[10:30:22] <Jartza> 60: 00 c0 rjmp .+0 ; 0x62 <__stack+0x3>
[10:30:22] <Jartza> 62: 00 00 nop
[10:37:18] <cehteh> what is the C code for that?
[10:47:48] <Jartza> I'm trying to figure out :D
[10:48:05] <Jartza> oh.
[10:48:11] <cehteh> for (;;)
[10:48:12] <Jartza> it's part of the _delay_ms(500)
[10:48:22] <cehteh> ah inline asm then?
[10:48:38] <Jartza> http://pastie.org/10657398
[10:48:49] <cehteh> hehe i checked my code and didnt found any nop
[10:48:55] <cehteh> no wonder :D
[10:49:17] <Jartza> I understand everything except that rjmp .+0 and nop
[10:49:18] <Jartza> :D
[10:49:21] <Jartza> why they need that
[10:49:35] <cehteh> you are the asm god here :D
[10:50:34] <Jartza> well, the rjmp just jumps to the nop-instruction
[10:50:36] <Jartza> which does nothing
[10:50:59] <Jartza> for 3 clock cycles :)
[10:51:19] <cehteh> not just behind the nop?
[10:51:37] <Jartza> no
[10:51:43] <cehteh> ah .. i have a glimpse what thats for
[10:51:48] <Jartza> rjmp .-2 would make an infinite loop
[10:52:00] <Jartza> because "." points to "next instruction" basically
[10:52:13] <Jartza> .-2 would then be "next instruction -2 bytes"
[10:52:30] <Jartza> rjmp .-2 would jump into itself then
[10:52:37] <Jartza> rjmp .+0 jumps to next instruction
[10:52:44] <Jartza> so it just wastes 2 clock cycles
[10:52:48] <tpw_rules> it probably encodes as 0 in the instruction stream too
[10:52:48] <Jartza> and nop wastes one
[10:52:51] <cehteh> they timed all the 'setup' instructions down to the cycle at the start, doing some loops to burn up time, but it didnt even out and they need to waste 4 more cycles
[10:53:07] <tpw_rules> because it adds the delta to the PC once the instruction is read
[10:53:59] <Jartza> cehteh: that delay is essentially a busy loop, but I just don't understand adding that 3 clock delay to the end of it
[10:54:01] <cehteh> what does delay(0) encode to?
[10:54:17] <cehteh> is delay written in asm?
[10:54:39] <Jartza> _delay_ms() is
[10:54:44] <Jartza> just like _delay_us()
[10:55:05] <cehteh> check delay(0) delay(1) delay(2) ... they certainly want to account for the setup cost of the loop too
[10:56:09] <Jartza> _delay_ms(0) is optimized out
[10:56:27] <cehteh> and delay(1) becomes something very different
[10:56:38] <cehteh> no loop at all
[10:57:00] <Jartza> and _delay_ms(1) becomes http://pastie.org/10657416
[10:57:23] <Jartza> which is again, two loops
[10:57:26] <Jartza> plus 3 clock cycles
[10:57:26] <Jartza> wtf
[10:57:40] <cehteh> do you see the pattern?
[10:59:32] <cehteh> time {delay(1); delay(1); delay(1)} should equal delay(3)
[10:59:55] <cehteh> so you need to account for the setup cost and add some biasing to get the timing correct,
[11:00:11] <cehteh> at least that would be my suspiction
[11:00:20] <Jartza> it doesn't equal
[11:00:35] <Jartza> that rjmp + nop (3 cycles) is added to all _delay_ms()
[11:00:43] <Jartza> doesn't matter how many ms you want to sleep
[11:00:47] <cehteh> yes
[11:01:21] <cehteh> did you count the cycles it takes?
[11:01:28] <cehteh> each variant?
[11:07:00] <Jartza> no I didn't, but each variant just changes the loop count
[11:07:11] <Jartza> in millisecond delay there's not much use putting 3 clock cycles
[11:08:04] <Jartza> 0,000375 milliseconds
[11:09:00] <Jartza> that doesn't even out anything
[11:09:26] <cehteh> mhm ok
[11:10:10] <cehteh> maybe a forgotten breakpoint for debugging?
[11:10:15] <cehteh> whatever
[11:10:20] <cehteh> NSA backdoor :D
[11:20:18] <Jartza> shouldn't be debug
[11:20:22] <Jartza> don't know what it is :)
[11:22:20] <Jartza> doesn't make sense to me
[11:22:38] <cehteh> remove it and check if it still works
[11:22:49] <cehteh> when its broken then you have your daily dose of atf
[11:22:51] <cehteh> wtf
[11:23:57] <Mr_Sheesh> Oh, ATF backdoors too now? Oh joy :P
[11:38:43] <Jartza> well
[11:38:44] <Jartza> http://pastie.org/10657480
[11:39:03] <Jartza> found that from the delay.h
[11:44:36] <cehteh> looks like i was right
[11:45:16] <Jartza> the whole delay.h is a bit of a black magic
[11:45:32] <Jartza> still delay(3) doesn't equal delay(1);delay(1);delay(1); :)
[11:45:42] <Jartza> they're trying to be too smart with that delay
[11:46:03] <Jartza> works better for _delay_us() but for _delay_ms() it's a bit pointless to delay for 3 clock cycles
[11:46:47] <Jartza> being 0.000375 milliseconds
[11:47:12] <Jartza> but maybe they try to make it more accurate, dunno
[11:47:37] <cehteh> nice try :D
[11:48:13] <Jartza> I think it's called "accurate enough" :)
[11:49:19] <cehteh> i usually dont like such smartness, better document the odds properly and done
[11:50:00] <cehteh> like "delay(n) sleeps for n*4+8 clock cycles" or so
[11:50:58] <Jartza> well. it's still documented "_delay_ms(x) sleeps AT LEAST x milliseconds"
[11:50:59] <Jartza> :P
[11:51:02] <cehteh> would be nice if avr's had a cycle counter, just some hardware register which increments every clock
[11:51:07] <Jartza> and not like "sleeps accurately x milliseconds"
[11:52:11] <cehteh> yes thats always implemented this way :)
[11:52:36] <cehteh> my scheduler also makes no promises about exact timing, just 'not earlier'
[11:52:52] <cehteh> everything else is 'best effort'
[11:54:34] <Jartza> yeah
[11:54:48] <Jartza> if you need accurate timings, you either do cycle counting with asm or use timers :)
[11:57:03] <cehteh> i use timers :D
[11:58:08] <cehteh> but timer interrupts only wake the mainloop which then checks if there is anything to do
[11:58:48] <cehteh> when the mainloops is already busy then events may have some delay
[12:07:11] <gorroth> omg, i think tonight i'm going to work on my AVR interrupt code again
[12:07:18] <gorroth> i have neglected any AVR work for about 6 weeks
[12:08:52] <Jartza> hmmh
[12:09:08] <Jartza> running attiny5 @ 8Mhz I have about 200 clock cycles per horizontal line to draw pixels :)
[12:15:17] <Jartza> d'oh. that's about 40 pixels maybe
[12:16:28] <cehteh> has it a USI?
[12:16:41] <Jartza> no
[12:17:10] <cehteh> tiny5 is somehow not so awesome :D
[12:17:31] <Jartza> it's very tiny
[12:18:04] <cehteh> maybe you really put some together with interleaved clocks
[12:18:27] <cehteh> 8mhz is that maxed out?
[12:21:03] <Jartza> no
[12:21:10] <Jartza> but I only have 8MHz and 16Mhz oscillators
[12:21:19] <Jartza> 12Mhz is max. according to specs
[12:21:26] <Jartza> I bet 16Mhz would run just fine
[12:22:57] <cehteh> you can always ass liquid nitrogen cooling :D
[12:23:01] <cehteh> add
[12:24:28] <cehteh> have you tried the internal osc on the tiny5? less circruits, less noise there, maybe its better than on the 85 and with pixels as big as barn-doors a bit distortion wont matter anyway
[12:25:05] <Casper> the internal RC is not precise, may cause huge issue
[12:26:01] <cehteh> for whatever huge issue can be here
[12:34:56] <solosoft> Hi, Im trying to compile a scetch whit linux Energia using the include xdc and cant figure out why it cant find <xdc/> files I can use the gcc compiler I added whit PATH I tryed coping xdc to /user/include to but cant find them any Idee what I have missed?
[12:36:38] <cehteh> maybe because its /usr/include
[12:38:08] <solosoft> yes I have tryed to static add the whole adress and it work if I edit all library files and do the same but thats not a proper option
[12:39:38] <Jartza> cehteh: none of the mcus have accurate enough oscillator for vga
[12:39:39] <Jartza> too much jitter
[12:39:46] <Jartza> and unfortunately any jitter is bad
[12:42:22] <Jartza> cehteh: 16Mhz wouldn't even need any cooling
[12:42:27] <Jartza> attiny85 runs @40Mhz
[12:42:33] <Jartza> spec says 20Mhz
[12:42:38] <Jartza> and it doesn't even get warm
[12:42:41] <cehteh> jk
[12:42:58] <cehteh> i never seen atmels get warm on number crunching
[12:43:06] <cehteh> driving shit out of spec, maybe
[12:44:06] <Jartza> mostly the ADC suffers from overclocking first
[12:44:13] <Jartza> after that the multiple instruction
[12:44:19] <Jartza> but tinys can't multiply :D
[12:46:32] <Mr_Sheesh> Have to use an external clock to overclock them, usually, tho
[12:47:05] <Jartza> sure
[12:47:08] <Jartza> or osccal
[12:47:44] <Jartza> heh
[12:47:47] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxMU1JQW5BZ1JpaG8/view
[12:47:57] <Jartza> seems I've made plenty of different versions of that vga
[12:48:23] <Mr_Sheesh> http://www.avrfreaks.net/forum/attiny-85-does-color-vga-sound-and-joystick-32mhz is sorta interesting
[12:48:43] <Jartza> been following that too
[13:02:02] <Jartza> oh
[13:02:07] <Jartza> chinese clone-usbasp
[13:02:15] <Jartza> maybe I could "steal" 12Mhz clock from that :)
[13:02:18] <Jartza> it has 12Mhz crystal
[13:07:04] <cehteh> tiny85 → PLL → frequency generator → 12Mhz
[13:08:09] <cehteh> or do you really think using a tiny85 to generate the clock for a tiny5 is overkill?
[13:13:53] <cehteh> mhm actually i think that might be a worthwhile project idea .. tiny85 as frequency generator
[14:02:01] <Mr_Sheesh> Why not go for an ATMega2560 instead, for more overkill? :p
[14:05:13] <Lambda_Aurigae> I prefer a 555 and a standalone PLL.
[14:14:52] <Mr_Sheesh> Luddite :P
[14:16:45] <Mr_Sheesh> Friend of mine still builds stuff w/ 555s, 4000 series, 7400 series, yet somehow tho he "wants" to move to uCs, he can't give me a list of his projects output voltage, period, # channels, etc. o.O
[15:48:31] <nikomo> Did I understand this correctly, I can use the USB DFU on 32u4 to upload my program to the chip, I don't need any extra bootloader on the chip that is capable of accepting data in and then writing that to Flash?
[15:48:37] <nikomo> sounds neat
[15:49:11] <nikomo> Oh right it's stored outside of Flash so you can't even wipe it out accidentally
[15:51:46] <nikomo> oh wow there's even 2 SPI busses, it's like they made this with me in mind
[16:00:12] <Lambda_Aurigae> atmega32u4 has a hardcoded dfu bootloader?
[16:04:52] <nikomo> so it seems
[16:05:47] <Lambda_Aurigae> from what I have seen they ship with a bootloader but it looks like a regular dfu bootloader, not some hardcoded thing.
[16:06:00] <Lambda_Aurigae> where did you see it's stored outside of flash?
[16:06:26] <Lambda_Aurigae> normally a bootloader can't overwrite itself,,if it's written properly.
[16:06:27] <nikomo> oh right it's actually not outside flash since you need to reserve space for it
[16:06:37] <Lambda_Aurigae> so it's just in the bootloader section of memory.
[16:06:50] <Lambda_Aurigae> so you can overwrite it if you erase the chip with an external programmer.
[16:07:05] <nikomo> there's a fuse you set to reserve space for it I believe
[16:07:15] <Lambda_Aurigae> bootsize fuses.
[16:07:20] <nikomo> external programmer can nuke it
[16:07:58] <Lambda_Aurigae> that's actually normal for most AVRs...at least those that support a bootloader section.
[16:08:01] <nikomo> huh, it has JTAG
[16:08:10] <nikomo> lol
[16:08:14] <Lambda_Aurigae> I've used it for years for making serial and spi and i2c and ethernet bootloaders.
[16:09:23] <Lambda_Aurigae> what's new is that some versions of that chip come from the manufacturer with a pre-loaded and configured bootloader.
[16:10:13] <nikomo> hmm, 16MHz requires 4.5V, how does that jive with the USB?
[16:10:54] <nikomo> My PIC-loving teacher was slightly confused by the voltage/frequency curve I showed him (ages ago) since PICs can just do whatever frequency at any operating voltage afaik
[16:12:25] <Jartza> they can?
[16:12:28] <Yoduza> voltage/frequency curve ? :O 1000MHz ?
[16:12:59] <nikomo> there's a graph in avr datasheets that shows maximum allowed frequency for specified operating voltage
[16:13:01] <nikomo> Jartza: yes
[16:14:20] <nikomo> Lambda_Aurigae: is there a stock bootloader available from atmel that'll just accept upgrade over USB, but if the host says nothing, go on to run main?
[16:14:33] <Lambda_Aurigae> dfu bootloader
[16:15:12] <nikomo> oh right it implements the DFU protocol. but you can replace the bootloader with your own code so the bootloader can do whatever it wants
[16:15:37] <Lambda_Aurigae> not sure what you mean...I write my own bootloaders usually.
[16:15:40] <Lambda_Aurigae> they do what I want.
[16:16:09] <nikomo> you can either use the DFU bootloader they have, or you can write your own bootloader that fits your own use case. that's what I mean
[16:16:20] <Lambda_Aurigae> yeah.
[16:16:25] <Lambda_Aurigae> I have done it many times.
[16:16:37] <nikomo> I've never done it, but doesn't sound too bad
[16:16:37] <Lambda_Aurigae> although, I haven't done a usb bootloader on avr yet.
[16:17:04] <nikomo> I mean, all it has to do is write stuff in Flash and EEPROM maybe, how hard could that be
[16:17:10] <Lambda_Aurigae> my best bootloader was one that loaded from an SD card if present with the correct named file on the SD
[16:17:21] <nikomo> nice
[16:17:29] <Lambda_Aurigae> not hard but there is special instruction for writing to flash.
[16:17:42] <Lambda_Aurigae> and you have to write flash in pages....after erasing said page.
[16:17:57] <nikomo> ah, so you get that low level access heh
[16:18:01] <nikomo> it's not done for you
[16:18:05] <Lambda_Aurigae> of course not.
[16:18:28] <Lambda_Aurigae> you can take existing bootloaders and rewrite them to your own purposes if the source is available.
[16:18:33] <Lambda_Aurigae> that's how I started with them.
[16:20:28] <nikomo> looking around, the 32u4 comes preloaded with a DFU 1.0 compliant bootloader, but I haven't seen any source code anywhere. not a problem though
[16:20:39] <Lambda_Aurigae> as for the frequency vs voltage thing...pic does it too.
[16:20:47] <Lambda_Aurigae> probably isn't one for the DFU..
[16:20:50] <Lambda_Aurigae> proprietary.
[16:20:56] <nikomo> aye
[16:21:11] <Lambda_Aurigae> and only certain revisions of the 32u4 come with the bootloader.
[16:21:16] <Lambda_Aurigae> read the datasheet very carefully.
[16:21:19] <nikomo> ah
[16:21:51] <nikomo> well I need an ISP header for fuses anyways so it's no biggie, I have a way in
[16:22:03] <Lambda_Aurigae> atmega32u4-AU and the atmega32u4RC-AU
[16:22:08] <Lambda_Aurigae> the -MU versions do not.
[16:22:18] <Lambda_Aurigae> according to the datasheet.
[16:22:28] <Lambda_Aurigae> if you start futzing with the fuses you can break the bootloader badly.
[16:22:50] <Lambda_Aurigae> page 422 of the datasheet tells which do and which don't
[16:22:51] <nikomo> Kinda wish the 32u4 had a crypto engine on it, but oh well. that's not a problem
[16:23:18] <Lambda_Aurigae> don't you have to go to the xmega series for crypto engine?
[16:23:51] <nikomo> I honestly can't remember what all I've seen that feature on, but sounds true
[16:25:46] <Lambda_Aurigae> actually, you have to go to the AT32UC chips to get crypto engine.
[16:25:51] <Lambda_Aurigae> that's AVR-32bit
[16:26:00] <nikomo> ah crap, I need to poke around before I get too happy with this chip
[16:26:21] <Jartza> iirc xmega a4 has crypto
[16:26:37] <nikomo> oh right, I got worried for a bit, not a problemo.
[16:26:38] <Jartza> like xmega32a4u etc
[16:27:01] <nikomo> I was thinking how the programming is going to be like since it said JTAG debug interface, but the Flash is always accessible via SPI, for ISP
[16:27:54] <Lambda_Aurigae> aahh..there we go.
[16:27:59] <Lambda_Aurigae> yeah..xmega has them.
[16:28:28] <Lambda_Aurigae> more pages of what I was looking at.
[16:28:31] <Jartza> I don't mind avr32 at all
[16:28:49] <Lambda_Aurigae> Jartza, I like it...too bad it is too little too late.
[16:28:52] <Jartza> xmega fits between atmega328 and arm :p
[16:28:58] <Lambda_Aurigae> ARM has kinda made it obselete.
[16:29:05] <Lambda_Aurigae> obsolete
[16:29:09] <Jartza> yeah
[16:29:15] <Jartza> I like xmega
[16:29:20] <nikomo> if I get everything working with msp432+openocd etc., I might just poke at ARM more
[16:29:29] <Lambda_Aurigae> and the ones with good features have a hobby-poor package...BGA SUCKS!
[16:29:44] <Jartza> it's more than atmega, cheaper and still good for plenty
[16:29:59] <Lambda_Aurigae> but you gotta solder it onto a board to play with it.
[16:30:00] <nikomo> reflowing is no problem for me, I believe, but you basically have to get a PCB done, to use one of those
[16:30:13] <nikomo> I guess you could maybe dead-bug?
[16:30:18] <nikomo> if it's small enough
[16:30:24] <Lambda_Aurigae> nikomo, I got one avr32 done with a pre-made board...but the board was expensive.
[16:30:28] <Lambda_Aurigae> and a pain in the ass.
[16:30:39] <Lambda_Aurigae> schmartboard makes a BGA board or three.
[16:30:49] <Jartza> I bought some tqfp-to-dip adapters
[16:30:58] <Lambda_Aurigae> you actually heat it from the underside with a soldering iron.
[16:31:03] <Jartza> nice for breadboarding
[16:31:16] <Lambda_Aurigae> Jartza, actual 2 row dip?
[16:31:22] <Lambda_Aurigae> from who?
[16:31:23] <Jartza> yes
[16:31:29] <Jartza> hobbytronics
[16:32:23] <Jartza> http://www.hobbytronics.co.uk/prototyping/smd-adapter-boards/tqfp-44-breakout
[16:34:11] <Jartza> I'll use those with my xmegas
[16:39:18] <Jartza> the nice addition is that place for crystal and caps
[16:39:29] <Lambda_Aurigae> no good for the chips I have.
[16:39:45] <Lambda_Aurigae> I need tqfp 64 with 0.50mm pitch
[16:40:19] <Lambda_Aurigae> and tqfp 100 with 0.50mm pitch
[16:40:44] <Lambda_Aurigae> can not find those in a dip adapter..they always do the 4 sided adapter.
[16:40:45] <Jartza> yeah
[16:41:10] <Jartza> those seem to be 4-sided :(
[16:41:25] <Lambda_Aurigae> and I want them DIP dag-nabbit!
[16:41:42] <Lambda_Aurigae> I have a pile of 68000 chips in 64pin dip!
[16:42:05] <Lambda_Aurigae> going to have to make some I think.
[16:42:08] <nikomo> Lambda_Aurigae: could make your own adapter
[16:42:15] <Lambda_Aurigae> or maybe a 4-sided to dip adapter I suppose.
[16:42:27] <Lambda_Aurigae> nikomo, yeah, I probably will eventually.
[16:42:41] <nikomo> eventually, after the heat death of the universe?
[16:42:46] <Lambda_Aurigae> naa.
[16:42:59] <Lambda_Aurigae> this spring I will likely order a few.
[16:43:07] <nikomo> because when I say I'll eventually do something, I usually get started around the heat death
[16:43:10] <Lambda_Aurigae> draw them up and have them madeby dirtypcbs
[16:43:15] <Jartza> though, 100-pin dip-adapter would be huuuge and expensive
[16:43:21] <Lambda_Aurigae> not really.
[16:43:42] <nikomo> it'd be long but eh
[16:43:57] <Jartza> yes, long
[16:44:10] <Lambda_Aurigae> make them about 1x5 inches.
[16:44:12] <nikomo> you could do like a T-shape maybe, where you break out important pins, and then just have a clump of pins on the top of the "T"
[16:44:29] <Lambda_Aurigae> 1x5.5 to encompass everything.
[16:44:57] <Jartza> yea
[16:45:40] <Lambda_Aurigae> 26 dollars for 10 of them...2 sided even.
[16:46:39] <Lambda_Aurigae> that's for 1-8 week shipping.
[16:47:24] <Lambda_Aurigae> dhl 3-9 days kicks it to 42 dollars
[16:47:35] <nikomo> you ain't in a hurry
[16:49:16] <Lambda_Aurigae> even 4x13cm with 1-8 week shipping is only 29 dollars
[16:50:38] <nikomo> it's 0:25am, I've successfully not done anything for 5+ hours. Time to do stuff.
[16:51:19] <Lambda_Aurigae> hell, I got off work 4 hours early due to near blizzard conditions here.
[16:51:42] <nikomo> I'm off till 4th I think, going back to school, got done with internship.
[16:52:00] <Lambda_Aurigae> must be nice.
[16:52:20] <Lambda_Aurigae> I got 2 days off for christmas(which I don't celebrate) and 1 day off for new years(which I also don't celebrate)
[16:52:59] <nikomo> I'm not sure how you're even supposed to celeberate Christmas, we just ate a bunch of ham.
[16:53:00] <Lambda_Aurigae> and the week between them is hell week as it is last week of the month and last week of the year and salesdweebs are trying to get their bonuses by selling lots of stuff and wanting it all installed before the end of the year.
[16:53:21] <Lambda_Aurigae> I don't even remember what I ate christmas day.
[16:53:27] <Lambda_Aurigae> didn't visit family or friends or anything.
[16:53:42] <Lambda_Aurigae> slept in, snacked most of the day, took a nap, and didn't go anywhere.
[16:54:52] <nikomo> wonder what kind of deals you could get out of salesmorons, near end of year. heh
[16:54:59] <Lambda_Aurigae> plenty.
[16:55:12] <Lambda_Aurigae> they sold as much in december as they did the whole rest of the year...probably more.
[16:56:58] <Lambda_Aurigae> and everything that gets sold has to be installed.
[16:57:00] <Lambda_Aurigae> copiers
[16:57:17] <Lambda_Aurigae> so 8 to 20 thousand each.
[16:58:21] <Lambda_Aurigae> http://www.wunderground.com/weather-radar/united-states/ia/union/dmx/?lat=42.17216492&lon=-93.08415222&label=Union%2c%20IA
[16:58:29] <Lambda_Aurigae> I'm at the circled + on the map.
[16:59:25] <nikomo> heh, website's eating the dirt hard, I swear the map is loading, just very very very slowly
[16:59:38] <Lambda_Aurigae> yeah..it's slow.
[16:59:44] <Lambda_Aurigae> major storm happening here.
[16:59:52] <nikomo> ah
[17:00:25] <Lambda_Aurigae> I'm in the center of the snowy area...on the southeast edge there's major storm storms with tornados and everything.
[17:01:46] <nikomo> yeah the website's dead, refuses to load the radar image lol
[17:01:53] <Lambda_Aurigae> oops.
[17:02:04] <nikomo> it managed to load a small strip at the top but then it died
[17:02:30] <Lambda_Aurigae> we are in the center of a 10+ inch snow area with mixed ice.
[17:02:43] <nikomo> Weather's nice here :P http://ilmatieteenlaitos.fi/sade-ja-pilvialueet
[17:02:45] <Lambda_Aurigae> currently have 4 to 6 inches...hard to tell because of the 15 to 20 mph winds.
[17:25:02] <Jartza> well. mutilated one usbasp and made my own "oscillator"
[17:26:32] <Jartza> now I can run attiny @12Mhz
[17:26:36] <Lambda_Aurigae> hehe.
[17:26:41] <Lambda_Aurigae> why 12MHz?
[17:27:05] <Jartza> that's max. for attiy5
[17:27:09] <Jartza> according to the specs
[17:27:12] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxdzRQZXRVaG91WnM/view
[17:29:21] <Lambda_Aurigae> hehe.
[17:29:40] <Lambda_Aurigae> run it up to 20MHz!
[17:42:26] <Lambda_Aurigae> ooo..I can get 10 boards, 10x10cm for 25 dollars.
[17:42:55] <Lambda_Aurigae> I can make 3 adapters on each board.
[17:43:18] <Lambda_Aurigae> for 64pin tqfp anyhow.
[17:44:05] <Jartza> Lambda_Aurigae: actually I don't have any 20Mhz oscillators anymore, I used all for octapentaveega :D
[17:44:10] <Lambda_Aurigae> aawwww.
[17:44:21] <Jartza> only 8, 16, 32 and 40
[17:44:40] <Jartza> and 8, 16 and 20 Mhz crystals
[17:44:52] <Jartza> stole that 12Mhz crystal from usbasp (I have 8 of them)
[17:45:01] <Lambda_Aurigae> hehe.
[17:45:11] <Jartza> and I can always solder crystal back there when I order new components
[17:45:34] <Lambda_Aurigae> I would have reprogrammed the usbasp to generate 12MHz
[17:45:38] <Lambda_Aurigae> somehow, maybe.
[17:45:41] <Lambda_Aurigae> tried anyhow.
[17:46:14] <Lambda_Aurigae> now I gotta find a halfway decent schematic/board layout program to make up these boards.
[17:46:40] <Jartza> I bet atmega8 also has "clockout"
[17:47:16] <Jartza> but it might still be shared with xtal pins, like on many avr
[17:49:07] <Lambda_Aurigae> let's look it up!
[17:51:31] <Jartza> actually mega8 doesn't have clock out :o
[17:51:35] <Lambda_Aurigae> nope.
[17:51:40] <Lambda_Aurigae> just discovered that.
[17:51:58] <Jartza> weird
[17:52:56] <Lambda_Aurigae> they included it in the atmega88 though.
[17:57:17] <Lambda_Aurigae> oh sweet.... dirtycircuits.com accepts kicad files directly.
[18:01:52] <Jartza> oh
[18:03:05] <Jartza> hmmh
[18:03:07] <Jartza> 59.9949009 Hz
[18:03:12] <Jartza> I guess that's close enough
[18:03:34] <Jartza> http://pastie.org/10658049
[18:03:42] <Jartza> calculated the timings for 12MHz :)
[18:03:48] <Lambda_Aurigae> aahh.
[18:04:24] <Jartza> 305 clock cycles per horizontal line to draw something
[18:05:00] <Jartza> I might be able to pull about 60 color pixels :)
[18:06:41] <Jartza> first I'll try getting the hsync + vsync to single composite sync
[18:06:56] <Jartza> problem is, can't use pwm :(
[18:41:13] <darsie> I might get a computer without parallel port. What cheap (and hopefully easy) ways would I have to program avrs, then?
[18:42:06] <Casper> if you have a true parallel port, then a 3 resistors programmer is possible
[18:42:21] <Casper> else I suggest that you get an usb one, like the one that Tom_itx sell
[18:42:41] <darsie> ic
[18:43:09] <darsie> I used mine without resistors.
[18:43:28] <Casper> it's ok, but in case of a screwup something can more easilly fry
[18:43:41] <darsie> ok
[18:43:55] <Casper> and hopefully the avr will be the weaker of the 2
[18:44:10] <darsie> they only deliver 3 mA or so, anyways. I think they have internal resistors.
[18:44:23] <Casper> no
[18:44:36] <darsie> maybe there are different ones.
[18:44:37] <Casper> it have a weak driver that may hot handle being short circuitted to gnd or vcc
[18:44:44] <darsie> ok
[18:44:58] <Jartza> or get this "usbasp" clone which sell like $2 in ebay
[18:45:00] <Jartza> or dx
[18:45:08] <Jartza> if you want really cheap
[18:45:14] <Jartza> if you want good, then something else :D
[18:46:56] <darsie> thx
[18:48:52] <darsie> US $1.86, free shipping ...
[18:53:32] <Jartza> yep
[18:53:42] <Jartza> buy 2
[18:53:58] <Jartza> most probably those chinese programmers have crappy firmware and it might work not-so-well
[18:54:06] <Jartza> but it can be updated to "real" usbasp firmware
[18:54:13] <Jartza> you just need a programmer to update it :D
[18:54:34] <Jartza> usually the chinese usbasp firmware works at least for firmware update
[18:54:36] <darsie> a parallel port?
[18:54:41] <Jartza> naah
[18:54:50] <Jartza> just use programmer to program a programmer :D
[18:55:08] <darsie> I use my parallel port for programming.
[18:55:31] <darsie> You mean HV programming?
[18:55:34] <Jartza> no
[18:55:40] <studdentt> i've launched screen /dev/ttyUSB0 to read from the uC but there are characters with ? in it
[18:56:09] <Jartza> studdentt: baud rate not correct?
[18:56:11] <studdentt> no letters are visible from the printf, why is that ?
[18:56:15] <studdentt> baudrate is fine
[18:56:35] <Jartza> most probably it's not if you get only ??? :)
[18:56:40] <darsie> Maybe you mad a bug.
[18:56:59] <Casper> studdentt: are you using a crystal on the avr?
[18:57:10] <darsie> like put an int on the stack where you sholud put a char.
[18:57:30] <studdentt> Casper: internal ref at 8MHz with CKDIV8 fuse
[18:58:03] <Jartza> and what uart speed you're trying?
[18:58:11] <studdentt> Jartza : 9600
[18:58:11] <Casper> studdentt: expect up to 10% deviation in speed, and stability issue
[18:58:43] <studdentt> the power rail is super stable
[18:59:30] <Casper> so?
[18:59:35] <Casper> the RC oscillator is not stable
[18:59:45] <Jartza> 9600 might be a stretch for 1Mhz
[18:59:48] <Jartza> try 4800
[19:00:42] <Casper> ah yeah
[19:00:48] <darsie> or 300 for a test.
[19:00:50] <Casper> max is 4800
[19:00:57] <Casper> http://wormfood.net/avrbaudcalc.php?postbitrate=9600&postclock=1
[19:03:14] <WormFood> The internal (without a crystal/osc) clock, will depend on the temp. As it gets warmer and cooler, it can be enough of a difference to throw your serial bitrate out of skew. I don't recommend using the internal clock if you're using the uart.
[19:04:00] <Jartza> still 9600 doesn't really work with 1Mhz
[19:04:11] <Jartza> even if it was spot-on
[19:04:19] <WormFood> And if you do want to use the internal clock, then you'll need to tweak it's timings to get it right on.
[19:04:31] <WormFood> wouldn't surprise me. 1mhz isn't much.
[19:05:00] <WormFood> I was almost running out of cycles, on my software serial port, at 4.5 Mhz (115.2K bitrate)
[19:05:18] <studdentt> i've been using 9600 a few times without problems, ll try with 4800
[19:05:28] <Casper> WormFood: your standard table lack the 1MHz table
[19:05:33] <WormFood> or even 1200
[19:05:38] <WormFood> Yeah, I removed it.
[19:05:47] <studdentt> still with 8% error, soem characters should be transmitted o-k
[19:05:54] <WormFood> Who runs anything at 1mhz?
[19:05:59] <Jartza> _o/
[19:06:15] <WormFood> Yeah, as your speed goes down, your tolerance goes up. You can get more sloppy at lower speeds.
[19:06:38] <studdentt> problem solved
[19:06:43] <studdentt> Wormfood: me :D
[19:07:01] <WormFood> Why?
[19:07:09] <Casper> studdentt: change the fuse, remove the /8
[19:07:18] <WormFood> Exactly!
[19:07:21] <studdentt> Casper: will do yes
[19:07:52] <WormFood> You really don't want to use the internal clock, if you're using uart, unless you expect to run into unexpected problems ;)
[19:08:09] <studdentt> WormFood: for a project i had to reduce power consumption so i reduced the clock..
[19:08:19] <WormFood> Fair enough.
[19:08:35] <Jartza> I would've reduced the voltage first
[19:08:45] <WormFood> Still, if you want it to be reliable, use a crystal/osc
[19:08:46] <studdentt> Jartza: i did that also :)
[19:08:58] <WormFood> what are your power goals?
[19:08:59] <Jartza> I found huge difference even when going from 3.3V to 3V
[19:09:07] <Jartza> I didn't expect that
[19:09:07] <darsie> WormFood: I run my avr's on the stock 1 MHz, usually. I used an 18.432 quartz for serial comm.
[19:09:10] <WormFood> run at 1.6
[19:09:12] <studdentt> Jartza: i went down from 5V to 2.5V
[19:09:29] <Jartza> that'll be great
[19:09:37] <Jartza> do you have level shifter on your uart?
[19:09:47] <Jartza> that might also cause trouble with higher speeds, rise time too slow
[19:11:27] <WormFood> 0.9216 Mhz, would give you 9600 baud, dead on, with 0% error. http://wormfood.net/avrbaudcalc.php?postbitrate=9600&postclock=0.9216
[19:11:42] <WormFood> so would 1.0752 Mhz.
[19:12:07] <WormFood> by the way, my calculator gave me those values. Sometimes I feel like I'm the only person that uses that feature.
[19:12:14] <Jartza> :)
[19:12:47] <studdentt> Jartza: not now , 5V
[19:12:55] <Jartza> mmkay
[19:13:14] <Jartza> I have this ftdi-cable for 3.3v logic, it sometimes has hard time when I'm running @ 2.5V
[19:13:36] <WormFood> why not get one that properly works at 2.5 volts
[19:13:37] <studdentt> Jartza: some meta-states
[19:17:08] <Jartza> yes, 2.5v isn't always enough to signal 1
[19:17:14] <Jartza> so I use level shifter
[19:20:52] <WormFood> About 3 months ago I moved. I now am about a 15 minue walk away from one of the world's largest electronics markets. You guys wished you had something like this near you. You'd never have to worry about not being able to get a part.
[19:21:38] <WormFood> You should get the right parts that work. It will make your life a lot easier.
[19:22:08] <Jartza> :)
[19:22:23] <WormFood> Jartza, is your native language English?
[19:22:27] <Jartza> no
[19:22:32] <WormFood> What is it?
[19:22:35] <Jartza> finnish
[19:22:45] <WormFood> Ah. That's why it's so good.
[19:22:51] <Jartza> heh
[19:23:20] <Casper> WormFood: it's not the accessibility that annoy me, but the price you get... so.. FU! :D
[19:23:45] <WormFood> I couldn't tell you weren't a native speaker, but I had some clues.
[19:24:21] <WormFood> Casper, what are you talking about?
[19:25:06] <Casper> WormFood: you have good price on all those parts
[19:25:19] <Jartza> WormFood: I have this theory, finnish is so far-off from english that we really have to learn it from the grounds-up and we have no way of mixing finnish to it, because the languages are so different
[19:25:32] <Casper> the local market here is expensive as hell, and internet is moderatelly expensive...
[19:26:07] <WormFood> Casper, do you remember where I live? Prices here are good. I guarantee you own something that was made where I live.
[19:26:24] <WormFood> I mean, from my city.
[19:26:37] <Casper> china iirc
[19:26:51] <WormFood> 深圳市 to be exact
[19:27:00] <Jartza> Shenzhen?
[19:27:04] <WormFood> yep
[19:27:31] <WormFood> I would have also accepted "Deep Drains" as an answer
[19:27:39] <WormFood> That's it's literal translation
[19:27:46] <Jartza> nice
[19:28:15] <Jartza> the small town/village I live in doesn't have translation to any other language
[19:28:24] <Jartza> as it doesn't mean anything
[19:28:26] <WormFood> I used to live walking distance to the 2nd largest deep water shipping port inthe world.
[19:28:50] <WormFood> many names don't mean anything. And in Chinese, you get the sound, plus a meaning. (all chinese characters are a syllable)
[19:29:00] <WormFood> So, that can be confusing at times.
[19:29:47] <WormFood> But also many places are named after their geographic features, or what people do there. I used to live in Yantian district. Literally "salt field". Guess what they used to do there.
[19:30:03] <Jartza> I tried studying chinese, but didn't have time then and had to give up
[19:30:10] <WormFood> It's not that hard.
[19:30:18] <WormFood> people make it out to be a lot harder than it really is.
[19:30:32] <Jartza> it still takes some time
[19:30:33] <Casper> deep drain... as sewer?
[19:30:50] <WormFood> Many times I can hear a word, and find it written somewhere, without having ever seen the characters before, because they give me clues as to their sounds.
[19:31:01] <WormFood> deep drains, as in fields.
[19:31:44] <WormFood> And my gf's family is from this area, so a trip "back home", is an hour car ride.
[19:31:48] <WormFood> fuck CNY!
[19:32:03] <Casper> man this bug is annoying... I hope it will be fixed at next X restart
[19:32:07] <WormFood> CNY = Chinese New Year. The largest annual mass migration in the world.
[19:32:21] <WormFood> You do not want to be traveling in China during CNY.
[19:32:50] <WormFood> It's expensive and shitty. I've ridden on these slow trains, jam packed full of farmers (with no manners)
[19:33:08] <aandrew> sounds unfun
[19:33:19] <WormFood> It's a worthwhile experience.
[19:33:19] <Jartza> weird moment
[19:33:28] <WormFood> It's not fun, but a good experience to have.
[19:33:31] <Jartza> wrote "sounds unfun" and started to think if "unfun" is really a word
[19:33:55] <WormFood> it's not.
[19:34:00] <Jartza> then aandrew wrote the same and I hadn't pressed enter... for a moment I felt strange ... "I didn't press enter" :D
[19:34:02] <WormFood> But, perfectly understandable
[19:34:49] <WormFood> I tell Chinese people, not to worry too much about being right. Try to be understandable.
[19:35:24] <WormFood> The whole idea of talking, is to convey ideas and information. Who cares if the grammar is correct, or the words are perfect, as long as you get your meaning across.
[19:35:35] <aandrew> Jartza: haha
[19:36:06] <Jartza> WormFood: I think it's the same when trying to learn new language, people are afraid to use it because "my grammar is not correct"
[19:36:11] <WormFood> It was funny. When my mom came to visit, she couldn't communicate with one of my friends. They were both speaking English, but I had to "translate". My mom would use "big words", and grammar my friend simply didn't understand. I had to translate it to simpler english, with less big words.
[19:36:24] <Jartza> but then you'll never learn, if you don't use the language
[19:36:27] <WormFood> I speak very poor Chinese, and most of the time people can understand what I want.
[19:37:17] <WormFood> I remember, I went into a hardware store, and asked for "oil", and they didn't understand me, so they handed me a piece of paper with a smirk, and I wrote 油 on the paper. Then they understood perfectly (being able to read/write the language is a huge benefit)
[19:37:38] <Jartza> hehe
[19:37:45] <Jartza> you should've written 710
[19:38:15] <Jartza> http://assets.hightimes.com/071013oil_03.jpg
[19:38:47] <WormFood> Chinese has a thing, called a numerical classifier. Whenever you say a number, you must first preface it with a word, that describes the type of object you're counting. So you couldn't say something like "hand me 5 pieces of paper", you'd have to say something like "hand me 5 sheets of paper", where if you leave out "sheets" it's confusing.
[19:39:21] <WormFood> But, they have a generic classifier, which I use a LOT, and people still, 99% of the time, understand me just fine, and frequently tell me the correct word to use.
[19:40:07] <Jartza> please give me 5 units of water
[19:40:24] <WormFood> there is a WD-40 clone here, called VVD-40
[19:40:55] <WormFood> You'd say glasses or bottles...but you'd use a classifier with those objects.
[19:41:26] <WormFood> It's really not hard, but it is quite a bit different from English. (fortunately Chinese grammar is super easy)
[19:42:33] <Jartza> well, I already speak one of the hardest languages in the world ;)
[19:42:39] <Jartza> maybe learning another one is easy
[19:43:34] <WormFood> Most Chinese characters are not pictograms (a picture representation), but ideagrams, where they combine 2 or more separate elements to create an idea. For example, man 男 is a combination of strength 力 and field 田. The strong person working the field, is a man.
[19:44:03] <Jartza> indeed
[19:44:34] <Jartza> and computer is lightning brain
[19:44:36] <WormFood> But we run into interesting situations, where knowing how to speak a word, doesn't always give you an idea of how to write it. So, many people don't know some characters, or use the wrong character (that sounds the same). Especially when those characters are "bad" or "dirty".
[19:45:15] <aandrew> I'm sure I've asked you this at least once before, but humour me... how did you get started in learning to read/write/speak chinese?
[19:45:31] <WormFood> Like the word "fuck". Most Chinese people don't know how to write this. Most people write it as 操 because they have no idea that 肏 is the right character.
[19:45:53] <WormFood> aandrew, I read books, and listen to audio.
[19:46:08] <WormFood> If you'd like, I can give you the book that I learned Chinese characters from.
[19:46:15] <aandrew> I would, actually
[19:46:24] <WormFood> Also, the wikipedia page on Chinese characters is excellent.
[19:46:38] <aandrew> learning chinese (not sure if mandarin or cantonese or some other variant) is one of my todo items
[19:46:42] <WormFood> I recommend you start with wikipedia first, then move on to other things.
[19:46:45] <aandrew> much more useful than spanish or french
[19:46:50] <WormFood> Cantonese is much harder than Mandarin.
[19:47:01] <WormFood> Cantonese has 7 to 9 tones, depending on who you ask.
[19:47:03] <aandrew> what are most datasheets and engineering materials written in?
[19:47:23] <WormFood> By the way, if you want some fun, as a Cantonese speaker to say 花桥 in Cantonese.
[19:47:40] <WormFood> That means "flower bridge", but it sounds like "fuck you" in English.
[19:48:01] <WormFood> It was sooo funny to get my gf's mother to say that.
[19:48:22] <aandrew> heh
[19:48:24] <WormFood> I asked her to say that, and she said it in Mandarin, and then I asked her to say it in Cantonese.
[19:48:45] <WormFood> Then her dad came over to help out. It sound like they were both saying "fuck you", "fuck you".
[19:49:13] <aandrew> heh in romanian the word to work is foc which sounds exactly like fuck
[19:49:22] <WormFood> Anyways, I wanted to show you how the character 肏 (fuck) is created. It's a combination of 2 characters.
[19:49:45] <WormFood> 入 (enter), and 肉 (meat) = 肏 (fuck)
[19:49:59] <WormFood> Now that is fuckin' funny! (pun intended)
[19:50:07] <aandrew> :-)
[19:51:47] <WormFood> And the word for "cunt", most people also can't write. That is 屄. That is a combination of 穴 (hole) and 尸 (corpse/body), which is kinda funny.
[19:52:37] <WormFood> And I tell my Chinese friends about these 2 characters, and they get mad at me, for learning the bad things first, and I didn't. My Chinese geek friends (here on freenode) taught me that. I didn't ask, they did it on their own.
[19:53:49] <WormFood> Anyways, enough off-topic chatter from me. I'm gonna get out of here, and try to get some work done. aandrew join #mandarin if you're really interested in learning. See ya'll l8r 再见
[19:56:21] <Jartza> :)
[20:06:04] <WormFood> aandrew, here are the books I started with http://wormfood.net/Fun_With_Chinese_Characters-Vol_1_2_and_3.zip but really I recommend you start with https://en.wikipedia.org/wiki/Chinese_characters
[20:10:34] <Jartza> wow
[20:11:00] <Jartza> some characters seem to be quite hard :)
[20:11:26] <Jartza> 𠔻
[20:11:32] <Jartza> my irc doesn't show that
[20:12:54] <Tom_itx> yeah some don't
[20:13:00] <Tom_itx> mirc doesn't
[20:13:55] <Jartza>
[20:13:59] <Jartza> how about that?
[20:14:12] <Tom_itx> nope
[20:14:24] <Tom_itx> iirc xchat shows it fine
[20:14:45] <Jartza> my mac shows it but even on retina display it's hard to tell what's in there
[20:15:08] <ASRock_pc> <Jartza> 龘
[20:15:17] <Tom_itx> nope
[20:15:26] <Tom_itx> doesn't show it there either
[20:16:22] <Jartza> https://i.imgur.com/2iXQ9Dw.png
[20:16:24] <Jartza> :D
[20:16:31] <Jartza> even retina display has hard time with it
[20:17:51] <Jartza> luckily you don't have that kind of characters in conversations
[20:18:25] <Tom_itx> a guy in another channel posts stuff all the time with odd characters in it
[20:18:31] <Tom_itx> never show up for me
[20:19:38] <Jartza> on mac I see this "negative question mark" if the letter is missing
[20:21:31] <Tom_itx>
[20:22:20] <WormFood> Even the most complex characters can be broken down into their individual parts
[20:22:44] <Tom_itx>
[20:27:22] <Jartza> WormFood: guessed so. tried to draw that "fuck" character with google translate, but wasn't that easy!
[20:33:23] <WormFood> The word for "cunt" sound exactly like the english word "be" or "bee". The same sound is also used for "pen". So, you can have fun with the wrong tones, and get away with it, because you're not a native speaker. I can you imagine asking a girl "do you have a cunt (pen) I can use", just by the wrong tone.
[20:34:11] <WormFood> I reading about a guy who memorized the wrong tone for "pen", and later realized his mistake. Now he knows why everyone gave him a weird look, when asking for a pen.
[20:36:19] <WormFood> without a doubt, learning the tones is the hardest part for me. Memorizing the tones, and speaking the tones are kinda hard for my American mouth/tongue. And in some cases, tones are extremely important. Like the only difference between "buy" and "sell" is the tone.
[20:37:36] <WormFood> Also, there is some difference between northern and souther mandarin. In the north, the tend to use a retroflex more frequently, where they never use it in the south.
[21:39:11] <studdentt> how should i compile with avr-gcc so that i can see floating point numbers on a serial terminal ?
[21:39:47] <studdentt> i'm using linux ubuntu