Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to change clock frequency in CodeVisionAVR

Status
Not open for further replies.

ashishvdeshpande

Newbie level 6
Joined
Jul 5, 2006
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,363
While creating codevisionavr project uC clock frequency is configured. How we can change this frequency in .c/.h file without creating new project.

I have C program which is created for 16MHz frequency if I run it with 8MHz then I won't get proper serial output also delay function won't work properly. I guess even delay.h must be using some #define to find out frequency of controller but i didn't find it in any c/h file.

I have two main requirement
1. I want to make my program generic to clock frequency.
2. I don't want to create new project for different clock frequency. Can't we change frequency in C file.

---------- Post added at 04:09 ---------- Previous post was at 04:05 ----------

Ohh Just now I found macro in code vision avr. _MCU_CLOCK_FREQUENCY_ macro give clock frequency in Hz. I can use this to make my code generic (irrespective of clock).

But can I change this frequency in C/H file without creating new project?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top