i have a hex code can i send to atmega 328 using uno board?

or can i some how convert my c code to sketch and burn ic?

avrdude sends hex code to the chip

any suggestion on how to turn .c code into arduino language?

There is no such thing as the "Arduino Language". The Arduino is programmed with C/C++.

ok, thank you… so its possible to convert

#include <mega16.h>
void main(void)
{
unsigned int k, h;
DDRA=0x00;
DDRD=0XFF;
while (1)
{
k =~PINA;
h=k & 0x0F;
switch (h)
{
case 0x02:
{
PORTD=0x89;
break;
}
case 0x08:
{
PORTD=0x86;
break;
}
case 0x04:
{
PORTD=0x85;
break;
}
case 0x06:
{
PORTD=0x8A;
break;
}
case 0x05:
{
PORTD=0x00;
break;
}
}
}
}
into arduino sketch? also this code is for atmel 168, im using 328

also i must use a bread board cause my uno can not fit my atmega328

armen_terabelian:
into arduino sketch? also this code is for atmel 168, im using 328

I doubt it; the atmega168 doesn't have a PINA. Also, what's the mega16 include? Are you sure it's not an atmega1280? Or atmega16u2?

Also, that's a really simple program, and it'll almost certainly be easier to rewrite it with the arduino library rather than try to translate line-by-line.

So:
What are you trying to make your arduino accomplish?

i am trying to burn a atmega328 ic so that it can receive tone from dtmf ic then enable h brigde l293 ic for motors

armen_terabelian:
ok, thank you... so its possible to convert

Yes, if you rewrite it.

Why are you asking this?

or can i some how convert my c code to sketch and burn ic?

What investigations, exactly, have you done about the Arduino IDE and how it works?

armen_terabelian:
i am trying to burn a atmega328 ic so that it can receive tone from dtmf ic then enable h brigde l293 ic for motors

Is that what the program you posted did? It seems like to read a dtmf ic you'd need an fft algorithm. The code you posted just looks at four pins and writes another four pins based on what it read.

Unless you mean an ic that converts the dtmf to four digital signals?

i have read all kinds of stuff but im having trouble. so im a noob. i need help writing code for my atmega328 ic. im building a project for school and ive been stuck on the code for ever.

armen_terabelian:
i need help writing code for my atmega328 ic.

Are you trying to write for a ATmega328 or to an Arduino?

really i want to write it onto a atmega328p-pu ic

armen_terabelian:
really i want to write it onto a atmega328p-pu ic

You're converting code for a processor not supported by the Arduino project to a bare processor. Maybe you would be better asking in avrfreaks.net's forum.

thank you, i appreciate the help.
one last thing... could i use my arduino to burn code that is created from atmel studio 6? maybe not a question for here?