当前位置:首页 > 单片机 > 单片机
[导读]1. S3C2440A has130multi-functional input/output port pins and there areeight portsas shown below:— Port A(GPA): 25-output port (output only)— Port B(GPB): 11-input/out port— Port C(GPC): 16-input/o

1. S3C2440A has130multi-functional input/output port pins and there areeight portsas shown below:

— Port A(GPA): 25-output port (output only)
— Port B(GPB): 11-input/out port
— Port C(GPC): 16-input/output port
— Port D(GPD): 16-input/output port
— Port E(GPE): 16-input/output port
— Port F(GPF): 8-input/output port
— Port G(GPG): 16-input/output port
— Port H(GPH): 9-input/output port
— Port J(GPJ): 13-input/output port

2. Port_Init:

//CAUTION:Follow the configuration order for setting the ports.
// 1) setting value(GPnDAT)

GPnDAT When the port is configured as output port, the pin state is the same as the corresponding bit.
When the port is configured asfunctional pin, theundefinedvalue will beread.

So rGPADAT undefined
// 2) setting control register (GPnCON)
// 3) configure pull-up resistor(GPnUP)

PORT A GROUP:

Register Address R/W DescriptionReset Value
GPACON 0x56000000 R/W Configures the pins of port A0xffffff
GPADAT 0x56000004R/W The data register for port A Undef.

//Ports : GPA22 GPA21 GPA20 GPA19 GPA18 GPA17 GPA16 GPA15 GPA14 GPA13 GPA12
//Signal : nFCE nRSTOUT nFRE nFWE ALE CLE nGCS5 nGCS4 nGCS3 nGCS2 nGCS1
//Binary : 1 1 1 , 1 11 1 , 1 1 1 1
//Ports : GPA11 GPA10 GPA9 GPA8 GPA7 GPA6 GPA5 GPA4GPA3 GPA2GPA1GPA0
//Signal : ADDR26 ADDR25 ADDR24 ADDR23 ADDR22 ADDR21 ADDR20 ADDR19 ADDR18 ADDR17 ADDR16 ADDR0
//Binary : 1 1 1 1 , 1 1 1 1 , 1 1 1 1
rGPACON = 0x7fffff; //GPA0~GPA22 =0:output; =1:fuctionul.
注: 该处GPA0~GPA22都为1,选择第二组功能:
ADDR0~ADDR26:ADDR[26:0] (Address Bus) outputs the memory address of the correspondingbank .
nGCS[7:0] :(General Chip Select) are activated when the address of a memory is within the address region of each bank. The number of access cycles and the bank size can be programmed.
nFCE : Nand flash chip enable
nFRE :Nand flash read enable
nFWE:Nand flash write enable
CLE : Command latch enable ALE : Address latch enable nRSTOUT : For external device reset control (nRSTOUT = nRESET & nWDTRST &SW_RESET)

PORT B GROUP
//Ports : GPB10GPB9 GPB8 GPB7 GPB6GPB5 GPB4 GPB3 GPB2GPB1 GPB0
//Signal :nXDREQ0 nXDACK0 nXDREQ1 nXDACK1 nXBREQ nXBACK TCLK0 TOUT3 TOUT2 TOUT1 TOUT0
//Setting: INPUT OUTPUT INPUT OUTPUT INPUT OUTPUT OUTPUTOUTPUT OUTPUT OUTPUT OUTPUT
//Binary : 00 , 00 01 , 01 01 , 01 01 , 01 01 , 00 00
//rGPBCON = 0x000150;(youlong)
rGPBCON = 0x015550; //GPB0~GPB10:=00:INPUT=01:OUTPUT=10:fuctionul.
rGPBUP = 0x7ff; // The pull up function is disabled GPB[10:0] (0:enable 1:disable). 上拉全关
注: PB0:TOUT0 is a PWM output.(板上接着蜂鸣器)
PB1:
PB2:L3MODE接到音频IC UDA1341第13脚
PB3:L3DATA接到音频IC UDA1341第15脚
PB4:L3CLOCK 接到音频IC UDA1341第14脚
PB5~PB8:LED1~LED4
PB9:
PB10:

