Basic I/O

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

Basic I/O

1,168件の閲覧回数
huinad
Contributor I

Hi,

 

I switch from HCs12 to Kinectic K60n512. I have basic problem Turn on / off led diode.

In code i have

GPIOA_PDDR = 0x10000fff; //Port Data Direction RegisterPort Data Direction Register
GPIOA_PCOR = 0x00000fff; //Port Clear Output Register

 

But nothing change. Where is my mistake? Is some useful train material?

 

Thank you very much.

And sorry for this basic problem.

0 件の賞賛
返信
1 返信

974件の閲覧回数
Dekiru
Contributor IV

Hi,

 

In Kinetis, pin's function is not defined by priority base like that in HCS12 family, but you have to specify it explicitly, i.e via MUX bits in PCR register.

You have to enable clock to a port before you can use it also.

 

There is gpio example in

http://www.freescale.com/webapp/sps/download/license.jsp?colCode=KINETIS512_SC&location=null&fpsp=1&...

 

Regards

0 件の賞賛
返信