#avr | Logs for 2013-11-24

Back
[01:07:37] <jerkey> N2TOH why do you want to run on 1039Hz clock? why not the 8MHz internal clock? are you trying to save power? or synchronize with the 1039Hz signal?
[01:19:53] <A124> Power savings.. tests have shown that using 1MHz vs 8MHz in most applications, based on computing power, not waiting for something, 8MHz is more efficient
[01:25:39] <jerkey> faster will always be more efficient
[01:25:46] <jerkey> think about it
[01:26:33] <A124> Not always.
[01:27:03] <A124> You have to use higher voltage for 16MHz, so I can't relate to that
[01:40:02] <jerkey> good point.
[10:08:01] <rue_bed> jerkey, faster isn't more efficient on an avr
[10:08:28] <rue_bed> at 16Mhz an avr prolly draws about 8x more power than it does at 6Mhz
[10:47:33] <Amadiro> It's just the integral of the curve
[10:47:40] <Amadiro> both height and width matter
[10:50:34] <Amadiro> (and unfortunately the area under the curve doesn't stay constant with changing clock speeds)
[10:53:06] <jerkey> but A124 said tests have shown that using 1MHz vs 8MHz in most applications, based on computing power, not waiting for something, 8MHz is more efficient
[10:55:45] <Amadiro> jerkey, if you can compute something and then go into a low-power state (or lets just say, turn yourself off) then turning yourself off earlier is of course better, so the faster you can compute the thing you wanted to compute, the better.
[10:56:04] <Amadiro> but if you use unproportinally much power during the computation, that "outweights" the "being done early"
[10:56:21] <Amadiro> so if you imagine your power usage to be plotted on a curve
[10:56:33] <Amadiro> where you start in the "off" state, then spike up to do something, and afterwards go back into the "off" state
[10:56:39] <Amadiro> it's about minimizing the area under the curve
[10:56:51] <Amadiro> so it's both about momentary power consumption and being done fast
[10:57:28] <Amadiro> Some chips that are all about low power consumption (like the efm32 chips by energy micro) chose to go the "faster is better" route to a large degree and give you a fairly powerful 32-bit ARM CPU
[12:13:06] <errordeveloper> hi
[12:13:45] <errordeveloper> i'm using jtagice mkii with a chip that is not supported by avarice
[12:14:31] <errordeveloper> does avarice really need to know everything about each specific mcu?
[12:21:32] <Casper> errordeveloper: sadly, yes, different chip have different commands
[12:24:34] <errordeveloper> Casper: hm... althogh it looks like avarice only needs a few lines
[12:25:13] <errordeveloper> may be i could give it a go... given that commands are all documented
[12:26:13] <Casper> yeah, probably only need to tell it the device signature and device core type, flash and eeprom size... maybe ram size
[12:31:25] <mesger> hello im modifying an arduino bootloader to update the firmware from sd card http://pastebin.com/Jb29VkqK is the code im inserting but for some reason it seems to hang on line 47,48
[12:35:41] <mesger> anyone ?
[12:35:56] <mesger> or am i just in the wrong channel ?
[12:39:45] <Tom_itx> either nobody is awake or nobody cares
[12:41:34] <Tom_itx> maybe you are erasing the code that is running
[12:41:37] <Tom_itx> ever think of that?
[12:43:09] <Tom_itx> i dunno where 'fa' is
[12:44:21] <Tom_itx> maybe it is write protected?
[13:02:02] <mesger> it is an atmega2560 chip with the bootloader at adress 0x3e000 im trying to write the firmware to the flash of the arduino
[13:02:17] <mesger> it shouldnt be write protected
[13:02:52] <mesger> no matter what it always hangs directly after if(br)
[13:03:41] <mesger> so it is not the boot_page _erase specifically ive recently found out
[13:05:14] <Casper> how is "fa" defined?
[13:05:30] <Casper> nm
[13:05:35] <Casper> wrong line
[13:05:46] <mesger> im using petit fat fs
[13:05:57] <mesger> i dont understand why it is hanging there
[13:06:32] <Casper> boot page erase?
[13:06:43] <mesger> no just after if(br)
[13:06:54] <mesger> if i uncomment the padding it hangs there
[13:06:57] <Casper> ain't that supposed to be used for the bootloader section only?
[13:07:33] <mesger> its an arduino
[13:07:55] <mesger> you have the bootloader which is at 0x3e000 and you have the firmware which starts at 0x0
[13:08:09] <mesger> the firmware is written by boot_page
[13:08:16] <Casper> maybe you are running out of ram too
[13:08:59] <mesger> ill try and comment some of the chars to see if i get further
[13:34:15] <megal0maniac_afk> I always forget that the bootloader is high in flash
[13:34:19] <megal0maniac_afk> Silly me
[14:06:19] <jerkey> convert all your const unsigned longs to #define
[16:27:35] <DutchPainter> Hey guys, anyone who can help me with the TWI on an ATmega? I can't get Slave TX working
[18:07:09] <sirpatrick> will code that uses registers from the atmega168 be the same on an atmega328?
[18:07:40] <Tom_itx> yup
[18:07:47] <sirpatrick> okay cool
[18:07:58] <Tom_itx> recompile for the additional memory
[18:08:27] <sirpatrick> alright
[19:14:28] <ambro718> sirpatrick: check which devices your datasheet describes, those will be very similar except for amount of flash/ram and maybe some other stuff.
[19:16:06] <Tom_itx> 48 88 168 328
[19:18:09] <ambro718> do those suffixes have any particular meaning, as in, 128(0), 128(4), 128(nothing)
[19:18:23] <ambro718> is it just a sequential number incremented for new developments?
[19:18:53] <Tom_itx> i'm not sure
[19:28:34] <jerkey> whats the difference between atmega328 and 328p ???
[19:29:44] <Tom_itx> p
[19:29:53] <Tom_itx> it's either voltage or frequency
[19:29:58] <Tom_itx> i forget which
[19:30:04] <Tom_itx> lower v
[19:30:18] <Tom_itx> but the frequency goes down with the voltage
[19:32:40] <jerkey> why is the signature different?
[19:32:52] <Tom_itx> because it's a different part
[19:35:49] <Fornaxian> p is for picopower
[19:36:09] <Fornaxian> p version can run much lower power..
[19:37:17] <Tom_itx> but slower
[19:37:25] <Fornaxian> yes.
[19:46:14] <jerkey> but how is that avrdudes bizness?
[19:53:00] <Tom_itx> it cares for you
[19:53:17] <Casper> jerkey: atmel used another signature, avrdude do not know what it is unless you tell it what it is
[19:54:19] <Casper> different part, different signature
[21:16:04] <jerkey> why do the parts need different signatures if they are computationally the same?
[21:17:27] <Tom_itx> they are not the same parts
[21:17:51] <Tom_itx> the die are different
[21:18:17] <Tom_itx> possibly so the mfg can tell them apart?
[21:18:32] <Tom_itx> you wouldn't want a P in a non P package
[21:19:23] <jerkey> so why do the surface mount and DIP packages have the same ID? what about different frequency ones?
[21:19:56] <Tom_itx> it's pretty easy to tell the difference in the package, also reflected in the part number
[21:20:12] <Tom_itx> but if they are electrically different you wouldn't know
[21:20:45] <jerkey> but the 10 and 20 mhz parts have the same signature
[21:21:02] <Tom_itx> reflected in the part number
[21:52:27] <Casper> jerkey: package change do not influence it's performance and specs since it's the same die, so same device
[21:52:58] <Casper> however P and non P may not react the same way in different ways
[21:53:17] <Casper> and I also noticed some difference between the 88p and 88
[21:53:29] <Casper> need some small timing change for some stuff to work
[21:54:25] <Casper> but really, atmel put one signature per die "mold"
[21:54:30] <Casper> which is a good thing
[21:54:51] <Casper> it avoid some issues sometime
[22:23:35] <jerkey> ok