#avr Logs

Sep 19 2017

#avr Calendar

12:33 AM day__ is now known as daey
01:27 AM habeangur: Emil: stop what?and I never used this serial port
01:47 AM Cracki: boss is a real character... asks me to pick the AVR for some project, I give him the cheapest option: the new attinys, been out for like a year. he comes back with "my two favorite electronics shops don't have them yet!"
01:47 AM Cracki: I propose attiny48/88, don't have those either.
01:48 AM Cracki: they only have the old shitty tinys
02:03 AM Casper: he don't know about digikey?
02:06 AM Cracki: I'm sure he does, he ordered stuff there before.
02:06 AM Cracki: eh, what do I know...
02:07 AM Cracki: that other outfit I worked at a while ago got a digikey sales dude to come because they were ordering 5 figures of stuff for one project
02:07 AM Cracki: got free mugs and PCB rulers
02:08 AM Cracki: perhaps he doesn't want a minimum order quantity
02:09 AM Cracki: or doesn't like shipping costs...
02:11 AM Casper: ... can I even fit this project in this enclosure?!?
02:11 AM Cracki: think like a cat
02:13 AM Casper: yeah but scary
02:13 AM andrzejku: I had started to learn AVR
02:13 AM andrzejku: and I am happy about that
02:13 AM Casper: https://i.imgur.com/SHq3uLm.png <==== not sure I can fit it...
02:14 AM Cracki: sure you can
02:14 AM Cracki: it's just a bunch of wires
02:14 AM Cracki: send them under the resistors and stuff
02:15 AM Cracki: or maybe put stuff that goes together *closer* together
02:16 AM Cracki: figure out some fundaments, such as where to lay ground and supply
02:16 AM Casper: the big white part is a psu pcb :D
02:16 AM Cracki: it appears that you're doing a 2layer and one layer is exclusively ground?
02:16 AM Cracki: yes yes the gray thing is to be avoided
02:19 AM Casper: it will be 1 layer + jumpers
02:19 AM Casper: on perfboard
03:32 AM remkooo1 is now known as remkooo
03:51 AM polprog: Cracki: that board can be still reduced in size (even when keeping thru hole components)
05:08 AM Emil: Also
05:08 AM Emil: Why through hole
06:50 AM Lambda_Aurigae: Ahoy ye scurvy dogs!
06:50 AM Lambda_Aurigae: Today be talk like a pirate day!
07:21 AM Emil: Ei
07:23 AM LeoNerd: Tally-ho, chocks away lads!
07:23 AM LeoNerd: ... wait, I may have misheard "pilot"
07:37 AM Emil: Tänään opimme suomea!
08:06 AM polprog: Dzisiaj uczymy sie polskiego.
08:06 AM polprog: instead
08:07 AM Lambda_Aurigae: my people left that land so they wouldn't have to learn polish!
08:07 AM Emil: Pronouncing Polish has always been interesting :D
08:08 AM Emil: How the heck are you supposed to connect the spelling and pronounciation
08:08 AM Emil: pronunciation*
08:08 AM Lambda_Aurigae: with a stapler.
08:08 AM Emil: polprog: wait
08:09 AM Emil: polprog: is that "sie" silent?
08:09 AM polprog: no
08:09 AM Emil: https://translate.google.com/#pl/en/Dzisiaj%20uczymy%20sie%20polskiego
08:09 AM Emil: Click on listen
08:10 AM Lambda_Aurigae: and, we trust google translator to be 100% accurate..
08:10 AM Emil: It actually pronunces Finnish rather well
08:10 AM Emil: wtf
08:10 AM Emil: it's pronounces
08:10 AM Emil: but it's pronunciation
08:11 AM Emil: Lambda_Aurigae: thought the content might be a bit broken
08:12 AM Emil: (For example it translated that Polish sentence to "Tänään opimme puolalaisen" meaning "Today we will learn a pole" but it pronounces it rather well)
09:00 AM polprog: kek
09:28 AM rue_house: Emil, hmm, dance lesson?
10:05 AM day__ is now known as daey
11:06 AM day__ is now known as daey
11:34 AM day__ is now known as daey
11:58 AM day__ is now known as daey
01:03 PM day___ is now known as daey
01:26 PM day___ is now known as daey
01:36 PM day____ is now known as daey
02:33 PM polprog: physics test tomorroq
02:34 PM polprog: s/q/w
02:37 PM cehteh: oops .. C question, never occured to me, is shifting by a negative amount supported to shift the other direction? guess not
03:00 PM polprog: odd my laptop just dropped off wifi or any outer internet, i had to reboot
03:01 PM polprog: :(
03:41 PM Casper: polprog: it hate you!<
03:41 PM Casper: it was tired to be a slave, working 24/7 without any break
03:41 PM Casper: while being cursed at
03:50 PM MrFahrenheit: I wanna murder the person who made this touchpad controller
03:50 PM MrFahrenheit: it's like they never even saw the spec, or even used i2c before
03:51 PM MrFahrenheit: "you didn't perform a certain read at the start of the conversation so now I will ignore your reset command"
03:58 PM Casper: lol
04:07 PM polprog: Casper: apropos the board you make or what? :P
04:08 PM polprog: MrFahrenheit: how do you know it's i2c? maybe it's their own two wire interface which just happens to be similar :P and they made up the spec
04:13 PM polprog: tar is an awesome tool
04:16 PM polprog: im nor running a backup of my phone's storage which is mounted as a deirectory over mtp
04:16 PM polprog: all 16 gigs if it
04:17 PM hetii: hi :)
04:18 PM cehteh: mtp .. brrr
04:18 PM polprog: hetii: hi :D
04:19 PM polprog: cehteh: yeah, i hate it. bad enough my phone doesnt have an SD card
04:19 PM polprog: so it's mtp or nothing, and when you gt it to work once it will work forever like eveyrthing on linux :P
04:20 PM cehteh: rsync ftw
04:21 PM MrFahrenheit: polprog, well it kinda is, since they definitely didn't read the spec... the one titled i2c hid
04:23 PM polprog: are you using a scope to sniff/debug or an LA instead?
04:23 PM MrFahrenheit: both
04:24 PM MrFahrenheit: my LA is just one of those cheap cypress f2l boards and pulseview... kinda interesting since the crap chip that I'm probing is a cypress part
04:30 PM polprog: cehteh: rsync seem spowerful
04:30 PM polprog: seems*
04:30 PM polprog: i like it
04:35 PM polprog: rsync seems to mirror the fs
04:35 PM polprog: can it make a single compressed file/
04:35 PM polprog: ?
04:37 PM cehteh: no
04:37 PM polprog: i think found my way then
04:37 PM cehteh: ssh / tar :)
04:37 PM polprog: tar locally and rsync to remote server
04:38 PM cehteh: or that
04:38 PM polprog: i know the tar | ssh -c 'tar' trick
04:38 PM polprog: :P
04:38 PM cehteh: but why dont you keep the filesystem structure?
04:38 PM polprog: what?
04:38 PM cehteh: much easier to restore single files then
04:38 PM cehteh: rsync the directory tree as is
04:39 PM polprog: yeah, that
04:39 PM cehteh: also incremental backup, rsync allows to hardlink files which didnt change since the last backup and only transfers changes then
04:39 PM polprog: wow
04:39 PM polprog: gotta learn this
04:39 PM polprog: tomorrow i think
04:39 PM polprog: thanks,
04:39 PM polprog: goodnight!
04:40 PM cehteh: i use that for my backup system here, on 400GB diskspace i backup plenty servers with history lasting half a year or so, daily snapshots
04:40 PM polprog: i already have a DB server, now ill have to build a backup one
05:24 PM Casper: polprog: no your laptop
10:16 PM JanC_ is now known as JanC
11:32 PM dgriffi2: how can I sensibly keep a bouncy power switch from glitching an attiny85 and garbling the eeprom?
11:34 PM learath: .... debounce it....?
11:34 PM learath: .... I'm confused
11:35 PM dgriffi2: when I apply power to the circuit, the switch sometimes bounces.
11:36 PM Tom_L: debounce circuit
11:36 PM Tom_L: schmitt trigger would do too
11:37 PM dgriffi2: it would work as the circuit is powered up?
11:37 PM Tom_L: http://www.labbookpages.co.uk/electronics/debounce.html
11:37 PM Tom_L: a cap might help that
11:38 PM dgriffi2: i'm familiar with that.... it assumes there is stable power before the switch is closed.
11:39 PM cehteh: battery or wall powered?
11:39 PM dgriffi2: battery
11:39 PM cehteh: doh ...
11:39 PM Tom_L: better filter caps on the supply might help
11:39 PM cehteh: the brownout detector can help, but causes some power draw on its own
11:39 PM dgriffi2: I have caps before and after the regulator
11:40 PM cehteh: otherwise it bounces at powerup .. implement a timeout before writing eeprom
11:40 PM cehteh: and use some round robin writing
11:40 PM cehteh: not always to the same position
11:41 PM cehteh: include generation counter and checksum
11:41 PM cehteh: robust and you get wear leveling
11:42 PM cehteh: read regulators datasheet, some make constraints esp to the output caps (about capacity and esr)
11:42 PM cehteh: you cant arbitarly increase those
11:42 PM dgriffi2: timeout before writing can't touch this. eeprom is messed up even if I remove tge writing code
11:42 PM cehteh: then you do something else wrong
11:43 PM cehteh: eeprom wont mess up from alone out of nothing
11:44 PM cehteh: and i always give the tip, for debug build add a (1sec) delay before you write to eeprom, possibly toggle a output/led then you see when you accidentally write eerprom in a tight loop
11:45 PM cehteh: there was some app note about the first eeprom address become corrupted because of some programming errors (seems to be a common case) if you can affort it, just dont use that address
11:46 PM dgriffi2: I tripped over that one early on. I'm avoiding location 0 now.
11:46 PM cehteh: and checsum your data, at least when it is somewhat important and things get wrong when the data is corrupt
11:47 PM cehteh: eeprom on AVR's are rated 10k erase cycles btw
11:47 PM cehteh: (iirc)
11:48 PM dgriffi2: I'm nowhere near that yet on my test board.
11:49 PM cehteh: well i dont know what you are doing, just a simple bug resetting the board and rewrite at startup or any otheer loop can wear out eerprom in a few seconds if not throttled
11:49 PM cehteh: hence the tip with the delay() you dont want to write eeprom in performance critical paths anyway thats a reminder too
11:49 PM dgriffi2: github.com/DavidGriffith/bluebox-avr
11:49 PM cehteh: what voltage btw?
11:50 PM dgriffi2: 5
11:50 PM cehteh: should be fine
11:50 PM cehteh: as saied, add checksum, maybe validate your writes (read after writing)
11:50 PM cehteh: and roundrobin
11:51 PM dgriffi2: not sure how to roundrobin this project
11:51 PM cehteh: how much data do you need to write to eeprom?
11:52 PM dgriffi2: initially, three bytes. one for the unusable 0th byte, the a mode byte and a speed byte
11:53 PM mickjc75: .
11:53 PM cehteh: so you have plenty space free in eeprom
11:53 PM dgriffi2: the rest are chunks of x bytes each
11:54 PM dgriffi2: each begins with a mode byte and the a sequence of x-1 bytes
11:54 PM cehteh: dynamic sized?
11:54 PM dgriffi2: there are 12 of tgese chunks
11:54 PM dgriffi2: no
11:56 PM cehteh: should be feasible to add roundrobin to that
11:56 PM cehteh: anyway .. at least add a checksum
11:57 PM dgriffi2: how would a checksum help?
11:57 PM cehteh: detecting corruption reliably ...
11:57 PM cehteh: you can as well just validate after write
11:58 PM dgriffi2: soo.. 0xff, mode, speed, checksum of prev 3 bytes
11:58 PM cehteh: and eeprom does not get corrupted by power cycling unless something else is very fishy
11:58 PM cehteh: yes
11:58 PM cehteh: 0xff?
11:58 PM cehteh: the address 0?
11:58 PM dgriffi2: ya
11:59 PM dgriffi2: then a checksum at the end of each chunk?
11:59 PM cehteh: struct chunk { generation, id, mode, speed, checksum }