#avr | Logs for 2014-04-27

Back
[00:33:39] <rue_house> ? abcminiuser you put in an eater egg?
[00:33:49] <bss36504> oh yes, yes he did
[00:33:52] <abcminiuser> God god people, it's years old
[00:34:46] <rue_house> hehe
[00:34:52] <rue_house> <- linux
[00:35:13] <bss36504> abcminiuser: years? I dunno
[01:27:50] <Roklobsta> what is the egg?
[01:31:37] <superware> I'm developing a Brushed DC Motor Controller for an existing camera gimbal, and it seems it's very challenging for the atmega328 to cope with decoding the quadrature encoder output (400 lines per revolution, x4 mode). Is it a good idea to move the decoding to an attiny85 and use TWI (I2C) to pull position values? (24/32 bit)
[01:35:05] <Casper> superware: if your mega328 can not do it, the tiny can not do it
[01:35:16] <Casper> unless it lack a peripherical, which I doubt
[01:38:09] <superware> the mega328 is doing everything :) including a PID loop etc
[01:40:10] <Casper> oh so you mean split the code
[01:40:19] <Casper> then maybe it can be a good idea
[01:40:30] <superware> since it's doing many things, and the quadrature decoding is done via INT0 and INT1, I'm afraid that in certain high speeds other interrupts will interfere with the quadrature decoding process and will cause skipping count
[02:11:45] <sirpatrick> So something crazy is going on with my MCUs. Somehow I have done something to all of them to where there are unable to be programmed with AVR dude. What is super strange is I didn't change anything that should cause it. I have been using the same makefile
[02:11:59] <sirpatrick> I tried different programmers, different prgramming cables, another workstation ,etc
[02:12:29] <sirpatrick> here is the makefile http://pastebin.com/HTDZtAgU
[02:13:45] <sirpatrick> I keep getting "avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check."
[02:13:59] <sirpatrick> I tried changing the programming speed with -B and have had no luck
[03:25:10] <cizra> Hi! What's the highest-frequency square wave I can generate with an AVR @ 8 MHz? (probably exploiting esome HW counter mode)
[03:25:50] <Xark> cizra: Well, you could set CLKOUT pin and then get 8Mhz. :)
[03:26:34] <Xark> cizra: Otherwise it will be 4Mhz (e.g., bit-banging or SPI).
[09:57:01] <Fleck> meh, software uart + int. osc is bad idea I guess
[09:57:08] <Fleck> can't make it run good
[09:58:42] <mdszy> It's not a good idea to run uart off of the internal osc
[09:58:51] <mdszy> too much drift
[09:58:53] <Fleck> yeah
[09:59:10] <Fleck> 4800 baud, but 4464 actual :D
[09:59:24] <mdszy> oof
[10:03:13] <Fleck> I wonder - whats the best way to send digital data using single wire?
[10:03:25] <mdszy> 1wire interface?
[10:04:20] <Fleck> I mean single wire and one direction
[10:04:36] <Lambda_Aurigae> uart
[10:04:43] <Lambda_Aurigae> but you will need 2 wires.
[10:04:47] <Lambda_Aurigae> GND and Data
[10:04:56] <Fleck> yeah but uart is not stable here
[10:05:23] <Lambda_Aurigae> 1wire won't be either without a common reference, like, a known stable clock.
[10:05:38] <Lambda_Aurigae> and if you have a good known stable clock then the uart will work.
[10:06:19] <Fleck> I would need that 4pin sq. wave gen...
[10:06:26] <Lambda_Aurigae> you could do autobaud but I suspect one end or the other of your application is not capable of handling it.
[10:06:43] <Lambda_Aurigae> it's called a crystal oscillator.
[10:06:46] <Fleck> yeah 2nd end has crystal
[10:07:21] <Lambda_Aurigae> also, remember, 16MHz is not a good speed for standard uart serial bit rates.
[10:07:23] <Fleck> can't connect "naked" crystal to attiny13
[10:07:51] <Fleck> 16MHz is ok for 9600
[10:07:52] <Lambda_Aurigae> then get a crystal oscillator.
[10:08:02] <Lambda_Aurigae> that's not the same as a crystal...
[10:08:22] <Lambda_Aurigae> the oscillator has a crystal in it but has all the stuff needed to make it resonate and generate the signal.
[10:08:28] <Fleck> I know... just, where to get it, I need to order it online... will take weeek!
[10:09:05] <Lambda_Aurigae> you have any old computers or anything laying around?
[10:09:15] <Fleck> yep
[10:09:38] <Lambda_Aurigae> search and ye shall find...maybe not the frequency you want but I bet you can get one that will work.
[10:10:13] <Fleck> I found some, but they are HUGE :D like 4x att13 size ;p
[10:11:21] <Lambda_Aurigae> use what you have, order what you need, or invent a new technology that allows two devices to communicate without having any common reference.
[10:12:06] <Lambda_Aurigae> if you had two way comms and ability to do programming mods at both ends you could do autobaud and use the internal RC oscillator.
[10:14:21] <Lambda_Aurigae> or you could cut your speed to 300bits per second.
[11:17:14] <RikusW> seems what you want is SPI or synchronous uart
[11:17:24] <RikusW> or i2c/twi
[12:04:00] <cizra> Xark: Thanks! Care to explain, though, how CLKOUT works? Do I really get 8 MHz from a 8 MHz chip? This means I'll get 16 MHz transitions.
[12:19:15] <RikusW> just set the CKOUT fuse
[12:19:39] <RikusW> *CLKOUT
[12:24:05] <Lambda_Aurigae> doesn't clkout require an external oscillator rather than a regular crystal?
[13:21:05] <MrVoltz> Hi
[13:21:46] <MrVoltz> Can I program atmega8 directly from Raspberry pi without voltage converters or something? Just directly wired?
[13:23:29] <Lambda_Aurigae> can the atmega8 run at 3.3V?
[13:24:04] <Lambda_Aurigae> aaand, the answer is, no.
[13:24:15] <Lambda_Aurigae> 4.5V minimum for an atmega8.
[13:24:20] <Lambda_Aurigae> an atmega8L will work.
[13:24:23] <Lambda_Aurigae> or an atmega88
[13:24:45] <MrVoltz> Some people are reporting that atmega8 works fine at 3v3
[13:24:52] <Lambda_Aurigae> then try it.
[13:24:58] <Lambda_Aurigae> according to the datasheet it won't.
[13:38:04] <MrVoltz> I found that I have Atmega8a
[13:38:21] <MrVoltz> That has 2.7V to 5.5V
[13:38:42] <Lambda_Aurigae> so it does.
[13:40:48] <Lambda_Aurigae> that should program at 3.3V nicely.
[13:47:39] <RikusW> clkout works from any clock source even internal RC
[13:48:40] <Lambda_Aurigae> I thought it used one of the xtal pins.
[13:48:47] <Lambda_Aurigae> never used it myself though.
[13:48:57] <RikusW> no, it uses the internal clock fed to the avr
[13:49:06] <Lambda_Aurigae> for an output I mean.
[13:49:33] <RikusW> I used it once to calibrate the RC osc using a DMM with frequency a counter
[13:50:39] <Lambda_Aurigae> must just be the smaller chips that do that.
[13:50:52] <Lambda_Aurigae> on the atmega1284p it's on a gpio pin.
[13:53:18] <RikusW> its possible to use XT2 connected to XT1 of another avr, this will allow only one crystal to be used, CLKOUT is safer though
[13:53:42] <RikusW> you need to set the fuse to enable CLKOUT
[13:54:02] <RikusW> it won't be a gpio anymore
[13:54:15] <RikusW> (until you reset the fuse that is)
[13:56:11] <Lambda_Aurigae> yyup.
[13:56:17] <Lambda_Aurigae> just reading through the datasheet on it.
[14:20:04] <Jartza> hmmh
[14:20:26] <rue_house> anyone used a ds1820 with an avr?
[14:20:29] <Jartza> one information I'm missing, and it wasn't at least obviously availabel in datasheet
[14:20:45] <Jartza> does attiny85 have any kind of "unique id" stored in chip?
[14:21:02] <Jartza> rue_house: I've used with attiny85
[14:21:13] <rue_house> bitbang or uart?
[14:21:47] <Jartza> attiny85 doesn't have an "uart" :)
[14:21:59] <rue_house> cool, will you share source?
[14:22:49] <Jartza> I actually used some ready arduino-code
[14:23:02] <Jartza> I'm trying to find the bookmark :)
[14:23:04] <rue_house> oh, want raw c
[14:24:23] <Jartza> hmm
[14:26:34] <Jartza> rue_house: http://siwawi.bauing.uni-kl.de/avr_projects/tempsensor/index.html
[14:27:29] <rue_house> thats the same source I'm picking thru now
[14:27:32] <rue_house> bit of a mess
[14:28:16] <rue_house> I kinda doubt this will compile in gcc-avr and fit on a t13
[14:28:53] <Jartza> ahh, t13
[14:29:03] <Jartza> might need some tweaking then
[14:29:11] <Jartza> t85 was easy as it has 8kB flash
[14:29:29] <rue_house> they have a generic one-wire library, a generic ds18x20 library, a crc8 library, a uart library...
[14:29:49] <rue_house> I just want to read the sensor
[14:29:51] <rue_house> 1 sensor
[14:31:59] <rue_house> hmm
[14:34:18] <Jartza> rue_house: http://pastebin.com/BPDwGyHM
[14:35:04] <Jartza> not exactly what you're looking for, but might be helpful
[14:36:38] <Jartza> https://github.com/akafugu/uA-thermometer
[14:36:47] <Jartza> seems that google finds quite many libraries :)
[16:36:28] <gchristensen> using avr-gcc, what is the difference between TCCR0A and TCCR0B? as far as I can tell, *b configures the prescalar, and (maybe?) enables/disables OCR0A (bit 7) and OCR0B (bit 6) -- is this correct?
[16:36:41] <mdszy> look in the datasheet.
[16:37:20] <gchristensen> err, of course.
[16:43:09] <Lambda_Aurigae> http://www.protostack.com/blog/2010/09/timer-interrupts-on-an-atmega168/
[16:43:20] <Lambda_Aurigae> gchristensen, after you read the datasheet, read through that.
[16:44:22] <gchristensen> Lambda_Aurigae: this is exactly the sort of thing I was looking for - thank you!
[16:44:41] <Lambda_Aurigae> first hit when I did a google search for tccr0a
[16:45:48] <Lambda_Aurigae> every bit of that info is in the datasheet, albeit in a bit more technical form.
[16:46:12] <Lambda_Aurigae> in fact, the datasheet has much more info.
[16:46:18] <gchristensen> I'll admit I didn't google for just tccr0a :/ I appreciate the help.
[16:46:58] <Lambda_Aurigae> learning to use search engines is probably the most important skill you can build in this day and age.
[16:47:31] <gchristensen> the amount of information in the datasheet is overwhelming, without the context around what its saying. I've been giving it a crack though. and yes... ESR's "smart questions" doc is something I link to frequently.
[16:47:54] <Lambda_Aurigae> you could always search the datasheet for tccr0a
[16:48:02] <Lambda_Aurigae> it will take you right to the section you need.
[16:48:22] <gchristensen> that's fair
[16:48:47] <Lambda_Aurigae> as for using search engines like google....ask the same question there you would here...then start simplifying the question by getting rid of extra words.
[16:50:24] <gchristensen> while I appreciate the help, I feel fairly patronized, and I don't really think I deserve quite so much. I've definitely received the clue-bat already
[16:50:43] <Lambda_Aurigae> sorry,,just trying to help for future queries.
[16:50:54] <gchristensen> I can understand that
[19:22:52] <Lambda_Aurigae> well, finally got around to playing with my avr32 board.
[19:23:01] <Lambda_Aurigae> and, now I gotta go find my dragon to program it!
[19:24:27] <Tom_itx> jtag only...
[19:37:24] <Xark> Lambda_Aurigae: Which board do you have?
[19:37:34] <Lambda_Aurigae> evk1104
[19:37:40] <Lambda_Aurigae> I think it has a bootloader on it.
[19:37:44] <Lambda_Aurigae> Tom_itx, the dragon will do jtag.
[19:40:10] <Lambda_Aurigae> grabbing the flip software now.
[19:40:23] <Lambda_Aurigae> finally got it to see the thing in windows in vmware.
[19:55:38] <dgriffi> anyone here do any work with DTMF decoders?
[20:06:07] <Lambda_Aurigae> not in many years.
[20:46:06] <dgriffi> Lambda_Aurigae: I have some 8870s here in DIP for design purposes. the finished product will be SMT. But I found some stuff in forums saying that the part is obsolete
[20:47:12] <dgriffi> so I bought some Holtek 9170s They seem current and the pin assignments seem to match up with the 8870... I'm not sure if they're drop-in replacements or not. Do you know?
[22:44:35] <rue_house> isn't 8870 a telephone ic?
[22:44:44] <rue_house> dtmf?
[22:45:00] <rue_house> hah
[22:45:03] <rue_house> what are you up to?
[22:45:14] <rue_house> dgriffi,
[22:49:51] <rue_house> its a pretty easy chip to use
[22:53:13] <rue_house> watch the tow, when it goes high, read the other bits, they will tell you which key was pressed
[22:53:39] <rue_house> watch the tow, when it goes high, read the other bits, they will tell you which key is depressed, you can issue prozak as required.