Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ATmega16A programming didnt work?

Status
Not open for further replies.

jepoy12

Junior Member level 3
Joined
Aug 19, 2011
Messages
26
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,463
After programming my Atmega16A I tried running it along with all in the circuit.
heres the circuit. its a cellphone controlled robot car
**broken link removed**
I tested it using a phone and called the other phone connected to the circuit then try pressing button "2" for forward but the motor didnt run.
Im trying to find out what part I might have done something wrong, so I will start with the ATmega16A uC.
heres the program of it.
#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;
}
}
}
}

I use this target board.
**broken link removed**

and my Programmer setting. Im using ProgISP v1.72
**broken link removed**

one of my classmate said that I might miss something on the setting.
I really dont know if I program my Atmega16A correctly.
Please help me.
 

As a first step, you should be able to detect, if ISP programming is working or not. Does the program verifiy correctly?
 

yes it says it was correctly program. Im a missing a check mark in the setting sir?
 

Is this your first attempt to program your design?

If so, you may want to add some LEDs to a few the unused port pins of the ATMEGA16A.

Doing so can come in handy during the debugging process by providing visual cues.

First, verify the device is in fact being programmed correctly, writing a simple LED blinker program or rotate one of the tires for a specific duration.

BigDog
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top