#avr | Logs for 2014-01-10

Back
[01:41:27] <phinxy> Oh god. The problem is that my clock is set to 0ms delay
[01:41:53] <phinxy> because i can high voltage program attiny45
[04:41:25] <The_Coolest> Tom_itx I just tried resoldering the 328p to the board, still dead. idk wtf is wrong with it :|
[09:53:35] <_abc_> Hi. So the dfu bootloader is also used by freescale etc?
[09:53:43] <_abc_> Is it 100% compatible with the one used by atmel?
[09:57:17] <avrlol> is it problematic to connect devices to the same pins used for programming?
[09:57:43] <amee2k> depends on the devices ;)
[09:58:09] <avrlol> well, its an nrf2401 module, so it wont hurt it
[09:58:25] <avrlol> but idk if it might interfere with the programming.
[09:58:28] <amee2k> electrically, ISP essentially uses SPI
[09:58:55] <avrlol> so using the same mosi/miso wont be a problem.
[09:59:12] <amee2k> SPI devices won't drive the bus unless they're selected. if you make sure that the module's chip select isn't active while the MCU is in reset, i don't see a problem with it
[09:59:45] <amee2k> (i'm not familiar with that module, assuming that it uses the SPI interface pins as intended)
[10:00:58] <_abc_> amee2k ha, hi again.
[10:01:01] <avrlol> its an nrf24l01 if that makes a difference for you :) i forgot an l
[10:01:10] <_abc_> amee2k: still playing bad guy on your own channel?
[10:01:34] <amee2k> i meant i'm not familiar with that module's entire lineup ;)
[10:02:22] <The_Coolest> hey _abc_
[10:02:26] <_abc_> hi
[10:02:29] <_abc_> The_Coolest: not yet...
[10:02:44] <amee2k> if in doubt, look at how people reconcile SD cards and ISP on the same lines (i.e. resistors to allow the ISP programmer to override the SD card signals without damaging the card's line drivers)
[10:02:46] <The_Coolest> so the 328P on the board I used as my LCD backpack/USBasp programmer died yesterday :(
[10:02:53] <amee2k> _abc_: whut?
[10:02:57] <_abc_> Hm so the dfu bootlloader is a standard sort of? De facto? freescale seems to call its parts with boot loader dfu too.
[10:03:09] <_abc_> amee2k: you had your own channel eh.
[10:03:30] <amee2k> yeah... contraception failure >_>
[10:03:40] <amee2k> what about it?
[10:03:46] <_abc_> uhhh? Do I want to know the details? No.
[10:04:35] <amee2k> lol
[10:05:43] * amee2k . o O ( achievement unlocked: TMI'd _abc_ )
[10:06:56] <_abc_> http://wiki.openmoko.org/wiki/USB_DFU_-_The_USB_Device_Firmware_Upgrade_standard ah so it's a usb standard. I missed that part. How do boot loaders handshake to say which mcu is attached? I assume there is a signature?
[10:07:04] <_abc_> Ah yes, there is, even in lsusb -v
[10:09:11] <_abc_> Why can't I find a link to a dfu usb bootloader code?
[10:09:58] <_abc_> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=77991 here's a discussion
[10:11:26] <Funklord> If I have a part that requires 2 different frequencies in different modes is it possible to switch between 2 different oscillators? (I need to switch between 10MHz and 6.5536MHz)
[10:11:39] <_abc_> No.
[10:11:51] <_abc_> Not at runtime, not in atmega. Maybe in xmega.
[10:13:00] <Funklord> what about new xmega parts like atxmega128a3u etc? It seems like it *might* be possible to clock the other part using the 2MHz intosc x5 PLL and switching to 6.5536MHZ extosc
[10:13:21] <_abc_> Ibelieve they use a pll for clock and you can switch 'gears' at runtime. Read the datasheet carefully.
[10:13:27] <Funklord> I've never used xmega devices before, so I'm unsure how the peripherals work
[10:13:37] <_abc_> Just read the section on clocking options.
[10:13:55] <Funklord> I've read it.. and I feel stupid
[10:15:17] <Funklord> It seems like you can have several oscillators on at the same time...
[10:16:34] <amee2k> couldn't you use two "canned" oscillators and use a 74HC-something multiplexer to select which one you want?
[10:16:41] <Funklord> Atmel datasheets used to be better :/
[10:17:00] <amee2k> and leave the MCU permanently set to external clock input
[10:17:08] <Funklord> amee2k: I don't know, wouldn't I get a bunch of parasitic effects?
[10:17:35] <amee2k> i'd expect it to /run/ fine, but i'm not sure about the switch-over
[10:18:28] <amee2k> to avoid glitches, might need to slow down the select line with an RC pair so you can shut down the MCU and wake it up with the WDT or a timer interrupt afterwards
[10:19:05] <_abc_> amee2k: switching oscillators by brute force causes glitches which cause the mcu to go crazy
[10:19:15] <_abc_> Switching must be synchronous and glitch free.
[10:19:22] <_abc_> This is not 'just a HC'
[10:19:32] <_abc_> It's a little jungle of flipflops and gates
[10:19:41] <amee2k> hmm, i see
[10:19:43] <_abc_> You can use a Cypress etc clock generator which is external and can be programmed
[10:19:58] <_abc_> But why not settle for one speed and simply change the PLL at runtime? Funklord
[10:20:04] <amee2k> yeah, would need a latch to synchronize the change with a clock cycle then
[10:20:23] <_abc_> amee2k: at least 2 latches and even then it is not guaranteed to be clean
[10:20:39] <amee2k> but i was hoping you could avoid that by turning off everything except the BOD to wake up the MCU after the switch
[10:21:17] <Funklord> _abc_: this is a 2 MCU solution, where one is an ancient one, that will need to be clocked at these two exact frequencies
[10:21:26] <amee2k> or use an xor across the RC pair to hold the MCU in reset until the switch-over is complete
[10:21:33] <Funklord> I could just reset it from the AVR
[10:23:01] <Funklord> it's a stupid proprietary communication processor
[10:23:20] <Funklord> that's why it has these weird requirements
[10:24:19] <Funklord> previously we've made two models of everything, each with a different crystal
[10:29:17] <_abc_> Funklord: So use an external clock generator.
[10:30:04] <_abc_> Funklord: What are you doing? Building an arduino fax machine ;)
[10:30:14] <Funklord> you mean the cypress thingy?
[10:30:43] <_abc_> Yes, or another
[10:31:28] <Funklord> many of the clock generators I've seen don't support both frequencies since they need to be factors of one another
[10:31:57] <Funklord> _abc_: I'm making a LON powerline network interface
[10:32:05] <_abc_> Ah
[10:33:04] <Funklord> but I'm hoping that the PLL on xmega can be routed to clkout pin
[10:33:31] <Funklord> that should work...
[10:34:10] <_abc_> I never tried anything like that so far
[10:41:56] <Funklord> Atmels new datasheet layout really sucks.. I now print them with 4 pages per paper page because they are so sparse. They look like many of the new stupid HTML5 websites with no content...
[10:44:26] <_abc_> omg you print them?
[10:44:34] <ambro718> tree killer!
[10:44:44] <_abc_> Funklord: Ctrl-F opens search in pdf
[10:44:49] <Funklord> yeah, double sided, 4 pages per side
[10:45:01] <_abc_> Funklord: you can search for keywords. F3 find the next instance
[10:45:22] <_abc_> Funklord: so a normal 160 page ds is printed on only 40 pages of dead trees?
[10:45:29] <_abc_> omg Funklord I am a luddite but you beat me
[10:45:54] <_abc_> ambro718: hug a tree and shut up. The money pays for new trees. In theory.
[10:45:56] <Funklord> 400 pages = 50 papers
[10:46:09] <_abc_> Ah double sided
[10:46:27] <_abc_> Funklord: your ink/toner dealer must love you
[10:46:37] * twnqx` looks at 3x 24" displays on the desk
[10:46:44] <twnqx`> yeah... priting is kinda useless :P
[10:46:54] <Funklord> _abc_: dunno, but I'm sure he loves my service guy :P
[10:47:23] <Funklord> the toner comes in this huge tube he pours into the printer
[10:47:49] <Funklord> I work a lot on the move, and still write notes on paper
[10:48:48] <Funklord> usually I try to read the whole datasheet and try to memorize most important aspects about it
[10:49:19] <ambro718> I tried that approach with the OpenGL spec, lol. Worked out quite all right.
[10:49:29] <ambro718> (only read about 2/3)
[10:49:39] <Funklord> that's impossible!
[10:49:54] <Funklord> it expands at a much greater rate than anyone can read
[10:50:13] <Funklord> ;)
[10:50:19] <ambro718> probably, I just took a snapshot ;)
[11:33:41] <zmo> hi
[11:38:04] <zmo> I'm trying to set up the fuses of a brand new atmega32u4, using the command : `avrdude -v -C /usr/local/etc/avrdude.conf -p atmega32u4 -P usb -c jtag3isp -b 9600 -B3 -U hfuse:w:0x58:m`
[11:38:32] <zmo> as you may guess, I got a JTAG ICE 3 and the latest avrdude
[11:39:07] <zmo> and if I said "I'm trying", it's that it's failing with; `avrdude: safemode: hfuse changed! Was 58, and is now 99`
[11:39:47] <zmo> it's reading correctly the MCU, I can dump some memory etc., but I can't change the value of the fuses (I did not try to flash the memory though)
[11:40:08] <zmo> I tried playing around with the -b/-B values
[12:40:36] <Duality> zmo: the last time I had that error, it was because a programming wire was loosely connected
[13:02:05] <carabia> is there a solid usi uart code for tiny45 somewhere?
[13:02:41] <carabia> seems to be a real pain
[13:03:11] <carabia> also i'd only need tx :(
[13:06:10] <carabia> http://www.atmel.fi/Images/AVR274.pdf hmm
[13:20:18] <_abc_> Is there a standard, bog plain, no fancypants avr bootloader?
[13:20:26] <_abc_> Everyone seems to roll their own, it drives me nuts
[13:20:37] <_abc_> More to the point, is boot loader programmer support in avrdude?
[13:20:47] <_abc_> I think there is, but do not know what I am looking for
[13:21:20] <_abc_> Aha! The avr910 and avr109 bootloaders are supported!
[13:22:27] <_abc_> What -c do I select for avrdude to talk to a boot loader like avr910 or avr109?
[13:23:26] <_abc_> Ah -c avr910
[13:43:23] <Duality> how do I turn assembly code into machine code? I know how to do it for c/c++ but why can't I find how to do it for assembly
[13:44:11] <tzanger> you use an assembler for that
[13:44:16] <myself> the long form datasheet has an opcode reference
[13:44:29] <myself> you can do it by hand with pen and paper. I recommend it for a short program or two, just to try. :)
[13:44:38] <tzanger> yes, it's a good exercise
[13:44:58] <tzanger> not so much fun on fixed width opcode processors, but still good exercise
[13:48:43] <myself> your definition of "fun" is slightly more sadistic than mine :P
[13:52:03] <Duality> cool this helped me out :)
[16:08:21] <Duality> cool I found a hp 48G calculator :)
[22:26:41] <ferdna> guys i need to measure mVAC... what is the best way?
[22:29:25] <vectory> come to ##electronics
[22:29:45] <Tom_itx> oh gawd who would do such a thing?
[22:30:27] <ferdna> vectory, i am there
[22:31:53] * Casper waves at ferdna
[22:31:54] <vectory> Tom_itx: i dont know, its entertaining, it should be more educational so i'd welcome the question
[22:32:16] <Tom_itx> it used to be pretty bizzare
[22:32:24] <Tom_itx> i quit and never looked back
[22:32:40] <Tom_itx> speedevil still there?
[22:37:30] <vectory> ferdna: whats to say against using an op-amp and dac?
[22:38:16] <ferdna> i dont care as longest i can measure...
[22:39:11] <vectory> or supply a mV refference voltage
[22:39:48] * vectory just saw a vid about reference voltages
[22:40:09] <ferdna> hmmm no... voltage will be changing... so no ref volt... =/
[22:47:35] <vectory> you do need a Vref, and if its Vcc