#avr Logs

May 05 2017

#avr Calendar

12:22 AM daey_ is now known as daey
01:11 AM JanC_ is now known as JanC
02:42 AM rue_bed: thatts nothing to do with robots
02:42 AM rue_bed: its just people wasting time with computers
03:32 AM Emil: eh?
03:48 AM polprog: arent we all those people?
05:34 AM theBear: i'm some of those people, not all of them tho ;-)
06:13 AM Lambda_Aurigae: I'm a couple of those people!
06:14 AM theBear: nice one ! taking two for teh team <wink>
06:43 AM Lambda_Aurigae: <Mimo1> Lamda_Aurigae: Im planning to use a Arduino chip
06:43 AM Lambda_Aurigae: <Lambda_Aurigae> what is an arduino chip?
06:45 AM Lambda_Aurigae: on an electronics channel on another network.
06:45 AM polprog: lol
06:45 AM polprog: poor bastard
06:46 AM Lambda_Aurigae: hehe.
06:46 AM Lambda_Aurigae: I told him there was no such thing..he hasn't responded yet.
06:47 AM polprog: i think we had a guy at the raspi channel here, who refused to acknowledge that you need a resistor between a LED and the GPIO pin
06:47 AM Lambda_Aurigae: you don't NEED it
06:47 AM polprog: what a moron, unfortunately you cant swear on that channel
06:47 AM Lambda_Aurigae: it's good to have to keep things from going bad.
06:47 AM Lambda_Aurigae: but you can run it without...something will likely give up the ghost if you don't have it...but,,,
06:47 AM polprog: sure, you dont need one even at 230v mains, it will just shorten the lifetime slightly
06:48 AM polprog: :^)
06:49 AM polprog: i would love to see the whole discussion
07:33 AM polprog: Emil: http://51.254.212.106/images/tinyasm.png
07:34 AM polprog: actually it's good i didn't etch today, i forgot to recalculate the fill!
07:39 AM polprog: /s/today/yesterday/
07:39 AM polprog: so i dont etch today cos i need to get the board printed
07:39 AM polprog: :/
07:53 AM Emil: polprog: hehe, I'm still surprised I'm not banned on #raspberrypi
07:54 AM Emil: After letting the mods know how I feel about them :D
07:54 AM Emil: and the policy
07:54 AM polprog: oh, i dont remember that so it was probably earlier than 2 months ago
07:56 AM Emil: Freenode/#raspberrypi.log:2017-03-03 15:14:34 +0200< Emil> gordonDrogon: you know what? Your policy harms every single fucking person on this channel and doesn't make it family friendly at all. It sets a bullshit and super idiotic reference for the "possible" underage people here. Saying wtf is not something people should be kicked and banned for. It can stand for (W)hat (T)he (F)udge and if you can't fucking st
07:56 AM Emil: and swear words then don't fucking think of them wh
07:56 AM Emil: Freenode/#raspberrypi.log:2017-03-03 15:14:34 +0200< Emil> en you hear an abbrevation. That's on fucking you you fucking idiotic asshole. Fuck off, fucktard.
07:56 AM Emil: ":D"
07:56 AM polprog: wow
07:56 AM Emil: I did leave after that one, though
07:56 AM polprog: well, they are terribly picky about swearing
07:56 AM Emil: they are
07:56 AM polprog: >implying kids use IRC
07:57 AM Emil: aren't you a kid? ;)
07:57 AM Emil: polprog: why don't you have your own domain yet?
07:57 AM polprog: but that's cos the foundation mentioned them somewhere - they even have that in the topic - and they are very proud of it
07:57 AM polprog: no more...
07:57 AM Emil: Register polprog.pl
07:57 AM Emil: or something
07:57 AM polprog: i was thinking about polprog.org since pl is pricey
07:58 AM Emil: if you pay me 9 euros I'll register you a .fi domain and point it anywhere you want
07:58 AM polprog: ah, regional domains
07:58 AM Emil: anyone can register them nowadays
07:58 AM polprog: weird. i can register any domain then?
07:58 AM Emil: .fi is 9€/year if you are a registrar
07:58 AM Emil: otherwise registrars usually add fees on top of it
07:59 AM LeoNerd: I seem to have painted myself into a bit of a corner. I'm using a PWM driver chip, the TLC5940, which needs a master clock. So I thought "hey, I have this CKOUT pin on the ATmega328".. so I just used that. This sortof works fine. However, it does mean my PWM controller is forced to run at the full 16MHz that my CPU runs
07:59 AM polprog: i guess i will have to make up my mind then, pl or org...
07:59 AM LeoNerd: This is turning out to be akward, because it means that very small "on time"s set by the PWM controller are too fast for the FETs I'm using as output drivers. I want to run it slower
07:59 AM polprog: for now, 51.254.212.106
07:59 AM LeoNerd: I don't suppose I can get the CKOUT pin to output *slower* than the main CPU frequency, can I?
08:00 AM polprog: you could make an interrupt, or make a hardware divider
08:00 AM Emil: LeoNerd: :D
08:00 AM Emil: LeoNerd: switch the mosfets
08:01 AM LeoNerd: Emil: Eh; this is already quite a good one. It's hard to find decent logic-level pFETs that can switch 12V nicely
08:01 AM Emil: LeoNerd: anycase, you can slow system clock but that slows the whole system
08:01 AM Emil: so not independently, no
08:01 AM LeoNerd: Yah; I want the CPU itself to remain at 16MHz if I can, because it's handling DMX and WS2812 LEDs and allsorts
08:01 AM Emil: what you could do, though
08:01 AM Emil: is just add a simple divider
08:01 AM Emil: they cost pennies
08:01 AM polprog: i just said that >:(
08:01 AM LeoNerd: Yeah, a 4xxx series ripple counter, or somesuch
08:01 AM Emil: polprog: hehe
08:02 AM LeoNerd: Synchronising it might be a pain
08:02 AM LeoNerd: .. Oh, though I have the BLANK signal already
08:02 AM LeoNerd: That might not be too bad
08:02 AM Emil: LeoNerd: why the heck would you use some pwm chips that require a master clock like that, though
08:02 AM LeoNerd: Alternatively maybe I can talk a spare PWM channel on the ATmega into being a *really* fast toggle output and use that
08:02 AM Emil: SPI controllable chips all the way
08:02 AM LeoNerd: This is SPI controlled
08:03 AM Emil: >why u need dat master clock
08:03 AM LeoNerd: The *data* is fed into it with SPI, but the chip lacks its own oscillator for its PWM counters
08:03 AM LeoNerd: It's intended for use in huge banks, so you'd have one master clock for lots of chips
08:03 AM Emil: LeoNerd: well, umm, add an external oscillator?
08:03 AM LeoNerd: I did. It's called the ATmega328 ;)
08:03 AM polprog: i would go for the freq divider
08:03 AM Emil: they also cost pennies
08:03 AM Emil: polprog: I wouldn't
08:03 AM Emil: An external oscillator are super cheap
08:03 AM polprog: even i'd add a dip switch bank where you set the divider
08:04 AM Emil: dear god noi
08:04 AM polprog: f u l l c o n t r o l
08:04 AM Emil: :DD
08:04 AM LeoNerd: Aha; the 4040 is the ripple counter I was thinking of
08:04 AM polprog: i just love switches, jumpers and indicators
08:04 AM Emil: hrrr
08:04 AM LeoNerd: Drive that from the CKOUT pin, and connect the TLC5940 onto one of its outputs
08:04 AM Emil: Everything controllable in code or go home
08:05 AM * Tom_itx puts Emil on high alert for saying 'wtf' in channel
08:05 AM Emil: Physical setup is absolutely haram
08:05 AM Emil: http://i0.kym-cdn.com/entries/icons/facebook/000/020/546/7e7.jpg
08:05 AM -!- #avr mode set to +o by ChanServ
08:05 AM Emil: hmm,m what is Tom_itx up to
08:05 AM polprog: sometimes you have to, like programming an address
08:06 AM polprog: dum dum dum
08:06 AM Emil: polprog: nah you just use a gpio for that
08:06 AM * Tom_itx smiles as the sun slowly rises over the horizon
08:06 AM Emil: or design the code and layout better
08:07 AM Emil: polprog: what was that pcb btw+
08:07 AM -!- #avr mode set to -o by Tom_itx
08:07 AM polprog: it was the t4313 with 595s and 7 segment displays
08:08 AM LeoNerd: I like this idea of using a 4040 actually. It has 12 divider stages of output, each with an output pin, so I can easily select my divider
08:08 AM LeoNerd: Shockingly similar to the on-chip CKDIV divider in fact :)
08:08 AM LeoNerd: Yes I like this plan
08:08 AM polprog: that's a nice chip :)
08:09 AM polprog: paired with some and gates it gives you fullly customizable 12 bit divider
08:09 AM LeoNerd: For my next ponderance: should I just get a DIP, or I wonder if I can try squeezing a SOIC chip onto my protoboard, given as Ionly need to solder 5 pins to it
08:09 AM LeoNerd: (VCC, GND, clock in, reset, clock out)
08:09 AM polprog: SOIC!
08:11 AM polprog: gtg, o/
08:12 AM LeoNerd: Hrm.. eBay really needs a "not from China" search option
08:12 AM LeoNerd: Or rather, a filter for "Only show me things that will arrive at my house by [N] days time"
08:14 AM LeoNerd: Though before I commit on this I might just see if I can make a divided clock output from a spare ATmega328 PWM pin anyway
08:20 AM LeoNerd: Aaaactually. This might be easier. I'm not currently using timer1 in my code, and the OC1A pin is currently spare. I could use that instead and arrange the clock on that
08:20 AM LeoNerd: So this is one wire to move in the circuit, and a small software change. Probably overall easier than adding a whole new chip to the board
09:03 AM LeoNerd: Ohwait I /am/ using timer1 :( Boo
11:31 AM Emil: Damn
11:32 AM Emil: I coded a png encoder some months ago
11:32 AM Emil: And the code is very simple
11:32 AM Emil: but damn I still have to go through the png documentation to understand wtf
11:33 AM Emil_: Tom_itx: oh, hehe
11:33 AM Emil_: Tom_itx: I have everything but actualy messages on ignore here :D
11:34 AM Emil_: Hmm, perhaps I should allow /me and notices
11:37 AM * skz81 agrees !
12:17 PM * Emil_ tests
12:18 PM antto: u FAILED
12:18 PM Emil: Why so?
12:18 PM * antto zaps Emil with 12V
12:18 PM Emil: >12V
12:18 PM Emil: >zaps
12:19 PM Emil: what are you? A low resistance life form?
12:19 PM antto: don't argue with me, u ded!
12:20 PM Emil: I have no comeback
12:28 PM specing: STOP RESISTING!!!
12:36 PM Emil: Can I just fucking hit the fucking idiots who write this shit documentation?
01:23 PM Casper: emil: not only you can, but you are encouraged to
01:23 PM Casper: Just be sure that there is no witness
02:01 PM polprog: what the hell is going on herr, whats that test,
02:01 PM polprog: it is a diffetent message syntax in my client
02:46 PM polprog: if the original ardu want bloated enough
02:46 PM polprog: http://hackaday.com/2017/05/05/using-modern-c-techniques-with-arduino/
02:46 PM Emil: polprog: and they butchered the uri
02:46 PM polprog: ??
02:47 PM Emil: >modern c techniques
02:47 PM Emil: blaming c
02:47 PM Emil: clickbait title
02:47 PM polprog: yeah
02:47 PM polprog: i skimmed thru it
02:47 PM Emil: when it is actually just cancerous c++
02:47 PM specing: CLICK HERE TO SEE HOW YOU CAN GO ON A HIGHWAY WITH YOUR CARRIAGE EQUIPPED WITH THESE HIGH-SPEED RIMS!
03:18 PM bss36504: Why the fuck would you use a function pointer in C++?!
03:19 PM LoRez: polprog: that's unnecessary
03:20 PM bss36504: The whole article is using C++ as a literal C+Some other shit, instead of a standalone language. So dumb.
03:21 PM bss36504: Hackaday sucks.
03:21 PM Lambda_Aurigae: it has become arduino-a-day
03:22 PM bss36504: Or RPi a day, or ESPxx a day, or WS-stupid-fucking-LED-strips a day
03:22 PM polprog: well, i dont know much about C++ or the like, the only C i do is AVRs.
03:22 PM polprog: but yeah, it's for *makers*
03:22 PM polprog: *maker* - a person who builds robots but has no idea how a transistor works
03:22 PM specing: bss36504: it is C+some ohter shit
03:23 PM specing: improved C
03:23 PM bss36504: polprog: C++ is a great language. C is a great language. they have strengths and weaknesses. Cherry picking what C++ features you want to build into some antipatterned garbage is dumb and counterproductive.
03:23 PM specing: well, depends on who you ask
03:23 PM specing: neither is great
03:23 PM bss36504: specing: I disagree. maybe the early C++ standard, and yes, the developers went "oh we should make a language like C that can do blah blah blah" but it is its own thing now.
03:24 PM specing: they still have not ripped out the C bits
03:24 PM specing: and until they do so, it is just C with some other stuff
03:24 PM polprog: bss36504: i only used C++ in school, and it was nothing... i dont know that language at all
03:25 PM bss36504: That's dumb, dude. Come on. Tons of languages are derived from another language, with backwards compatibility, but that doesnt make them not another language.
03:25 PM bss36504: Groovy, Scala != Java. C# != C, C++!=C
03:25 PM bss36504: just because there are parts that are backwards compatible to the old language
03:26 PM polprog: java i do know
03:26 PM specing: those other languages are not named literaly improved C
03:26 PM bss36504: The point is though, if you're going to use C++, use it correctly and follow the design patterns. don't use that garbage in the article. There should literally never be raw pointers in a C++ program.
03:26 PM bss36504: Actually, C# is a riff on C++++
03:27 PM bss36504: No joke look it up
03:27 PM bss36504: at least name-wise
03:27 PM specing: and we use stuff from C like scanf in competition programming, as iostream is too slow
03:27 PM polprog: i guess ill start reading K^R book
03:27 PM polprog: that i recently got
03:28 PM Lambda_Aurigae: K&R ROCKS!
03:28 PM * Lambda_Aurigae ducks and runs.
03:28 PM polprog: but not the indent style
03:28 PM Emil: K&R syntax is cnacer
03:28 PM Lambda_Aurigae: indent however you like.
03:28 PM Emil: Good book otherwise
03:28 PM Lambda_Aurigae: it matters not.
03:28 PM bss36504: I don't see your point. iostream is necessarily more complicated, but just because scanf (which is pretty bad for other reasons) was written in pure C doesnt invalidate my other point, which is that C++ is it's own language despite the fact that it inherits C syntax and compatibility.
03:29 PM bss36504: specing ^
03:29 PM bss36504: But, nobody has ever argued about programming languages before sooo.... :)
03:30 PM polprog: there's that rust freak on another channel i am on, he's doing rust on an stm32 IIRC
03:30 PM bss36504: Neat
03:30 PM bss36504: I've never looked at rust
03:31 PM Lambda_Aurigae: some freak here wants to do rust on avr.
03:31 PM Lambda_Aurigae: never understood that.
03:31 PM Lambda_Aurigae: electronics should be kept rust free.
03:31 PM polprog: he actually made me write fizzbuzz in it, just basing on the official documentation. like it was my 2nd rust program ever and it's fizzbuzz
03:32 PM polprog: i mean, if it compiles to asm, it up to you if you use gas, c, rust, forth, whatever there is
04:15 PM Emil: Holy shit
04:16 PM Emil: I think I just experienced my first step towards cynicism and not helping others
04:16 PM Emil: Trying to troubleshoot this shit, documentation being shit and no one not helping or cannot helping
04:17 PM Emil: I suddenly saw myself like that, too, not helping and looking over others
04:17 PM Emil: Because it "was fucking hard for me, too"
04:20 PM polprog: dont help if you cant,
04:21 PM polprog: this will just frustrate you
04:22 PM theBear: Emil, don't worry, it gets easier every time it happens, by the time yer get to where i'm at you won't even notice yer doing it <grin>
04:22 PM polprog: cynicism helps me be a happy person
04:22 PM theBear: cyanide and happiness helps me be one
04:23 PM polprog: c&h is nice but a bit gay
04:24 PM Emil: :D
04:24 PM Emil: polprog: no I mean
04:25 PM Emil: polprog: the point is I _can_ help
04:25 PM Emil: But in the vision I wouldn't
04:25 PM theBear: polprog, your face is nice but a bit gay @! <grin>
04:25 PM polprog: also
04:25 PM polprog: http://51.254.212.106/papiery/atmel-2521-avr-hardware-design-considerations_applicationnote_avr042.pdf
04:25 PM polprog: scroll down to page 18
04:26 PM polprog: what the fuck is this shitty chineese schematic
04:26 PM polprog: i see those in the "datasheets" of chineese crap
04:26 PM polprog: atmel, please
04:26 PM theBear: it's true there are regular likey-opposite-sex kinda underlying themes involved, but ya know, without those you can't really tell people that you been exploring the depths of despair and sadness that are found in life
04:26 PM polprog: yeah
04:26 PM Emil: polprog: it's default output from Altium designer iirc
04:26 PM Emil: or some other thing like that
04:26 PM polprog: Emil: Yuk
04:26 PM polprog: terrible
04:26 PM Emil: I kind of like it
04:27 PM polprog: serif font on a schematic
04:27 PM Emil: Hehe
04:27 PM polprog: jeez, that's not how it works
04:27 PM Emil: Well yeah that's not too good
04:27 PM polprog: it looks like somebody did that in Word not a pro software
04:27 PM Emil: heheeheh
04:28 PM Emil: You trying to get yourself into the hall of fame?
04:28 PM polprog: of what
04:28 PM theBear: meh that's not so bad, plus atmel appnotes are traditionally effing awesome, they get just the right combo of a good/interesting concept to show, and everything from broad strokes down to just enough fragments of circuit fine-ends and code snippets to make it all seem so very easy and do-able
04:29 PM polprog: i like reading atmels docs but that style in that particular one just bothers me
04:29 PM polprog: if not that schem it would be all cool
04:29 PM Emil: Big problems ;)
04:31 PM theBear: well ya know, less awesome avr series call for less awesome appnotes
04:34 PM polprog: how much is "one page of eeprom"
04:34 PM polprog: im reading on the userrow in t4313
04:34 PM Emil: Anyone done DEFLATE here?
04:38 PM theBear: depends on the eeprom
04:38 PM polprog: guess i have to read on the paging concept
04:39 PM theBear: tho i'm tempted to suggest that at least the more traditional families, and even some of the serial style ones like microwire 29(? somethign like tht) series tend to default to the same size things
04:39 PM theBear: it's a pretty simple concept, just imagine some chunk of memory/data-space, and multiply it
04:40 PM polprog: ok
04:41 PM theBear: at an abstract level you can just think of it a lot like an extra bit(s) of address space, tho generally when it is discussed as pages you'll find that for soem implementation specific reason (protocol or available pins or whatever) it is treated more like X times SizeOfOnePage than jjust more address bits
04:41 PM polprog: ok, but where is the rest of the memory ("unused pages") stored
04:42 PM polprog: is it like you first send it the page number then the address you you can adress more than 255 bytes?
04:42 PM polprog: assuming 8 bit sys
04:43 PM theBear: the err, what, physically ? it depends, i dunno what kinda tech/interface you talking about, and it's late, and i taking alotta painkillers, but yeah, that's the basic kinda idea, tho how you achieve that might be tricky or slow or more complex than addressing something on the current page, again depending on specific tech/implementation
04:44 PM polprog: ok, i think i get it, tyvm
04:44 PM theBear: i try ;-)
04:44 PM polprog: i'm tired too, i'll be going to sleep now
04:44 PM polprog: o/
04:45 PM theBear: ooroo
08:49 PM rue_house: while(istired()) sleep();
08:49 PM rue_house: alarmclockless version
08:50 PM Lambda_Aurigae: cereal port not found. brkfst.dll not loaded.
08:55 PM rue_house: wrong os!