Apr 1, 2011 #1 2 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.
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.
Apr 1, 2011 #2 S seadolphine2000 Advanced Member level 3 Joined Apr 12, 2005 Messages 880 Helped 122 Reputation 244 Reaction score 87 Trophy points 1,308 Activity points 7,372 I think this is good start: Beginner's introduction to AVR assembler language AVR Tutorial: Introduction and Digital Output
I think this is good start: Beginner's introduction to AVR assembler language AVR Tutorial: Introduction and Digital Output
Apr 1, 2011 #3 2 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 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
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
Apr 1, 2011 #4 H hobbss Member level 2 Joined Oct 18, 2010 Messages 49 Helped 20 Reputation 40 Reaction score 19 Trophy points 1,288 Activity points 1,858 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
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
Apr 1, 2011 #5 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 This post may help you https://www.edaboard.com/threads/206148/#post869568 Alex
Apr 2, 2011 #6 2 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 hobbss, thanks, i am looking to write the code in C using avr studio. alex, thanks a lot, that link helps a lot.!
hobbss, thanks, i am looking to write the code in C using avr studio. alex, thanks a lot, that link helps a lot.!