#avr Logs

May 02 2018

#avr Calendar

02:44 AM polprog: https://puu.sh/AetAF/99c90fe1bf.jpg
02:47 AM polprog: took about 8 mins to upload from here over HSPA
02:47 AM Haohmaru: such much noise reduction, wow
02:51 AM Emil: antto: I never left
02:54 AM polprog: morning emi
02:54 AM polprog: Emil*
02:58 AM Haohmaru: u wot
03:18 AM nohitzwork: https://www.arrow.com/en/research-and-events/videos/the-top-10-development-platforms-dev-kits-2018
03:20 AM nohitzwork: i think this would be viable alternative for those chinese cheap ones https://www.arrow.com/en/products/sip-kitnxf001/samsung-electronics
03:20 AM nohitzwork: the dev kit is 33$ but the module itself only 10$
03:21 AM nohitzwork: and it runs tizen
04:45 AM Emil: >top development boards
04:45 AM Emil: >1. Arduino Uno
04:45 AM Emil: Instant loss of all credibility
04:46 AM LeoNerd: Is my 328pb board in the list? ;)
05:02 AM polprog: lol Emil
05:03 AM polprog: if you program it in normal c and get rid of that stupid pin numbers its pretty much a breakout board
05:03 AM polprog: like any other :v
05:06 AM l9_ is now known as l9
05:11 AM Haohmaru: polprog aren't you gonna rub-off the "arduino" label from it?
05:11 AM Haohmaru: coz u loose your credibility instantly
05:13 AM aczid: all those people without credibility making things. shame on them
05:14 AM Haohmaru: they should #include <credibility.h>
05:25 AM aczid: maybe make an node.js npm package for instant inline credibility
06:40 AM nuxil: Emil doesnt like arduino, thats why he dosent want to see arduino as nr1, even tho it has the best ecosystem/ biggest community of them all.
06:41 AM * nuxil shows Emil a unequal resistor ladder thats linear ( http://i.imgur.com/BXnTi.png ) and see him go insane :p
06:42 AM polprog: what resistors
06:42 AM polprog: i just see some bent wires there
06:43 AM Haohmaru: i see grayscale pixels
06:43 AM nuxil: hu?
06:43 AM polprog: hmmm
06:44 AM nuxil: was reading this old post i found a bit interesting.
06:44 AM nuxil: http://www.nerdkits.com/forum/thread/1815/
06:47 AM nuxil: strange that they dont got the discovery or nucleo on that list
06:47 AM polprog: "mongo" on that thread has a point
06:48 AM nuxil: "mongo"?
06:48 AM nuxil: as i retarded ?
06:48 AM nuxil: to be "mongo" in my language just means to be realstupid/retarded :p
06:48 AM polprog: lol
06:49 AM polprog: mongoDB? you have a point there
06:49 AM nuxil: LOL
06:59 AM nohitzwork: http://www.st.com/en/evaluation-tools/steval-fcu001v1.html
07:00 AM nohitzwork: https://blog.st.com/steval-fcu001v1-drone-flight-controller-unit/
07:28 AM day: nuxil: german?
07:29 AM nuxil: day, no.
07:29 AM day: NL?
07:29 AM nuxil: no
07:29 AM nuxil: NO!
07:29 AM day: it means retard here as well
07:29 AM nuxil: no -> as in norway :p
07:30 AM day: :P
07:30 AM day: .no makes it easier to "get"
07:30 AM nuxil: :D
08:51 AM laurence__ is now known as Laurenceb_
08:51 AM Laurenceb_: hi, anyone here familiar with twi/i2c?
08:51 AM Laurenceb_: I'm trying to work out why I'm not getting as much data through as I hoped for
08:52 AM Laurenceb_: in fact I'm getting about 70% of the theoretical data throughput with 16mhz atmega328p and 400khz i2c
08:52 AM Laurenceb_: does the peripheral take several clock cycles to do anything?
08:52 AM rue_mohr: your saying you have 400Khz i2c and your not getting as much data thruput as you want
08:53 AM rue_mohr: I'd just go out on a limb and say protocol problem
08:53 AM rue_mohr: use a different protocol :)
08:53 AM rue_mohr: twi and i2c are synchronous, there are no delays
08:54 AM rue_mohr: let me guess, your getting about 1/10 the thruput you expected?
08:54 AM Haohmaru: spi is moar synchronous
08:55 AM Laurenceb_: rue_mohr: not 70%
08:55 AM Laurenceb_: but my i2c interrupt service routine is quite simple
08:55 AM Laurenceb_: I cant see where the clock cycles are going
08:55 AM rue_mohr: at 400khz, what are you talking to, and how much thruput are you expecting
08:55 AM Laurenceb_: unless the peripheral is slow to respond
08:56 AM Laurenceb_: I'm talking to an accelerometer
08:56 AM Laurenceb_: I get 3.05ksps
08:56 AM Emil: polprog: you trying to teach your father? :D
08:56 AM Emil: nuxil: no
08:56 AM Emil: it's not about me not liking Arduino
08:56 AM Emil: I only dislike the HAL and software style it promotes
08:56 AM Laurenceb_: start,address+w, register,start,address+r,r,r,r,r,r,r,stop
08:56 AM Emil: the breakoutboards are just minimum development boards which are amoral
08:57 AM Laurenceb_: o theoretically I should get just over 4ksps
08:57 AM Laurenceb_: *so
08:57 AM Laurenceb_: about 100 i2c bit periods
08:58 AM Emil: Having that Uno board as number one promotes this kind of development, which is the cancer and bane of my existence http://blogs.uakron.edu/waynec3/files/2016/09/pic1.jpg
08:58 AM Emil: integrating fucking jumper cables
08:58 AM Emil: I _hate_ that we don't weed/beat it out of new students right the first fucking year
08:58 AM Emil: the teachers are so fucking afraid to teach it hurts :D
08:59 AM Emil: There's a time and place for breadboards but whole fucking projects like that is not it
08:59 AM Emil: argh
08:59 AM Emil: /rant
09:00 AM Haohmaru: Emil wut's that on the pic?
09:00 AM Emil: Haohmaru: first suitable image I got with "arduino project"
09:01 AM Haohmaru: needs a warning sticker: "don't shake, don't turn upside down"
09:03 AM rue_mohr: ok, so 400Khz, 40 bytes/sec
09:03 AM rue_mohr: bytes, so everyting from the address up
09:03 AM rue_mohr: how many bytes are your samples?
09:03 AM Haohmaru: eh?
09:03 AM nuxil: Laurenceb_, what i2c lib are you using ?
09:04 AM rue_mohr: 400Khz is 400Khz
09:04 AM Emil: rue_mohr: wot
09:04 AM rue_mohr: 400Khz is 400Khz
09:04 AM rue_mohr: its synchronous
09:04 AM Haohmaru: rue_mohr how u calculated 40 bytes/sec?!
09:04 AM rue_mohr: almost nobody uses pulse stretching
09:04 AM Laurenceb_: https://github.com/pietern/avr-i2c
09:04 AM nuxil: Laurenceb_, the one i found to be god is http://homepage.hispeed.ch/peterfleury/avr-software.html
09:04 AM rue_mohr: 400 clocks/sec, 10 clocks/byte
09:04 AM nuxil: *good
09:05 AM rue_mohr: *typ
09:05 AM Haohmaru: why 10?
09:05 AM Emil: rue_mohr: wtf
09:05 AM Emil: rue_mohr: >400 clocks sec
09:05 AM rue_mohr: do you know about stop drop and roll with i2c?
09:05 AM Emil: what the fuck are you talking about
09:05 AM Haohmaru: i'm not familiar with i2c, no
09:05 AM Emil: also k is lower case
09:05 AM Emil: it's 400kHz
09:06 AM rue_mohr: 400k clocks/sec, 10 clocks/byte 400k/10 is 40kbytes/sec
09:06 AM nuxil: Laurenceb_, you should give peter fleury's i2cmaster code a try. i used with with hw and software solution and works like a charm with both.
09:06 AM rue_mohr: then you take off a byte for every packet, 1 for writing, 2 for reading
09:06 AM Laurenceb_: is it interrupt driven?
09:06 AM nuxil: its asm
09:06 AM Haohmaru: where do extra 2 clocks go per byte?
09:06 AM rue_mohr: then you take off the extra bytes you need to ask for data
09:07 AM rue_mohr: then you divide whats left by the size of the reply
09:07 AM rue_mohr: and you have your rate
09:08 AM Laurenceb_: well I have 9bytes +3*start + 1*stop
09:08 AM Laurenceb_: so worst case ~10.5 bytes?
09:08 AM rue_mohr: no
09:08 AM rue_mohr: you have to send a byte to ask to talk to it
09:09 AM rue_mohr: and if you want to read it, you have to send it twice, once to say what you want to read, and once to say you want to read from it
09:09 AM Haohmaru: ah, extra hidden bytes
09:09 AM Laurenceb_: sure
09:09 AM Laurenceb_: start,address+w, register,start,address+r,r,r,r,r,r,r,stop
09:09 AM rue_mohr: thats assuming you dont ahve to say much about what you want to read
09:09 AM rue_mohr: forget the start and stop
09:09 AM Laurenceb_: so 9bytes +3*start + 1*stop
09:09 AM rue_mohr: just assume 10 cycles/byte
09:09 AM Laurenceb_: ok
09:10 AM Laurenceb_: so 90 clock cycles
09:10 AM Laurenceb_: 4.4ksps
09:10 AM Laurenceb_: why so slow... grrr
09:10 AM Laurenceb_: I only see 3.05
09:11 AM rue_mohr: maybe that one does do clock stretching!
09:11 AM Laurenceb_: hmm
09:11 AM rue_mohr: a perphial can hold the clock line low to say "hold up!"
09:11 AM nuxil: just give the other lib a try and see your problems go away. if not blame Emil :D
09:12 AM rue_mohr: yes, beat your head against it for 24 hours so you can come say I was right
09:12 AM Laurenceb_: yeah the datasheet mentions clock stretching
09:14 AM Laurenceb_: maybe using the fifo mode on the sensor would speed it up
09:14 AM rue_mohr: if there is a way of streaming data from it instead of starting a new read all the time it would probably help a little
09:15 AM rue_mohr: I dont think you can get more than 5 bit values from something like a gyro at 3Khz anyhow
09:15 AM Laurenceb_: unfortunatly there isnt
09:16 AM Laurenceb_: I should stick a scope on the i2c lines
09:16 AM rue_mohr: to prove I'm right
09:16 AM Laurenceb_: looks like it must be clock stretching
09:16 AM nuxil: dont you have a logic analyzer ?
09:16 AM Laurenceb_: yes.. somewhere
09:16 AM rue_mohr: those logic analizers are AWESOME
09:17 AM rue_mohr: for a while I was convinced I didn't really need a scope
09:17 AM Laurenceb_: I'll try the fifo, maybe sensor wont hold as much if the data is already stored
09:18 AM rue_mohr: my guess is that its 12 bit sample rate is about 100Hz, and that reading more than that is just giving you the same value back repeatedly
09:18 AM Laurenceb_: http://www.analog.com/media/en/technical-documentation/data-sheets/ADXL375.PDF
09:18 AM Laurenceb_: nah it samples at 3.6khz
09:18 AM nuxil: oh.. use the spi dude
09:19 AM rue_mohr: spi can go way higher than 400Khz
09:19 AM Laurenceb_: someone already made a cable that uses i2c...
09:19 AM rue_mohr: front page "BANDWIDTH OF UP TO 1KHZ"
09:20 AM nuxil: so. make a new cable :p
09:20 AM rue_mohr: and that 1khz will usually not be at full resolution
09:20 AM nuxil: ouch
09:22 AM * rue_mohr squints at datasheet
09:22 AM rue_mohr: wtf
09:22 AM nuxil: page 10, output data rage 3200hz
09:22 AM nuxil: *rate
09:22 AM nuxil: hmm
09:22 AM rue_mohr: then on page 11 they top out at 400Hz
09:23 AM nuxil: yea
09:23 AM rue_mohr: wtf
09:24 AM Laurenceb_: well I'm getting 3.05ksps and values change each time
09:25 AM nuxil: 400hz is in low power mode
09:25 AM nuxil: looks like several modes
09:25 AM rue_mohr: hmm
09:26 AM rue_mohr: unusual to have 16 bit adc and 3ksps+ go togethor
09:27 AM rue_mohr: esp cause it looks like a mux'd adc
09:27 AM rue_mohr: maybe the different values are their filter
09:30 AM rue_mohr: there seems to be a fair bit this datasheet dosn't say
09:39 AM Laurenceb_: apparently analogue devices accels use clock stretching
09:44 AM Laurenceb_: and there is a mention of clock stretch on p19
09:53 AM Laurenceb_: interesting - looking at a histogram of the data, the lower bits are zero too often
09:53 AM Laurenceb_: looks like fifo is needed
10:01 AM polprog: [15:55] <Emil> polprog: you trying to teach your father? :D ???
10:01 AM polprog: context :D
10:01 AM polprog: ?
10:04 AM polprog: Emil: dear god that pic. breadboard inside an enclosure. NONONO ^W ^W
10:06 AM polprog: i hate all those crappy projects with universal enclosure, with universal rasterboards and it all looks like crap
10:09 AM nuxil: dont judge a book by its cover :)
10:16 AM nohitzzzz: sup
10:22 AM nuxil: not much
01:55 PM MrFahrenheit: just saw the avengers
01:55 PM MrFahrenheit: it was great
01:56 PM Emil: ah yeah
01:56 PM Emil: I need to go to the movies
01:57 PM MrFahrenheit: it was pretty much non-stop action/drama, no respite
01:58 PM MrFahrenheit: normally that would be horrible, but they pulled it off through the sheer variety
01:59 PM nuxil: so i guess no printer yet since you got time for movies :p?
02:04 PM MrFahrenheit: that is correct :P
02:04 PM MrFahrenheit: also, this was planned last week
11:28 PM day__ is now known as day