Basic I/O

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Basic I/O

665 Views
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 Kudos
1 Reply

471 Views
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 Kudos