Reading DTMF Data On PortC

Hi All,

I am trying to read dtmf data using M8870 ic with UNO.

data pin's A, B, C, D are connected to pin A0 to A3.

I change A0 to A3 to digital input's. Here is the code.

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:

byte dtmf_data;  // hold dtmf data 

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.

// the loop routine runs over and over again forever:
void loop() {

  dtmf_data  == (PINC)&0x0F;


my problem is no bcd code is detecting on portc.

correct function is, when i press button 1 then serial terminal shows continuous char 1 & this information will change according to button.


Hi All,

Problem solved.

Here is the mistake.

i write

dtmf_data == (PINC)&0x0F;

instead of

dtmf_data = (PINC)&0x0F;


Hi All !

I am using pin2,3,5 & 6 using as digital output but they are not working according to command.

Are these pins are busy with some other functions.

How to solve this ?


I am using pin2,3,5 & 6 using as digital output

Not in the code you posted.

How to solve this ?

There's a clue above...

Hello Sir,

UNO Pin 2,3,5 & 6 pin are driving L298 motor driving ic.

2 motors are connected. Motors does not run according to command.

To solve this problem, 1st i remove L298 & put 4 led's on pin-2,3,5 & 6 pin.

I am surprised everything works perfect.

Now i remove led's & put again L298, now motor does not follow command.

I test L298 with manual sending data for reverse & forword direction & its work perfect.

Now it may be only power supply issue.

Now going to test it.