Electronic Components Datasheet Search
  English  ▼

X  

MAC7200 Datasheet(PDF) 927 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) 927 Page - Freescale Semiconductor, Inc

Back Button 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 MAC7200 Datasheet HTML 931Page - Freescale Semiconductor, Inc Next Button
Zoom Inzoom in Zoom Outzoom out
 927 / 976 page
background image
Initialization/Application Information
MAC7200 Microcontroller Family Reference Manual, Rev. 2
Freescale Semiconductor
849
be rather inefficient, and can not easily be programmed into a DMA. The next example illustrates how to
use the Pin Data Register (PINDATAxx) to overcome these two disadvantages.
NOTE
The PINDATAxx register is simply a "mirror" of the corresponding bit in the
PORTDATA register. Therefore writes to the PORTDATA register will
change the read value of a PINDATAxx register, and vice-versa.
Example 34-4. Disable the IIC and use its two pins as general purpose inputs
In File registers.h:
#define PIM_BASE_ADDRESS
0xFC0E8000/* Example only ! */
/* Following example assumes ’char’ is 8-bits and ’short’ is 16-bits */
volatile unsigned short *CONFIG_B0 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x0040);
volatile unsigned short *CONFIG_B1 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x0042);
:
:
volatile unsigned char *PINDATA_B0 = (volatile unsigned char *) (PIM_BASE_ADDRESS+0x0064);
volatile unsigned char *PINDATA_B1 = (volatile unsigned char *) (PIM_BASE_ADDRESS+0x0065);
In File main.c:
#include "registers.h"
:
:
/* Initialize Port B */
*CONFIG_B0 = 0x0000;/* GPIO Mode: Input, No interrupt */
*CONFIG_B1 = 0x0000;/* GPIO Mode: Input, No interrupt */
/* Sample Ports B0 & B1 */
unsigned char value_B0;
unsigned char value_B1;
value_B0 = *PINDATA_B0;/* Equivalent to (*PORTDATA_B & 0xF001) >> 0 */
value_B1 = *PINDATA_B1;/* Equivalent to (*PORTDATA_B & 0x0002) >> 1 */
Like the PORTDATA register, writes to the PINDATA registers for input pins have no effect (other than
to set the corresponding bit in the PORTDATA register). Therefore, it is possible to use a DMA to drive
multiple pins, even though the pins may not be contiguous (i.e.-Pins B0-B3 and B5-B8). Conversely, reads
from the PINDATA registers for output pins will simply return the value of the corresponding bit in the
PORTDATA register. The next section illustrates how to use a DMA with trigger capability to implement
periodic protocols (such as PWM) on the GPIO ports.
34.8.2.2.3
Using a DMA
As seen in the previous section, it is relatively easy to drive or sample multiple pins without the need for
mask or shift operations, using the PINDATAxx registers. This allows the use of a DMA to copy entire
tables of data from/to several pins at a time. In addition to standard DMA operations, the Port Integration
Module also supports the use of DMA triggers to perform periodic copies of data, allowing you to easily
implement protocols such as Pulse Width Modulation. For more details on how to setup and configure
DMA triggers, please refer to the section covering the DMA Channel Mux. In general, the procedure is as
follows:
1. Configure the Port Integration Module
2. Configure the DMA to copy tables of data from memory to the Port Integration Module



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