Electronic Components Datasheet Search
  English  ▼

X  

MAC7200 Datasheet(PDF) 926 Page - Freescale Semiconductor, Inc

Part # MAC7200
Description  MAC7200 Microcontroller Family Reference Manual
PDF  976 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  FREESCALE [Freescale Semiconductor, Inc]
Direct Link  http://www.freescale.com
Logo FREESCALE - Freescale Semiconductor, Inc

MAC7200 Datasheet(HTML) 926 Page - Freescale Semiconductor, Inc

Back Button MAC7200 Datasheet HTML 922Page - Freescale Semiconductor, Inc MAC7200 Datasheet HTML 923Page - Freescale Semiconductor, Inc MAC7200 Datasheet HTML 924Page - Freescale Semiconductor, Inc MAC7200 Datasheet HTML 925Page - Freescale Semiconductor, Inc MAC7200 Datasheet HTML 926Page - Freescale Semiconductor, Inc MAC7200 Datasheet HTML 927Page - Freescale Semiconductor, Inc MAC7200 Datasheet HTML 928Page - Freescale Semiconductor, Inc MAC7200 Datasheet HTML 929Page - Freescale Semiconductor, Inc MAC7200 Datasheet HTML 930Page - Freescale Semiconductor, Inc Next Button
Zoom Inzoom in Zoom Outzoom out
 926 / 976 page
background image
Initialization/Application Information
MAC7200 Microcontroller Family Reference Manual, Rev. 2
848
Freescale Semiconductor
volatile unsigned short *CONFIG_B6 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x004C);
volatile unsigned short *CONFIG_B7 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x004E);
volatile unsigned short *CONFIG_B8 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x0050);
volatile unsigned short *CONFIG_B9 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x0052);
volatile unsigned short *CONFIG_B10 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x0054);
volatile unsigned short *CONFIG_B11 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x0056);
volatile unsigned short *CONFIG_B12 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x0058);
volatile unsigned short *CONFIG_B13 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x005A);
volatile unsigned short *CONFIG_B14 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x005C);
volatile unsigned short *CONFIG_B15 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x005E);
volatile unsigned short *PORTDATA_B = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x0060);
In File main.c:
#include "registers.h"
:
:
/* Initialize Port B */
*CONFIG_B0 = 0x0080;/* Peripheral Mode */
*CONFIG_B1 = 0x0080;/* Peripheral Mode */
*CONFIG_B2 = 0x0040;/* GPIO Mode: Output */
*CONFIG_B3 = 0x0040;/* GPIO Mode: Output */
*CONFIG_B4 = 0x0040;/* GPIO Mode: Output */
*CONFIG_B5 = 0x0040;/* GPIO Mode: Output */
*CONFIG_B6 = 0x0040;/* GPIO Mode: Output */
*CONFIG_B7 = 0x0040;/* GPIO Mode: Output */
*CONFIG_B8 = 0x0040;/* GPIO Mode: Output */
*CONFIG_B9 = 0x0040;/* GPIO Mode: Output */
*CONFIG_B10 = 0x0040;/* GPIO Mode: Output */
*CONFIG_B11 = 0x0040;/* GPIO Mode: Output */
*CONFIG_B12 = 0x0000;/* GPIO Mode: Input, No interrupt */
*CONFIG_B13 = 0x0000;/* GPIO Mode: Input, No interrupt */
*CONFIG_B14 = 0x0000;/* GPIO Mode: Input, No interrupt */
*CONFIG_B15 = 0x0000;/* GPIO Mode: Input, No interrupt */
/* Technically speaking, the above four lines of code are
not necessary because the reset value of all CONFIG
registers is 0x0000. They are shown here for the purposes
of illustration. */
/* Sample the 4 input pins */
unsigned int value;
/* Mask out bits 0-11 and shift into bit positions 0-4.
It is necessary to mask bits 0-11 because a read from
PORTDATA on output ports will return the value of the
bit in the PORTDATA register */
value = (*PORTDATA_B & 0xF000) >> 11;
/* drive the 10 output pins */
/* Shift our desired value ’0x3FF’ into bit positions 2-11.
It is not necessary to mask out any other bits (i.e.-bits
0-1 and 12-15) because writes to pins in GPIO Input or
Peripheral Mode have no effect. However, these writes do
change the value in the PORTDATA register, and therefore
will be reflected in the next read of the PORTDATA register. */
*PORTDATA_B = 0x3FF < 2;
34.8.2.2.2
Driving/Sampling Individual Pins
As can be seen from the above example, when using the PORTDATA register, it becomes necessary to
perform mask and shift operations when sampling or driving data. For smaller numbers of pins, this can



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com