sbit LEDA at PORTA.B0; // PORTA.B0 is equivalent to RA0.
//PORTA is treated as a structure of bit variables and is a little more general i.e. bit 0 of that register.
sbit LCD_RS at RB4_bit; // RB4 is equivalent to PORTB.B4 .
//RB4 is predefined by MikroC (from Microchip) as PORTB.B4 .
//Similar but you have to know that Microchip calls that pin RB4.
LEDA = 1; // generates bsf PORTA,o in assembler
LCD_RS = 0; // generates bcf PORTB,4
So it assign a name LEDA to the bit0 of sfr register PORTAIt's just MicroC's different ways of allowing you to name a bit in an SFR register (like PORTA,0).
Yes. It's so your codeSo it assign a name LEDA to the bit0 of sfr register PORTA
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
E | Reading Random Digital Data from AD4681 ADC | Analog & Mixed-Signal Design | 37 | |
C | Data sheet IC | Datasheets, Manuals & Parts Identification | 6 | |
M | Data (voltage) logger with remote access | Automation, Robotics & Control | 3 | |
D | 8051 sbit | General Electronics Chat | 10 | |
K | what is the difference between sbit and bit | Microcontrollers | 5 |
by Jake Hertz
by Jake Hertz
by Jake Hertz