#avr Logs

Apr 27 2017

#avr Calendar

12:27 AM xentrac: that one uses a PCD8544, right?
12:32 AM daey_ is now known as daey
01:20 AM polprog: xentrac: yeah. adafuit sells them for 10$ but i think you can scavenge one easily
02:27 AM xentrac: yeah, I think so :)
02:27 AM xentrac: thank you!
03:40 AM JanC_ is now known as JanC
07:43 AM noHitW_work: i got this dsp kit today http://www.kanecomputing.co.uk/dsk_c6711.htm
07:43 AM noHitW_work: sadly the software cd was lost
07:44 AM xentrac: can you just download the software from the website?
07:47 AM polprog: nice kit
07:48 AM polprog: im thinking about some lattice ice fpga kit, ive got a couple on my mind
07:49 AM xentrac: what do you want to do with the FPGA?
07:50 AM polprog: mess around mainly. if i come up with a project ill get one
07:52 AM xentrac: I've been watching logic analyzer videos
07:53 AM xentrac: it seems like the main obstacle to doing a 100MHz logic analyzer on a shoestring is that you need an FPGA ;)
07:53 AM xentrac: the standard project is to put a J1A Forth processor on an IceStick and program it, but that's sort of boring in the sense that it's only a little faster than an AVR
07:54 AM polprog: ive seen an fpga version of the buspirate, they loaded a soft cpu on the fpga and ran BP firmware
07:55 AM LeoNerd: Ugh... terrible
07:55 AM polprog: yes
07:55 AM LeoNerd: The BusPirate is not the greatest thing
07:55 AM LeoNerd: The wire protocol has some serious shortcomings to it.. it could be a lot better
07:55 AM LeoNerd: even on the same hardware
07:55 AM * LeoNerd is working on a much better one
07:55 AM xentrac: haha
07:56 AM polprog: its not, but its cheap. i was disappointed because the uart was too slow
07:56 AM LeoNerd: Yah, well that's because it's a non-USB MCU glued to an FTDI chip
07:56 AM LeoNerd: Mine's based on a 32U4
07:56 AM xentrac: yeah, loading a soft CPU on an FPGA is the first thing everyone wants to do with an FPGA, but that doesn't really show the advantages of an FPGA
07:56 AM LeoNerd: Yah that seems like a very silly idea
07:56 AM polprog: im not into pics, yet
07:57 AM LeoNerd: The whole point of an FPGA is to be able to do /lots/ of concurrent parallel logic, all at once
07:57 AM polprog: yeah
07:57 AM * LeoNerd aware he basically said the same thing three times there ;)
07:57 AM xentrac: MilkyMist was somewhat more interesting in that it used the FPGA to do graphics you couldn't really do on a microcontroller
07:58 AM LeoNerd: Yes; graphical stuff is one useful thing
07:58 AM xentrac: do you know about the Cytocomputer? It was an eccentric architecture developed at a little-known military-funded research lab in Michigan in the 1970s for mostly computer vision
07:58 AM polprog: i think id want to do something with led matrices and fractals
07:59 AM polprog: physics now, gotta go
07:59 AM xentrac: do you know about fractal generation with 1-D cellular automata?
07:59 AM xentrac: and do you know about lattice gas automata?
07:59 AM noHitW_work: xentrac havent found it yet
08:00 AM xentrac: those were the kinds of things the Cytocomputer architecture was optimized for
08:00 AM polprog: i have a book on celluar automata. i need to read it
08:00 AM noHitW_work: but i think i will email TI if they could send me the software
08:00 AM xentrac: you should hack some stuff together
08:03 AM xentrac: I mean it's cool to read books but building stuff is how you really learn, and in particular in CAs you can find awesome stuff just by trying random shit
08:04 AM polprog: xentrac: sure!
08:04 AM polprog: i love making stuff
08:04 AM xentrac: :)
08:17 AM noHitW_work: damn if i cant get the software
08:17 AM noHitW_work: found a nice guide for the kit http://www.signal.uu.se/Courses/CourseDirs/AdaptSignTF/DSP_html/manual.pdf
08:27 AM Emil: Alrighty so if you want an Äpy shipped to you please say quickly because it's selling out :D
08:27 AM Emil: 70/100 sold
08:39 AM noHitW_work: do you guys know that there is GOTO in C ? :D
08:39 AM noHitW_work: i didnt know that
08:39 AM LiaoTao: noHitW_work, You just started doing sane error handling? :)
08:39 AM noHitW_work: no
08:40 AM noHitW_work: my co-worker used it in his code
08:41 AM noHitW_work: saw it the first time
08:53 AM skz81: noHitW_work, "goto" even... "GOTO" won't compile :p
08:55 AM sabor: #define GOTO return
08:55 AM sabor: ;P
08:56 AM xentrac: heh, I think I learned C had goto around 1990
08:56 AM xentrac: only a few years after I learned it was possible to program without line numbers
08:57 AM xentrac: it doesn't have exceptions or labeled break/continue so you kind of need goto
09:11 AM pwillard: Goto is like that forbidden fruit. If you use it... you will be cast out of the cool coders group forever.
09:14 AM xentrac: only among beginners
09:14 AM skz81: <sabor> #define GOTO return >> void foo() {GOTO;}
09:15 AM sabor: beautiful :)
09:16 AM skz81: <pwillard> Goto is like that forbidden fruit. If you use it... you will be cast out of the cool coders group forever. >> Yup kernel hackers are such jerks / noobs
09:17 AM xentrac: I'm sure that somewhere there are still people writing long monolithic functions that are hard to understand because of all of the gotos. but I don't think it's the common problem now that it was in 1972
09:53 AM pwillard: Yeah, they were still unlearning Fortran and Basic then
09:53 AM Lambda_Aurigae: FORTRAN ROCKS!
09:53 AM Lambda_Aurigae: that's what we wrote all of our orbital mechanics software in back in the 80s and 90s
09:53 AM Lambda_Aurigae: except when the DoD had us convert everything to Ada
09:55 AM pwillard: yup. I think the Navy liked ADA and that meant everyone else should
09:55 AM xentrac: Are "Fortran Rocks" the rocks you carved the Fortran into?
09:56 AM Lambda_Aurigae: not sure where it came from but it ended up being a DoD directive...everything must be converted to Ada by such and such a date.
09:56 AM * pwillard looks at the old Collosal Cave Fortran source code.
09:56 AM Lambda_Aurigae: we were about halfway through and someone pulled their heads out of their collective asses and reversed the order.
09:56 AM pwillard: Ada lasted about as long as Pascal did
09:56 AM Lambda_Aurigae: FORTRAN was, for the time, the best programming language for doing math.
09:56 AM Lambda_Aurigae: Pascal is still hot in some areas.
09:56 AM Lambda_Aurigae: hotter than Ada really.
09:56 AM Lambda_Aurigae: it's been around longer too.
09:57 AM xentrac: really, the story is that the DoD developed Ada because in the 1970s they realized that it was very costly for software to be nonportable and incompatible
09:57 AM pwillard: i recall that someone had a ADA compiler for AVRs
09:57 AM specing: I'm pretty sure the majority of bad blood against Ada comes due to bad toolchains
09:57 AM xentrac: no, it's mostly that the language sucks
09:57 AM specing: pwillard: gcc had Ada fro AVR
09:57 AM Lambda_Aurigae: pwillard, it's part of the gcc set.
09:57 AM specing: pwillard: has*
09:57 AM pwillard: ah...
09:57 AM pwillard: makes sense then
09:58 AM specing: pwillard: I have it installed
09:58 AM Lambda_Aurigae: you can compile avr-gcc with ada support...and fortran for that matter.
09:58 AM xentrac: I mean, just the bad toolchains would be a problem, but one you could overcome
09:59 AM xentrac: so they figured that they could solve the "problem" of language diversity by fiat
09:59 AM Lambda_Aurigae: it's just another programming language with bits meant to keep you from hurting yourself and others...
09:59 AM specing: xentrac: they had to, otherwise everyone would end up using some bad language like C or Python
09:59 AM xentrac: so they held a language design competition
09:59 AM specing: xentrac: which is exactly what happened
09:59 AM xentrac: specing: exactly!
10:00 AM xentrac: or JavaScript
10:00 AM LeoNerd: I think it's more the fact that Ada sucked less in the 1970s than most other languages, but since then the other languages have all improved significantly, whereas Ada has not
10:00 AM LeoNerd: Because nobody uses it for anything, so it doesn't get any attention
10:00 AM xentrac: I think it sucked even worse at the time actually
10:00 AM Lambda_Aurigae: specing uses it! for annoying us....
10:00 AM specing: LeoNerd: Ada's latest standard is from 2012, so yes it has improved
10:00 AM xentrac: it's improved significantly since
10:00 AM * Lambda_Aurigae ducks and runs.
10:00 AM xentrac: that only demonstrates that it has changed, specing, not that it has improved
10:01 AM xentrac: but it has
10:01 AM Lambda_Aurigae: back in 1989, when I was dealing with Ada, the only thing ithad over other languages was threading support.
10:01 AM pwillard: LeoNerd: Exactly
10:01 AM specing: Lambda_Aurigae: and sanity
10:02 AM specing: Lambda_Aurigae: so basically you have 30 year old bad blood
10:02 AM pwillard: And if I recall... the AF sort of had a Not Invented Here attitude towards ADA
10:02 AM Lambda_Aurigae: I just saw no reason to use it over other languages. never saw anything useful in it at the time.
10:03 AM xentrac: if the DoD had succeeded, you'd have to script your military web pages in Ada or not script them at all
10:03 AM Lambda_Aurigae: we never saw any performance increases or any development ease with it.
10:03 AM pwillard: You could get "exceptions"
10:04 AM specing: xentrac: that would have been great
10:04 AM xentrac: http://home.pipeline.com/~hbaker1/SigAda92Positions.html covers a perspective on some of the problems people had with Ada in the 1980s from someone deeply involved
10:04 AM Lambda_Aurigae: and with what I do currently, I really don't see anything it would give me over what I use.
10:09 AM xentrac: there are some errors you can coax it to detect at compile-time that you can't in C
10:09 AM xentrac: or even C++ or Rust in fact
10:10 AM LeoNerd: I think it's very rare that any of the errors I tend to make in AVR programs could be detected by compilers
10:10 AM LeoNerd: of any kind
10:10 AM xentrac: really? you don't think you could discover them with logic?
10:10 AM polprog: except for syntax/type errors, i never got error'd from a c compiler
10:11 AM xentrac: they all have to do with unknown properties of your peripherals or things like that?
10:11 AM polprog: warnings might point you somewhere, but who reads them :^)
10:11 AM LeoNerd: I doubt that any compiler of any kind could, for example, have told me that I had too long a delay in the 0-pulse phase of my WS2812 driver to account for the extra clock skew down 5 metres of stage cable
10:11 AM xentrac: I usually use -Werr
10:11 AM xentrac: did you not know that your cable was going to be 5 meters long?
10:12 AM polprog: i have used -Wall -Wextra when writing for C competitions back then
10:12 AM xentrac: I feel like for embedded programming the tradeoffs are shifted very much toward compile-time error-detection and away from Smalltalk-style hop-into-the-debugger and fix it
10:12 AM polprog: you dont often get to jump into a debugger
10:12 AM xentrac: exactly
10:12 AM LeoNerd: xentrac: I probably did. I just didn't think about the clock skew down it
10:12 AM LeoNerd: My point is: very few of the debugging/problem solving time is spent on things that any reasonable compiler for any language could have told me about
10:13 AM polprog: that's why i always put some leds on the protos, so i can generate runtime codes
10:13 AM LeoNerd: Whereas at least when writing C I don't really ever find myself /fighting with/ the compiler
10:13 AM LeoNerd: It gets out of my way and letsm e get on with things
10:13 AM xentrac: LeoNerd: I am pretty sure that formal verification tools used by digital chip designers do in fact check to see if the clock skew in the physical layout is going to exceed the correctness constraints
10:13 AM xentrac: none of them handle systems that are five meters across, as far as I know
10:14 AM LeoNerd: xentrac: I doubt verymuch that such a simulation system would be aware of the fact I had some cable plugged in
10:14 AM xentrac: not if you didn't tell it
10:14 AM polprog: yeah, unless you make some very advanced model
10:14 AM LeoNerd: Or maybe that because it was only 26AWG, there's sufficient resistance down the line that ground bounce gets in the way of reliable signal decoding at the far end
10:14 AM LeoNerd: Or maybe that I've twisted it around a steel scaffolding pole of my stage and added extra inductance
10:14 AM LeoNerd: or any of a thousand other things
10:14 AM xentrac: ground bounce is definitely a thing you can simulate in SPICE
10:15 AM xentrac: but it's true that wires in SPICE don't have resistance by default :)
10:15 AM LeoNerd: Right. But there gets to a point where it takes /longer/ to set up the simulation than just to physically build the real device and see if it spins
10:15 AM xentrac: or inductance
10:15 AM LeoNerd: For whatever definition of "spin"
10:15 AM xentrac: yup!
10:16 AM xentrac: the advantage of setting up the simulation is that then you can do Monte Carlo simulation of 2³⁰ variations of parameters and find out if your circuit (and perhaps code) works for all of them
10:16 AM xentrac: this is harder to do physically
10:16 AM polprog: you need to get something like that for testing prototypes: https://www.youtube.com/watch?v=AGZiLMGdCE0
10:16 AM polprog: ;)
10:17 AM LeoNerd: Also, no matter how good a simulation, that can only simulate the things I tell it to simulate. Almost always, the problem turns out to be something I wasn't aware of before I started
10:17 AM LeoNerd: So I'd never have put it into the simulation to begin with
10:17 AM xentrac: iTV Corp. ran out of money because the last tapeout they could afford ran into analog problems due to a bug in their analog simulator
10:17 AM xentrac: which they'd written themselves
10:18 AM polprog: what's a tapeout?
10:19 AM xentrac: that's where you send the chip design to the fab (originally on a magnetic tape) to spend a few thousand to a million dollars making masks and fabricating some wafers with your chips
10:19 AM xentrac: now Jeff is dead, Chuck's wife is dead, but Chuck is making working chips
10:19 AM xentrac: 20 years later
10:20 AM polprog: oh.
10:20 AM polprog: interesting :)
10:20 AM xentrac: and lots of companies, on the other hand, have failed because they tried to build web sites in languages like Ada
10:20 AM polprog: Who's chuck?
10:20 AM xentrac: Moore
10:20 AM xentrac: so how much effort you put into up-front verification can be a crucial success factor in your project
10:21 AM xentrac: if you spend either too little or too much, it can sink you
02:29 PM polprog_: what the hell... is this legit? 5 cents for a chip? http://www.tme.eu/gb/details/sct2016ctsg/led-drivers/starchips-technology/
02:29 PM polprog_: looks like they are making a sellout, avail till stock lasts
02:30 PM polprog_: that's still suspicious
02:32 PM Emil: polprog: what's the normal price?
02:34 PM polprog: i dunno
02:34 PM polprog: probably becuase it's some no name chip, and they are trying to get rid of it
02:36 PM bss36504: polprog: the whole tme domain is broken.
02:36 PM bss36504: oh wait, it decided to load finally
02:37 PM polprog: im thinking if it's a good idea to buy those...
02:37 PM polprog: they are getting rid of that for a reason
02:40 PM NoHitWonder^: well, you cant go wrong with 5cents
02:40 PM polprog: its not about 5 cents :^) it's about how long will i be mad trying to get that to work :^)
05:34 PM xentrac: there are definitely chips that cost 5¢
05:40 PM xentrac: I mean https://www.digikey.com/product-detail/en/on-semiconductor/LM2904DR2G/LM2904DR2GOSTR-ND/918485 is 5.2¢
05:40 PM Casper: sure, if you buy 125k units
05:41 PM xentrac: at those prices, who could resist?
05:43 PM xentrac: I admit I haven't actually found any chips on Digi-Key for less than 5¢
05:43 PM specing: that is because their margin is more than 5 cents alone
05:44 PM specing: you'd have to go to talk directly to a factory in china to get that price
05:44 PM xentrac: I did find a lot of chips under 10¢ though
05:44 PM xentrac: 555s, LM324s, TL431s
05:45 PM xentrac: linear regulators seem to bottom out around 25¢ probably because they need to contain a certain amount of metal to dissipate the heat generated
05:46 PM specing: but metal is cheap
05:48 PM xentrac: maybe it's more a matter of die size? presumably the case is somewhat cheaper than the large die that is conducting heat to it
06:06 PM JanC is now known as Guest13777
06:06 PM JanC_ is now known as JanC
08:30 PM JanC_ is now known as JanC
11:29 PM rue_house: ... what are you two on about?
11:29 PM rue_house: the cheapest chip?