m52233demo

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

m52233demo

957 Views
sk7499
Contributor I
can some one assist will a line of code on how to get inputs prefebly digital  on the m52233demo board it doesnt matter about the port im kind of new to this controller im swithching from the hc11.
Labels (1)
0 Kudos
1 Reply

292 Views
PaoloRenzo
Contributor V

sk7499 wrote:
can some one assist will a line of code on how to get inputs prefebly digital on the m52233demo board it doesnt matter about the port im kind of new to this controller im swithching from the hc11.



Hi:

unsigned char dat;

/* set port AN as GPIO */
MCF_GPIO_PANPAR = 0x00; // 0 = pin assumes the GPIO function for that pin

// by default pin is configured as input

dat = MCF_GPIO_SETAN; //read entire port

Maybe this code could be useful

Good luck!!
0 Kudos