Sylaina/oled-display

TWBR out of range error and F_CPU undeclared

Huruvarshan opened this issue · 1 comments

I'm getting an error of the TWBR being out of range and the F_CPU being undelcared.
TWBR out of range: I've tried setting the prescaler to 1, 4, 16 and 64. Aswell as changing the I2C frequency. Nothing worked for me.
I am using the AtMega2560 with an external clock of 16MHz.

Here is a screenshot of the error list in Microchip Studio:
image

It looks like you haven't declare F_CPU. TWBR will be calculated by F_CPU.