- This topic has 2 replies, 3 voices, and was last updated 13 years, 1 month ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
|
Microcontroller › 8051 › related I/O pins operations of 8051……..
hi friends i have doubt on i/o pins configuration of 8051.when i am writing embedded c program for selecting the single bit code sbit led=P1^0; like that for selecting all port0 pin means sfr led=0x80;… but my doubt on first im selecting all port pin using sfr then how i selecting particular pin example P0.1 form that sfr port for read and write…..
you can use either of the one operation. If you are using SFR u are using the entire 8 bits as a byte. When you are using sbit u are using only the corresponding bit..
Using both for the same port in the program may produce logical error if not the syntax error..
what nikhiljain said is correct .
Using both for the same port in the program may produce logical error if not the syntax error..