#avr Logs

Apr 23 2018

#avr Calendar

12:34 AM nuxil: mornings
12:39 AM eadthem: yes essentaly
12:40 AM eadthem: atm baro altemeter, ground speed, and air speed
12:42 AM nuxil: airspeed shold be "simple" to do. but how are you suppose to do groundspeed? unless you use gps
12:42 AM eadthem: gps
12:42 AM eadthem: which is easy on avr with a module
12:42 AM polprog: morning
12:43 AM polprog: i love murphys laws. i was on time on the platform today
12:43 AM nuxil: good day.
12:43 AM polprog: the train broke
12:43 AM polprog: and were stuck
12:43 AM polprog: ecks. dee.
12:44 AM nuxil: LOL
12:45 AM nuxil: eadthem, why do you need something that mesures 1000 feet ?
12:45 AM eadthem: well strictly i dont
12:45 AM polprog: [07:44] <@polprog> oh were now going backwards to the nearest station lol
12:45 AM nuxil: all these small modules / ultrasonic / lidar is like for 100Meter and less.
12:45 AM eadthem: if it was easy i would add it else and it looks like im at the else then no
12:46 AM eadthem: lidar is more like 10 outdoors with non reflective surface
12:46 AM nuxil: http://blog.qartis.com/arduino-laser-distance-meter/
12:47 AM nuxil: :D
12:48 AM nuxil: and then you got this super cheap diy method https://sites.google.com/site/todddanko/home/webcam_laser_ranger
12:49 AM polprog: hmm that uni-t gutting is a nice hack
01:01 AM eadthem: well off to bed
01:01 AM eadthem: night
01:15 AM polprog: this city today is djikstra's wet dream
01:31 AM Haohmaru: i got a range of very very weird behavior when touching the crystal of the xmega
01:32 AM Casper: Haohmaru: that is why crystals are often grounded
01:32 AM Haohmaru: i have the feeling that it causes the program to jump to random locations in the flash
01:32 AM Casper: that shouln't happend
01:33 AM Casper: but it can stop and resume...
01:33 AM Casper: and if it go in 'overdrive' it can cause the avr to be massivelly overclocked and cause issues..
01:33 AM Haohmaru: yeah, but it sometimes sends random event messages (via my communication protocol) with semi-valid content
01:36 AM Haohmaru: sometimes the USART clock stops but the firmware "sort of" continues to work (a LED blinking in main() keeps toggling)
01:36 AM Haohmaru: or vise-versa
01:37 AM Haohmaru: sometimes i have the feeling that interrupts stop to work
01:37 AM Haohmaru: i implemented the osc failure detection/interrupt, and it catches only about 10% of the times (or less)
01:38 AM Haohmaru: sometimes the firmware appears as if it resets normally, but the RST controller and RTC16 indicate that the chip has not really reset (RST indicates no reasons for reset, RTC16 keeps ticking)
01:40 AM Haohmaru: what's more funky is, a few times the firmware kept running in a very weird state, where it was sending periodic PING messages via the custom protocol, but they looked shorter, as if the bitrate was wrong
01:40 AM Casper: consider what happend if your clock is unstable
01:40 AM Casper: and pause
01:40 AM Casper: it will screw up usart
01:41 AM Haohmaru: thing is, these packets are sent via the synchronous USART to another xmega, and that sends them via TCP
01:41 AM Casper: synchronious shouln't be affected if it stay within the receiver speed ability
01:41 AM Casper: but... need to make food... want to cook me something?
01:42 AM Haohmaru: a ping packet is "00 00 00 00 00 00" .. in that state i received "20 04 20 04"
01:44 AM Haohmaru: yeah, the wierd thing is that the usart clock looked right, but the packets appeared shorter
01:45 AM Haohmaru: the xmega which i was messing with is the usart master, the other xmega which receives is sync slaved .. so.. wtf
01:53 AM Casper: oh
01:54 AM Casper: if the clock pause
01:54 AM Casper: multiple interrupt could happend, and only one will then be processed
01:55 AM Haohmaru: hm
01:55 AM nuxil: the one with highest priority
01:55 AM Haohmaru: also, sometimes when i stop touching the xtal - the signal doesn't recover (no oscillation)
01:57 AM nuxil: dude. you got a real fetish for touching crystals :p
01:57 AM nuxil: stop it :p
01:58 AM nuxil: Haohmaru, did you ground the crystal case as i suggested ?
01:58 AM nuxil: some days ago
01:59 AM Haohmaru: i put a croc clip on it and attached it to ground, nothing changed
02:01 AM nuxil: :\
02:03 AM nuxil: Haohmaru, what crystal are you using? Hc49 ?
02:04 AM nuxil: Btw, did you setup the fuses for fullswing crystal.. "and long bootup time for the crystal to get stable?"
02:07 AM Casper: croc wire... bad
02:07 AM Casper: use a short wire soldered
02:07 AM * nuxil agrees
02:07 AM Casper: you did not grounded your crystal
02:07 AM Casper: you put an antenna on it
02:08 AM nuxil: shortest possible wirte to ground.
02:08 AM nuxil: *wire
02:08 AM nuxil: *connection
02:08 AM Casper: you would be surprised at what an antenna can be
02:10 AM nuxil: some chips has removed the fullswing osc driver circuit . dont know if it affects xmega tho.
02:27 AM Haohmaru: THT HC-49 (short one)
02:27 AM Haohmaru: the clock setup on xmega is controlled via software, not fuses
02:28 AM nuxil: oki. i have no idea. never used xmega. only atiny's and atmega's
02:28 AM Haohmaru: so i initialize the external crystal according to examples from atmel, which include waiting for the xmega to say that it's stable enough, then i switch to using that clock as system clock
02:29 AM Haohmaru: i also added an interrupt that detects failure in the clock, but it rarely catches it
02:30 AM Haohmaru: in that interrupt, i set a flag (global variable) which i then poll in main(), and if i see it there - i re-initialize the clock, and print a debug message via uart
02:30 AM Haohmaru: note: my uart is interrupt-driven
02:31 AM Haohmaru: so, it's technically possible that the interrupt catches more often but the uart fails to deliver the debug message
02:31 AM Haohmaru: i'll try soldering a short wire to ground, but it's gonna look fuggly
05:01 AM day: Haohmaru: i postulate it isnt going to fix it
06:37 AM polprog: may be a stulid question
06:37 AM polprog: but why dont you use a ready made crystal osc (i mean the 4 pin can)
06:38 AM Haohmaru: not all 4pin things are oscillators
06:38 AM polprog: the one that has vcc, gnd and a square wave output
06:39 AM polprog: still no idea how is that called h
06:39 AM Haohmaru: it's probably not cheap
06:39 AM polprog: is it?
06:39 AM Haohmaru: it'd be an oscillator
06:39 AM polprog: yeah
06:45 AM Emil: Haohmaru: if you get a clock failure isr
06:45 AM Emil: Haohmaru: I don't think you should run that system :D
06:46 AM Emil: because isn't the clock failure like "okay we lost crystal and rc, switching to internal low speed for end-of-the-world-mode"
07:19 AM Haohmaru: Emil you say "low speed" as if it's 32kHz or something
07:24 AM Emil: it's 128kHz
07:24 AM Emil: at least on m328pb
07:34 AM Emil: but do check and report here also what it's like on xm
07:35 AM Haohmaru: iz 2MHz on the xmega
07:35 AM Haohmaru: the default clock
07:43 AM Emil: not the same thing
07:44 AM Emil: oh I was wrong
07:44 AM Emil: the detection mechanism operates at 128kHz
07:44 AM Emil: and switches to the internal 8MHz one
07:44 AM Emil: 1MHz*
07:50 AM nuxil: instead of writeing code that says. "hey the osc failed". you should be trying to figure out the cause. whats interfering with the mcu/osc that causes this in the 1st place. unstable voltage. voltage spikes, internal noise on pcb/ external noise. add emi protection. so on.
07:51 AM Haohmaru: Emil dafuq are you talking about?
07:52 AM MrFahrenheit: man, iced earth, been ages since I played that
07:52 AM nuxil: on a xmega does a isr halt main they do on atinys/atmegas?
07:53 AM nuxil: *as they ..
07:53 AM Haohmaru: nuxil the oscfail interrupt specifically is "non-maskable", if that's what you mean
07:54 AM nuxil: oh it got a interrupt just for oscfail..
07:54 AM Haohmaru: once enabled, it can't be turned off (unless you restart teh chip)
07:54 AM nuxil: man. just got me thinking. when i chip needs that its sounds bad :p but i guess its a good think.
07:55 AM nuxil: i mean.. if you design your circuit in such a way that your osc will faill all the time. you done a bad job :p
08:04 AM Haohmaru: don't judge mah chip!
08:04 AM Haohmaru: >:(
08:04 AM nuxil: Haohmaru, wrap a small box with several layers of tinfoil. create a "faraday cage", put your device in there and see if it runs fine. if not problem is on your board somewhere, else its external
08:05 AM Haohmaru: that won't help
08:05 AM Haohmaru: i cannot reproduce the problem here
08:05 AM nuxil: so. whats special about the location where its suppose to be then ?
08:05 AM Haohmaru: all of the issues i mentioned above were happening here at the "lab" when i touch the crystal
08:06 AM Haohmaru: there's nobody touching the PCB in the feild, and the issues there happen less often
08:06 AM Haohmaru: also, i've no idea what exactly causes those issues
08:07 AM Haohmaru: the special thing is that i cannot go there and sit for N amount of time to "catch" the actual issue as it happens, and even if i do - i cannot simply start debuging it there
08:08 AM Haohmaru: so.. it's a matter of "we installed supposedly non-ideal devices to a client"
08:08 AM Haohmaru: much sux
08:11 AM nuxil: :\ you tested if its not the cellphone that does this ? both with just gsm mode and (utms/edge/hsdpa) or whatever you got there and so on.
08:12 AM * MrFahrenheit looks at Haohmaru's chip as if it was an early 8088
08:19 AM Haohmaru: there's no gsm in this
08:33 AM Emil: Haohmaru: touch the crystal?
08:33 AM Emil: Haohmaru: have you grounded the crystal body?
08:33 AM Haohmaru: actually, i'm touching the capacitors on the crystal
08:34 AM Emil: bro
08:34 AM Emil: pls
08:34 AM Emil: no
08:34 AM Emil: o
08:34 AM Haohmaru: they are unfortunately very close to some relays
08:34 AM Emil: you do realise the capacitances we are talking about are small yo
08:34 AM Haohmaru: i know, 1Meg scope probe f*cks that signal up
08:35 AM Emil: you can easily push the oscillator outside of the working range just by being too close to it
08:35 AM Emil: :D
08:35 AM * Haohmaru pushes Emil back
08:35 AM Haohmaru: shhhh, step away from mah crystal
08:36 AM Haohmaru: mah precioussss
08:36 AM Emil: Haohmaru: I blame Haohmaru
08:36 AM polprog: advise the user to keep away at least 30 feet from the device at all times
08:36 AM Haohmaru: 30 feet? wtf polprog
08:36 AM polprog: thats gonna be 100 dollars for consulting
08:36 AM Haohmaru: FEET
08:36 AM polprog: :p
08:36 AM * Haohmaru kicks polprog into america
08:37 AM polprog: im sure its those relays messing up
08:37 AM polprog: you could also can the avr itself
08:37 AM polprog: just thinking aloud
08:37 AM Haohmaru: i suspect that, that's why i was poking the crystal, to see what kinds of symtpoms it'll produce
08:38 AM Haohmaru: and, it's a raaaange of symtpoms :/
08:38 AM MrFahrenheit: is the range inclusive?
08:38 AM Haohmaru: wut you mean?
08:38 AM MrFahrenheit: it's a common source of off-by-one errors
08:39 AM Haohmaru: hm?
08:39 AM MrFahrenheit: speaking of feet, I'm outside tanning mine
08:40 AM Haohmaru: dafuq, i wrote "symtpoms" twice /o\
08:40 AM * Haohmaru blames Emil
08:47 AM Emil: PФLPЯФG ҤДS ЪЄЭЙ ДԠЄЯЇҪДЙЇZЭD
08:48 AM Emil: ewww
08:48 AM Emil: hat does not look as nice as it should
08:49 AM Emil: that*
08:50 AM Haohmaru: wut'cha tryin to do Emil?
08:53 AM polprog: amerikanization komplet.
08:55 AM polprog: kiitti Emil
08:56 AM Emil: polprog: eery
08:57 AM nohitzwork: :D
08:57 AM Emil: Dzięki, Polprog.
08:58 AM polprog: Haha, dzięki Emil ;)
08:58 AM Emil: naw I much prefer that Finnish yo
08:59 AM Emil: it has this very strange feeling to it
08:59 AM Emil: like crossing the uncanny valley
08:59 AM Emil: "and suddenly Finnish appeared"
08:59 AM nohitzwork: yeah
09:01 AM nohitzwork: it wouldnt been that effective if he had said "kiitos"
09:01 AM Emil: and it's even in everyday speech form instead of standard language
09:01 AM Emil: nohitzwork: yeah
09:07 AM polprog: kiitti has a note that its informal
09:08 AM polprog: what does eery mean
09:08 AM rue_mohr: how many people are programming avrs in assembler here...
09:09 AM Haohmaru: <crickets.wav>
09:10 AM * polprog did
09:10 AM polprog: jartza did
09:10 AM rue_mohr: which assember did you use?
09:10 AM rue_mohr: gnu?
09:11 AM Emil: polprog: have you tried using a search engine yet? ;D anycase it means in this case I was taken back by the sudden usage of informal Finnish (in a positive way)
09:11 AM polprog: rue_mohr: yes, gnu
09:12 AM polprog: at&t syntax.
09:12 AM Emil: polprog: uncanny, so as to inspire superstitious fear
09:12 AM polprog: just threw the asm file at avr-gcc
09:12 AM polprog: Emil: thanks
09:12 AM Emil: eerie is perhaps the better way to write it
09:12 AM polprog: i should sit and finnish reading the pronunciation guide
09:12 AM rue_mohr: avr-gcc foo.s?
09:15 AM polprog: yeah
09:15 AM polprog: its on my site in the crash course
09:16 AM Emil: polprog: nice!
09:17 AM polprog: i thought youve seen it a couple times :D or you mean the suomi book
09:17 AM Emil: the suami book yeah
09:17 AM Emil: (it's suomi not suami)
09:18 AM polprog: i sais suomi
09:18 AM Emil: I know
09:18 AM polprog: said*
09:18 AM Emil: I mangled it myself
09:18 AM polprog: tsunami
09:18 AM Emil: because it's funny
09:18 AM Emil: tsundere-suami
09:18 AM polprog: by the way. if i ever marry
09:18 AM polprog: im gonna form a Dipole
09:20 AM MrFahrenheit: just by saying that you've ensured you'll never get married
09:20 AM polprog: im gonna be single pole then
09:20 AM Emil: :D
09:20 AM polprog: bbl, dinner ;)
09:20 AM Emil: You should get married in Dipoli then :D
09:21 AM Emil: https://www.google.fi/search?q=dipoli&source=lnms&tbm=isch&sa=X&ved=2ahUKEwjfwKfWy9DaAhXPw6YKHVOdCmkQ_AUoAXoECAAQAw&biw=1920&bih=958
09:27 AM polprog: looks like a nice place
09:39 AM MrFahrenheit: speaking of poles, sabaton's 40:1 just came on
09:51 AM learath: is sabaton poleish?
09:52 AM MrFahrenheit: no, but the song is about polish soldiers
09:52 AM polprog: sabaton is like super patriotic music here. all the polish rednecks listen to it
09:53 AM polprog: i kindof like it but only to some extend
09:53 AM polprog: primo victoria. dududududu
09:53 AM polprog: :p
09:53 AM polprog: extent*
09:53 AM MrFahrenheit: because of 40:1?
09:54 AM learath: Ahh
09:54 AM learath: ok
09:56 AM polprog: this and that and another track
09:57 AM MrFahrenheit: I finished documenting this header file and it grew from 44 to 560 lines
09:58 AM polprog: good
09:58 AM polprog: now remove excess C code
09:58 AM Haohmaru: 526 lines \o/
09:58 AM Haohmaru: ehm 516
09:58 AM polprog: and youre a theoretical computer scientist \o/
09:59 AM Haohmaru: me? no
10:16 AM Emil: if you want really some hardcore music try triarii
10:18 AM Emil: Haohmaru: joke, your head
10:18 AM Emil: :D
10:23 AM polprog: Haohmaru ∩ the joke = Ø
10:24 AM * polprog is listening to the narcotic suite from Music For the Jilted Generation by the Prodigy
11:27 AM nohitzzzz: 3 kilos is probably my favorite song from that album
11:28 AM polprog: https://i.redditmedia.com/xSh0Y3LyIVWxDWVt4Ep4fpIhUFR2G83d1fgsV2s_w-o.png?s=f02a648006f2b8516e962f03fec82fe8
11:28 AM Thrashbarg: innit!
11:53 AM MrFahrenheit: man, https://images.bonanzastatic.com/booth_image/afu/booth_image_customs/0056/3576/395291_290158477718009_1553066640_n_thumb960.jpg
12:21 PM antto: that's a nice candyshop
01:33 PM polprog: holy crap
01:33 PM polprog: please tell me all of this is "marked for disposal"
01:34 PM polprog: ill happily dispose it in my car's trunk
01:34 PM polprog: :P
01:36 PM MrFahrenheit: no, it's an american company that sells used/broken equipment
01:38 PM polprog: nice
01:38 PM polprog: there are a couple of those
01:38 PM antto: ugh, chewed-and-then-spewed-out candy.. shop
01:38 PM * antto abandons ship
01:38 PM polprog: ive seen them selling literally everything.. even scanning electron microscopes
01:39 PM polprog: i mean... if its clean and in good condition i dont mind it being 20 years old
01:39 PM antto: if it's 20 years old.. guess what ;P~
01:39 PM Tom_L: it's older than you?
01:39 PM polprog: tht too
01:39 PM polprog: that*
01:39 PM antto: you look at it the wrong way and the plastic's gonna break
01:39 PM MrFahrenheit: polprog, they gave shariar a broken 8.5 digit multimeter for free
01:40 PM MrFahrenheit: it was from ~89, but he fixed it and it works
01:40 PM polprog: nice
01:40 PM polprog: 8.5 digits
01:40 PM MrFahrenheit: https://www.youtube.com/watch?v=1yWjT6b1wWI
01:41 PM polprog: oh its one of those HP ones
01:42 PM polprog: nice
01:43 PM polprog: i need to take a look around places to see if i can grab something cool
03:43 PM MrFahrenheit: https://www.google.com/search?q=zubaz&client=firefox-b-ab&tbm=isch
04:47 PM antto: thank u wind, for teh clouds.. https://i.imgur.com/xbp9wrE.jpg
11:20 PM day__ is now known as day