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 | Data Logging Project on Pro Mini, Need Help | Microcontrollers | 4 | |
| E | How to Capture SPI Data Without Affecting the Bus? | Microcontrollers | 14 | |
| T | Suggestions for Bluetooth data collection | Microcontrollers | 2 | |
| D | 8051 sbit | General Electronics Chat | 10 | |
| K | what is the difference between sbit and bit | Microcontrollers | 5 |