Access ports wordwise

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Access ports wordwise

556 次查看
sionp
Contributor II

Hi,

         I would like to know whether we can write to multiple pins of a port in one instant by using some sort of write to port register where each bit of the register will be the port pin. After going through the documentation I was unable to find the same. For applications where the parallel buses can be used such as character LCD/ digital attenuators/potentiometers, it would be helpful.

标签 (1)
3 回复数

485 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi Sion,

Yes, of course. Kinetis MCU's gpio is grouped into several port. There are up to 32 gpio in each port. There are also some 32 bit wide register to control these gpio. Write to there 32bit register can read/write pins simultaneously. Please see the GPIO chapter in reference manual.

Regards,

Jing

485 次查看
sionp
Contributor II

Hope GPIOx_PDOR registers are the one you are referring to. Since the API's were not using this register I was not able to find. Also the manual has got these registers hidden towards the end of the document in memory mapping section.

0 项奖励

485 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi,

Yes, it is. And you can use GPIOx_PCOR and GPIOx_PSOR to make the work easier.

Regards,

Jing

0 项奖励