Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Sends a byte over I2C as a master on AVR.
#include <avr/io.h>
#define F_SCL 100000UL
#define TWBR_VAL ((F_CPU/F_SCL-16)/2)
void i2c_init(){ TWBR=TWBR_VAL; }
void i2c_start(){ TWCR=(1<<TWSTA)|(1<<TWEN)|(1<<TWINT); while(!(TWCR&(1<<TWINT))); }
void i2c_send(uint8_t data){ TWDR=data; TWCR=(1<<TWEN)|(1<<TWINT); while(!(TWCR&(1<<TWINT))); }
int main(){ i2c_init(); i2c_start(); i2c_send(0xA0); }Embedded C/C++ refers to using the C or C++ programming languages for programming embedded systems. These are resource-constrained devices like microcontrollers, IoT devices, automotive controllers, and real-time systems where direct hardware control and performance are critical.
Origin & Creator
C was created by Dennis Ritchie at Bell Labs in the 1970s, and C++ was developed by Bjarne Stroustrup in the 1980s. The embedded variant evolved as developers adapted these languages for low-level, resource-constrained systems.
Industrial Note
Embedded C/C++ dominates industries like automotive (ISO 26262), aerospace (DO-178C), industrial automation, and consumer electronics where memory, speed, and reliability are critical.