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

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

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

Jump to solution
2,075 Views
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?

Labels (1)
0 Kudos
Reply
1 Solution
993 Views
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.

View solution in original post

0 Kudos
Reply
2 Replies
994 Views
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 Kudos
Reply
993 Views
jab
Contributor III

eight bits yes, thanks :smileyhappy: .

0 Kudos
Reply