After finishing up the $50 robot, I wanted to go through the the upgrades in mentioned in the tutorial.
First one that made sense to me is the upgraded micro controller, since I would rather do that before any of the others.
Instead of buying the ATmega168, I bought the ATmega328P since I was making an order from spark fun for the UART parts and they only had the 328P and not the 168.
So I got my parts yesterday and I am following Admin's tutorial.
I create a new project and copy all of the photovore_v1 files over, in this new project I specify the 328P.
I modify the makefile for this micrcontroller, I also modify the makefile to use timerx8 instead of timer
The last part of the tutorial mentions:
"The global.h file should also be modified since it contains a F_CPU define, depending on if you use the makefile to overwrite that value or not."
So I open up the global.h file and here is the code for the F_CPU files:
// CPU clock speed
//#define F_CPU 16000000 // 16MHz processor
//#define F_CPU 14745000 // 14.745MHz processor
//#define F_CPU 8000000 // 8MHz processor
//#define F_CPU 7372800 // 7.37MHz processor
//#define F_CPU 4000000 // 4MHz processor
#define F_CPU 3686400 // 3.69MHz processor
#define CYCLES_PER_US ((F_CPU+500000)/1000000) // cpu cycles per microsecond
I was a bit surprised by this because I thought the ATmega8 was a 16MHz processor, so I would have expected that one to be uncommented, not the 3.69MHz processor line.
So I did not do anything with this and decided to rebuild all and program.
I rebuilt all and it wet fine, I did have a warning about a SIG_ADC but it still worked.
I then program and it programs successfully.
Once programmed the LED light is turning on, but nothing is happening at all with the servos.
This was working perfecty with the ATMega8, and I verified by swapping the chips again.
I went through all the code and searched the forums, I am now stuck.
Anyone have any ideas here on what I need to do? Is this the F_CPU code, or something else maybe? Maybe the SIG_ADC warning?
When I looked up the SIG_ADC warning I found a post by Admin that said to try to include signal.h, I did that in my SOR_utils.h file, and it would not build because I do not have the signal.h file.
Any ideas where I can get it, or how to build it?
Any help would be appreciated.
Thx.