#avr | Logs for 2013-08-16

Back
[08:50:59] <darsie> hi
[08:52:19] <darsie> Can I start an atMega with a 20 MHz and CLKDIV8 at 2.7 V and switch to CLKDIV1 when Vcc is 5V?
[08:52:36] <darsie> atMega168
[08:52:59] <darsie> Can I start an atMega168 with a 20 MHz crystal and CLKDIV8 at 2.7 V and switch to CLKDIV1 when Vcc is 5V?
[08:53:26] <braincracker> +
[08:53:39] <darsie> +?
[08:53:43] <darsie> posivite?
[08:53:48] <darsie> positive?
[08:54:13] <braincracker> it will even be within specs
[08:54:22] <darsie> ok. thx
[08:57:04] <darsie> Yeah, I took the 2.7 V from the datasheet. Actual start voltage might be a little more.
[08:57:44] <braincracker> turn off the uvlo ?
[08:57:52] <darsie> what?
[08:57:53] <theBear> that's a good question
[08:57:59] <braincracker> under voltage lockout fuse
[08:58:07] <darsie> hmm
[08:59:16] <braincracker> i had to disable it for example, because the 168pa's 1.85V uvlo is too high for 1.8V+-10% operation
[08:59:27] <darsie> ok
[09:08:02] <braincracker> problematic part would be to use the 20MHz xtal below 2.7V, that is out-of-specs
[09:08:18] <braincracker> for full swing crystals
[09:08:45] <jacekowski> you can't switch clock dividers
[09:08:55] <jacekowski> not during runtime
[09:08:58] <darsie> jacekowski: I can, IIRC.
[09:09:06] <jacekowski> how where when?
[09:09:54] <jacekowski> ahm
[09:10:13] <theBear> can't you ? isn't t just a regular register ?
[09:10:20] <jacekowski> i though it's a fuse
[09:10:33] <darsie> CLKDIV8 presets the divider.
[09:10:33] <braincracker> hm well timer2 has an async thing
[09:10:35] <theBear> oh, you might be right, it's been a while :)
[09:10:59] <braincracker> i just use that for RTC with watch crystal
[09:12:00] <braincracker> clkdiv can be fused at runtime ?
[09:12:14] <braincracker> is it cached ?
[09:12:25] <darsie> no (IMHO), but the clock divider can be changed at runtime
[09:12:32] <braincracker> oh ok
[09:12:59] <braincracker> then you have limited number of switches ;/
[09:14:15] <darsie> "Note that any value can be written to the CLKPS bits regardless of the CKDIV8 Fuse setting."
[09:16:45] <darsie> 7.11 System Clock Prescaler
[09:17:18] <darsie> When switching between prescaler settings, the System Clock Prescaler ensures that no glitches occurs in the clock system. It also ensures that no intermediate frequency is higher than neither the clock frequency corresponding to the previous setting, nor the clock frequency corresponding to the new setting.
[09:17:41] <braincracker> isn't this the timer2 async clock prescaler ?
[09:18:14] <braincracker> that works when you set core clock on internal osc
[09:18:26] <darsie> clkI/O, clkADC, clkCPU, and clkFLASH aredivided by a factor as shown in Table 27-3 on page 307.
[09:21:26] <braincracker> i'd stay away from it if it is not cached
[09:21:56] <braincracker> flash memory can be written successfully 10k-100k times
[09:22:04] <darsie> I've used it. Because I didn't want to change the CKDIV8 fuse setting. It worked.
[09:22:51] <darsie> it's not in flash memory.
[09:23:08] <braincracker> oh i see so clkps is a different thing, it should be a register
[09:23:25] <braincracker> go on then try it
[09:23:50] <darsie> That works. I just wasn't sure if a 20 MHz crystal will work at 2.7 V.
[09:24:16] <braincracker> only prescaled core clock needs to be within the coreclock specs
[09:24:32] <braincracker> SOA
[09:24:45] <darsie> soa?
[09:25:10] <braincracker> generally, safe operating area
[09:25:42] <darsie> "Note that the Full Swing Crystal Oscillator will only operate for VCC = 2.7 - 5.5 volts."
[09:27:16] <pc_magas> Hello I am thinking of An CNC Is there a DIY way to do that using old printers?
[09:28:30] <braincracker> anything can be hacked
[09:28:59] <darsie> You can even make a CNC out of hydrogen gas.
[09:29:42] <theBear> but, hydrogen gas won't mill thru ferrous metals !
[09:30:10] <darsie> theBear: No, you have to fuse it to iron, chromium and vanadium first ;).
[09:30:23] <braincracker> the printer is already cnc anyway.
[09:30:46] <pc_magas> I am thinking an old drill as head
[09:31:06] <pc_magas> And for X,Y and Z axis I am thinking to use printer meterials
[09:31:20] <braincracker> you thinking too much
[09:31:37] <pc_magas> cause I have an old printer
[09:31:50] <pc_magas> and I want to get rid of it
[09:32:08] <braincracker> most people throw it out in the trash-can
[09:32:21] <pc_magas> also and some OLD PSU that still works
[09:32:31] <pc_magas> braincracker, but I am not
[09:32:37] <pc_magas> because tyhey still work
[09:32:43] <darsie> electronic waste should go to toxic waste disposal facility.
[09:33:32] <pc_magas> but they are not waste just stuff that work and I do not know what to do with them
[09:33:40] <braincracker> oh yea :) then the workers share the things there ;)
[09:33:57] <darsie> I miss my old matrix printer. I could print a street address and tear off a few lines, instead of wasting most of a whole sheet.
[09:34:21] <braincracker> use a punch matrix printer
[09:34:34] <braincracker> does not require ink, just punches holes in paper
[09:34:36] <braincracker> ^^
[09:36:30] <darsie> I use my digicam instead.
[09:38:13] <braincracker> digicam for printing ?
[09:38:33] <darsie> for taking street addresses with me.
[09:38:50] <darsie> So I don't forget where I want to go.
[09:39:55] <braincracker> well a Hungarian guy invented a thing called ball-point-pen, sometimes i use that
[09:40:11] <braincracker> it requires no batteries
[09:40:33] <darsie> I have recharchable batteries.
[09:40:57] <braincracker> how you charge it in the desert?
[09:41:02] <pc_magas> braincracker, ;)
[09:41:28] <pc_magas> darsie, but still you use electric energy and make unwanted CO2
[09:41:28] <darsie> In the desert are no street addresses ;p
[09:41:47] <braincracker> i was thinking about you getting lost and your batteries die
[09:42:03] <pc_magas> With ballpooint you also use food energy ang you are less fat ;)
[09:42:20] <darsie> pc_magas: We have Oekostrom (ecoelectricity). 100% renewable.
[09:42:39] <darsie> I'm thin.
[09:42:44] <darsie> 70 kg, 191 cm.
[10:48:37] <Joggl> omg, my isp-stick is working *dance*
[11:05:33] <Joggl> http://www.ehajo.de/images/dbimages/artikel_0000166_b_1.JPG <- this one
[11:37:55] <RikusW> Thats small
[12:43:12] <brandon2> Hey guys I am very new to Atmel programming and I got a whole bunch of Atmel chips to play around with including a few ATTiny45/85 chips. I had an arduino before and was able to program one of the ATTiny45's using it as an ISP but I decided it would be a good idea to get a real programmer so I bought one of these things of ebay
[12:43:15] <brandon2> http://www.ebay.com/itm/170939199485?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649 problem is I cant get the damn thing to program any chips it keeps giving me errors, I have read online that you may need to use another programmer to reflash these things but I was getting errors when I tried to use my Arduino as ISP to do that, anyone have any tips for this kind of programmer
[13:34:32] <Casper> brandon2: sorry, can't see the item
[14:33:08] <Joggl> RikusW, quite small, yes :)
[14:33:37] <Joggl> i was bored of all those noobs who make things smaller and present them as "wow what cool thing i have done"
[14:37:59] <abcminiuser> So everyone's already installed 6.1 SP2, yes?
[14:42:06] <Joggl> sure!
[14:44:12] <abcminiuser> ARM support for the JTAG-ICE3
[14:44:24] <abcminiuser> More importantly: no more goddam Jungo for the JTAG-ICE3
[14:48:27] <N1njaneer> abc: "Welcome to the Jungo, it gets worse here ever day!" -- Guns 'n Roses
[14:48:43] <N1njaneer> Because 80's song lyrics are always great to parody
[14:49:23] <N1njaneer> But yeah, I always wondered by both Atmel and Xilinx, both super-capable companies, wound up using Jundo for their USB stuff. Fastest path to market I suppose.
[14:49:33] <N1njaneer> +Jungo
[14:52:20] <Tom_itx> SP2! WTF i just loaded the last one last night
[14:52:27] <Tom_itx> my god... yet another one
[14:52:38] <Tom_itx> it takes a week to install!
[14:52:40] <N1njaneer> Tom: Nope, you really just had a very vivid dream about doing so.
[14:53:08] <Tom_itx> their login scheme from within the app sucks too
[14:53:18] <Tom_itx> it never returns you to the download page after logging in
[14:53:47] <Tom_itx> </RANT>
[15:02:35] <braincracker> can you overclock an atmel MCU to 48GHz? ;)
[15:02:58] <Tom_itx> for a short time
[15:03:08] <braincracker> LNO2 ?
[15:03:40] <braincracker> i think even best PC CPUs die above 5-8GHz
[15:06:53] <abcminiuser> N1njaneer, yeah, fastest path 10 years ago
[15:06:56] <abcminiuser> Now, not so much
[15:07:18] <abcminiuser> Tom_itx, this brings ARM support for the JTAG-ICE3 (SAM D20 only for now)
[15:07:26] <abcminiuser> And a lot of bug fixes
[15:07:29] <abcminiuser> Mostly in debugging
[15:16:18] <abcminiuser> *sigh*
[15:16:24] <abcminiuser> I think I've created another horror
[16:33:29] <Brando753> Casper: Sorry the item I am using is
[16:33:31] <Brando753> http://www.ebay.com/itm/170939199485?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649
[16:34:27] <Joggl> Brando753, thats BIG ;)
[16:35:02] <Brando753> Joggl: Hmm?
[16:35:20] <Joggl> i just got my very small isp-programmer today :)
[16:35:35] <Brando753> well I cant get the damn thing to work
[16:35:42] <Brando753> so its rather useless so far
[16:36:13] <Joggl> Brando753, http://www.ehajo.de/images/dbimages/artikel_0000166_b_1.JPG
[16:36:26] <Brando753> o.o
[16:36:30] <Joggl> http://dokuwiki.ehajo.de/en:bausaetze:usp-stick
[16:36:30] <Brando753> that is small lol
[16:36:44] <Brando753> atleast it works ...
[16:36:51] <Brando753> mine wont program my ATTIny's
[16:36:53] <Brando753> (╯°□°)╯︵ ┻━┻
[16:37:34] <Brando753> and oddly enough my Arduino as ISP wont either (it used to), though thats probably another issue
[16:37:50] <Brando753> I dont think I fried the chip as I tried another one and it had the same issue
[16:38:08] <Brando753> but what I programmed into it via Arduino as ISP still runs fine
[16:39:38] <Joggl> my stick works quite well
[16:39:47] <Brando753> how much was it?
[16:40:01] <Joggl> i have some bigger version in my shop for about 2 years now, absolutely no problems
[16:40:01] <Brando753> I might just need to buy a different programmer
[16:40:03] * Brando753 sigh
[16:40:06] <Joggl> the very small one costs 4,90
[16:40:17] <Brando753> 4,90 what?
[16:40:27] <Brando753> pounds, dollars, euros
[16:40:27] <Joggl> damn charset ;) euros
[16:40:31] <Brando753> ah
[16:40:36] <Brando753> mine cost me $3,15
[16:40:59] <Brando753> mine cost me $3.15
[16:40:59] <Joggl> and its made 100% in germany
[16:40:59] <Brando753> and mine was made 100% in china :P
[16:40:59] <Brando753> lol
[16:41:52] <Joggl> ;)
[16:42:19] <Brando753> from what I can tell this programmer needs a firmware flash
[16:42:26] <Brando753> but I cant get my Arduino to flash it
[16:42:27] <Brando753> (╯°□°)╯︵ ┻━┻
[16:55:56] <Rickta59> with inline asm avr-gcc .. when using the "e" operand .. how do i use that in the asm code?
[16:56:08] <Rickta59> i tried %4+
[16:56:12] <Rickta59> but that fails
[16:56:20] <Rickta59> i just switched it to a z and used z+
[16:56:33] <Rickta59> but i'd rather let the compiler pick a register
[16:57:06] <Rickta59> ld %1,z+
[17:12:07] <RikusW> http://quinndunki.com/blondihacks/?p=1322
[21:54:13] <quxy> can anyone advise as to how I might output serial on an attiny861? All I need is to be able to transmit bytes at 31250b, no receive
[22:41:59] <OndraSter> serial as in SPI or UART?
[22:46:27] <quxy> OndraSter: serial as in UART. I'm trying to send MIDI. Also, being able to use the internal 8MHz clock would be a big plus.
[23:21:59] <Casper> quxy: actually, 8MHz is doable, but internal RC may not be... it's NOT reliable
[23:22:56] <quxy> Casper: I know it might not work, but it would great if it would. I need all the pins I can get
[23:23:20] <Casper> you would need to calibrate it, but it's doable
[23:24:30] <Casper> you need to divide 8e6 by 256, so check what combinaison of prescaller and UBR would give 256
[23:25:42] <Casper> (somehow I have doubts... does it have a prescaller?)
[23:31:24] <quxy> Casper: one timer has a prescaler, I believe
[23:32:48] <Casper> timer yes, but you will use the hardware uart most probably
[23:34:05] <quxy> Capser: but it does not really have 'normal' uart, but rather a USI. and I have no idea what to do with that. I'm a bit of a noob at this sort of thing
[23:37:00] <quxy> Hmm, I'm trying to read thru this application note (confusing), it seems like this is what I'm after
[23:41:48] <quxy> Casper: this seems like it may work: http://www.atmel.com/Images/doc4300.pdf but I'm not clear on whether it requires an external clock
[23:45:23] <Casper> the internal clock can be off by like 10%
[23:45:41] <Casper> so without calibrating it, it's quite useless for serial communication
[23:45:52] <Casper> however if you calibrate it then it will be fine
[23:49:40] <quxy> Casper: hmm ok