#avr | Logs for 2013-02-06

Back
[00:00:34] <Casper> next stuff to buy: docsis3 modem cable, then probably an openups, then some battery
[00:00:41] <Casper> then I'll make a NAS
[00:01:11] <rue_house> then you can lose all your data on one drive!
[00:01:41] <rue_house> nothing like head motor demegnetization!
[00:02:03] <rue_house> clunk tick tick tick tick tick
[00:02:08] <rue_house> clunk tick tick tick tick tick
[00:03:47] <rue_house> https://docs.google.com/file/d/0B0nOlQ9bqIadTkY4cXVYbXRzWWM/edit?usp=sharing
[00:03:50] <rue_house> hahahah hara!
[00:05:49] <Casper> o.O
[00:06:23] <Casper> http://www.youtube.com/watch?v=oeMKmQ2gStg ← THAT is laughtable
[00:08:08] <rue_house> oh dear
[00:08:29] <Casper> look dangerous too
[00:11:08] <Grievre> How many clock cycles does it take to sample the ADC of an ATTiny?
[00:11:46] <Casper> nini
[00:14:03] <rue_house> depeds how fast its running
[00:14:10] <rue_house> from 1 to 40000
[01:45:36] <TechIsCool> alright I just built myself a board and I can't get my dragon to comunicate with it. Anyone want to help?
[01:45:59] <TechIsCool> Its a atxmega32a4u and I have the pdi connected to the isp header of my dragon
[01:57:27] <mog> TechIsCool, have you done a continuity check
[01:57:39] <mog> and checked that the board has voltage
[01:57:44] <TechIsCool> yes and yes
[01:58:21] <TechIsCool> I can't say for sure all the pins are functioning but I did go around the board and check for bridges and also to make sure the pins I have connected work
[01:58:37] <TechIsCool> using a dvm in ohms
[02:01:06] <mog> hmm
[02:01:19] <RikusW> TechIsCool: did it work before ? or is this the first try ?
[02:01:41] <TechIsCool> RikusW: First try, also never used my dragon for pdi so not sure if it actually works
[02:02:14] <mog> ive only used a dragon for icsp
[02:02:47] <RikusW> mog: you mean ISP ? ICSP is for PIC
[02:03:09] <RikusW> mog: a mind bender ISP use SPI ;)
[02:03:32] <mog> i always see it written that way
[02:03:47] <mog> i thoguht it meant in circuit serial programmer
[02:03:57] <RikusW> TechIsCool: the dragon pdi fails with xm128A1 but jtag works, pid works on newer xmegas
[02:03:57] <mog> and generic
[02:04:16] <RikusW> I tried it on xm256a3u and both pdi and jtag works
[02:04:26] <TechIsCool> RikusW: the 32a4u does not have jtag so its only pdi which is enabled
[02:04:57] <RikusW> afaik the dragon and pdi should work on 32a4u
[02:05:09] <RikusW> OndraSter: should be able to say for sure
[02:05:23] <TechIsCool> RikusW: Alright
[02:05:31] <RikusW> he got both dragon and 32a4u iirc
[02:05:56] <RikusW> TechIsCool: PDI needs Vtg Gnd Rst and Data to be connected
[02:06:04] <TechIsCool> Correct
[02:06:16] <RikusW> and the xmega needs 3v3, NOT 5V....
[02:06:23] <TechIsCool> Yup
[02:07:19] <TechIsCool> I have confirmed pinout and connection between dragon and device header and the atxmega
[02:07:41] <RikusW> pins 1-data 2-Vtg 5-clk/rst 6-gnd
[02:09:03] <TechIsCool> RikusW: Yup its the way I have it on my board I guess the next thing is to pull out the oscope
[02:11:11] <RikusW> data is bidirectional
[02:11:53] <TechIsCool> Its more the clk that I should make sure is functioning first because if the rest line is not pulled correctly.
[02:12:04] <RikusW> PDI is synchronous uart with rx/tx on the same wire
[02:13:17] <RikusW> abcminiuser actually use the s uart on m32u2 to make his AVRISP mkii clone
[02:13:23] <RikusW> for PDI that is
[02:13:51] <TechIsCool> I guess I could spin up my atmega32u4 and make it program pdi
[02:15:03] <RikusW> you can get the mkii in the LUFA source
[02:15:46] <RikusW> but you'd need to either run at 8MHz and 3v3 or overclock and run 16MHz (default clock for mkii) and 3v3
[02:15:58] <RikusW> add a 330 Ohm resistor between rx/tx
[02:16:11] <RikusW> and use rx as the data line
[02:16:52] <RikusW> I guess it will be a small mod to make the mkii run at 8MHz
[07:07:01] <OndraSter> if TechIsCool appears here when I am away, then you can tell him, that Dragon and PDI works on 128a4u just fine. Haven't tried 32a4u but there is no reason for it not to work
[07:07:25] <OndraSter> BUT you need 40pF or so between PDI_CLK (RESET) and GND
[07:07:33] <OndraSter> the output transistors on dragon are... weird
[07:07:37] <OndraSter> and do not work with PDI properly
[08:10:19] <Malinuss> Tom_itx, just got your programmer - yay
[08:10:28] <Malinuss> damn that was fast
[08:10:35] <Malinuss> you posted it what? Friday?
[08:52:41] <Posterdati> hi
[08:52:57] <Malinuss> hello
[08:53:13] <Posterdati> how can I declare a variable to hold an sfr?
[08:53:32] <Posterdati> I mean: var = OCR1A, then setting var sets OCR1A
[09:02:10] <Malinuss> Posterdati, what? what is "an sfr"?
[09:02:44] <Grievre> Posterdati: you can't really do that
[09:02:48] <Grievre> Posterdati: why would you want to do that?
[09:03:40] <Malinuss> Special function registers.. well you could make a function?
[09:03:43] <Posterdati> I found this: http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_port_pass
[09:03:48] <Posterdati> ok done
[09:04:51] <Malinuss> why didn't you just ask that instead?
[12:52:54] <TechIsCool> OndraSter: you around?
[12:54:33] <OndraSter> yes
[12:54:47] <OndraSter> <OndraSter> if TechIsCool appears here when I am away, then you can tell him, that Dragon and PDI works on 128a4u just fine. Haven't tried 32a4u but there is no reason for it not to work
[12:54:47] <OndraSter> <OndraSter> BUT you need 40pF or so between PDI_CLK (RESET) and GND
[12:54:47] <OndraSter> * VaporOne odešel (Ping timeout: 245 seconds)
[12:54:47] <OndraSter> <OndraSter> the output transistors on dragon are... weird
[12:54:47] <OndraSter> <OndraSter> and do not work with PDI properly
[12:55:28] <TechIsCool> ^That so a 40pf cap between clk and gnd
[12:55:37] <TechIsCool> and then it will work instresting
[12:57:38] <TechIsCool> I will try it thanks for the information I will report back when I have it completed
[12:58:26] <OndraSter> np
[12:58:32] <OndraSter> I gave it two 22pF in parallel
[12:58:50] <OndraSter> when on PCB
[12:58:55] <OndraSter> one 20pF was enough when in b...board
[12:58:56] <OndraSter> damnit
[12:58:58] <OndraSter> breadboard
[12:58:59] <OndraSter> that.
[12:59:30] <TechIsCool> I think I am going to resort to 4 10pF's since I don't have anything else laying around might just build it into the cable not the board
[13:05:03] <OndraSter> no!
[13:05:12] <OndraSter> it has to be close to the chip
[13:14:54] <Guest19760> guys, i want to implement usb on avr, can any one giv me some idea, which hardware is right
[13:22:50] <TechIsCool> OndraSter: Alright
[13:23:03] <TechIsCool> I placed them under the header
[13:23:12] <TechIsCool> that is the closest I can get them
[13:26:22] <TechIsCool> in avrdude is the atxmega32a4 the same as the u varient? I have tried it now from atmel studio 6 and it still squaks
[13:27:19] <Tom_itx> i suggest looking in the avrdude pdf
[13:28:16] <TechIsCool> Tom_itx: Do you know where the pdf resides all I could seem to find last night was a old 2007 version
[13:28:50] <OndraSter> no, U is not the same
[13:28:56] <OndraSter> uh
[13:29:00] <TechIsCool> OndraSter: Alright
[13:29:18] <OndraSter> just open device programming -> select 32a4u -> read device id
[13:29:20] <Tom_itx> U can be programmed via flip cmd line
[13:29:33] <OndraSter> it canť
[13:29:36] <OndraSter> can't
[13:29:43] <TechIsCool> not without a bootloader
[13:29:43] <OndraSter> xmegas do not have burned in DFU
[13:31:36] <TechIsCool> OndraSter: When I run that I get an error saying "Unable to enter programming mode. Verify device selection, interface settings, target power and connections to otarget device. When I read target voltage I get my 3.3v
[13:33:44] <TechIsCool> Then it says in the output Got error setting up PDI mode: Device is not supported in this emulator mode. Debugger command setParameter failed, ModuleName TCF Device:startSession failed
[13:34:12] <TechIsCool> My dragon is running 7.18 firmware version
[13:34:54] <TechIsCool> but there is a new atmel studio let me download that
[14:13:44] <tomatto> hi
[14:16:41] <tomatto> please, can you suggest me some analog circuitry which is needed to add between audio signal source and ADC pin of avr? i want to make vu meter with my mega8
[14:37:58] <iSaleK> tomatto: I'm not very good with parts since I'm begginer in electronics, but my idea would be to first amplify the signal because as far as I know, volume output from PC Sound card is in range from 0-1.1 or 1.5V
[14:38:34] <OndraSter> 0.7Vpp iirc
[14:38:36] <OndraSter> or 0.6
[14:38:46] <iSaleK> or you can work with that, it's not that low but you could amplify it 3-4 times
[14:38:55] <tomatto> iSaleK: yes, but i am failing with this part
[14:42:03] <tomatto> i tried many schematics, but doesn't work any of them
[14:43:36] <iSaleK> tomatto: Did you try with some OP amp to increase the signal amplitude and then pass it to the ADC?
[14:45:17] <tomatto> iSaleK: yes i did. every my try to build some op amp circuitry for amplify and rectify audio signal failed
[14:45:37] <iSaleK> tomatto: I googled and found IC741, OP Amp, you could use it to boost the signal 3-5 times to get amplitude from 0-0.7 to 0-3.5V
[14:46:08] <iSaleK> Then you could read that signal with ADC on ATmega8 and acordingly power the LEDs or whatever you want to power with it :)
[14:46:11] <tomatto> i used lm358
[14:47:15] <tomatto> do you have some schematic for that analog circuitry with op amp which do you know that works?
[14:47:27] <iSaleK> How did you connect it and what external components did you use?
[14:47:48] <iSaleK> I don't have, but I could help you with ideas what to try :)
[14:51:09] <iSaleK> You could use non-inverting schematic, with R2=100K and R1=25K, that should give you about 5x gain on output which is enough to have 0-3.5V to the ADC
[14:54:12] <Malinuss> Tom_itx, you there :P?
[14:54:15] <tomatto> iSaleK: any capacitor or rezistors to op amp + input?
[14:55:21] <iSaleK> tomatto: Well I would put some small cap like few uF at between the + of the signal and + of the OP amp input pin
[14:57:11] <tomatto> iSaleK: what about polarity of that capacitor?
[14:58:17] <iSaleK> tomatto: I would turn the + side to the + of the signal and GND to the + pin of the OP amp
[14:59:02] <dioxide> tomatto: have you looked at other avr vu/spectrum analyzer projects?
[14:59:06] <dioxide> http://elm-chan.org/works/akilcd/report_e.html
[15:00:20] <tomatto> dioxide: yes i saw that, but i haven't that ICs
[15:01:01] <dioxide> http://dangerousprototypes.com/2011/01/28/avr-vu-meter-and-spectrum-analyser/
[15:02:10] <dioxide> i would expact most any opamp to work, even if it isnt the ideal one
[15:03:00] <tomatto> dioxide: i don't see any schematic there
[15:03:10] <dioxide> its down low
[15:04:08] <tomatto> finally :), this circuit i tried, but not working :(
[15:09:30] <TechIsCool> where do I download a copy of avrdude for windows? newest release
[15:10:15] <TechIsCool> nvm win avr has it
[15:11:34] <iSaleK> tomatto: could you send me the schematic that you are trying?
[15:12:16] <tomatto> iSaleK: what of tryings is http://img193.imageshack.us/img193/1453/filtrolm.jpg
[15:13:28] <iSaleK> tomatto: did you make this circuit or did you have found it somewhere?
[15:13:39] <tomatto> iSaleK: found
[15:13:56] <iSaleK> Did you try removing the diodes?
[15:14:40] <tomatto> yes, i did diodes to the output with capacitor to ground
[15:15:03] <iSaleK> Since I guess they have forward voltage of about 0.6 so the Op Amp would need to generate output that is more than 0.6 for negative feeedback to start working
[15:15:15] <iSaleK> I will try to send you one schematic to try and make it
[15:15:18] <iSaleK> just a sec
[15:20:24] <Posterdati> hi
[15:20:24] <tobbor> Hello Posterdati
[15:20:42] <Posterdati> is there a way to remap an interrupt vector on the fly?
[15:22:46] <tomatto> iSaleK: ok.
[15:23:50] <iSaleK> tomatto: Strange, I can't seem to get more than 2.8V output from this IC althou the gain should be like 8 times I get 4.5 max
[15:24:09] <iSaleK> Try R2=1K and R1=120ohm
[15:25:01] <tomatto> iSaleK: i have now 3V with no change when audio is playing or not
[15:25:49] <iSaleK> With this schematic that you gave me?
[15:26:54] <tomatto> iSaleK: no, just non inverting op amp circuit
[15:27:05] <iSaleK> tomatto: I don't know what is the slew rate for this OP amp but if it's too slow it may not be able to follow the changes on the input
[15:27:25] <dioxide> that particular circuit is known working
[15:28:00] <tomatto> i don't see what i am doing wrong
[15:30:54] <tomatto> i tried to do first part of this http://coolarduino.files.wordpress.com/2012/06/analog_vu_k.jpeg
[15:33:37] <iSaleK> tomatto: Did you try with the R1=120Ohm and R2=1K setup?
[15:34:13] <iSaleK> Signal from the audio put it directly to the Op amp and look at the output
[15:41:10] <tomatto> iSaleK: when i remove capacitor with wire only, output is 0V
[15:41:47] <iSaleK> Even when the music is playing?
[15:42:34] <tomatto> it doesn't matter
[15:42:55] <iSaleK> You have this configuration, right? -> http://i.imgur.com/CzgMgv3.png
[15:43:47] <tomatto> iSaleK: exactly
[15:44:22] <iSaleK> tomatto: And how big cap do you add to the input?
[15:45:56] <iSaleK> when you try with the cap ofcourse
[15:52:14] <tomatto> iSaleK: 10uF. with cap is output 3V
[15:53:27] <iSaleK> tomatto: Did you try reversing the polarity of the cap?
[15:54:38] <tomatto> iSaleK: yes, now output is increasing from 0V to 3V
[15:54:50] <iSaleK> While playing music on it?
[15:54:59] <tomatto> iSaleK: yes
[15:55:29] <iSaleK> Well that's good, now try replacing your cap with smaller one, like 1uF or something like that
[15:56:03] <iSaleK> Since your music is playing the capacitor is charging and OP amp is discharging it, so if the cap is too big the op amp may not be able to discharge it fully
[15:56:34] <iSaleK> so that may be the reason why are you always getting 3V at output
[15:57:30] <tomatto> iSaleK: with 1uF is charging faster
[15:57:57] <iSaleK> So it goes from 0 to 3V and stays to 3V ?
[15:58:24] <tomatto> iSaleK: yes
[15:58:40] <tomatto> now it is 2.89V
[15:58:52] <iSaleK> What are you using to mesure the voltage?
[15:59:38] <tomatto> iSaleK: multimeter
[15:59:49] <iSaleK> tomatto: :)
[16:00:19] <tomatto> iSaleK: and osciloscope
[16:00:24] <tomatto> oscilloscope
[16:01:12] <iSaleK> Try adding 100K resistor, one side between cap and op amp + imput and another side to the gnd
[16:02:25] <iSaleK> It should force discharging of the capacitor
[16:03:21] <tomatto> now it is about 0.1V
[16:04:08] <iSaleK> Is there a way you could send me the picture of the scope output?
[16:04:25] <iSaleK> Also try adding another 100K between op amp + input pin and VCC
[16:08:01] <tomatto> iSaleK: on scope is now moving between 20mV and 150mV
[16:08:47] <iSaleK> tomatto: And the values of the R2 and R1 are?
[16:09:16] <iSaleK> With 100K both between input and GND and input and VCC? With 1uF cap? Right?
[16:09:24] <tomatto> iSaleK: 1k and 100R
[16:12:27] <iSaleK> tomatto: It moves between 20mV and 150mV when you add just one R between input and gnd or when you add R between input and GND plus R between Input and VCC?
[16:15:22] <tomatto> iSaleK: only when i added R between input and GND, when i added R between input and VCC nothing changed
[16:17:21] <iSaleK> tomatto: Ok, one more thing comes to my mind. Try adding 1uF cap to the output. + side to the output of the Op amp and measure the V on - side of the cap
[16:18:33] <iSaleK> Add something like 1K or 10K resistor between - side of the cap and GND to allow it to discharge
[16:34:40] <iSaleK> tomatto: Giving up already? :)
[16:35:39] <tomatto> iSaleK: not yet :)
[16:35:56] <iSaleK> tomatto: did you try adding the cap to the output like I told you?
[16:40:30] <tomatto> iSaleK: no 10uF at all?
[16:41:05] <iSaleK> No no, try adding 1uF or something like that cap to the output
[16:41:09] <iSaleK> I will give you the schematic now
[16:41:38] <TechIsCool> Anyone know what Illegal emulator mode means in avrdude
[16:44:41] <iSaleK> tomatto: http://i.imgur.com/yghpnBv.png
[16:48:29] <tomatto> iSaleK: it is more about 0V now
[16:48:35] <tomatto> around
[16:48:45] <iSaleK> :S
[16:48:54] <iSaleK> I don't know what's wrong with it :\
[16:50:24] <tomatto> iSaleK: increase R2?
[16:50:55] <iSaleK> tomatto: Well, you could try that :)
[16:51:13] <iSaleK> I'm not sure what is causing the problem thou :\
[16:53:16] <tomatto> there is lot of noise and i turn of music :(
[16:56:04] <tomatto> when i turn of music
[17:04:18] <tomatto> iSaleK: when i increase R2 to 10k output is higher but noise too
[17:05:54] <iSaleK> tomatto: Hmmm, with capacitors? :)
[17:06:43] <tomatto> iSaleK: yes. really that input capacitor should have + on the input signal side?
[17:08:57] <iSaleK> tomatto: to be honest, I'm not sure
[17:09:18] <iSaleK> I will give you the another scheme now to try. I hope this one works
[17:09:28] <tomatto> me neither
[17:09:28] * iSaleK hopes so
[17:12:56] <iSaleK> tomatto: I've found severals schemes for audio opamp that has cap + turned to signal ( minus to the OP amp input)
[17:13:21] <tomatto> ok.
[17:21:57] <iSaleK> tomatto: Try this one
[17:21:58] <iSaleK> http://i.imgur.com/I4WkW06.png
[17:22:03] <iSaleK> It should work
[17:22:07] <Malinuss> evening avr
[17:23:02] <iSaleK> tomatto: The negative feedback res R5 can vary from 100K to 1M
[17:23:20] <tomatto> iSaleK: R3 and R1 may be connected to vcc or just together?
[17:23:55] <iSaleK> tomatto: I'm sorry, they are both connected to VCC
[17:24:11] <iSaleK> I'm tired so I make mistakes (more than when I'm rested) :)
[17:24:58] <tomatto> me either :D
[17:25:33] <tomatto> iSaleK: i have not really good feeling about R3
[17:26:46] <iSaleK> tomatto: Why? It's pull-up on the input. This circuit works a bit diferent from the one we've been making before but it should do the job
[17:30:54] <tomatto> is that 4.7uF important? i have only 10uF and 1uF nothing between
[17:38:17] <tomatto> iSaleK: not better, but opposite
[17:39:14] <iSaleK> tomatto: Can you give me the oscilloscope output? :)
[17:40:47] <tomatto> iSaleK: not sure, pretty ugly picture :(
[17:43:26] <iSaleK> tomatto: Can you send me the photo of it?
[17:43:32] <iSaleK> screenshot or whatever
[17:48:43] <tomatto> it is just a blur
[17:49:06] <iSaleK> tomatto: It's this circuit http://audio.circuitlab.org/2012/06/simple-preamp-mic-using-lm358.html
[17:49:20] <iSaleK> It's mic preamp, It should work ok
[17:49:40] <iSaleK> What are the voltages on the output? Do you get soundwaves or fixed values?
[17:53:50] <tomatto> it is looks like only noise
[17:59:50] <iSaleK> tomatto: The problem is that this is inverting op amp (int this configuration)
[18:00:02] <iSaleK> Maybe passing that signal to next opamp to just mirror it would work
[18:01:03] <tomatto> iSaleK: mirror it?
[18:01:31] <iSaleK> tomatto: Well to invert-inverted signal, it should give you the signal from 0-5V
[18:02:23] <iSaleK> tomatto: Oh, my bad... you don't have simetric supplu :\
[18:02:36] <iSaleK> If you had +VCC and -VCC you could do this :\
[18:03:07] <tomatto> i haven't negative voltage
[18:03:40] <tomatto> how?
[18:27:58] <iSaleK> tomatto: Well if you could have +5 VCC and -5V VEE you could use that but you would get - voltage on the output
[18:28:25] <iSaleK> but I guess other OP could just invert it again and you would have a nice + voltage
[18:52:23] <tandoori> hmm how do i turn off unused pins in programming?
[19:01:18] <iSaleK> tandoori: What do you mean by turn off?
[19:01:27] <iSaleK> tomatto: Are you still here?
[19:02:19] <tandoori> iSaleK: oh i meant to turn them off so that they aren't accidently turned on or something
[19:02:35] <tomatto> iSaleK: yes, turn off...pause music
[19:03:03] <iSaleK> tandoori: They cannot be accidently turned on...
[19:03:09] <iSaleK> tomatto: Do you have microcap?
[19:03:53] <tomatto> sorry previous not for me :)
[19:03:57] <tomatto> iSaleK: microcap?
[19:04:45] <iSaleK> are you under unix, M$ or Mac? :)
[19:05:12] <tomatto> unix
[19:05:37] <iSaleK> Then you don't have Microcap simulator :)
[19:06:08] <tomatto> no, i haven't
[19:06:10] <iSaleK> Nevermind, mine has exact model of LM358 and it cannot get higher output voltage than 3V (for 5V VCC)
[19:07:23] <tomatto> ok?
[19:09:51] <tomatto> so?
[19:09:53] <iSaleK> http://imgur.com/qbb8Pgj
[19:10:02] <tandoori> iSaleK: so i dont have to set up any of the other pins as high or low? i can just leave them alone and unconnected to the circuit?
[19:10:18] <iSaleK> tomatto: Here is the image of the schematic and output http://imgur.com/qbb8Pgj
[19:10:34] <iSaleK> Any increment of R2 would make the signal flat on top
[19:10:38] <iSaleK> so the max is 3V
[19:10:47] <iSaleK> And it should work if you have a setup like this one
[19:11:02] <iSaleK> Please try and let me if it works in practice and watch out for wiring :)
[19:11:16] <iSaleK> It's late so if you are like me, you could easily swap wires :)
[19:11:38] <iSaleK> tandoori: You are talking about AVR microcontroller, right?
[19:12:04] <tandoori> iSaleK: of course
[19:12:23] <iSaleK> tandoori: Then if you leave them hanging (unconected on your board) it doesn't matter
[19:12:41] <tandoori> oh, yay
[19:12:42] <iSaleK> however you should then set them as output pins and set them to LOW in code
[19:13:12] <iSaleK> It will lower the power comsuption and no static could be picked up on those pins
[19:13:13] <tomatto> iSaleK: what about caps use or don't?
[19:13:39] <iSaleK> tomatto: I would try without them this time... they give me very very wierd results in simulator
[19:13:39] <tandoori> iSaleK: ah ha thats what i was looking for. i knew it was something like that
[19:13:41] <tandoori> many thanks
[19:13:51] <iSaleK> tandoori: You're welcome
[19:15:17] <iSaleK> tandoori: Your MCU pins can't be accidentaly High or Low, they have to be triggered by code (or some external event that triggers code event) but I suggest you always put unused pins as Output (on most AVR they are output as default) and set them as LOW (again, default on many AVRs)
[19:16:03] <OndraSter_> no
[19:16:08] <OndraSter_> they are as input in default
[19:16:09] <OndraSter_> on all AVRs
[19:16:21] <OndraSter_> (maybe the AT90 series not, but that is long time gone)
[19:19:47] <tomatto> iSaleK: output is holding on 2.18V
[19:20:08] <tandoori> there, ive set them all as output and low in code
[19:20:09] <tandoori> yay
[19:21:01] <iSaleK> tomatto: Leave circuit as it is and short OP amp input to GND and read the output?
[19:21:34] <tomatto> iSaleK: do you mean positive input?
[19:21:55] <iSaleK> tomatto: yes, the one where you input the signal from the audio jack
[19:22:37] <tomatto> iSaleK: zero
[19:22:49] <iSaleK> ok
[19:26:38] <Malinuss> tandoori, yeah all the pins are input as default
[19:30:18] <iSaleK> My bad
[19:30:19] <iSaleK> :)
[19:34:07] <tandoori> mmh my code is so close to being done i can taste it
[19:34:18] <tandoori> i am nervous and excited to program my first avr
[19:34:47] <Malinuss> what will your first code do tandoori ?
[19:35:41] <tandoori> oh its a simple led project, but more extensive than a silly 'Hello World' led project
[19:45:30] <Grievre> does AVR allow for some sort of external timer reset? Like can I attach a pin to a timer/counter such that whenever the pin is low, the timer is reset to zero, and when it's high the timer runs normally?
[19:45:39] <Grievre> entirely in hardware?
[19:47:01] <Grievre> basically what I want is for an interrupt handler to be invoked when a certain pin has been held low continuously for 88 us
[19:47:19] <Grievre> but nothing to happen otherwise
[19:49:33] <Casper> no
[19:49:53] <iSaleK> tomatto: Check this PDF http://www.ti.com/lit/an/sboa092a/sboa092a.pdf
[19:50:18] <iSaleK> tomatto: Page 67 Try using that circuit but put E1 as GND and E2 as Signal input
[19:50:24] <iSaleK> I hope it works
[19:50:44] <iSaleK> I'm goingt to sleep now, let me know tommorrow if you manage to make it work :)
[19:50:53] * iSaleK goes to sleep....
[19:50:57] <iSaleK> Good night everyone
[19:51:10] <tomatto> iSaleK: still with no caps?
[19:51:21] <Grievre> oh I could set an input capture on that pin and then check to see if the negative edge happened x amount of time ago, that works
[19:51:22] <tomatto> iSaleK: thanks and gn.
[19:51:37] <iSaleK> tomatto: Well try that schematic and change it if it doesn't work... but I hope it works
[19:51:39] <iSaleK> Good luck
[19:54:00] <iSaleK> tomatto: I've just seen this schematic on page 77
[19:54:14] <iSaleK> tomatto: I think it's even better than the one before, so try that one first
[19:54:16] <iSaleK> Good luck :)
[19:54:19] * iSaleK off
[20:02:18] <tandoori> how do i get a bit in a byte at a particular position? lets say i want to return bit 0 in a byte
[20:05:21] <Tom_itx> a bit mask compare
[20:05:33] <tandoori> oh thats right
[20:17:08] <Grievre> Does the receive complete interrupt get called on a frame error, or if not is there another interrupt which is called in that case?
[20:20:28] <tandoori> yay i am now ready to program my avr! whee!
[20:28:37] <tandoori> where can i find the proper pin out for this procket programmer and the programming ports
[20:29:01] <Grievre> tandoori: is it a 6-pin ISP header?
[20:29:05] <tandoori> i had the link to do it but i lost it
[20:29:10] <tandoori> aye, 6 pin
[20:31:03] <Grievre> tandoori: one second lemme screenshot for you
[20:31:08] <tandoori> danke
[20:33:31] <Grievre> tandoori: https://dl.dropbox.com/u/82410932/ISPheader.png
[20:34:16] <tandoori> many thanks
[20:34:43] <Grievre> tandoori: that's looking down at the pins btw
[20:55:05] <tandoori> ugh
[20:55:29] <tandoori> i am trying to program my avr but i keep getting init failed, rc=-1
[20:55:42] <tandoori> says: double check connections and try again
[20:56:01] <tandoori> i checked my connections and they are just as they should be according to the datasheet
[20:58:06] <tandoori> pin 20 = VCC, pin 19 = SCK, pin 18 = MISO, pin 17 = MOSI, pin 10 =GND and pin 1 = Reset
[20:59:24] <tandoori> i am using: "avrdude -c usbtiny -B 1 -p attiny2313 -U flash:w:foo.hex"
[20:59:54] <Casper> might want to try with a slower clock...
[21:00:13] <tandoori> pardon?
[21:00:19] <tandoori> hows i do that
[21:00:34] <tandoori> remove -B 1?
[21:02:05] <tandoori> nope still failed
[21:02:15] <tandoori> maybe my file is incorrect?
[21:03:48] <damjan> try avrdude -c usbtiny -B 1 -p attiny2313 -v
[21:04:46] <Grievre> tandoori: you want :i after the foo.hex
[21:04:49] <Grievre> don't you?
[21:04:54] <Grievre> oh wait attiny maybe it's different
[21:05:33] <Grievre> I dunno about attiny but with atmega you need to have an xtal and associated caps connected in order to program it
[21:05:41] <Grievre> and also reset pulled up to 5V
[21:05:54] <damjan> Grievre: :i is optional, and is autodetected
[21:06:04] <damjan> Grievre: also, doesn't matter what the cpu is
[21:06:31] <damjan> tandoori: try with bigger -B something
[21:06:52] <tandoori> ugh it just fails. this is dumb
[21:06:53] <timemage> tandoori, something i've noticed people do first time when pushing pins into an isp connector is wire the thing backwards. the diagrams are usually oriented to show the connector looking down at a pcb rather than looking into the isp ribbon cable. just wanted to make sure you're not getting confused by that.
[21:06:59] <damjan> tandoori: I remember having a similar problem, too bad I don't have the command in my bash history
[21:07:50] <tandoori> timemage: i was using this as a guide: http://www.batsocks.co.uk/readme/isp_headers.htm
[21:09:00] <tandoori> and when i connect the programmer to the mcu all the leds that are connected to pins light up
[21:09:17] <tandoori> i thought that was interesting but, meh
[21:10:55] <tandoori> oh i see its because it was connected to everything else, lol
[21:13:09] <tandoori> (sigh) let me check my pin assisgnments again
[21:15:43] <timemage> tandoori, their diagram is fine. i've used it as a reference before. what i was trying to verify is that you're matching your wires up by using that diagram while looking down on the connector as though you were pushing it into a PCB and not lining them up while looking at the business side of the isp cable.
[21:21:47] <tandoori> ugh i double checked and it still doesnt work
[21:28:26] <timemage> tandoori, you doing this on an experimenter board?
[21:28:45] <tandoori> do you mean a protoboard?
[21:28:59] <timemage> tandoori, well, the reusable kind, but yeah.
[21:29:17] <tandoori> then yes but if you mean one of those expensive pogrammers, nope. i have a small programmer only thingy
[21:29:25] <tandoori> timemage: yeah i have a breadboard
[21:29:53] <timemage> tandoori, if you can get all the wiring in one detailed shot, take a picture of it and post it.
[21:30:15] <tandoori> hmm there are wires all over this breadboard
[21:30:28] <tandoori> i also used more than what were really needed just so i wouldnt get lost
[21:30:45] <timemage> tandoori, =), you can always start removing them. ideally you want nothing driving your spi pins while programming.
[21:33:37] <tandoori> what the hell?!
[21:33:41] <tandoori> i think i did it
[21:33:52] <tandoori> i removed -B 1 and it worked
[21:33:54] <tandoori> lol
[21:33:58] * tandoori dances with timemage
[21:34:03] <timemage> heh
[21:34:32] <tandoori> wooo!
[21:37:03] <tandoori> ...and of course the circuit doesn't work properly
[21:37:05] <tandoori> lol
[21:42:33] <timemage> tandoori, hmm, well, -B 1 sets the rate fast. for a 2313, i don't think i've bothered to change it before.
[21:47:02] <tandoori> im not sure why this programme doesnt work. its really weird
[21:47:24] <Tom_L> -B32
[21:48:01] <timemage> tandoori, hard to say why =)
[21:48:30] <tandoori> hmm
[21:48:51] <tandoori> when i first init the avr, i have to set the initial values of the pins high and low, right?
[21:48:57] <tandoori> i don't think i did that
[21:52:23] <timemage> tandoori, assuming you're talking about using gpio pins for output, you've set the direction register, right?
[21:52:49] <tandoori> the DDR# values?
[21:52:49] <tandoori> yeah, i have
[21:53:33] <timemage> tandoori, ok.
[21:54:33] <tandoori> ugh i think i mixed up my ports and pins
[21:54:55] <tandoori> port = write, pin = read, right
[21:55:06] <Tom_L> yessir
[22:37:09] <rue_shop2> hey what happened tiwht aht guy this morning
[22:37:20] <rue_shop2> did he find the electrostatic carryover?
[22:37:38] <rue_shop2> !thislog
[22:37:39] <tobbor> This one: http://rueshouse.dyndns.org:82/~ircjunk/irclogs/html/%23avr-2013-02-07.html
[22:40:01] <rue_shop2> cant find it, I'll never know
[22:59:37] <jadew> !thatlog
[23:02:32] <jadew> hi
[23:28:21] <TechIsCool> Anyone know what Illegal emulator mode means in avrdude?
[23:33:09] <Casper> that the FBI is on their way to arrest you? :D no idea
[23:33:47] <theBear> maybe say what you did/typed and we might have an idea
[23:34:57] <Casper> theBear: but he musn't be in australia, it didn't killed him (yet?)
[23:35:10] <theBear> heh
[23:35:57] <TechIsCool> theBear: I am trying to program a atmega32a4u with avrdude and it seems to just crash after sauing Illegal emulator mode
[23:37:24] <theBear> what cmdline did you use ? perhaps you didn't use an existing devicename or a wrong switch
[23:38:40] <TechIsCool> well since the atmega32a4u is not listed I used the atmega32a4.
[23:38:43] <TechIsCool> here is the command
[23:39:02] <TechIsCool> avrdude -p atxmega32a4 -c dragon_pdi -P usb -v -v -v -v
[23:56:55] <theBear> errr, -P usb doesn't look right
[23:57:09] <theBear> then again i dunno how a dragon presents itself
[23:57:16] <theBear> what os ?
[23:59:39] <TechIsCool> theBear: Windows 7 x64 sp1
[23:59:43] <TechIsCool> avrdude 5.11
[23:59:57] <TechIsCool> path 7610