CLK output pin?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CLK output pin?

1,093件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by volter on Sat Jun 18 13:21:36 MST 2011
I need some pin to be configured as a CLK at 4MHz for my external ADC (MAX183BCNG).
Is there already build in function for this?
0 件の賞賛
返信
4 返答(返信)

1,075件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by volter on Sat Jun 18 14:14:24 MST 2011
I find this configuration for LPC1114 but I think it will work for LPC1343 as well
// Init
LPC_SYSCON->SYSAHBCLKCTRL |= (1<<6); // Enable GPIO clk
LPC_IOCON->PIO0_1 &= ~0x3F; // Select clkout function for P0.1

LPC_IOCON->PIO0_1 |= 0x01;

LPC_SYSCON->CLKOUTCLKSEL = 0x03; // IRC: 0x00 System osci: 0x01 WTD: 0x02 Main clk: 0x03

LPC_SYSCON->CLKOUTUEN = 0x01; // Update clock

LPC_SYSCON->CLKOUTUEN = 0x00; // Toggle update register once

LPC_SYSCON->CLKOUTUEN = 0x01;

while ( !(LPC_SYSCON->CLKOUTUEN & 0x01) ); // Wait until updated

LPC_SYSCON->CLKOUTDIV = 1; // Divided by 1

I just need to set CLKOUTDIV to 18 to get 4MHz
0 件の賞賛
返信

1,075件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Jun 18 13:52:21 MST 2011

Quote: volter
OK and how I configure & use it.



Use manual of your MCU and / or read this forum?
0 件の賞賛
返信

1,075件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by volter on Sat Jun 18 13:46:34 MST 2011

Quote: Zero
Yes,  CLKOUT :)


OK and how I configure & use it.
0 件の賞賛
返信

1,075件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Jun 18 13:27:41 MST 2011
Yes,  CLKOUT :)
0 件の賞賛
返信