😂Indian tutorial Mai na inko thik se English ATI hai or English ke chakkar Mai hindi b bhulgaye hai. Better to watch foriengn channel for MCU rather then these.
Thank you for this great video! This is exactly what I was looking for! So many instruction on how to toggle the bits but nowhere if you want to CLEAR particular bit and leaving the others unchanged!
Hi , i use to do that like this : #define PORTA *(volatile unsigned char *) 0x18 // 0x18 physical adress of portA #define bitset(var,bitno) ((var) |= (1
Very perfect method cool and with grate patients. Thanks for sharing. The initialized value of Port A = ob 10101010; is a default or any arbitrary bits if we want to make change in TCCR1A register to ob10100010 what to do in Studio.
Yes in assembly there are instructions to set/clear a bit. Some C compilers can embed ASM instructions. Atmel Studio has macros defined for sei() and cli() to enable/disable interrupts. Standard C cannot directly access bits via p1.1 You can also define structures with bitwise variables. But this usually just makes it more complicated. You can also define easy to remember macros to handle bit manipulation.