原创 项目可能要出问题的梦

2006-9-11 08:50 3357 7 6 分类: 工程师职场

我的梦很有意思,没事也就记下来一些,也就当自己研究一下自我吧。


2006.9.5  我有在公司负责一个项目,公司已经投入二、三十万了。可是近来频频出现问题,反复修改和改模,自己都有些担心了,心存疑问时有做一梦:梦里在家等车要回公司,心想车还早着呢。可突然车来了,我却措手不急。车也不停就开走了,车是准点的,也会准点到站,根本就不管我,我飞奔着也赶不上。沮丧着说不去上班了。突然却是老总找我,找我谈一些事。我还在沮丧中,他却不管一直的说。我觉着那部车就是我的项目。结果会怎样,感觉是不好。要等以后项目结束才知道梦预示什么了。


2006.9.11昨晚做梦袖子,裤脚里全是蛆,恶心死了,拿了灭害灵来,一喷却喷出来的不是杀虫剂,还是蛆。周公说是有财,我自己看来可能是近来有点麻烦了。


真要是有什么 再来写了记下来,

PARTNER CONTENT

文章评论1条评论)

登录后参与讨论

用户1079511 2009-7-21 10:27

xiaoke26: 查询方式接收串口数据,故没用到中断!

用户148994 2009-7-16 21:39

这程序怎么都没有对中断进行初始化??

用户461316 2008-8-25 08:29

eliucheng,发的是什么,,

用户1001363 2008-4-15 11:19

re:[原创]STM32学习笔记之 串口通讯 我写的串口程序,但是串口没有数据发不出来,请你帮忙找下原因,加你QQ你也不回,这里留言 没法修改格式!你加我Q 18282241 谢谢了

用户1079511 2008-4-14 21:11

都是什么啊,格式那么乱看不懂!

用户1001363 2008-4-14 19:26

/* Includes ------------------------------------------------------------------*/ #include "stm32f10x_lib.h" /* Private typedef -----------------------------------------------------------*/ typedef enum { FAILED = 0, PASSED = !FAILED} TestStatus; /* Private define ------------------------------------------------------------*/ #define TxBufferSize (countof(TxBuffer)) /* Private macro -------------------------------------------------------------*/ #define countof(a) (sizeof(a) / sizeof(*(a))) /* Private variables ---------------------------------------------------------*/ USART_InitTypeDef USART_InitStructure; u8 TxBuffer[] = "BufferSendfromUSART2toPC"; u8 RxBuffer[TxBufferSize]; u8 TxCounter = 0, RxCounter = 0; TestStatus TransferStatus = FAILED; ErrorStatus HSEStartUpStatus; /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ GPIO_InitTypeDef GPIO_InitStructure; ErrorStatus HSEStartUpStatus; /* Private function prototypes -----------------------------------------------*/ void RCC_Configuration(void); void NVIC_Configuration(void); void Delay(vu32 nCount); /* Private functions ---------------------------------------------------------*/ /******************************************************************************* * Function Name : main * Description : Main program. * Input : None * Output : None * Return : None *******************************************************************************/ int main(void) { #ifdef DEBUG debug(); #endif /* Configure the system clocks */ RCC_Configuration(); /* NVIC Configuration */ NVIC_Configuration(); /* Enable GPIOC clock */ RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE); /* Configure PC.06, PC.07, PC.08 and PC.09 as Output push-pull */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_8; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_Init(GPIOB, &GPIO_InitStructure); USART_InitStructure.USART_BaudRate = 9600;//波特率9600 USART_InitStructure.USART_WordLength = USART_WordLength_8b;//8位数据 USART_InitStructure.USART_StopBits = USART_StopBits_1;//1个停止位 USART_InitStructure.USART_Parity = USART_Parity_No ; //无校验位 USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;//禁用RTSCTS硬件流控制 USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;//使能发送接收 USART_InitStructure.USART_Clock = USART_Clock_Disable; //串口时钟禁止 USART_InitStructure.USART_CPOL = USART_CPOL_Low; //时钟下降沿有效 USART_InitStructure.USART_CPHA = USART_CPHA_2Edge;//数据在第二个时钟沿捕捉 USART_InitStructure.USART_LastBit = USART_LastBit_Disable;//最后数据位的时钟脉冲不输出到SCLK引脚 USART_Init(USART2, &USART_InitStructure);//初始化串口2 USART_Cmd(USART2, ENABLE);//串口2使能 while (1) { /* Turn on led connected to PC.06 pin */ GPIO_SetBits(GPIOB, GPIO_Pin_5); /* Insert delay */ Delay(0xAFFFF); GPIO_ResetBits(GPIOB, GPIO_Pin_5); Delay(0xAFFFF); /* Turn on led connected to PC.07 and PC.08 pins */ GPIO_SetBits(GPIOB, GPIO_Pin_6 ); /* Insert delay */ Delay(0xAFFFF); GPIO_ResetBits(GPIOB, GPIO_Pin_6); Delay(0xAFFFF); GPIO_SetBits(GPIOB, GPIO_Pin_7); Delay(0xAFFFF); /* Turn off led connected to PC.06 pin */ GPIO_ResetBits(GPIOB, GPIO_Pin_7); /* Insert delay */ Delay(0xAFFFF); /* Turn on led connected to PC.09 pin */ GPIO_SetBits(GPIOB, GPIO_Pin_8); /* Turn off led connected to PC.07 and PC.08 pins */ // GPIO_ResetBits(GPIOB, GPIO_Pin_7 | GPIO_Pin_6); /* Insert delay */ Delay(0xAFFFF); /* Turn off led connected to PC.09 pin */ GPIO_ResetBits(GPIOB, GPIO_Pin_8); USART_SendData(USART2, TxBuffer[TxCounter++]); } } /******************************************************************************* * Function Name : RCC_Configuration * Description : Configures the different system clocks. * Input : None * Output : None * Return : None *******************************************************************************/ void RCC_Configuration(void) { /* RCC system reset(for debug purpose) */ RCC_DeInit(); /* Enable HSE */ RCC_HSEConfig(RCC_HSE_ON); /* Wait till HSE is ready */ HSEStartUpStatus = RCC_WaitForHSEStartUp(); if(HSEStartUpStatus == SUCCESS) { /* Enable Prefetch Buffer */ FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable); /* Flash 2 wait state */ FLASH_SetLatency(FLASH_Latency_2); /* HCLK = SYSCLK */ RCC_HCLKConfig(RCC_SYSCLK_Div1); /* PCLK2 = HCLK */ RCC_PCLK2Config(RCC_HCLK_Div1); /* PCLK1 = HCLK/2 */ RCC_PCLK1Config(RCC_HCLK_Div2); /* PLLCLK = 8MHz * 9 = 72 MHz */ RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9); /* Enable PLL */ RCC_PLLCmd(ENABLE); /* Wait till PLL is ready */ while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET) { } /* Select PLL as system clock source */ RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK); /* Wait till PLL is used as system clock source */ while(RCC_GetSYSCLKSource() != 0x08) { } RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2, ENABLE);//使能串口2时钟 } } /******************************************************************************* * Function Name : NVIC_Configuration * Description : Configures Vector Table base location. * Input : None * Output : None * Return : None *******************************************************************************/ void NVIC_Configuration(void) { #ifdef VECT_TAB_RAM /* Set the Vector Table base location at 0x20000000 */ NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0); #else /* VECT_TAB_FLASH */ /* Set the Vector Table base location at 0x08000000 */ NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0); #endif } /******************************************************************************* * Function Name : Delay * Description : Inserts a delay time. * Input : nCount: specifies the delay time length. * Output : None * Return : None *******************************************************************************/ void Delay(vu32 nCount) { for(; nCount != 0; nCount--); } #ifdef DEBUG /******************************************************************************* * Function Name : assert_failed * Description : Reports the name of the source file and the source line number * where the assert_param error has occurred. * Input : - file: pointer to the source file name * - line: assert_param error line source number * Output : None * Return : None *******************************************************************************/ void assert_failed(u8* file, u32 line) { /* User can add his own implementation to report the file name and line number, ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ /* Infinite loop */ while (1) { } } #endif /******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/

