FRDM-K64 PIN Digital Read

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

FRDM-K64 PIN Digital Read

873件の閲覧回数
antonioangelm24
Contributor I

Hi.

I have a simple question. How do I use the DigtialRead function from Arduino in my FRMD K64 in C?. I need to read either high or low (1 | 0). I was trying this with the GPIOx_PDIR function but this doesn't write you a Logic 0 when the read is 0.

Can anyone help me out?

Thank you very much. 

ラベル(1)
2 返答(返信)

746件の閲覧回数
mjbcswitzerland
Specialist V

Hi Antonio

If a pin is configured as GPIO (with clock gated to it) and its GPIOx_PDDR is '0' you can read its state in the GPIOx_PDIR register.

I don't have the impression that developers using the NXP forum use Arduino so you may find more suitable answers to your environment at the Teensy forum - the TEENSY 3.5 uses the K64.

In case you are making a transition from the Arduino world you can try the uTasker project (open source on Git Hub) since it also supports TEENSy 3.5 (and FRDM-K64F etc.), including simulation of the device/board so that you can more easily learn the internal workings. It doesn't constrain you to a certain environment since it is neutral and includes project for most common IDEs (MCUXpresso, CW, KDS, IAR, Keil, Rowley, Atollic, etc...).

Regards

Mark

746件の閲覧回数
antonioangelm24
Contributor I

Hello Mark,

Thank you for your answer. I'll get to that, and will check the uTasker you mencioned.

Thanks.

0 件の賞賛
返信