Programing the AVR atmega8

Status
Not open for further replies.

2bengg

Junior Member level 3
Joined
Feb 27, 2011
Messages
28
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,498
I am having to use an atmega8 for my project (my prof's suggestion)
i have studied coding with 8051 MC.

i might be requiring help with some programing, hoping that you guys will be able to help.

First thing i need to understand is how do i go about

1. reading just 1 pin of an I/O port
say 4th pin of PORT C or the 5th pin of PORT D

2. writing to just 1 pin of an I/O port
say 3rd pin of PORT C or the 6th pin of PORT D

i have looked around over the internet and haven't been able to find what i am looking for.

i know how to initialize a port as an input port or an output port.
 

aah thank you so much. that second link is exactly what i was looking for.
i guess my searching skills require a lot of improvement
 

Also, try AVRFreaks. They tend to be a little C heavy, but there is definitely info on assembly programming as well. In particular, go to the tutorials portion of the forum:

View Forum - AVR Tutorials :: AVR Freaks
 
Reactions: 2bengg

    2bengg

    Points: 2
    Helpful Answer Positive Rating
hobbss, thanks, i am looking to write the code in C using avr studio.
alex, thanks a lot, that link helps a lot.!
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…