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 |
|---|---|---|---|---|
| V | Asynchronous and Synchronous Transmission of Uart Data | Microcontrollers | 5 | |
| K | I want to charge and send data sing an usb c connector. | Digital Design | 7 | |
| V | Data Mismatch in RS485 communication | Microcontrollers | 3 | |
| D | 8051 sbit | General Electronics Chat | 10 | |
| K | what is the difference between sbit and bit | Microcontrollers | 5 |