PORT C GROUP

//Ports: GPC15 GPC14 GPC13 GPC12 GPC11 GPC10 GPC9 GPC8
//Signal :VD7VD6VD5 VD4VD3VD2VD1VD0
//Binary : 10 10 , 10 10 , 10 10 , 10 01 ,

//Ports: GPC7 GPC6 GPC5 GPC4 GPC3 GPC2 GPC1 GPC0
//Signal : LCDVF2 LCDVF1 LCDVF0 VM VFRAME VLINE VCLK LEND
//Binary : 01 01 , 01 10 , 10 10 , 10 10
rGPCCON = 0xaaa956aa; //00=INPUT 01=OUTPUT 10=fuctionul
rGPCUP = 0xffff; // The pull up function is disabled GPC[15:0]
注: 整个PC口都用在LCD控制上

本站声明: 本文章由作者或相关机构授权发布,目的在于传递更多信息,并不代表本站赞同其观点,本站亦不保证或承诺内容真实性等。需要转载请联系该专栏作者,如若文章内容侵犯您的权益,请及时联系本站删除。
换一批
延伸阅读

摘要:介绍了电缆托架的定义、材质及结构参数,明确了托架应用场合及型式。结合海洋石油环境特点和平台总体布置方案,总结了托架规划的注意事项。在规划方案的基础上,细化了托架设计需参考的相关文件和图纸,详细介绍了托架主通路和分支...

关键字: 型式选择 注意事项 设计思路

摘要:从勘测工作、架线施工、杆塔施工方面,介绍了提高110kV输配电线路施工质量的措施,提出了在施工过程中需要注意的事项,以保障施工人员的人身安全及输配电线路的稳定运行。

关键字: 110kV输配电线路 施工质量 注意事项

摘要:油棕榈树主要种植在马来西亚、印度尼西亚和非洲,并通常在种植园内建立相应的油棕榈厂。随着马来西亚政府对粉尘排放要求的提高,原锅炉尾部配置的多管式旋风除尘器已经不能满足排放要求。据此介绍了油棕榈厂的燃料、飞灰特性和可供...

关键字: 飞灰 电除尘器 注意事项

为增进大家对滤波器的认识,本文将对滤波器的主要分类,以及滤波器的使用注意事项予以介绍。

关键字: 滤波器 指数 注意事项

常看见初学者要求使用_at_,这是一种谬误,把C当作ASM看待了。在C中变量的定位是编译器的事情,初学者只要定义变量和变量的作 用域,编译器就把一个固定地址给这个变量。

关键字: C51 单片机 误区 注意事项

在设计PCB布局图时,必须“ (1) 防止负阻减少”、“ (2) 防止EMI问题”。

关键字: 晶体谐振器 注意事项 PCB

扫频仪将是下述内容的主要介绍对象,通过这篇文章,小编希望大家可以对扫频仪的相关情况以及信息有所认识和了解。

关键字: 扫频仪 主要参数 注意事项

什么是UPS电源?它有什么作用?规范的UPS未加外接电池前,在它的输出功率与负载耗电功率彻底匹配(即全负载)的状况下,一般从市电接连时算起可供电约6-十分钟(详细数值每个类型的UPS阐明书上都有记载)。假定以负载耗电功率...

关键字: 电源 ups 注意事项

如今的USB Type-C线缆允许消费者在功率高达100W的情况下为电池供电的便携式产品充电。

关键字: 热保护 注意事项 USB

  本文根据网络视频采集的需要,将网络传输与视频采集相结合,设计了以S3C2440为核心的USB摄像头视频采集和嵌入式Linux系统下的视频服务器,从而实现了远程网络视频信息采集。   

关键字: s3c2440 视频采集 usb摄像头
关闭
关闭