#avr | Logs for 2012-11-10

Back
[04:49:03] <megal0maniac> 38 days and my DX order hasn't arrived.
[04:49:42] <megal0maniac> I can't keep soldering SMT with a blob of sticky stuff on the end of a pencil. It just isn't the same as using tweezers :P
[05:53:32] <amee2woof> welcome to china
[05:53:37] <amee2woof> thats industry quality for ya :D
[07:47:35] <iSaleK> I have clock edges from my buffers connected to PD0, PD1, PD4, PD5. I also have DDRD set to DDRD |= (1<<BUFFER0CLK) || (1<<BUFFER1CLK) || (1<<BUFFER2CLK) || (1<<BUFFER3CLK); Where BUFFER0CLK is PD0, and so on...
[07:48:19] <iSaleK> When I connect the power to the board, only buffer1 (PD0) is working, others are do not respond...
[07:48:31] <iSaleK> Any Ideas what am I doing wrong?
[07:52:21] <timemage> iSaleK, by buffer you mean pin on your avr's port D?
[07:53:11] <Steffanx> || isn't a bitwise or iSaleK
[07:53:17] <Steffanx> You need |
[07:53:22] <timemage> heh
[07:53:55] <OndraSter> megal0maniac_afk, http://www.youtube.com/watch?v=jGRlGT1iK_U&feature=youtu.be
[07:54:11] <Steffanx> You
[07:54:20] <Steffanx> -You
[07:54:58] <Steffanx> What you use for the highlighting OndraSter ?
[07:55:20] <OndraSter> colours
[07:55:25] <Steffanx> Pre-made editor or are do you mess with regex's yourself?
[07:55:32] <OndraSter> all by myself
[07:55:44] <Steffanx> Wheel reinvented :P
[07:55:45] <OndraSter> SmartTextBox is derived from RichTextBox
[07:55:46] <OndraSter> :P
[07:55:50] <OndraSter> but it works under Mono
[07:56:33] <OndraSter> the colouring was the easier part
[07:56:41] <OndraSter> looping regex really
[07:56:49] <OndraSter> hinting etc took more lines actually
[07:58:54] <iSaleK> timemage, no, I have octal d-ff, using it like buffer. Their clock pins are connected to my PDx pins
[07:59:12] <iSaleK> Steffanx, I see, my bad... I will replace it with | and see if it work :)
[07:59:14] <iSaleK> THank you!
[08:14:19] <Steffanx> Succeeded iSaleK ?
[08:16:07] <JK_> Why I use UART to transfer data , when I use 232 it's work , but transfer data with other processor by direct way isn't work.
[09:45:41] <OndraSter> hmm I do wonder if it would be possible to decode mp3 in real time on 32MHz xmega
[09:45:45] <OndraSter> or even 64MHz overclocked :P
[09:46:00] <OndraSter> 486 @ 33MHz almost decoded 128Kbps stream
[09:56:13] <Horologium> OndraSter, should be possible.
[09:56:56] <OndraSter> aye, "should"
[09:57:05] <OndraSter> 486 comes to 1 instruction per cycle too
[09:57:08] <OndraSter> very often
[09:57:16] <OndraSter> but who knows how much was the mp3 decoding optimalized!
[09:57:24] <OndraSter> anyway, I would much rather get midi+mod player though :P
[09:57:29] <OndraSter> because chiptunes ftw
[10:13:14] <Horologium> or get a commodore sid chip and play real music!
[10:13:20] <Horologium> ;}
[10:24:28] <OndraSter> hehe
[10:24:31] <OndraSter> noise channel
[10:24:35] <OndraSter> triangle channel...
[10:24:45] <OndraSter> I have got here NES on which controllers don't work
[10:24:51] <OndraSter> (tried three different controllers) :(
[10:24:55] <OndraSter> on neither of the ports
[10:27:50] <ferdna> ferrite cores are useful for what?
[10:30:50] <OndraSter> filtering
[10:31:00] <OndraSter> it is an inductor
[12:01:06] <rue_mohr> swithing power suppoes
[12:16:51] <RikusW> http://blog.notdot.net/2012/10/Build-your-own-FPGA
[12:24:58] <hackvana> RikusW: Very cool project.
[12:25:05] <hackvana> (And I provided the PCBs)
[12:26:05] <RikusW> ah
[12:26:12] <RikusW> http://blog.notdot.net/2012/10/Build-your-own-FPGA
[12:26:19] <RikusW> hackvana: wrong tab ;)
[12:26:32] <hackvana> Hmm?
[12:26:32] <RikusW> http://www.esdjournal.com/articles/cober/earth.htm
[12:26:54] <RikusW> ah, pasted in both channels :-P
[12:27:30] * RikusW measured 10Vac referenced to earth when standing on a 230Vac power cord
[12:27:42] <RikusW> 200mV a bit away from it
[12:28:19] <RikusW> I think it was much higher when I used a 1MOhm scope
[12:28:46] <RikusW> I think a very high impedance voltmeter would give a better result
[12:42:19] <OndraSter> I vote for buffer opamp
[12:42:23] <OndraSter> with JFETs
[12:45:27] <RikusW> hmm
[12:45:34] <RikusW> mosfet opamp ?
[12:45:41] <RikusW> does that even exist ?
[12:46:39] <OndraSter> hell yes
[12:46:43] <OndraSter> jfet opamps are common thing
[12:46:51] <OndraSter> 1TOhm input impedance I think
[12:47:01] <OndraSter> ADI makes some nice ones
[12:47:23] <OndraSter> I think
[12:48:03] <OndraSter> ADA4610
[12:48:11] <OndraSter> http://www.analog.com/en/precision-op-amps/high-supply-voltage-amplifiers/ada4610-2/products/product.html
[12:48:22] <OndraSter> 10^13 input impedance
[12:48:29] <OndraSter> that is 10TOhm :)
[12:50:01] <RikusW> wow, nice
[12:50:19] <OndraSter> ADI makes great stuff
[12:50:25] <OndraSter> too bad it is not available on Mouser
[12:50:25] <RikusW> expensive ?
[12:50:36] <OndraSter> check on the bottom
[12:50:40] <OndraSter> they even sample these
[12:55:12] <RikusW> only +-2.5V though
[12:55:31] <RikusW> TL072 ?
[12:55:40] <OndraSter> that should be jfet too
[12:56:06] <OndraSter> you can check whole line from ADI :P
[12:56:11] <OndraSter> they have got lots and lots of opamps
[12:56:13] <OndraSter> and not just opamps
[12:56:30] <OndraSter> analog muxes, precision references, BlackFin processor, DDS...
[12:56:36] <RikusW> yep
[12:56:56] <RikusW> I might have TL072 or TL062 here
[12:57:28] <RikusW> input 10^12
[12:58:07] <OndraSter> hmm the blackfins aren't even *that* expensive
[12:58:09] * RikusW wonders how a 10mA fuse is made
[12:59:08] <RikusW> TLC2274 CMOS Opamp
[14:13:10] <RikusW> super ESD -> http://www.esdjournal.com/Lightning/Lightning.htm
[14:15:01] <RikusW> who said only ICs can be damaged by ESD ? ;)
[14:17:08] <OndraSter> if this can happen
[14:17:15] <OndraSter> I am not putting the ESD suppressors on my board then.
[14:17:16] <OndraSter> :D
[14:17:23] <OndraSter> when lighning strikes it it will be useless!
[14:17:26] <OndraSter> WASTING 0.4€!
[14:17:59] <specing> lol
[14:19:48] <OndraSter> IP4220CZ6... I hope it works :P
[14:19:52] <OndraSter> just as the SMPS I am using
[14:24:44] <OndraSter> http://www.ebay.com/itm/Arbor-IEC-621-6U-20-slot-Industrial-19-Rackmount-Chassis-W-PX-20S3-Rev-E1-S19-/370630162244?pt=LH_DefaultDomain_0&hash=item564b477744
[14:24:45] <OndraSter> THIS IS HOT
[14:26:06] <RikusW> seems there is 400nA AC to ground when standing on a 230Vac cable
[14:27:47] <specing> OndraSter: lolwhat?
[15:32:18] <megal0maniac> Why do I always seem to rock up just after Rikus leaves? :/
[15:33:02] <OndraSter> megal0maniac, you have missed out on this http://www.youtube.com/watch?v=jGRlGT1iK_U&feature=youtu.be
[15:35:26] <megal0maniac> It's cool, but looks like it might get in the way at times
[15:40:23] <OndraSter> yeah
[15:40:39] <OndraSter> it will be disableable
[15:46:35] <megal0maniac> Maybe semi-transparent? Or with less... detail? More detail displayed on mouseover. e.g. a list of max 3 possible choices pops up. on mouse-over, MORE THINGS!
[15:49:05] <megal0maniac> OndraSter: Seems like it's cheaper for you to import stuff. Note the lack of tax or duty: http://www.dutycalculator.com/new-import-duty-and-tax-calculation/saved_calculations/view_details/133585062/
[16:21:23] <OndraSter> megal0maniac_afk, import from where?
[16:21:40] <OndraSter> the calculator is wrong
[16:21:45] <OndraSter> above 22€ = 21% VAT
[16:21:50] <OndraSter> + $5 fee to the post
[16:22:05] <OndraSter> VAT includes shippping price!
[16:22:10] <OndraSter> not just the package value :/
[16:24:46] <specing> damn governments
[16:24:57] <iSaleK> Hey guys I'm trying to make a simple clock with 2313 and 8MHz external crystal. I was wondering what are you suggestions for prescale settings, timer mode and etc. so I would not need to recalibrate the clock every few days? :)
[16:25:48] <karlp> put a RTC module and a proper watch crystal on board?
[16:26:01] <karlp> or at least the watch crystal?
[16:26:03] <specing> iSaleK: man adjtimex, man adjtime
[16:27:47] <iSaleK> I've already made the board and board has the MCU, buffers, thermomethers etc and other bord is soldered directly below that one and has SMD LED that light up 7-segment displays
[16:27:58] <iSaleK> So I'm stuck with 8MHz crystal :\
[16:32:28] <OndraSter> crystals are fairly accurate
[16:32:33] <OndraSter> not as much as watch xtals...
[16:32:37] <OndraSter> but better than RC
[16:32:46] <OndraSter> just get external RTC and hook it up
[16:32:48] <OndraSter> i2c
[16:33:42] <Tom_itx> no more accurate than watch crystals just that the watch crystals divide properly
[16:36:12] <OndraSter> Tom_itx, actually
[16:36:19] <OndraSter> if your 8MHz xtal has 50ppm
[16:36:25] <OndraSter> vs 32kHz 50ppm...
[16:36:32] <OndraSter> isn't it the same?
[16:37:01] <OndraSter> *-actually
[16:38:27] <Tom_itx> not if you wanna use it as a clock
[16:38:36] <Tom_itx> it won't divide out right
[16:38:37] <OndraSter> well sure it is easier to divide 32.768k
[16:38:50] <Tom_itx> and you'll have to keep correcting it
[16:41:45] <iSaleK> So If I put the increment routine in the timer interrupt, and in while loop I do the checking if 1s has passed, I could manage to get a decent watch?
[16:44:11] <iSaleK> Or shoul I desolder about 50 pins and replace the crystal?
[16:44:24] <iSaleK> I have one 32.768KHz laying around
[16:44:25] <OndraSter> watch xtal goes to different pins
[16:44:42] <iSaleK> How come? I didn't know that?
[16:44:47] <OndraSter> TOSC pins
[16:44:48] <OndraSter> check datasheet
[16:44:52] <Devilholk> Why can't you divide 8 MHz right?
[16:45:03] <OndraSter> 8/256?
[16:45:06] <OndraSter> 8/65536?
[16:45:13] <Devilholk> Do you have to use powers of 256?
[16:45:14] <OndraSter> you would have to set compare matches
[16:45:27] <OndraSter> that is the option, yes
[16:46:06] <iSaleK> Well I would like to use 8MHz because then I would not need to desolder the whole board and then solder it again...
[16:46:09] <OndraSter> BUT! All the base dividers are 1 2 4 8 16 32 64 128 ..
[16:46:12] <OndraSter> for the counter
[16:46:24] <OndraSter> so unless you do some heavy fixing up it goes off
[16:46:41] <Devilholk> No, ones just need to make sure you update the timer registers with subtractions
[16:47:05] <Devilholk> So it will be correct over average even if the interrupt triggers a bit differently
[16:47:14] <iSaleK> I was just wondering if I count uS or mS that have passed in timer interrupts and in while loop I do the minutes/seconds increment I could manage to get working clock?
[16:47:41] <Devilholk> You could do the clock increment in the timer as well
[16:47:53] <Devilholk> Just take care not to read half your time, have interrupt change time and read second half
[16:48:16] <Devilholk> So, disable interrupts before reading the time and don't be disabled long enough to 'miss' one
[16:49:10] <iSaleK> That what I was thinking about, if I'm having interrupt more often than every 100us I could miss one interrupt
[16:49:40] <Devilholk> Well, it depends on how long you have interrupts disabled etc
[16:49:51] <Devilholk> And how much stuff the ISR does in worst case
[16:50:12] <iSaleK> Maybe I should just let timer increment the value and while loop to increment minutes, since after interrupt mcu returns to while loop
[16:50:15] <Devilholk> Isn't 1 kHz enough? Do you need sub-mS precision?
[16:50:43] <Devilholk> Either way is fine
[16:50:43] <iSaleK> No I don't but I allready have 8MHz on this bouard...
[16:50:47] <iSaleK> *board
[16:52:10] <Devilholk> What is the range of the prescaler?
[16:52:25] <iSaleK> If I set prescale to 8 and use OCR=0x63 and TCNT=0x9C I will get 100us for timer0 with 0% error
[16:52:43] <iSaleK> So I guess I should use that one since I don't think I can get any better option with this configuration
[16:53:24] <iSaleK> Or I can pull up 1ms with prescale set to 32
[16:53:58] <iSaleK> On ATtiny2313 prescaler can go up to 1024
[16:56:18] <Devilholk> If I needed seconds from 8 MHz I'd prescale by 256 and then use 16 bit timer and have it 31250 counts from overflow, subtracting 31250 each interrupt (maybe some adjustment is needed for how the numbers are transferred to the HW regisgters)
[16:56:37] <Devilholk> I have never done it on AVR before but the timers were very similar in the PIC's I used
[16:58:31] <iSaleK> Ok, thanks. I will go trought the datasheet and look what I can do with timers...
[16:58:44] <iSaleK> I was just wondering if you guys had any tips to make this easier :)
[16:59:42] <Devilholk> Well, easy is to use 32.768 kHz crystals
[17:00:11] <Devilholk> Well, easy, I mean it depends on what you think is tricky
[17:00:26] <Devilholk> A software trick may be considered easier than modding the HW
[17:00:59] <Devilholk> I think you could search for application notes on how to generate non drifting periodic interrupts
[17:01:11] <Devilholk> You might even find working examples you can mod
[17:32:25] <iSaleK> I have a stupid question but I'm not sure about this so I have to ask... What is the diference between TIMER0_COMPA and TIMER0_COMPB ?
[17:35:15] * Devilholk googles
[17:39:29] <r00t|home> use the datasheet, luke
[17:41:08] <iSaleK> :)
[17:41:18] <Devilholk> I find those registers in the interrupt vector map
[17:41:37] <Devilholk> For some reason it is tricky to search for register names in atmels DS's (IMO at least)
[17:45:22] <Casper> iSaleK: each timer have 2 outputs on it
[17:45:32] <Devilholk> iSaleK: This might be worth reading for you http://www.atmel.com/Images/doc2505.pdf
[17:45:51] <Devilholk> Still don't find info about those compare-interrupts but I have not been reading that carefully
[17:46:12] <Casper> basically, you define the max value, and it then can generate an interrupt at 2 different values, or output 2 different PWM signal
[17:50:44] <Devilholk> Nice
[17:50:59] <TechIsCool> does anyone know where layout.inf is located in windows for the lufa cdc usb drivers?
[17:56:28] * DagoRed head desks
[17:56:34] <DagoRed> this programmer hates me
[17:56:54] <Casper> then show him love, maybe it will change it's mind?
[17:57:50] <DagoRed> I've tried that.
[17:59:00] <TechIsCool> DagoRed: What is it doing or not doing
[17:59:59] <DagoRed> I have a programmer I purchased from Tom. I tried using it in linux with AVR dude and it's not being found in windows or linux.
[18:00:25] <TechIsCool> have you tried a different usb cable and or / port that is not usb3?
[18:00:27] <DagoRed> On windows, the arduino environment can find the programmer (mostly for uploading boot loaders for the hacker space).
[18:01:10] <DagoRed> Yes I have, it works fine. Windows can see it the programmer and I have the driver installed
[18:01:30] <DagoRed> on linux.... the programmer seems to respond however AVRDUDE can't find the programmer.
[18:02:28] <TechIsCool> in linux can you try lsusb or cat /etc/mtab
[18:02:48] <TechIsCool> see if it is listed lsusb is much better if possible
[18:03:08] <DagoRed> looking now
[18:03:31] <DagoRed> found it: Bus 002 Device 020: ID 03eb:2104 Atmel Corp. AVR ISP mkII
[18:03:48] <TechIsCool> so are you sure you are targeting it correctly in avr dude?
[18:07:10] <TechIsCool> DagoRed: Paste it here when you think you have it right
[18:09:30] <DagoRed> ok
[18:27:16] <DagoRed> TechIsCool: avrdude -c avrisp2 -P usb -p m328p -U flash:w:ATmegaBOOT_xx8_adaboot328.hex:i
[18:27:25] <DagoRed> I get an error message however.
[18:27:29] <TechIsCool> whats the error
[18:27:45] <DagoRed> avrdude: usb_open(): cannot read serial number "error sending control message: Operation not permitted"
[18:27:45] <DagoRed> avrdude: usb_open(): cannot read product name "error sending control message: Operation not permitted"
[18:27:45] <DagoRed> avrdude: usbdev_open(): error setting configuration 1: could not set config 1: Operation not permitted
[18:27:45] <DagoRed> avrdude: usbdev_open(): did not find any USB device "usb"
[18:27:54] <DagoRed> lbusb
[18:28:12] <TechIsCool> DagoRed: Is that lbusb or libusb?
[18:28:20] <DagoRed> libusb
[18:28:39] <TechIsCool> DagoRed: Virtual machine or real machine linux?
[18:28:57] <DagoRed> virtual
[18:29:00] <DagoRed> distro: Debian
[18:29:07] <TechIsCool> what are you using for passthrough?
[18:29:21] <DagoRed> What do you mean as a pass through?
[18:29:26] <DagoRed> VMware?
[18:31:37] <TechIsCool> DagoRed: Try lsusb -v -d 03eb:2104
[18:33:48] <karlp> sudo?
[18:34:01] <TechIsCool> karlp: that's what we are checking right now
[18:34:15] <TechIsCool> if it returns without error he is if not her needs to sudo or su
[18:34:22] <DagoRed> cannot read device. broken pipe
[18:34:31] <TechIsCool> alright try that command with sudo
[18:35:13] <DagoRed> I did
[18:35:20] <TechIsCool> hmm
[18:35:30] <DagoRed> without, it says it cannot read device.
[18:35:44] <TechIsCool> but with it what does it say broken pipe
[18:35:50] <DagoRed> yes
[18:35:52] <DagoRed> strange eh?
[18:36:16] <TechIsCool> DagoRed: Why does it not work in windows?
[18:37:12] * DagoRed shrugs
[18:37:31] <TechIsCool> DagoRed: Have you installed libusb-32 filter?
[18:37:49] <DagoRed> I don't think I have
[18:38:03] <TechIsCool> http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.6.0/
[18:38:36] <TechIsCool> please try to install the devel-filter and then see if avrdude works I know that was an issue last time I tried it in windows 7
[18:38:48] <DagoRed> I'm assuming this is for windows or linux?
[18:38:59] * DagoRed sees win32 and thinks windows.
[18:39:07] <TechIsCool> DagoRed: Windows sorry I want to eliminate the the virtual and passthrough
[18:39:22] <DagoRed> understood
[18:42:50] <DagoRed> TechIsCool: now what? just downloaded and extracted the file.
[18:43:09] <TechIsCool> Just install it then try avrdude again
[18:43:23] <TechIsCool> with the same command avrdude -c avrisp2 -P usb -p m328p -U flash:w:ATmegaBOOT_xx8_adaboot328.hex:i
[18:44:31] <DagoRed> ok
[18:45:18] <DagoRed> how the hell do I install these?
[18:45:26] <DagoRed> I see some raw files, that's it.
[18:45:31] <TechIsCool> which one did you download?
[18:45:48] <TechIsCool> download this one
[18:45:49] <DagoRed> libusb-win32
[18:45:49] <TechIsCool> http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.6.0/libusb-win32-devel-filter-1.2.6.0.exe/download
[18:47:48] <DagoRed> I need to restart. BRB
[18:48:14] <TechIsCool> alright
[19:01:52] <DagoRed> TechIsCool: baack
[19:01:58] <DagoRed> back
[19:01:59] <TechIsCool> Welcome back
[19:02:27] <DagoRed> testing avrdude again
[19:06:32] <DagoRed> and waiting....
[19:10:08] <TechIsCool> DagoRed: still waiting
[19:10:42] <DagoRed> it works now!
[19:11:19] <TechIsCool> DagoRed: Glad I could help it stupid right
[19:11:56] <DagoRed> thank you TechIsCool
[19:12:02] <TechIsCool> if you dig into the arduino code it actually is calling libusb itself thats why it works.
[19:12:09] <DagoRed> ahh
[19:12:30] <DagoRed> well... I plan on doing more avr studio. But loading the boot loader was step one.
[19:14:22] <DagoRed> TechIsCool: now it's not working again...
[19:14:34] <TechIsCool> try closing the command line and opening it again
[19:14:49] <TechIsCool> also run as administrator if possible
[19:14:49] <DagoRed> ahh, I found the vm is trying to steal it.
[19:14:51] <DagoRed> that is why.