Home \ Help \ Search \ Login RSS

Welcome, Guest. Please Login

This forum is now READ-ONLY! Please visit http://forum.wiring.co/ for the new forum.

Wiring ForumWiring HardwareTroubleshooting › How to change the frequency of CPU?  

Page Index Toggle Pages: 1
How to change the frequency of CPU?   (Read 10739 times)
03/06/07 at 14:41:24

fallen   Offline
YaBB Newbies

Posts: 13
*
 
Hi! I want to change the frequency of wiring ,from 16M to 7.3728M ,

I already download a 7.3728M bootloader to wiring , and I can download program by bootloader now, and it work fine ,but there is something wrong with Serial , I think , because the F_CPU in wiring is 16M , I should change it to 7.3728M.

I change  "wiring-0011\lib\WConstants.h" :

// passed in at compile-time
#ifndef F_CPU
#define F_CPU 7372800L
#endif

// passed in at compile-time
#ifndef CPU_FREQ
#define CPU_FREQ 7372800L
#endif

but the problem is still there, could you tell me where is the "real" F_CPU?  and how to change it ?

thank you very much!!
 
IP Logged
 
Reply #1 - 03/06/07 at 17:17:34

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
hi, we are migrating the source code repository to svn, I hope it will be available today (late night) or tomorrow with notes on how to access it etc. From there you'll be able to download the code, make de modifications you need and run your tests.
I'll post a note here once it is up.
 
IP Logged
 
Reply #2 - 03/07/07 at 05:09:41

fallen   Offline
YaBB Newbies

Posts: 13
*
 
Hi ! barragan , thank you very much !! I will wait for the source code .

and is there a document to tell us how to build the source code in windows ?

Thank you !
 
IP Logged
 
Reply #3 - 03/07/07 at 06:36:29

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
Yes I am trying to work on that, actually it is very similar to build processing, you'' need to install cygwin on your system.
 
IP Logged
 
Reply #4 - 03/08/07 at 09:26:59

fallen   Offline
YaBB Newbies

Posts: 13
*
 
Hi! barragan , could I get the source code now?
could you give me the svn add?
thank you!
 
IP Logged
 
Reply #5 - 03/08/07 at 21:16:13

ppateric   Offline
YaBB Newbies
I Love YaBB 2!

Posts: 1
*
 
That work for me, currently getting the source...
 
IP Logged
 
Reply #6 - 03/09/07 at 00:54:40

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
hey guys, code can be seen here: http://wiring.org.co/source
for download check the instructions here: http://wiring.org.co/faq.html#060
We are preparing better documentation for it.
 
IP Logged
 
Reply #7 - 03/09/07 at 07:01:47

fallen   Offline
YaBB Newbies

Posts: 13
*
 
Thank you barragan!

but when I use "svn co svn://wiring.org.co/source/trunk/wiring"
it return: "Can't connect to the host 'wiring.org.co'

If you have time , could you tell me how to download the source? thank you!
 
IP Logged
 
Reply #8 - 03/09/07 at 07:15:25

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
hi, the command is wrong, try svn co svn://wiring.uniandes.edu.co/trunk/wiring
the http://wiring.org.co/source is only to visualize the repository. Instructions are here too: http://wiring.org.co/faq.html#060


 
IP Logged
 
Reply #9 - 03/09/07 at 13:44:04

fallen   Offline
YaBB Newbies

Posts: 13
*
 
Thank you!
It is working now !
 
IP Logged
 
Reply #10 - 03/11/07 at 02:44:15

fallen   Offline
YaBB Newbies

Posts: 13
*
 
Hi! barragan

I download all the source code . but when I "./make.sh" ,there are many error ,  many file can't find , and it's seems need VS98(but the path of "VS98" use "\", so cygwin can't find it?) ?

and I can successfuly make processing and arduino , they all work fine , could you tell me what's wrong or how to do?

and could wiring add a "F_CPU" in "preferences.txt" just like arduino?  By that way , we can change the frequency easy ! 

thank you!
 
IP Logged
 
Reply #11 - 03/12/07 at 02:43:27

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
Ok, make is very similar to processing's, but you need to have the tools/avr/bin (it is inside the Wiring distribution) in your path in order to build. It should work then.
 
IP Logged
 
Reply #12 - 03/15/07 at 13:47:25

fallen   Offline
YaBB Newbies

Posts: 13
*
 
Thank you ! barragan , I can't touch PC these days, so I just see your Reply , I will try it , thank you very much!!
 
IP Logged
 
Reply #13 - 03/15/07 at 14:40:10

fallen   Offline
YaBB Newbies

Posts: 13
*
 
Hi! barragan
could you tell me how to "have the tools/avr/bin (it is inside the Wiring distribution) in your path in order to build"

thank you!
 
IP Logged
 
Reply #14 - 03/19/07 at 17:22:49

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
hi, the file tools-avr.tar.gz is inside the wiring/build/windows/dist you can copy it to your / directory in cygwin:

cp tools-avr.tar.gz /
cd /
gzip -d tools-avr.tar.gz
tar xvf tools-avr.tar

this will create the /tools dir in your cygwin root
than you can do this:
export PATH=/tools/avr/bin:$PATH

that's it.
 
IP Logged
 
Page Index Toggle Pages: 1