芯片复制RX8025T和DS3231时钟芯片
芯片复制STM32单片机源程序如下:
- 芯片复制#include "public.h"
- 芯片复制#include "printf.h"
- 芯片复制#include "rtc.h"
- #include "systick.h"
- #include "gui.h"
- #include "led.h"
- #include "math.h"
- #define PI 3.1415926
- int xo=120,yo=200,zo=100,ro=100;//表心坐标z 指针长,圆大小
- void get_circle(int x,int y,int r,int col)
- {
- int xc=0;
- int yc,p;
- yc=r;
- p=3-(r<<1);
- while(xc <= yc)
- {
- GUI_Dot(x+xc,y+yc,col);
- GUI_Dot(x+xc,y-yc,col);
- GUI_Dot(x-xc,y+yc,col);
- GUI_Dot(x-xc,y-yc,col);
- GUI_Dot(x+yc,y+xc,col);
- GUI_Dot(x+yc,y-xc,col);
- GUI_Dot(x-yc,y+xc,col);
- GUI_Dot(x-yc,y-xc,col);
- if(p<0)
- {
- p += (xc++ << 2) + 6;
- }
- else
- p += ((xc++ - yc--)<<2) + 10;
- }
- }
- void draw_circle() //画圆
- {
- get_circle(xo,yo,ro,YELLOW);
- get_circle(xo,yo,(ro-1),YELLOW);
- get_circle(xo,yo,(ro-2),YELLOW);
- get_circle(xo,yo,(ro-3),YELLOW);
- get_circle(xo,yo,5,YELLOW);
- }
- void draw_dotline() //画格点
- {
- u8 i;
- u8 rome[][3]={"12","1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11" } ; //表盘数字
- int x1,y1,x2,y2,x3,y3;
-
- for(i=0;i<60;i++)
- {
- x1 = (int)(xo + (sin(i * PI / 30) * (ro-8)));
- y1 = (int)(ro - (cos(i * PI / 30) * (ro-8)));
-
- x2 = (int)(xo + (sin(i * PI / 30) * (ro-3)));
- y2 = (int)(ro - (cos(i * PI / 30) * (ro-3)));
-
- GUI_Line(x1,y1+ro,x2,y2+ro,RED);
-
- if(i%5==0)
- {
- x1 = (int)(xo + (sin(i * PI / 30) * (ro-15)));
- y1 = (int)(ro - (cos(i * PI / 30) * (ro-15)));
- x2 = (int)(xo + (sin(i * PI / 30) * (ro-3)));
- y2 = (int)(ro - (cos(i * PI / 30) * (ro-3)));
- GUI_Line(x1,y1+ro,x2,y2+ro,RED);
- x3 = (int)((xo-8) + (sin((i ) * PI / 30) * (ro-20)));
- y3 = (int)((ro-8) - (cos((i ) * PI / 30) * (ro-20)));
- GUI_Show12ASCII(x3,y3+ro,rome[i/5],YELLOW,BLACK);
- }
-
- }
-
- }

芯片解密