How to redirect from D3 to A1-A7? please help

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
man1024
Posts: 11
Joined: Thu Jun 07, 2012 2:53 am

How to redirect from D3 to A1-A7? please help

Post by man1024 »

Please help to redirect from D3 pin to any A0,A1,A2..A7. D3- motor 1 in XQuad configuration. my D3 is dead.

please help.

Arf
Posts: 22
Joined: Tue May 22, 2012 10:48 pm

Re: How to redirect from D3 to A1-A7? please help

Post by Arf »

man1024 wrote:Please help to redirect from D3 pin to any A0,A1,A2..A7. D3- motor 1 in XQuad configuration. my D3 is dead.

please help.


Have you stuck a multi meter on the D3 pin of the Atmega chip and measures if there is conductivity to the D3 pin on the circuit board? It could simply be a bad contact.

man1024
Posts: 11
Joined: Thu Jun 07, 2012 2:53 am

Re: How to redirect from D3 to A1-A7? please help

Post by man1024 »

yes. I did. it's dead, fried. (I made mistake when short D3). however it will power the board (ESC).

I do believe it should be the way to use A0, A1...etc instead, by programming.

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: How to redirect from D3 to A1-A7? please help

Post by Tommie »

Just get yourself a new controller; how long are you going to code for 2€?

man1024
Posts: 11
Joined: Thu Jun 07, 2012 2:53 am

Re: How to redirect from D3 to A1-A7? please help

Post by man1024 »

I found place at "output" code, but need more information.

//here i should replace 3 to A0

#if defined(PROMINI)
uint8_t PWM_PIN[8] = {9,10,11,3,6,5,A2,12}; //for a quad+: rear,right,left,front
#endif

// and here i need to replace "COM2B1" to A0 definition, but don't know what...

#if (NUMBER_MOTOR > 3)
TCCR2A |= _BV(COM2B1); // connect pin 3 to timer 2 channel B COM2B1

#endif

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: How to redirect from D3 to A1-A7? please help

Post by Tommie »

You cannot do that. these pins are hard-wired to the internal timers. As I said, you can get a new ATMega328 for 2€, is it really worth it?

man1024
Posts: 11
Joined: Thu Jun 07, 2012 2:53 am

Re: How to redirect from D3 to A1-A7? please help

Post by man1024 »

ok then, getting new chip.

Arf
Posts: 22
Joined: Tue May 22, 2012 10:48 pm

Re: How to redirect from D3 to A1-A7? please help

Post by Arf »

I would suggest a new chip too in that case. You don't really want a controller with a weakened chip suddenly falling out of the sky.

Post Reply