0

I am using a custom made AVR board with Atmege-328p on it and it doesn't have a 16MHz crystal on it. I would like to use the internal 8MHz as clock. I have set the appropriate Fuses but now I am unable to tell the programs that F_CPU is 8000000UL. One way of doing it is to add another variant to the boards. I would like to if there is another way to set F_CPU ?

asked Jun 13, 2017 at 12:30

1 Answer 1

2

No, the boards.txt file is where it is defined and the only place it is (or can be) defined. Making a new board variant is the proper way of adding a new board with new settings.

answered Jun 13, 2017 at 12:54
1
  • Maybe there is already a board in "boards.txt" that is compatible with your board. The bootloader doesn't know if the 8MHz is from a crystal or from the internal oscillator, that means you can even use a bootloader for a 8MHz crystal, and you only have to change the fuse for the internal oscillator. During programming (for example burn the bootloader) with a programmer the ATmega328p requires a clock. Therefor you have to be careful not to set the external crystal (when there is no crystal), because then the programmer doesn't work. Commented Jun 13, 2017 at 13:17

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.