Serial output
If you want to read the value of a variable inside your MCU, the easiest option is to just print it on the serial port.
TX-pin is PIN_PA1.
Calibrate your MCU-clock
- Set the fuse to enable clock output on PIN_PB2.
- Use a frequency counter (or an oscilloscope) to measure the frequency.
- When it's not correct you can adjust the frequency using the OSCCAL-register:
void setup() { OSCCAL-=4; }
Disabling RX
void setup()
{
OSCCAL-=5;//999.178kHz
Serial.begin(4800);
//Disable Serial RX
ACSR &=~(1<<ACIE);
ACSR |=~(1<<ACD);
}
void loop()
{
Serial.print("Hello");
delay(1000);
}
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.