Witam,
mam lamerskie pytanie dotyczące programowania w C.
Chciałbym ustawić pin CLKOUT kontrolera CAN MCP2515 na wyjście zegara dla mikrokontrolera, z mnożnikiem 1.
Opis z datasheet:
"The CLKOUT pin is provided to the system designer for
use as the main system clock or as a clock input for
other devices in the system. The CLKOUT has an internal
prescaler which can divide FOSC by 1, 2, 4 and 8.
The CLKOUT function is enabled and the prescaler is
selected via the CANCNTRL register"
Biblioteka mcp_can_dfs.h zawiera:
/*
* CANCTRL Register Values
*/
#define CLKOUT_ENABLE 0x04
#define CLKOUT_DISABLE 0x00
#define CLKOUT_PS1 0x00
#define CLKOUT_PS2 0x01
#define CLKOUT_PS4 0x02
#define CLKOUT_PS8 0x03
więc trzeba tylko zmienić wartości, niestety nie wiem na jakie.
Z góry dzięki za pomoc.