I don't have a Tiny13 data sheet in front of me, but I
would expect some timing restrictions, like there are for
disabling the watchdog. You MAY need to write to the Change
Enable bit, then within a specific time window, write the
new clock config. The data sheet ought to be pretty
explicit about the procedure.
Jim
On Mon, 20 Nov 2006 22:47:54 -0700
"Cat C" <catalin_cluj@hotmail.com> wrote:
> I don't know much about your specific case, and you don't
> say quite enough,
> but if:
>
> 0x80; // enable the Clock Prescaler Change Enable bit
> and
> 0x02; // system clock divide by 4
>
> Maybe you want:
> CLKPR=0x82
>
> Cat
>
> ----Original Message Follows----
> From: "Richard Cooke" <rcooke@digitalwavelength.com>
> Reply-To: AVR-Chat@yahoogroups.com
> To: AVR-Chat@yahoogroups.com
> Subject: [AVR-Chat] How do you change the clk speed?
> Date: Tue, 21 Nov 2006 05:23:08 -0000
>
> Hi Folks,
>
> I'm working on the ATtiny13 with the AVR Dragon and the
> latest version
> of AVR Studio (4.12 SP4). I guess I don't understand how
> to change
> the clock frequency correctly. I read the manual and I
> thought that
> if I used:
>
> CLKPR=0x80; // enable the Clock Prescaler Change Enable
> bit
> CLKPR=0x02; // system clock divide by 4
>
> Isn't this the proper way to change the clock? I'm
> measuring the
> current and I see no change. I'm running the chip at 5V
> and according
> the the spec sheet I should measure a little over 1ma at
> 1.2MHz.
>
> Any ideas?
>
> Thanks,
>
> Richard Cooke
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
_________________________________________________________________
> Ready for the world's first international mobile film
> festival celebrating
> the creative potential of today's youth? Check out Mobile
> Jam Fest for your
> a chance to WIN $10,000! www.mobilejamfest.com
>
---------------------------------------------------------------
The Think Different Store
http://www.thinkdifferentstore.com/
For All Your Mac Gear
---------------------------------------------------------------