I am very new to the platform and taking a class with the Microcontroler listed above. Please forgive my simple questions.
I am looking to control the on-board LED's with a pushbutton wired into a solder less breadboard. I know I must enable the clock on a pin, set it as input or output, then write to it. Yet not sure how.
In some sample code I see:
|SIM_SCGC5 EQU 0x40048038||;SIM_SCGC5 address||The control for each ports Clock Gate|
I belive this controls the clocks for all pins...
|PORTB_PCR18 EQU 0x4004A000 + 4 * 18 ;PORTB_PCR18 address||LED Pin for RED|
And this should enable B18 to be used.
I want to enable other ports such as PORTB_PCR19 and PORTD_PCR1 but not sure where the address is in memory.
I am assuming PORTx_PCRn is the naming convention for the register at the location 0x4004A000 + 4*18 and the code EQU equated the name with the location.
Yet I can not figure out where to find the memory locations of the other pins. Any advice?
Where can I find this information?