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.

Minimum System of ATmega128

Status
Not open for further replies.

satria02

Junior Member level 2
Joined
Apr 22, 2011
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Bandung
Activity points
1,467
i'm sorry.....

no one was connected on i/o port......
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,888
Helped
2,021
Reputation
4,158
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,371
I don't have a logic solution, usually the problem in cases like this is that the mcu can't establish a connection with the programmer or can't be programmed or evem a code that is not correct but this is not the problem in your case.
You have an MCU that is programmed correctly but the pins don't respond to the code...
Try to transfer the code using the application I mentioned above to see if anything changes.

One more thing to try is to blink the inputs using the internal pull up (pin set up as inputs instead of output ) to see if you get a different result, use a multimeter, you should normally see 0-5v.
The project frequency should be 1000000 since this is your mcu frequency now.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <avr/io.h>
#include <util/delay.h>
 
int main(void)
{
PORTA = 0xff;  // enable pull ups
DDRA = 0x00;  // post as input
 
 
    while(1){
        _delay_ms(1000); // delay 1 sec
        PORTA^=0xff;  // invert PORTA outputs 
        // PORTA^=0x01;  // or invert PORTA.0 output only 
 
 
    }
}



Alex
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top