xiediaodiao

    1. 能给您的头文件加一下备注吗,看看每行是设置什么的,我们好做相应修改。
    2. MMA7455L求助 1/3618 传感器 2011-08-31
      int main(void) { //u8 x,y,z; #ifdef DEBUG   debug(); #endif   /* System Clocks Configuration**********************************************/   RCC_Configuration();      /* NVIC Configuration*******************************************************/   NVIC_Configuration();   /* USART Configuration*******************************************************/   USART_Configuration();   /* MMA7455 Configuration****************************************************/   MMA7455_Configuration();     /* Configure all unused GPIO port pins in Analog Input mode        (floating input        trigger OFF), this will reduce the power consumption and increase the device immunity against EMI/EMC *************************************************/   RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA |                                                  RCC_APB2Periph_GPIOB |                          RCC_APB2Periph_GPIOC |                                                  RCC_APB2Periph_GPIOD |                          RCC_APB2Periph_GPIOE |                                                  RCC_APB2Periph_GPIOF, ENABLE);           /*Enable the APB2 periph clock*/   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;   //GPIO_Init(GPIOA, &GPIO_InitStructure);   GPIO_Init(GPIOB, &GPIO_InitStructure);   GPIO_Init(GPIOC, &GPIO_InitStructure);   GPIO_Init(GPIOD, &GPIO_InitStructure);   GPIO_Init(GPIOE, &GPIO_InitStructure);   //GPIO_Init(GPIOF, &GPIO_InitStructure);   RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA |                                                  RCC_APB2Periph_GPIOB |                          RCC_APB2Periph_GPIOC |                                  RCC_APB2Periph_GPIOD |                          RCC_APB2Periph_GPIOE |                                                  RCC_APB2Periph_GPIOF, DISABLE);          /*Disable the APB2 periph clock*/      RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA |                                                    RCC_APB2Periph_GPIOF , ENABLE);   /*set PA6 as input */   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6;             GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;   GPIO_Init(GPIOA, &GPIO_InitStructure);      /*set PA5,PA7,PA8 as output*/   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5 | GPIO_Pin_7 | GPIO_Pin_8;                    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;   GPIO_Init(GPIOA, &GPIO_InitStructure);      /* Configure USART1 Tx (PA.09) as alternate function push-pull */   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;   GPIO_Init(GPIOA, &GPIO_InitStructure);       /* Configure USART1 Rx (PA.10) as input floating */   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;   GPIO_Init(GPIOA, &GPIO_InitStructure);      /*set PF6 as output*/   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6;                    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;   GPIO_Init(GPIOF, &GPIO_InitStructure);   /*for showing the result of successful uart configuration*/   printf("\r\n Welcome to www.PowerAVR.com \r\n");   printf("\r\n Please Input Character From Keyboard \r\n");                  /*Write the contrl command on the register,set the mode as measurement*/         Write_Reg(0x16,0x05);         Delay(0xff);         //Write_Reg(0x18,0x20); //         //Delay(0xff);         //Write_Reg(0x19,0x00);         //Delay(0xff);         //Write_Reg(0x1a,0x00);         //Delay(0xff);         /*get the 3-axis data from MMA7455L by Reading the register*/         while(1)         {                 x=Read_Reg(0x06);                 y=Read_Reg(0x07);                 z=Read_Reg(0x08);                 GPIO_ResetBits(GPIOF, GPIO_Pin_6);                 Delay(0xffffff);                 GPIO_SetBits(GPIOF, GPIO_Pin_6);                 Delay(0xffffff);                 printf("\n%x%x%x\n",x,y,z);         } }
    3. 求推荐型号和原因 6/3625 传感器 2011-07-15
      想知道比较或者优势在哪?谢谢
    4. 求推荐型号和原因 6/3625 传感器 2011-07-15
      想知道具体原因。优势在哪?第一次做很多不懂请版主多多帮忙,谢谢:congratulate:
    5. 看看隐藏

最近访客

< 1/1 >

统计信息

已有93人来访过

  • 芯积分:--
  • 好友:1
  • 主题:2
  • 回复:5

留言

你需要登录后才可以留言 登录 | 注册


现在还没有留言