#avr | Logs for 2016-03-01

Back
[05:37:09] <lorenzo> yay, just managed to interface avr + lmt01 :)
[05:38:28] <lorenzo> Pulses: 1172
[05:38:28] <lorenzo> Temperature: 23.2500
[05:42:25] <daey> needs more decimals
[05:43:00] <Lambda_Aurigae> need to convert that to Kelvin.
[05:45:11] <daey> the worst part with hobby projects is making a nice enclosure :(
[05:45:33] <lorenzo> daey: datasheet says 0.0625C resolution per pulse
[05:45:41] <lorenzo> so I think it really needs more decimals :D
[05:45:47] <lorenzo> not that it will matter for real measurements
[05:45:51] <daey> told you :P
[05:46:07] <lorenzo> ah though it was sarcasm :D
[05:46:10] <daey> it was
[05:47:04] <daey> didnt know such precise sensor existed "in a ready to use package"
[05:47:16] <daey> such a precise*
[05:51:59] <Caesium> yeah the ds18b20 is the same, resolution 0.0625c. But then the accuracy is only +/- 0.5c anyway so its a bit.. meh :)
[05:52:16] <Caesium> you could calibrate it in software but then there's the +/- 0.2c drift to deal with
[05:56:14] <daey> the lmt has a accuracy of +-0.125
[06:07:04] <Lambda_Aurigae> my calibrated finger has an accuracy of +/- 5degF
[06:09:06] <daey> lorenzo: looking at the LUT for the LMT01. It doesnt seem to be linear. is it linear between each step?
[06:09:09] <julius> hi
[06:09:47] <julius> this is how you set your registers if you want to go to hell: (in the middle of the page) http://embedded-lab.com/blog/building-a-digital-light-meter-with-a-calibrated-ldr/
[06:11:13] <Lambda_Aurigae> I don't see anything wrong with it.
[06:11:27] <Lambda_Aurigae> other than no comments.
[06:11:36] <lorenzo> daey: yes
[06:11:47] <lorenzo> "The output transfer function appears to be linear and can be approximated by the following first order equation"
[06:11:51] <lorenzo> (page 12)
[06:24:42] <daey> lorenzo: hm strange. i was looking at p13. which shows a table and if you plot a few of those you wont get a straight line. it bends upwards with rising temperature
[06:30:56] <daey> lorenzo: in which case your measured temperature is 22.93°C instead of your claimed 23.25°C
[06:31:10] <lorenzo> daey: should be within accuracy
[06:31:23] <lorenzo> 0.5C
[06:31:37] <daey> lorenzo: accuracy is 0.125°C
[06:32:08] <daey> but accuracy has nothing to do with this. it only affects the pulse count
[06:32:12] <lorenzo> daey: typical
[06:32:23] <lorenzo> see the plot on 1st page
[06:33:34] <daey> you stated a pulsecount of 1172. each count represents 0.0625°C. 1125 counts typically represent 20°C. you counted 47 counts more > meaning 47*0.0625°C + 20°C > 22.93°C
[06:35:14] <daey> but yeah. the whole count section looks kinda odd. the graph is not linear. which means 1count != 0.0625°C
[06:36:48] <lorenzo> daey: hm, so I guess "error can be linearly interpolated between temperatures given in table" etc etc
[06:37:02] <lorenzo> which means that I should use the LUT to correct the error probably
[06:38:04] <lorenzo> daey: but again, if you look at the LUT for 0C, the pulse swing is +/- 8
[06:38:09] <lorenzo> and 8 * 0.0625 = 0.5C
[06:38:15] <lorenzo> which is the accuracy
[06:38:19] <lorenzo> so..
[06:40:37] <daey> ok. i took the 0.125°C accuracy as the worst possible accuracy
[06:43:16] <lorenzo> https://github.com/lcafaro/avr-lmt01/blob/master/main.c
[06:44:52] <daey> i always wonder why they come up with these strange protocols. is it to maintain compatibility to something?
[06:46:06] <lorenzo> daey: to keep us entertained I guess :-)
[06:46:12] <lorenzo> I can't see a practical application of it
[06:46:19] <daey> the sensor only has 12bit resolution. yet they send 4096bits in the worst case...
[06:46:31] <lorenzo> I bought the sensor just for having fun with that pulse interface
[06:46:54] <daey> did you use the external interupt on rising edge?
[06:47:15] <lorenzo> no, I'm using interrupt on comparator toggle
[06:47:30] <lorenzo> daey: since ... the sensor requires external signal conditioning to bring it up to a decent logic level
[06:47:46] <daey> i see
[06:48:05] <lorenzo> so you either use a comparator, or add in a opamp / schmitt trigger
[07:30:02] <daey> i feel kind of stupid atm...if i throw a perfectly weighted coin X times. the chance to get one side is: (1-0.5)^X ?
[07:31:04] <Tom_itx> left or right hand?
[07:31:06] <daey> 1-0.5^X
[07:31:41] <daey> if you call a specific side before hand
[07:32:12] <daey> like you say. head. with one throw: 50%. with two 75% with 3 ....
[07:32:13] <Tom_itx> and which side was up when you flipped it?
[07:32:35] <Tom_itx> was it windy or calm?
[07:32:46] <daey> the outcome is perfectly random
[07:36:28] <daey> nah the formula is crap
[07:37:22] * theBear suspects that it was
[07:37:29] <theBear> windy or calm that is
[07:37:34] * Tom_itx suspects theBear
[07:37:50] <theBear> statistics/odds are a very subjective kinda math
[07:38:12] <daey> no its super simple
[07:38:27] <daey> well at least this question. not statistics in general
[07:40:51] <theBear> what i mean is, teh hard reality can be "bent" with perfectly reasonable sounding math/factors
[07:41:12] <theBear> for example surely if you get three heads, you got a higher chance of getting a tail next, don't you ?
[07:41:23] <theBear> or don't you. <grin>
[07:44:02] <daey> theBear: ? no you dont
[07:44:07] <daey> its 50% every time.
[07:44:22] <daey> but the sum over multiple throws is ofc. higher than 50%
[07:46:40] <daey> for a coin its rather simple. if you throw it twice, there are 4possible outcomes. (0,0) (0,1) (1,0) (1,1). in 3 of 4 cases you have a head > 75% probability
[07:46:45] <theBear> but you can extrapolate 50% per flip to mean that the more you get of one side, the more likely the other is to turn up next, certainly in the real world this kinda thing is common (among sales-material-writer-types for example) ... i'm no statistics student, but i'm not sure the reasoning/theory is invalid, tho lemme assume that reasoning IS invalid, and i'lkl consider your equation
[07:47:39] <theBear> hmm, maybe your formula /X ? just using 10 as a test-case in my head so far
[07:48:32] <theBear> .5^10 is err, .000976562 on my calculator, that can't be right ?
[07:49:32] <daey> could be. no idea. the first few steps are imaginable. but i cant guess the chance for such high numbers
[07:52:01] <theBear> when you say chance to get one side, what you mean exactly?
[07:52:16] <theBear> lol "such high numbers" after i just said 10 flips <grin>
[07:52:24] <theBear> yeah i know you didn't mean that
[07:53:02] <daey> theBear: what is the chance to get at least one head in X throws
[07:53:18] <daey> 1st 50%, 2nd 75% ....
[07:54:14] <theBear> mmm, that kinda verges on my extrapolation is valid or not direction of thought i think
[07:54:34] <theBear> x more throws you mean right ?
[07:54:41] <daey> no throws overall
[07:54:57] <daey> whats your chance to get a head in 4 throws > 1-0.5^4
[07:55:26] <daey> if the formula is correct 93.75%. i think the formula is right for this specific 50% case
[07:55:27] <theBear> hmm, i think your reasoning/theory says it is always 50%*throws, but mine says umm, hmm, the same ? damn, you broke me, and i was doing so well the last couple hours, getting stuff done, taking names :)
[07:56:03] <theBear> hmm, in 4 throws it should be 4/4 = 100% , or 400% maybe ?>
[07:56:26] <daey> nah its asymtotic
[07:57:18] <daey> even in infinite throws theres still a chance that you never get a head
[08:02:26] <julius> on a 6 pin connector, theres pin 1 and opposite of it pin 2, 3 opposite of 4, 5 opposite of 6. i know where pin one is on the cable...what would be the next cable?
[08:02:38] <julius> to what ping would it be connected?
[08:03:19] <LeoNerd> Generic question is generic
[08:03:25] <LeoNerd> Give more details. What kind of connector?
[08:03:52] <julius> the 6 pin programming cable
[08:04:00] <julius> let me look for a picture
[08:04:57] <julius> https://fabienroyer.files.wordpress.com/2010/12/6-pin-isp-cable.png and that answers my question i gues
[08:04:57] <LeoNerd> Oh, the 2x3 header?
[08:04:58] <julius> s
[08:05:17] <julius> yes, need to use a older programmer to not kill my current setup
[08:05:44] <LeoNerd> If it's a 0.05" pitch ribbon cable, the conductors are numbered sequentially
[08:05:58] <LeoNerd> Often number 1 has an identifying mark.. e.g. on a usual grey cable it'll have a red stripe
[08:05:59] <julius> ah ok
[08:06:06] <julius> yeah, i got that
[08:06:15] <julius> then the picture is wrong
[08:06:21] <julius> 1 is not the red cable there
[08:07:50] <LeoNerd> The numbers are different too
[08:08:00] <LeoNerd> That's saying 1 4 5 6 7 8
[08:08:12] <julius> true
[08:08:14] <LeoNerd> Maybe this is explaining an adapter of some kind? Giving pin numbers of the thing on the other end?
[08:08:31] <julius> was a random picture, didnt read the description
[08:08:32] <LeoNerd> http://www.batsocks.co.uk/readme/isp_headers.htm is the usual reference I use
[08:09:13] <julius> that is done nicely
[08:09:55] <julius> im curios, what do you do currently with your avr's?
[08:11:00] <LeoNerd> Allsorts
[08:11:11] <LeoNerd> Right now (as in literally this second) I have some data logger things
[08:26:46] <LeoNerd> It's a fairly generic datalogger with m328P, SD card, RTC, USB serial port.
[08:27:05] <LeoNerd> Currently connected to 4 buttons to get conference feedback
[09:00:11] <cehteh> ho avrs these days .. cleaning up workshop and building quadcopter frame :D
[09:04:35] <julius> what kind of data would you log with that?
[09:05:23] <julius> cehteh, build me a copter that can follow a target and i make you rich
[09:05:46] <cehteh> like the zano? :D
[09:07:51] <cehteh> well .. small frames now for serioulsy badass copters, lets see it i can scratch 200km/h :)
[09:34:22] <julius> well, maybe not with the end of it. just read about it
[09:35:03] <julius> just connected a new avr on a used board, theres already a atmega32 sitting on it. blinking a led...kinda makes me nervous
[09:35:21] <julius> dont really know what it was supposed todo, i hope its not a timer that counts down...
[11:26:49] <Jartza> evening
[11:46:43] <LeoNerd> ATmega328P, 3.3V power, running at 14.7456MHz; plus RTC plus SD card, plus an LED. Does 30mA sound a lot for that?
[11:47:00] <LeoNerd> That's what I'm measuring here, and that feels excessive for a chip that's in sleep mode most of the time
[11:47:35] <LeoNerd> Not sure if I'll save much (any?) power by applying PRRs
[11:47:52] <LeoNerd> E.g. I don't need the I²C module except when talking to the RTC chip once a minute.. I could turn tha toff
[12:01:29] <kc1dmf> Hi, everybody!
[12:02:47] <LeoNerd> Afternoon
[12:04:09] <kc1dmf> What's going on?
[12:27:26] <megal0maniac> Fun question
[12:28:35] <megal0maniac> I have a signal generator, it generates an AC signal (-1.5V - 1.5V p-p)
[12:29:38] <megal0maniac> How do I get it to be 0V - 3V p-p? Except for adding 1.5V
[12:29:47] <LeoNerd> Er.. that's how :)
[12:30:02] <LeoNerd> AC-couple it using a capacitor, to something that applies a bias
[12:30:11] <megal0maniac> Well the amplitude is adjustable
[12:30:20] <LeoNerd> You likely want some buffering either side
[14:17:28] <WormFood> How do I get my arduino to output serial to the USB (using avr-gcc, not the Arduino stack)? Do I need to set it to a specific speed, or something, that I'm overlooking?
[14:18:35] <cehteh> eh what?
[14:18:58] <cehteh> what arduino? how is the usb connected?
[14:20:42] * cehteh just programms uart on the nano clone where usb is connected to some ftdi clone (CH34something) and it just works
[14:21:25] <Jartza> some very old arduinos had ftdi-chip to handle usb-to-serial
[14:21:44] <Jartza> then I think uno has atmega8u there in place of ftdi
[14:22:21] <cehteh> nanos have ftdi
[14:22:30] <Jartza> my uno seems to have mega16u2
[14:22:36] <cehteh> other smaller arduinos prolly too
[14:22:43] <Jartza> so, essentially arduino has two atmegas :)
[14:22:48] <cehteh> i never used a full size arduino ..
[14:23:07] <Joggl__> absolutely uninteresting what chip is on int
[14:23:07] <Jartza> but the "arduino" itself (mega328p) is not connected to usb as such... it's just uart
[14:23:21] <Joggl__> its just the usb-to-serial converter. important is the main chip, thats 328p
[14:23:39] <Joggl__> and the usart from 328p is connected to these usb-to-serial chips
[14:23:43] <cehteh> some arduinos have main chips with usb
[14:23:49] <Jartza> it doesn't have to be 328p
[14:23:57] <WormFood> Right. The avr's usart is connected to the serial-to-usb chip (which in my case, is an avr too)
[14:24:05] <WormFood> I have the mega2560 board
[14:24:33] <WormFood> do I need to set the serial speed, to a specific bit rate, or something?
[14:24:40] <Joggl__> sure.
[14:24:46] <WormFood> which is?
[14:25:00] <Joggl__> better. you have to calculate the register-settings to fit the baudrate
[14:25:12] <WormFood> duh
[14:25:27] <Joggl__> and than you set the baudrate on your pc. the usb-to-serial chip translates every baudrate
[14:25:31] <WormFood> what bit rate does the serial-to-usb converter expect?
[14:25:45] <WormFood> The bit rate on the pc doesn't matter, with usb.
[14:25:52] <Joggl__> sure it does
[14:25:58] <WormFood> no it doesn't.
[14:26:00] <Joggl__> you set 9k6Bd on pc
[14:26:01] <WormFood> I've tested this
[14:26:11] <Joggl__> the pc send this to usb-to-serial chip
[14:26:21] <cehteh> with this ftdi clone it just works as in i can use any baudrate i want, tested from 50baud to 115200 on the avr side, and same settings on the terminal
[14:26:23] <WormFood> 9.6k, 115.2k...don't matter on the usb side
[14:26:40] <Jartza> WormFood: 2Mbit/s is the max :)
[14:26:42] <Joggl__> if you put 115kbd on pc
[14:26:51] <Jartza> that much your atmega16u2 can handle
[14:26:53] <Joggl__> you get 115kbd at your atmega2560
[14:27:00] <WormFood> you guys do realize, 99% of the time, when you say "baud", you're using the term incorrectly?
[14:27:23] <Jartza> btu I tend to use 230400
[14:27:28] <Jartza> WormFood: we do
[14:27:45] <WormFood> if bit rate on the avr side doesn't matter, then I see no reason not to run it at maximum speed.
[14:27:52] <Jartza> I had 600 baud modem which transferred data 1200bps :)
[14:28:23] <WormFood> however, when using the arduino stack, I'm able to get serial output in a terminal emulator, on the pc side, and bit rate on the pc side does not matter.
[14:28:42] <Joggl__> so, back to your question: you have to set up the atmega2560 to the baudrate you set up on your pc. fact.
[14:28:44] <WormFood> I am however, unable to get any serial output on the usb port, when using avr-gcc
[14:29:21] <WormFood> Joggl__, I've done that also. Even if the bit rate was wrong, I should still get something (garbage), but instead, I get nothing at all.
[14:29:46] <Joggl__> yeah, at least some garbage
[14:29:53] <WormFood> I get nothing.
[14:29:54] <Jartza> now that I'm thinking, 2Mbit/s did have some issues
[14:30:06] <Joggl__> whats your ide for programming it?
[14:30:08] <Jartza> I think it was 1Mbit/s speed that was working ok with mega16u2
[14:30:17] <WormFood> my code is trivial. Simply configure the usart, and wait for the data register to be clear, and pump a byte into it, constantly.
[14:31:13] <Jartza> there's tx and rx leds usually on arduino boards
[14:31:15] <Jartza> do they flash?
[14:31:54] <Joggl__> you set all registers correctly?
[14:32:11] <WormFood> duh...you're right. I couldn't see them due to the shield I have on it. but it does have a tx/rx led, that I totally forgot about.
[14:32:37] <WormFood> I'm sure I've set all the registers correctly. I've gone over that code, and double checked the datasheet, and all that jazz.
[14:32:44] <Joggl__> UCSRB |= (1<<RXEN) | (1<<TXEN);
[14:33:20] <WormFood> UCSR0B=(1<<RXEN0)|(1<<TXEN0);
[14:33:28] <WormFood> UCSR0C=(1<<UMSEL00)|(1<<UCSZ00)|(1<<UCSZ01);
[14:35:03] <Joggl__> cool
[14:35:15] <Joggl__> my browser crashes opening the datasheet.........
[14:35:36] <WormFood> Using Chrome?
[14:36:02] <Joggl__> vivaldi
[14:36:02] <WormFood> IE is the world's most popular web browser...
[14:36:08] <WormFood> ...for downloading other web browsers.
[14:36:32] <Joggl__> you set umsel00
[14:36:38] <Joggl__> so you have synchronous usart
[14:36:47] <Joggl__> doesnt this need hardware handshake?
[14:37:24] <WormFood> hhhmmm...you're right.
[14:37:29] * WormFood investigates
[14:37:37] <Jartza> seems the leds are controlled by the 16u2
[14:37:42] <Joggl__> remove umsel00 because arduinos do not have this lines
[14:37:42] <Jartza> and not mega2560
[14:37:51] <Joggl__> jartza: you are right :P
[14:38:07] <Jartza> 16u2 txd goes to PE1 and rxd goes to PE0
[14:38:33] <WormFood> fuuuuck! That was the problem. I don't know how I overlooked that.
[14:38:36] <Joggl__> RxD0
[14:38:43] <Joggl__> :D
[14:38:53] <WormFood> *now* I'm getting garbage, which is more than I was getting before
[14:38:56] <Joggl__> :D
[14:39:13] <Joggl__> chipis on 16mhz i think with external crystal
[14:39:25] <julius> the atmega169 got 1kb of ram, that is 8192bit....assuming that i can use 50% of it. whats the biggest number that fits in 4096bit?
[14:42:14] <Caesium> 2^4096 is one fucking huge number.
[14:42:28] <julius> was just wondering..ah yes thats the way to find out
[14:42:35] <Jartza> yes
[14:42:56] <Jartza> python -c "print 2**4096"
[14:42:57] <Jartza> :D
[14:43:23] <Joggl__> ah, you really want to know the decimal value ;) i just thought "but... but... 4096 is the number...."
[14:43:26] <WormFood> 2^512 = 1.340780793×10¹⁵⁴
[14:43:28] <Jartza> http://pastie.org/10743949
[14:43:53] <WormFood> 2^1024 = 1.797693135×10³⁰⁸
[14:44:51] <Jartza> that pastie is 2^4096
[14:45:00] <julius> i used bc already
[14:45:00] <julius> thx
[14:45:11] <Jartza> you need that big numbers?
[14:45:12] <WormFood> My calculator craps out between 1024 and 1500
[14:45:34] <Jartza> lol
[14:45:42] <Jartza> osx calculator says "infinity" :D
[14:46:59] <Jartza> that would make a helluva counter
[14:47:03] <WormFood> Jesus H. Fuck! Now I can't program my board.
[14:47:09] <julius> Jartza, i want that chip
[14:47:15] <Jartza> what chip?
[14:47:23] <WormFood> exact same command I've been using, now won't find the avr
[14:48:14] <julius> that chip your calculator calculated ;)
[14:49:01] <Jartza> WormFood: are you using the iscp header to program the atmega2560?
[14:49:19] <WormFood> hahaha...I suppose it helps to close whatever has opened the usb port first.
[14:49:30] <Jartza> ohh, that too
[14:49:35] <WormFood> no. I'm using the arduino bootloader.
[14:49:53] <Joggl__> :)
[14:49:58] <WormFood> But, I need to get an ISP, just to stop this type of thing from happening. Already using the usb to test with, and program with is frustrating.
[14:50:35] <Joggl__> i sell isp-programmers :P
[14:50:56] <WormFood> Joggl__, you're right about needing to set the serial speed the same on both the avr and pc side...but I have another usb serial device (a printer), that works no matter what speed I select on the pc side.
[14:51:27] <WormFood> I was thinking it was my avr that worked at any speed, but seems not.
[14:51:40] <Joggl__> WormFood, dunno whats in the printer, but i exactly know whats in the 16u2 of arduino
[14:53:01] <WormFood> this is weird. If I change the bit rate on the PC side, and set it back to the right speed, I get garbage.
[14:53:57] <Joggl__> just buy one of these: https://www.saleae.com/
[14:53:59] <Jartza> WormFood: there's usbasp programmer in ebay for <$2
[14:54:05] <WormFood> I wonder what's up with that.
[14:54:18] <Jartza> I once ordered 10 of those and they work just fine :)
[14:54:19] <WormFood> I can buy one locally even cheaper, I'm sure.
[14:54:25] <Jartza> sure thing
[14:54:28] <Jartza> probably the same ones
[14:54:35] <WormFood> 我住在深圳
[14:54:52] <Jartza> yea, you've told :)
[14:55:32] <WormFood> I'm a 15 minute walk from one of the world's largest electronics areas. Almost guaranteed, you own something that was made in my city.
[14:55:45] <Joggl__> shenzen?
[14:55:51] <WormFood> yep
[14:56:05] <WormFood> Sweet Shenzhen
[14:56:10] <Joggl> i want to be there one time...
[14:56:24] <Jartza> WormFood: plenty. I order a lot of PCBs and they come from shenzhen
[14:56:26] <WormFood> Come on. It's on this planet. It's not hard to get to.
[14:56:38] <Joggl> i.. i.. do not fly...
[14:56:42] <WormFood> My mom is coming on Friday. I go to HK to pick her up.
[14:56:47] <WormFood> why not?
[14:56:53] <WormFood> Flying is the safest form of travel.
[14:56:58] <Jartza> so even my own products come partly from there
[14:57:28] <Jartza> like Tagsu. The PCB and the lanyard come from there :)
[14:57:43] <Joggl> shenzen is one of the only places on earth why i will get into such a plane again in my life.
[14:57:50] <Jartza> but the LCD nowadays comes from Taiwan
[14:57:54] <Jartza> previous version was from Shenzhen
[14:57:54] <WormFood> Even when you factor in, the crashes, and everything else, flying is extremely safe. And, if you're paranoid about a crash, don't sit in 1st class. Sit in the last 2 rows of the airplane. That's the safest spot, outside of being inside that black box.
[14:58:18] <Jartza> the black box is usually orange
[14:58:22] <WormFood> I know
[14:58:29] <WormFood> But, they still call it a black box
[14:58:32] <Jartza> yep
[14:58:41] <WormFood> Black women also have one of those too ;)
[14:58:49] <Jartza> :D
[14:59:12] <WormFood> But, I've heard they're all pink on the inside. (I wouldn't know)
[14:59:33] <WormFood> I haven't seen them all
[14:59:48] <Joggl> just ordered displays today in shenzen
[15:00:08] <WormFood> I got a bunch of LCD displays, I want to sell.
[15:00:13] <julius> black box? do you guys know the joke with the guy fucking the black stewardess in the toilet of a plain?
[15:00:18] <WormFood> From dead laptops. I can sell them in the market.
[15:00:28] <WormFood> I don't think I've heard that joke.
[15:00:39] <WormFood> But, that reminds me of another joke....
[15:00:40] <Jartza> nope
[15:00:48] <Joggl> o0
[15:00:49] <julius> he wants to put his data in the black box...in case of a crash
[15:01:35] <Joggl> i like buydisplay.com
[15:01:47] <julius> WormFood, what do you pay as a private person to send items to europe or the us? like below 500g?
[15:03:30] <WormFood> The pilot of a flight, gets on the intercom, and says "Our flight today, from New York to LA will take approximately 8 hours, and we'll be crusing at an altitude of 10,000 feet", and he thinks he turns off the intercom, but it's still on, and he says to the co-pilot "I think I'm gonna take a shit, and fuck the stewardess", and the stewardess upon hearing this, rushes to the cockpit to tell the captain the intercom is still on. An old woman sees her
[15:03:31] <WormFood> running, and says "what are you running for? Didn't you hear him say he has to take a shit first?"
[15:04:22] <julius> hehe
[15:04:24] <julius> good one
[15:04:25] <WormFood> julius, I don't know. I never sent a package to usa. I just wait 'till my mom comes, and send stuff back with her.
[15:04:41] <WormFood> I got a pair of shoes from a drug dealer...
[15:04:53] <WormFood> ...I don't know what he laced them with, but I've been tripping.
[15:05:57] <julius> :)
[15:06:00] <WormFood> I'm trying to be a hip dad, and stay up on all the lingo the kids are using these days, so I said "If you don't interface with your vegetables, then you won't be able to download any desert".
[15:06:50] <julius> i can smile over that
[15:07:34] <julius> crap, the programmer works on one chip but not on the other...the other is still blinking a led
[15:09:18] <WormFood> Yeah, that one isn't that funny here, but at the right place, and the right time, that could be very funny.
[15:10:07] <WormFood> I had a friend come to visit, and he noticed the package of blueberries there, and there were only 2 left, and I said "they represent my 2 blue balls"
[15:10:30] <Joggl> and than he licked the blueberries instead of eating them?
[15:10:42] <WormFood> only in your dreams.
[15:11:01] <WormFood> how do you know it was a guy that was visiting?
[15:11:55] <Joggl> because i know everything.
[15:12:31] <WormFood> I used to have a problem with rats. One day, I came home, and found one in my kitchen, so I closed the doors and windows, so I could do something with it. I split it's head wide open by stepping on it. I wasn't trying to fuck it up ,just stun it. For me, it was the thrill of victory, and for the rat, it was the agony of de feet.
[15:12:32] <julius> i just walked slowly with the basket next to my uncooperative controller...he is sweating now
[15:14:18] <WormFood> Whenever I meet someone who says they're an engineer, I very excitedly say "You're an engineer?!? That looks like a really tough job. I have a question I've been dying to ask you...How do you steer the train, to keep it on those tiny little tracks".
[15:15:11] <twnqx> in sovjet russia, tracks steer YOU
[15:17:30] <WormFood> very interesting. I change the bit rate on my pc, and I get garbage, of course, I change it back, and I get different garbage. I issue a hangup command, and it goes back to normal.
[15:17:57] <WormFood> I wonder how my printer is working at any bit rate.
[15:32:02] <julius> https://img.fasttechcdn.com/103/1039701/1039701-2.jpg <- on the left side of the picture, the cable header that comes towards the screen. where is vcc?
[15:34:02] <WormFood> I can't seem to load that image
[15:34:59] <WormFood> or perhaps you shouldn't use shitty services like that. "FastTech does not support your country" "Your IP address based on the country, region or network has been flagged."
[16:08:36] <julius> oh sorry
[16:09:37] <julius> http://www.pic-upload.de/view-29902187/1039701-2.jpg.html
[17:01:15] <lorenzo> julius: http://cdn.instructables.com/FR9/HXLZ/GAPV8IA4/FR9HXLZGAPV8IA4.MEDIUM.jpg
[17:01:16] <lorenzo> "VTG"
[17:01:43] <lorenzo> http://cdn.instructables.com/FHT/SR4F/IBC22EHF/FHTSR4FIBC22EHF.MEDIUM.jpg -> this one shows the plastic tab too
[17:05:38] <julius> yes i know those
[17:05:59] <julius> but do they come out the same?
[17:06:49] <lorenzo> what do you mean?
[17:06:55] <julius> on the picture i posted i get +5v between leftmost pin in the second row, counting from top
[17:07:09] <julius> and the one next to it on the same row
[17:07:36] <julius> my cable is connected on one side to the programmer, the other i attached with single cables
[17:07:53] <julius> breadboard cables going in the connector
[20:00:37] <Diethyl> hey people
[20:00:50] <theBear> hey dude
[20:01:23] <Lambda_Aurigae> people...bah....come in here and insult us machine intelligences like that.
[20:06:17] <theBear> don't make me go all turier'ettes robot-style on yo' poor unsuspecting "ass"
[20:34:59] <Diethyl> sorry Mr. borg
[20:35:30] <Diethyl> I had a question I was hoping someone...I mean umm something could answer
[20:36:26] <theBear> heh, i think we're both real people, but i might be programmed to think that, hard to say
[20:36:41] <theBear> i hope you mean answer your greeting too, cos human or not, i ain't psychic
[20:37:13] <Diethyl> I was wondering if anyone or thing knew the proper pinout for at attiny85
[20:37:18] * Lambda_Aurigae is just psychotic
[20:37:28] <Caesium> Diethyl: its in the datasheet? whats the problem?
[20:37:30] <theBear> umm, this thing i like to call the g-image machine does
[20:37:30] <Diethyl> I'm trying to use a bus pirate as an avr to program my chip
[20:37:32] <Lambda_Aurigae> Diethyl, have you checked, oh, I dunno, the datasheet?
[20:37:36] <theBear> oh, and of course the datasheet
[20:37:53] <Diethyl> I'm using a different brand data probe
[20:38:15] <Lambda_Aurigae> it's still in the datasheet.
[20:38:19] <Lambda_Aurigae> no matter what probe you use.
[20:38:23] <Diethyl> the colors of the cables are different than the colors of actual clams so it makes things kinda confusing
[20:38:36] <theBear> clams ?
[20:38:38] <Diethyl> I meant clamps not clams
[20:38:40] <Diethyl> heh hhe
[20:38:45] <Lambda_Aurigae> so, you need the pinout of your cable, not the attiny
[20:38:46] <theBear> :)
[20:38:57] <theBear> one would hope the cable was marked something like 1-8
[20:39:01] <theBear> or 0-7
[20:39:14] <theBear> or ya know, however wide yer average pirate is these days
[20:41:22] <Diethyl> my god that's just crazy enough to work
[20:42:26] <theBear> i am pretty crazy... certified on two sides of the country ! and i remember working inthe past
[20:42:40] <Lambda_Aurigae> I worked in the past too.
[20:42:48] <Lambda_Aurigae> like, yesterday, and earlier today.
[20:44:24] <theBear> heh, cool
[21:46:18] <Diethyl> anyone have any cool projects going on?
[21:57:28] <Evidlo> I'm building a modulator
[21:57:33] <Evidlo> modem
[21:59:13] <Evidlo> Does anyone know what "#define get_rx_pin_status() ( SOFTUART_RXPIN & ( 1<<SOFTUART_RXBIT ) )" is doing?
[21:59:23] <Evidlo> I'm debugging somebody's code and this always returns 1
[22:00:07] <aandrew> Evidlo: well take it apart
[22:00:20] <aandrew> what's SOFTUART_RXPIN defined as, what's SOFTUART_RXBIT defined as?
[22:01:32] <Evidlo> PINB and PB2
[22:01:42] <Evidlo> oh
[22:01:45] <Evidlo> hold on
[22:02:21] <Evidlo> I had it hooked up to PB0
[22:05:43] <Casper> poa poaaa poaaa powaawawawawawaaaaaaa
[22:10:21] <Evidlo> My modem is working at 1KB/s
[22:14:57] <Casper> is that good or bad?
[22:15:52] <theBear> it's working
[22:15:56] <theBear> sounds good to me
[22:16:35] <theBear> methinks the soft-uart function/code/handler would be somewhat relevant here
[22:17:06] <theBear> and without the other code that populates those variables elsewhere, they not gonna magically return different values if you test them over and over :)
[22:31:37] <Evidlo> That's fast enough for me
[22:31:58] <Evidlo> I might be able to double the speed, maybe
[22:33:52] <Evidlo> theBear: I'm using some softuart code I found
[22:34:37] <theBear> obviously :)
[22:35:31] <Evidlo> The weird thing is that when I measure the UART baud rate on a scope, I calculate 8000 baud instead of the 9600 I have it set to
[22:35:50] <Evidlo> Exactly 8000
[22:51:24] <theBear> is your scope x axis calibrated, or even set on a non-variable setting ?
[22:52:01] <theBear> and how is that "set", remembering that a soft uart will be non-hard-timing, to varying degrees depending on approach
[22:55:27] <Evidlo> theBear: Is X calibration something I need to worry about on a digital scope?
[22:55:39] <theBear> i dunno, probly not
[22:56:01] <theBear> if it fancy and modern shouldn't it count the baud/transition rate for yer to begin with ?
[22:56:16] <Evidlo> theBear: Also, I thought the timing on uart was critical, since there's no time sync pulse
[22:56:36] <Evidlo> just a start and end bit
[22:56:51] <theBear> there some ascii alphabet/normal character, i wanna say U or u but might be wrong, that should be a perfect hi/lo/hi/lo squarewave for the between start/stop bits portion of a standard serial kinda byte, which is handy for things like scoping this stuff
[22:58:02] <Evidlo> I'm pretty sure I'm measuring it correctly. First cursor on the edge of the start bit, second on the the edge of the end bit/
[22:58:12] <Evidlo> 8bits/time = baud
[22:58:41] <theBear> Evidlo, well, ideally it's very consistant and within no more than a few %'s of the rated speed/what the other end is listening for or sending, but that doesn't mean the code you grabbed from some random dude is any good, or that you ain't just completely outta thinking time in any given (9600+(9600*2/8ths) )th of a second period that your soft uart needs to be ready to do the next something by
[22:59:59] <Evidlo> Well the softuart is able to communicate with another chip running the same thing, so I don't think it's overloading the chip
[23:00:54] <lorenzo> I've just figured out that the arduino nano is a pretty good AVR development board
[23:01:06] <lorenzo> it's got the ISP header, on board usb<>serial converter too :o
[23:01:45] <theBear> well, apart from the name and price and way they feel the need to renumber and out-of-sensible-order all the iopins/ports, it's not too bad
[23:02:20] <lorenzo> it's 2$
[23:02:31] <theBear> oh, and how they seemingly intentionally shield you from thigns like what micro you are actually using/programming, and how it works with needless abstraction and renaming etc
[23:02:34] <lorenzo> yeah, I've had to print out a Arduino pin <> ATmega328p pin thing
[23:02:42] <theBear> holy crap, surely it ain't a real arduino-branded one ?
[23:03:04] <theBear> re price that is
[23:03:06] <lorenzo> theBear: bit.ly/21BwD9v
[23:03:25] <lorenzo> theBear: about the arduino "language" I don't care much, I'm using plain avr-gcc and a makefile with it
[23:03:34] <lorenzo> it's just a nice atmega328p board :p
[23:04:44] <theBear> mmm, looks suspiciously logo/dirty-word free to me, surely it's just a fairly-similar-looking clone at that kinda price, which makes me much more approving of it, and however you come at it, that avr on any board for under 2 bucks is a bargain
[23:05:08] <theBear> wait, you said tehre a ft232? or clone chip on there too ?
[23:05:37] <lorenzo> theBear: there's a ch340 on it
[23:05:50] <lorenzo> yeah it's a clone, the entire thing
[23:05:58] <lorenzo> probably the serial converter too :D
[23:06:08] <lorenzo> and I don't trust the voltage regulator either
[23:23:36] <Diethyl> does anyone know an easy formula for calculating voltage drop
[23:24:04] <Diethyl> I'm trying to figure out what resistor to use to drop from 6 to 5 volts
[23:24:37] <theBear> hot damn ! you could get 8 of them delivered cheaper than the cheapest on-a-board-of-any-kind avr available off a shelf anywhere in the country here, and 12 or 16 of 'em for the price of the cheapest in-a-shop-to-buy-today ft232/clone/anything that can serial-usb without it being programmed into a micro in the whole counttry !