用户1053025 2006-9-11 09:31

yanglz,comfort,我昨晚做梦也不好,恐怕是因为周一焦虑症,呵呵。不要紧,梦都是反的。而且我常常认为,人生经历了,无论是梦过还是被乌鸦嘴说过,就算完成了这个步骤,现实中就不会再发生了。
相关推荐阅读
用户35345 2006-10-27 21:05
爸爸,我爱你
        爸爸,我爱你。        我相信你能听得见。        爸爸,你离开我们有一年多了,你是在全家一起度过去年的中秋才走的。        也许冥冥中自有安排,在你要离开我们的一个...
用户35345 2006-10-16 20:39
新奇的广告画
        很多人都有见过那种小贴纸吧,一种贴在开水杯上,一受热原本黑色的衣服就会变成透明的。虽说很无聊,不过,假如能找到一种随着温度而变色的材料,象变色龙那种,那可就爽了。        用随着...
用户35345 2006-10-16 20:26
异想天开:一种新的机箱---奔驰的芯
       现在的机箱设计都在搞特色化,我有一个构想,大家就当作异想天开吧:       将一匹奔驰的骏马的图案分解开来,然后将其做成镭射图案做在透明风扇的扇叶上,在扇叶的里面加入镭射灯,并设计一控...
用户35345 2006-10-16 20:08
水冷行业很快就需要一个标准
       水冷导热的效率和速度明显优于常规的风冷散热,水冷成为下一代散热技术的核心成为必然,       而水冷散热的发展,随着水泵微型化,长寿命的实现,防锈蚀,抗泄漏等技术的成熟,制造成本的不断...
用户35345 2006-10-13 23:48
搞技术的遇到这样的情况,怎么办?
       为了争取到客户,产品往往即要便宜又要可靠,        可是天又不是你的,你叫它不下雨就不下雨?哪有那么美的事。        我们公司有接到一个产品,单很大,但因为成本被压到没办法了...
用户35345 2006-09-30 11:17
一种AC、DC通用风扇专用转速测试仪
风扇的转速是最基本的测试项目,目前行内有不少测试转速的仪器和方案,可是没一种方案即简便又通用。一种是:通过测试电流波的波形,通过整形,放大,模数转换而来显示转速,好处是风扇接通电源就可以测试,而不需其...
我要评论
1
7
关闭 站长推荐上一条 /3 下一条