#include <stdint.h>
#define PortC_dir (*((volatile uint8_t*)0x27))
#define PortC_data (*((volatile uint8_t*)0x28))
#define PortC_in (*((volatile uint8_t*)0x26))
#define PIN0 (1 << 0)
#define SEQUENCE 100 //0b00110010 Binary representation of 50
void send(uint8_t data){
for(volatile int i = 7; i>=0; i--){
if(data & (1<<i)){
PortC_data |= PIN0;
Serial.print('1');
}else{
Serial.print('0');
PortC_data &= ~PIN0;
}
for(volatile long x = 0; x < 100000; x++);
}
Serial.println();
}
int main(){
Serial.begin(9600);
PortC_dir |= PIN0;
while(1){
send(SEQUENCE);
}
}