#avr | Logs for 2012-07-15

Back
[00:58:53] <OndraSter> That awkward when you read "moment" and it is not there.
[00:59:53] <theos> hmm
[05:32:02] <cehteh> http://i.imgur.com/6YBbz.jpg :)
[05:35:20] <LukaszST> hello
[05:38:53] <cehteh> hi
[05:38:53] <tobbor> cehteh! like, totally tell us about the project!
[05:39:03] <cehteh> tobbor: uhm really :)
[06:55:57] <age> hi. does the I/O clock get prescaled by default? I'm trying to output non-prescaled pwm, and it gives me 46 KHz on a chip running at 12 MHz
[06:57:30] <specing> age: CKDIV8 is set by default @ fuses
[06:58:53] <age> specing, it's an atmega8535, doesn't have ckdiv
[06:59:11] <age> and would still get me 1.5 MHz
[06:59:28] <specing> maybe you have a prescaler hooked to the timer?
[07:01:14] <age> specing, I have selected CS00 which is i/o clock with no prescaling
[07:02:47] <specing> Have you looked into the "clock system" section @ datasheet?
[07:04:14] <age> specing, it only has fuse descriptions
[07:05:10] <age> I am absolutely sure this chip runs at 12 MHz, since it also has v-usb which is timing dependent. it would not work with wrong frequency
[07:09:28] <age> "The Timer/Counter can be clocked directly by the system clock (by setting the CSn2:0 = 1)." but a table above specifies 001 for not prescaling
[08:49:40] <OndraLappy> oh why hello there!
[09:11:54] <Tom_itx> !seen abcminiuser
[09:11:56] <tobbor> abcminiuser was last seen in #avr on Jul 11 10:37 2012
[09:12:12] * Tom_itx gives abcminiuser a tardy notice
[10:34:22] <grummund> !seen tobbor
[10:34:23] <tobbor> tobbor is here
[11:04:49] <age> hi. I need some help with PWM code. this example: http://codepad.org/yq292J2i gives me 46 kHz on OC0, atmega8535 @ 12MHz. shouldn't the frequency be higher?
[11:10:57] <Xark> age: AFAIK it will still count to 256, so freq = clock / 256 (=~46.8Khz).
[11:11:46] <age> hmm, must be something I missed.
[11:12:12] <Xark> This is why you get 50%, 127/256 is when the compare triggers and it toggles the pin.
[11:13:21] <age> Xark, so I need CTC to control the frequency?
[11:14:23] <Xark> Well, perhaps. But for PWM, I think clock/256 is AVR max (other than bit banging).
[11:14:46] <age> I see, thanks
[11:15:03] <age> I don't really need PWM right now, just controllable frequency source
[11:15:22] <age> and for PWM frequency wouldn't matter that much
[11:15:22] <Xark> OK, I think what you want is to specify a TOP value less than 255 (maybe).
[11:15:28] <age> yes, that
[11:16:45] <Xark> Hmm.. Yes. You can still get 50% duty cycle by a corresponding reduction in the compare value (or whatever duty cycle).
[11:19:52] <age> CTC gets me 50% duty and f = clock / (2 * TOP)
[11:20:05] <age> which is awesome :>
[16:29:03] <slide23> bah ok so i think someone answered a few days ago but i forgot
[16:29:22] <slide23> is there a way to download the current hex from an atmega8 and save it for backup?
[16:30:21] <Steffann> zlog knows
[16:30:22] <Casper> yes and no
[16:30:45] <Casper> slide23: if there is no lock bit set, then yes
[16:30:59] <Casper> else nope
[16:31:01] <slide23> ok, how hehe
[16:33:31] <slide23> $(AVRDUDE) $(PROGRAMMER) -p $(DEVICE) -U flash:r:flashdump.hex:i
[16:33:35] <slide23> let me try that
[18:39:52] <solexious> Hello all, looking at the ATmega32U4, is it ok to run the VCC at 3.3 and have VBUS attached at the same time (obv running VBUS at 5v)
[18:41:19] <solexious> s/VBUS/UVCC/
[18:45:42] <Tom_itx> yes there are settings for that
[18:45:50] <Tom_itx> the docs show you about it
[18:46:25] <Tom_itx> unless you don't mean VBUS
[18:46:31] <Tom_itx> then you'd better check
[19:20:09] <solexious> Found the pages in the data sheet, thanks :)
[19:21:36] <Tom_itx> i would have told you but i wasn't sure of the configuration, there are at least a couple ways to wire it
[19:22:01] <Tom_itx> the internal 3.3v gives you about 20ma external to use
[19:22:21] <Tom_itx> or you can interface to 3.3v externally