n00b Question about AN Port, GPIO and reading 8 bit words

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

n00b Question about AN Port, GPIO and reading 8 bit words

跳至解决方案
2,077 次查看
jab
Contributor III

ok so i've been working with MCF52235EVB for some time now. i now want to build my own MCF52235 PCB to do some stuff. one of the things I need to do is read 16bit parallel words. so i thought i could use one port to read 8 bits MSB and another port to read 8 bits LSB.

 

i read through the reference manual and see that analog port (PAN[0:7]) and the interrupt port (PGP[0:7]) are two seven bit ports. so i can set these two ports to be GPIO and digital inputs and read in the words.

 

is this the right way to do this? any obvious mistakes?

标签 (1)
0 项奖励
回复
1 解答
995 次查看
scifi
Senior Contributor I

When you were saying "seven bit ports" you must have meant "eight-bit ports."

Yes, you can read a byte through one 8-bit port and the other byte through the other 8-bit port. You have to make sure the 16-bit word is stable while you are sampling it (the two 8-bit reads cannot be simultaneous.)

Otherwise, it's ok.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
996 次查看
scifi
Senior Contributor I

When you were saying "seven bit ports" you must have meant "eight-bit ports."

Yes, you can read a byte through one 8-bit port and the other byte through the other 8-bit port. You have to make sure the 16-bit word is stable while you are sampling it (the two 8-bit reads cannot be simultaneous.)

Otherwise, it's ok.

0 项奖励
回复
995 次查看
jab
Contributor III

eight bits yes, thanks :smileyhappy: .

0 项奖励
回复