2bengg
Junior Member level 3
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 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.