#avr | Logs for 2016-09-10

Back
[00:22:04] <Casper> rue_house: do you have an idea of a somewhat rigid plastic or alu sheet, that will resist water and cold and that is atleast 2 times cheaper than corropast?
[00:22:29] <rue_house> yup
[00:22:42] <rue_house> it comes curled up, you have to flatten it
[00:23:15] <rue_house> it comes up to about 12.5" wide
[00:23:29] <rue_house> http://ruemohr.org/~ircjunk/tutorials/mech/p1010110.jpg
[00:24:01] <Casper> ...
[00:24:36] <rue_house> I think its cheaper, I dont know what they charge for corriplast where you are
[00:25:15] <rue_house> http://ruemohr.org/~ircjunk/robots/arm9/p1060859.jpg
[00:25:54] <rue_house> http://ruemohr.org/~ircjunk/robots/arm7/p1050938.jpg
[00:28:49] <rue_house> http://ruemohr.org/~ircjunk/robots/arm8/p1060488.jpg
[00:36:22] <rue_house> ?
[03:04:01] <Furkiepurkie> what's a linux alternative to atmel studio?
[04:31:39] <rue_bed> any c development environment
[04:33:46] <Furkiepurkie> so vim should work
[04:36:20] <Furkiepurkie> what do I need or use to get something like this https://i.imgur.com/CE08ISl.png
[04:36:31] <Furkiepurkie> and how can I upload that to an arduino uno
[04:38:42] <Snert> download the linux version of the arduino IDE.
[04:42:23] <Furkiepurkie> already got that one but I'd like to compile in c/c++ while writing in vim
[04:43:17] <Furkiepurkie> using avr instead arduino if that makes sense
[04:49:51] <Snert> last time I checked, the arduio does in fact, compile C++ code.
[04:50:01] <Snert> there's also eclipse.
[04:50:28] <Snert> and a text editot is just a text editor.
[04:50:59] <Snert> using any text editor of your choice has nothing to do with the arduino ide, eclipse, or C++.
[04:51:05] <Snert> it's just an editor.
[05:48:02] <Lambda_Aurigae> Furkiepurkie, install the avr toolchain and use whatever text editor you want.
[05:48:12] <Lambda_Aurigae> avr-libc, avr-gcc, binutils-avr
[05:48:37] <Lambda_Aurigae> build your own makefile
[05:48:42] <Lambda_Aurigae> write your code
[05:48:48] <Lambda_Aurigae> compile it with make
[05:48:52] <Lambda_Aurigae> away you go.
[05:50:34] <Thrashbarg> that's in direct contradiction of the current view that you MUST use an IDE no matter what
[05:51:47] <Lambda_Aurigae> that's why I uses SATA these days.
[05:51:56] <Lambda_Aurigae> I like to be a contradiction
[05:52:04] <Thrashbarg> indeed
[05:52:11] <Thrashbarg> drowning in the fountain of eternal life
[05:52:37] <Lambda_Aurigae> if one must have an IDE on linux, use eclipse. I understand there is an AVR plugin for it that does the whole build thing too.
[05:52:53] <Thrashbarg> yes that scary black-magic build process
[06:02:56] <Furkiepurkie> Thanks Lambda_Aurigae, that's what I was looking for
[06:05:18] <Lambda_Aurigae> good thing we have IRC these days.
[06:05:35] <Lambda_Aurigae> back when I started with AVR and PIC microcontrollers, there were no IRC channels about them.
[06:05:40] <Lambda_Aurigae> I had to use google on my own.
[06:05:43] <Lambda_Aurigae> :}
[06:13:27] <Lambda_Aurigae> and them damned aussies like abcminiuser,,,sheesh.
[06:13:42] <abcminiuser> What did I do?
[06:13:51] <Lambda_Aurigae> huh?
[06:13:52] <Lambda_Aurigae> wha?
[06:13:58] <abcminiuser> Ducking out in a mo, half way through watching Life of Brian with the wife
[06:13:59] <Lambda_Aurigae> nuuuufffing.
[06:14:11] <abcminiuser> Just seeing if my docker image has downloaded
[06:14:17] <Lambda_Aurigae> aahh.
[06:14:29] <Lambda_Aurigae> go back and spend time with the wifey.
[06:14:37] <Lambda_Aurigae> that way she doesn't poison your popcorn.
[06:15:31] <abcminiuser> Hah, actually she's literally making popcorn now
[06:15:39] <abcminiuser> That's why I'm checking on my server....
[06:15:42] * Lambda_Aurigae am psychotic,,err,,psychic.
[06:15:48] <Lambda_Aurigae> or,,,both?
[06:15:53] <abcminiuser> And getting more bourbon
[06:16:10] <abcminiuser> Okies, I hear her melodic screeching, gotta go
[06:16:10] <Lambda_Aurigae> we do m&ms with popcorn, not bourbon
[06:16:13] <abcminiuser> Back later
[06:16:21] <Lambda_Aurigae> laters.
[06:19:23] <Lambda_Aurigae> and, I'm off to work myself.
[06:19:25] <Lambda_Aurigae> so, have fun.
[06:25:06] <_ami_> twnqx: ping,
[07:49:54] <carabia> Lambda_Aurigae: eclipse? really
[07:50:07] <carabia> I take it you haven't used it a whole lot haha
[07:57:49] <Tom_itx> the 2 times i used it, it locked up the pc so no i haven't used it alot either
[08:12:45] <Lambda_Aurigae> carabia, didn't say it was a good option..just that it was an option.
[08:12:54] <Lambda_Aurigae> and, no, I don't use it myself because it sucks.
[08:13:31] <Lambda_Aurigae> I would rather use edlin on a teletype....and, yes, I've done so.
[08:22:29] <carabia> for me the biggest benefit of an ide is debug integration, but not a lot of people do that on tinys and megas... :)
[08:32:02] <Lambda_Aurigae> would be nice to have such on linux beyond gdb and simulavr
[08:32:14] <Lambda_Aurigae> but, I don't even use that..mostly I use LED debug method.
[08:32:46] <Lambda_Aurigae> yanno, thinking back, I used to do that on the vic-20,,, many many moons ago.
[08:33:13] <Lambda_Aurigae> I remember building an LED board to go in the peripheral expansion port and blinking them in my assembly code to show what was going on.
[09:41:08] <nuxil> HI
[09:42:06] <nuxil> is it possible to use a atiny85 as a frequence counter?
[09:42:44] <Emil> nuxil: sure
[09:42:54] <Emil> it just dependa on your spesifications
[09:44:36] <nuxil> im building myself an analoge wien bridge oscillator.
[09:45:01] <nuxil> an was woundering if i could use a tiny to detect the frequence
[09:45:21] <Emil> Sure you can
[09:45:34] <Emil> But like I said, it depends on your spesifications
[09:46:27] <Emil> And how good you are st coding
[09:46:57] <nuxil> my c skills aint the best
[09:49:46] <Emil> If you are an arduino shill you can still do it, albeit with less precision and resolution
[09:50:37] <Emil> The point is that you have 6 pins you can use.
[09:50:58] <Emil> One of them goes to the signal you want to measure
[09:51:28] <Emil> Anything done in software is slow as balls
[09:52:28] <Emil> So you need to figure out how you are going to send the relevant data
[09:52:35] <Emil> Or show it
[09:52:49] <Emil> And how do you want to control the device
[09:53:20] <Emil> and do you want it to be continuous analysis
[09:53:42] <Emil> or do a measurement, transmit/show result, do another measurement
[09:54:42] <Emil> For a standalone, easy to implement way I would perhaps go with:
[09:55:26] <Emil> 4 leds on same port, 1 port to do analog read on for scaling (using a potentiometer perhaps)
[09:56:04] <Emil> And then do a measurement, either calculate fft or crudely calculate and average time between pin changes
[09:57:09] <Emil> And then scale it according to to adc read and put the leds to that value
[09:58:13] <Emil> You could even have four motentiometer and a single led
[09:58:27] <Emil> each changing a logarithmic range
[09:58:55] <Emil> Hmm, perhaps I'll do this for fun
[09:59:40] <Emil> Oh, by the way, you probably want to have a crystal for accurate timing
[10:00:00] <sabor> another 2 pins gone...
[10:00:05] <Emil> I know
[10:00:21] <Emil> But it is usually worth it for much better accuracy
[10:01:07] <sabor> you can use an external clock source and use just 1 pin, for example gps pps signal
[10:01:15] <Emil> That's true
[10:01:33] <Emil> Hmm
[10:01:52] <Emil> I should have this as a challenge for a course or hackathon
[10:06:13] <carabia> _ami_: By the way, if you happen to get lucky with CAN-bus, drop me a line will you?
[10:06:40] <Emil> MVP Hardware Hackathons
[10:06:40] <_ami_> carabia: did not try yet. have to try it soon.
[10:06:51] <Emil> How about that
[10:07:00] <carabia> Though I think it was a Honda you're after, I have generally no experience with jap cars, but might help.
[10:07:02] <Emil> MVPHW Hackathons
[10:07:49] <_ami_> carabia: http://www.ebay.in/itm/Latest-ELM327-USB-ECU-OBDII-OBD2-EOBD-CAN-BUS-Car-Reader-Scanner-non-bluetooth-/131505550407 should i buy this?
[10:08:32] <_ami_> its a clone one.. i do need to assemble elm 327 chip later on.
[10:08:32] <carabia> _ami_: as said I have no experience with jap cars, ... the implementations are wide and varied...
[10:10:44] <carabia> What I did was I had an mcp can transceiver and an mcp can controller that i could talk to via spi
[10:11:46] <carabia> And i went straight for the ECU bus wires that I knew to work for sure (found behind + under the steering column), but this was on a few different models of MB
[10:12:27] <Lambda_Aurigae> Emil, to do the timing, if one of the timers can be externally triggered, set that up to count...set another up as a time reference...every so often, check and reset your count...divide count by time and you have frequency.
[10:12:52] <carabia> 'cause the ecu bus had the data I was interested in, and at least mb has multiple different buses
[10:14:18] <aandrew> also need to be careful; my car, for example, has I think 5 CAN buses and they all come together in a little module under the dash which is kind of a router/gateway for CAN. Not everything going on comes out the OBDII connector
[10:23:57] <carabia> That's what I was kind of trying to point out there
[10:35:05] <Emil> Lambda_Aurigae: ?
[10:57:29] <Lambda_Aurigae> oh..oops..sorry..wrong person I directed it to.
[10:57:38] <Lambda_Aurigae> should have been nuxil
[10:57:49] <Lambda_Aurigae> that's what happens when I'm trying to work and chat at the same time.
[10:57:55] <Lambda_Aurigae> only got 5 things at once going on here.
[10:59:26] <Emil> You're lucky ;)
[11:00:20] <Emil> But that externally clocking a timer is a pretty good solution
[11:01:10] <Lambda_Aurigae> been there, done that.
[11:01:31] <Lambda_Aurigae> use one timer with an interrupt to give you a time interval
[11:01:44] <Lambda_Aurigae> then grab the number of pulses from the other timer and reset it
[11:02:10] <Lambda_Aurigae> uses little processor time, can run independent of the rest of the app.
[11:02:41] <Lambda_Aurigae> interrupt can set a variable with the loop.
[11:02:50] <Lambda_Aurigae> umm.
[11:02:55] <Lambda_Aurigae> interrupt can set a variable with the count
[11:03:11] <Lambda_Aurigae> then the main loop can read that and send it over uart or whatever.
[11:03:19] <Lambda_Aurigae> program at the PC can do the dividing.
[11:03:43] <Lambda_Aurigae> or you can do it in the main loop and send the final out or display it or whatever.
[11:03:52] <Lambda_Aurigae> I did it with displaying it on a 16x2 lcd
[11:04:14] <Emil> That's really bloody swell
[11:04:29] <Emil> If only we could control multiple clocks simultaniously
[11:06:01] <Lambda_Aurigae> depends on what you mean.
[11:06:12] <Lambda_Aurigae> like, multiple inputs to counters?
[11:06:39] <Emil> Lambda_Aurigae: like reading registers simultaniously or stopping clocks a the same time
[11:07:02] <Lambda_Aurigae> yeah..you have to kinda guestimate some of the delays
[11:07:09] <Lambda_Aurigae> or count processor cycles.
[11:07:09] <Emil> Like, you know how to synchronize timers on avr we have to add nops
[11:07:14] <Emil> yeah
[11:07:38] <Lambda_Aurigae> if you have 3 chips running from the same external clock and running the same code they stay in sync really well.
[11:07:46] <Lambda_Aurigae> just look at Jartza's octapentaveega.
[11:08:07] <Lambda_Aurigae> he has 3 attiny85 chips running from one external clock and they stay in sync really well, generating 3 bit vga.
[11:08:08] <Emil> Sorry, not add nops but count how far the counter will advance before setting another timer
[11:08:42] <Emil> Hmm
[11:09:06] <Emil> I wonder if there is information about avr clock slipping
[11:11:26] <Lambda_Aurigae> I've never seen anything like that.
[11:12:02] <Lambda_Aurigae> as avr chips don't do much in the way of predictive readahead or anything, you can pretty much count on a certain instruction taking a specific number of cycles.
[11:12:16] <Lambda_Aurigae> only thing that might cause some shifting is interrupts.
[11:12:43] <Lambda_Aurigae> and that's even pretty precise...all in the datasheet.