Working RS232 controller running at 9600 Hz. Consist of Transmitter and Receiver Module. Tested in FPGA Spartan 3 Included files for testing at FPGA - Scan4digit .vhd - to display at 7 sgement display - D4to7 .vhd - Convert HEX Decimal to ASCII code.
標簽: Transmitter controller Receiver Working
上傳時間: 2013-12-27
上傳用戶:541657925
A Celsius-Fahrenheit-Kelvin -converter using NetBeans IDE.An application that converts between Celsius, Fahrenheit, and Kelvin degrees. For each unit, there is a text field showing the temperature, and a button that activates the conversion from that unit to the other units. Show 2 Decimal places.
標簽: Celsius-Fahrenheit-Kelvin application converter NetBeans
上傳時間: 2017-06-07
上傳用戶:三人用菜
#include <stdio.h> #include <stdlib.h> ///鏈式棧 typedef struct node { int data; struct node *next; }Node,*Linklist; Linklist Createlist() { Linklist p; Linklist h; int data1; scanf("%d",&data1); if(data1 != 0) { h = (Node *)malloc(sizeof(Node)); h->data = data1; h->next = NULL; } else if(data1 == 0) return NULL; scanf("%d",&data1); while(data1 != 0) { p = (Node *)malloc(sizeof(Node)); p -> data = data1; p -> next = h; h = p; scanf("%d",&data1); } return h; } void Outputlist(Node *head) { Linklist p; p = head; while(p != NULL ) { printf("%d ",p->data); p = p->next; } printf("\n"); } void Freelist(Node *head) { Node *p; Node *q = NULL; p = head; while(p != NULL) { q = p; p = p->next; free(q); } } int main() { Node *head; head = Createlist(); Outputlist(head); Freelist(head); return 0; } 2.順序棧 [cpp] view plain copy #include <iostream> #include <stdio.h> #include <stdlib.h> ///順序棧 #define MaxSize 100 using namespace std; typedef
上傳時間: 2018-05-09
上傳用戶:123456..
function [alpha,N,U]=youxianchafen2(r1,r2,up,under,num,deta) %[alpha,N,U]=youxianchafen2(a,r1,r2,up,under,num,deta) %該函數用有限差分法求解有兩種介質的正方形區域的二維拉普拉斯方程的數值解 %函數返回迭代因子、迭代次數以及迭代完成后所求區域內網格節點處的值 %a為正方形求解區域的邊長 %r1,r2分別表示兩種介質的電導率 %up,under分別為上下邊界值 %num表示將區域每邊的網格剖分個數 %deta為迭代過程中所允許的相對誤差限 n=num+1; %每邊節點數 U(n,n)=0; %節點處數值矩陣 N=0; %迭代次數初值 alpha=2/(1+sin(pi/num));%超松弛迭代因子 k=r1/r2; %兩介質電導率之比 U(1,1:n)=up; %求解區域上邊界第一類邊界條件 U(n,1:n)=under; %求解區域下邊界第一類邊界條件 U(2:num,1)=0;U(2:num,n)=0; for i=2:num U(i,2:num)=up-(up-under)/num*(i-1);%采用線性賦值對上下邊界之間的節點賦迭代初值 end G=1; while G>0 %迭代條件:不滿足相對誤差限要求的節點數目G不為零 Un=U; %完成第n次迭代后所有節點處的值 G=0; %每完成一次迭代將不滿足相對誤差限要求的節點數目歸零 for j=1:n for i=2:num U1=U(i,j); %第n次迭代時網格節點處的值 if j==1 %第n+1次迭代左邊界第二類邊界條件 U(i,j)=1/4*(2*U(i,j+1)+U(i-1,j)+U(i+1,j)); end if (j>1)&&(j U2=1/4*(U(i,j+1)+ U(i-1,j)+ U(i,j-1)+ U(i+1,j)); U(i,j)=U1+alpha*(U2-U1); %引入超松弛迭代因子后的網格節點處的值 end if i==n+1-j %第n+1次迭代兩介質分界面(與網格對角線重合)第二類邊界條件 U(i,j)=1/4*(2/(1+k)*(U(i,j+1)+U(i+1,j))+2*k/(1+k)*(U(i-1,j)+U(i,j-1))); end if j==n %第n+1次迭代右邊界第二類邊界條件 U(i,n)=1/4*(2*U(i,j-1)+U(i-1,j)+U(i+1,j)); end end end N=N+1 %顯示迭代次數 Un1=U; %完成第n+1次迭代后所有節點處的值 err=abs((Un1-Un)./Un1);%第n+1次迭代與第n次迭代所有節點值的相對誤差 err(1,1:n)=0; %上邊界節點相對誤差置零 err(n,1:n)=0; %下邊界節點相對誤差置零 G=sum(sum(err>deta))%顯示每次迭代后不滿足相對誤差限要求的節點數目G end
標簽: 有限差分
上傳時間: 2018-07-13
上傳用戶:Kemin
css美化有序列表,貼出部分css代碼 <ol > <li>先涂粉底再涂防曬</li> <li>先涂防曬再涂粉底</li> </ol> <!doctype html> <html> <head> <title>CSS3 ordered list styles - demo</title> <style> body{ margin: 40px auto; width: 500px; } /* -------------------------------------- */ ol{ counter-reset: li; list-style: none; *list-style: Decimal; font: 15px 'trebuchet MS', 'lucida sans'; padding: 0; margin-bottom: 4em; text-shadow: 0 1px 0 rgba(255,255,255,.5); } ol ol{ margin: 0 0 0 2em; } /* -------------------------------------- */
上傳時間: 2018-08-22
上傳用戶:53660542
Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005
標簽: 游戲
上傳時間: 2019-07-19
上傳用戶:cmpcmp