I’m a first time user of Arduino, got Arduino Pro Mini board 3.3V 8MHz based on ATmega 328P. Board connected to laptop USB port via USB to Serial breakout board built on the FT232RL FTDI chip.
I use Arduino Web Editor and managed to upload JTAGenum project sketch to the Arduino. The baud rate of the serial console has been set 115200, as required for project code. When I opened terminal and tried run test commands I got just gibberish or garbage characters on the output.
Not sure whether this issue can be caused by incorrect F_CPU settings, or by other reason.
In board description was noted that clone board is ATmega328P 3.3V 8MHz. When I use Arduino Web Editor, it detects this kind of board as ‘16MHz ATmega328’ in FLAVOUR menu. Boards > Arduino Pro or Pro Mini > FLAVOUR > 16MHz ATmega328. When I manually selected 8MHz ATmega328 kind, then connection with board missing (red cross), so I should click on ‘Arduino Pro or Pro Mini’ menu and it sticks back to the ‘16MHz ATmega328’ type.
Can it be chance that board actually is 16MHz, not 8MHz? If yes, how to test board to detect this exactly?
The project have code that cuts clock in half for 3.3v AVR boards, its uncommented:
// For 3.3v AVR boards. Cuts clock in half. Also see cmd in setup()
#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
// Uncomment for 3.3v boards. Cuts clock in half
// only on avr based arduino & teensy hardware