上一页 1 ··· 7 8 9 10 11
摘要: #include "DSP280x_Device.h"#include "DSP280x_Examples.h"char a=0xfe;void sci_init(void){InitSysCtrl();InitSciGpio();EALLOW;SciaRegs.SCICCR.bit.PARITYENA=0;SciaRegs.SCICCR.bit.STOPBITS=0;SciaRegs.SCICCR.bit.SCICHAR=7;SciaRegs.SCIHBAUD=0x01;SciaRegs.SCILBAUD=0x44;SciaRegs.SCICTL1.a 阅读全文
posted @ 2013-01-17 20:52 luxiaolai 阅读(320) 评论(0) 推荐(0) 编辑
摘要: #include "DSP280x_Device.h"#include "DSP280x_Examples.h"void delay(void){int i,j;for(i=0;i<2550;i++)for(j=0;j<100;j++);}//外部中断服务程序interrupt void xint1(void){PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;//清除中断标志位响应其它中断if(!GpioDataRegs.GPADAT.bit.GPIO26){delay();if(!GpioDataRegs.GP 阅读全文
posted @ 2013-01-16 21:23 luxiaolai 阅读(367) 评论(0) 推荐(0) 编辑
摘要: #include "DSP280x_Device.h"#include "DSP280x_Examples.h"//定时器中断报务程序interrupt void fuwu_timer0(void){GpioDataRegs.GPATOGGLE.all=0xffff;//将GPIO状态反转PieCtrlRegs.PIEACK.bit.ACK1=1;//清除中断位可响应其它中断}//定时器0初始化函数void init_timer0(void){InitSysCtrl();//初始化系统时钟看门狗等系统资源InitPieCtrl();//初始化系统中断向量 阅读全文
posted @ 2013-01-16 21:22 luxiaolai 阅读(338) 评论(0) 推荐(0) 编辑
摘要: module state(CLOCK,RESET,LED,KEY_UP);input CLOCK,RESET,KEY_UP;output reg [3:0] LED;parameter s1=2'b00,s2=2'b01,s3=2'b10,s4=2'b11;reg [1:0] current_state,next_state;reg t;parameter T1s=23'd2_000_00000;reg [22:0] cnt;always @ (posedge CLOCK or negedge RESET)if(!RESET)begincnt<=0 阅读全文
posted @ 2012-07-10 21:15 luxiaolai 阅读(414) 评论(0) 推荐(0) 编辑
摘要: /************************************** The Key Edge TestAuthor:luxiaolaiDate :2011-11-29***************************************/module test(LED,RESET,CLOCK,KEY_UP);input RESET,CLOCK,KEY_UP;output [3:0] LED;wire led_cn;test1 U1(.clk(CLOCK),.rst(RESET),.key(KEY_UP),.keyout(led_cn),);test3 U2(.clk(CLO 阅读全文
posted @ 2011-11-29 21:12 luxiaolai 阅读(351) 评论(0) 推荐(1) 编辑
摘要: module test(RESET,CLOCK,SEL,DIG,KEY_UP,KEY_DOWN);input RESET,CLOCK,KEY_UP,KEY_DOWN;output reg[5:0] SEL;output reg[7:0] DIG;parameter cnt=32'd2_000_0;reg[31:0] cnt1;reg[3:0] b;wire[3:0] t;always @ (posedge CLOCK or negedge RESET)beginif(!RESET)begincnt1<=0;b<=0;endelse if(cnt1==cnt)beginb&l 阅读全文
posted @ 2011-11-14 21:25 luxiaolai 阅读(358) 评论(0) 推荐(0) 编辑
摘要: module test(RESET,CLOCK,SEL,DIG,KEY_UP,KEY_DOWN);input RESET,CLOCK,KEY_UP,KEY_DOWN;output reg[5:0] SEL;output reg[7:0] DIG;parameter cnt=32'd2_000_0;reg[31:0] cnt1;reg b;wire t;always @ (posedge CLOCK or negedge RESET)beginif(!RESET)begincnt1<=0;b<=0;endelse if(cnt1==cnt)beginb<=~b;cnt1 阅读全文
posted @ 2011-11-14 19:56 luxiaolai 阅读(536) 评论(0) 推荐(0) 编辑
摘要: module test(KEY_UP,SEL,DIG,CLOCK,RESET);input KEY_UP,CLOCK,RESET;output [5:0] SEL;output reg [7:0] DIG;parameter cnt=23'd2_000_000;reg [22:0] cnt1;reg [31:0] count;reg t;wire b;always @ (posedge CLOCK or negedge RESET)beginif(!RESET)t<=1;else if(!KEY_UP)t<=0;else t<=1;endassign b=t;alwa 阅读全文
posted @ 2011-11-12 14:55 luxiaolai 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 学习Verilog必走的3个阶段 http://www.fpgaw.com/viewthread.php?tid=1209&fromuid=4862 阅读全文
posted @ 2011-11-10 18:31 luxiaolai 阅读(163) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11