HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old May 30, 2012, 01:18 PM
mansour.ohms's Avatar
Joined Mar 2011
16 Posts
I forgot to show the pictures the modifications to the turnigy esc
mansour.ohms is offline Find More Posts by mansour.ohms
Reply With Quote
Sign up now
to remove ads between posts
Old May 30, 2012, 01:57 PM
hacker
Canada, BC, North Vancouver
Joined Dec 2010
934 Posts
Quote:
Originally Posted by mansour.ohms View Post
Hi Guys I am playing arround with Simon's firmware and the turnigy plush 18A esc. I want to see the difference between 8MHz and 16MHz so i added a 16MHz crystal oscilator. The problem is i cant get the oscilator to run. I have measured with a scope the oscilator signals are stuck low. I am using the standard tgy.asm with the tgy.inc as the include file.

Has any one attemted this before? If so what are the correct fuse settings?

Thx
Ohms
Others have attempted this, and it works. The usual fuses will not start the oscillator. Once you set the fuses, you cannot even program it (or change the fuses back) via ISP unless the oscillator is working, so it's a bit of a dodgy step, but it should work.

Go to http://www.engbedded.com/fusecalc and enter in the current fuse values, then set CKOPT and Crystal/Resonator High Freq from the drop-down. (Any of them will work -- I usually select the bottom one / longest boot wait.)

BTW: My code sets OSCCAL to 0xff which makes it run at almost 16MHz anyway. I noticed it kind of doesn't work so well anymore at 8MHz since the zc filtering was added.
simonk is offline Find More Posts by simonk
Reply With Quote
Old May 30, 2012, 03:10 PM
mansour.ohms's Avatar
Joined Mar 2011
16 Posts
Hi Simonk,

Thanks for the tip i will give it a try.

Ohms
mansour.ohms is offline Find More Posts by mansour.ohms
Reply With Quote
Old May 30, 2012, 08:24 PM
Suspended Account
Joined Dec 2010
11,764 Posts
You need to change the fuse from intrc to ext resonator, 8mhz+. Not sure what bit that is specifically but plenty of avr fuse calculators on the internet. it won't automatically switch to external crystal like most other modern MCUs..
timecop is offline Find More Posts by timecop
Reply With Quote  (Disabled)
Old May 31, 2012, 01:20 AM
mansour.ohms's Avatar
Joined Mar 2011
16 Posts
Simon and TC Thanks for the tips it is working now.

Simon your remark about zero crossing triggerd a thaught. How sensitive is the zero crossing to offset drift? I assume offset drift changes with the temperature variations of the mosfets? Do you use the zero crossing for frequency measurement or is it needed for somthing else?

Thx
Ohms
mansour.ohms is offline Find More Posts by mansour.ohms
Reply With Quote
Old Jun 01, 2012, 02:23 PM
hacker
Canada, BC, North Vancouver
Joined Dec 2010
934 Posts
Quote:
Originally Posted by mansour.ohms View Post
Simon and TC Thanks for the tips it is working now.

Simon your remark about zero crossing triggerd a thaught. How sensitive is the zero crossing to offset drift? I assume offset drift changes with the temperature variations of the mosfets? Do you use the zero crossing for frequency measurement or is it needed for somthing else?

Thx
Ohms
You mean oscillator drift? It doesn't matter that much, I don't think. The not working as well at 8MHz just comes from the filtering being timed by the number of cycles it takes, not by any sort of timer. Zero crossing sensing is used to track the motor timing. As it spins, and the two other phases are held high and low by active FETs, the undriven phase voltage passes across "zero", ie, the neutral or average voltage of the motor phases. This is how we know where the motor is. We then apply the commutation timing wait, and then advance the FET commutation step.

The difficult part is that we're PWMing the high FET on and off unless at full throttle, so this introduces some noise. Since we're only working with a comparator and not an ADC, all we can do is try our best to filter the comparator's input. This loop changes speed with the oscillator speed, but it's not critically important unless it aliases badly with the PWM speed. The PWM speed at 18KHz PWM is 888 cycles at 16MHz, though, so there are quite a few opportunities to process the comparator input.
simonk is offline Find More Posts by simonk
Reply With Quote
Old Feb 12, 2014, 04:01 PM
Registered User
Joined Feb 2014
1 Posts
Question

I have 4x RCTimer 20A that i want to flash with SimonK firmware but i also want to add external quartz for them. In the documentation that i have found so far i can't find where to set the frequency of ATMega8 to 16Mhz. Can any one tell me or point me to where i can find this?
gvi70000 is offline Find More Posts by gvi70000
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
2 Electro Fusion Motors & CC esc's from Coronas for sale mthomson Aircraft - Electric - Airplanes (FS/W) 7 Mar 18, 2004 06:13 AM
FS- FMA M5 dual conv Rx and 2 esc's- all NIB Etonic Aircraft - Electric - Airplanes (FS/W) 3 Nov 17, 2003 01:27 PM
How do I hook 2 esc's into 1 receiver ? Al P Power Systems 2 Aug 30, 2002 05:38 PM
EBAY Brushless Motor & 2 ESC's S Anastasio Aircraft - Electric - Airplanes (FS/W) 0 Aug 12, 2002 06:41 AM
WTB: 2 Hitec Feather Recievers and 2 ESC's Ryan Nau Aircraft - Electric - Airplanes (FS/W) 6 Jul 03, 2002 07:13 PM