#define PORTB_DATARG 0x25
#define PORTB_DDRBRG 0x24
#define PORTB_PINBRG 0x23
#define DT 10000000U
#define DATARG (*(volatile uint8_t*)(PORTB_DATARG))
#define DDRBRG (*(volatile uint8_t*)(PORTB_DDRBRG))
#define PINBRG (*(volatile uint8_t*)(PORTB_PINBRG))
void setup() {
// put your setup code here, to run once:
DDRBRG |=(1<<5); // using as output
}
void loop() {
// put your main code here, to run repeatedly:
DATARG =0b00100000;
myDelay();
DATARG =0b00000000;;
myDelay();
}
void myDelay()
{
for(volatile uint32_t i=0;i<DT;i++);
}