代码:
#include
#include
#include
#pragma config POSCMOD= XT
#pragma config OSCIOFNC= OFF
#pragma config FCKSM= CSDCMD
#pragma config FNOSC= FRCDIV
#pragma config IESO= ON
#pragma config WDTPS= PS32768
#pragma config FWPSA= PR128
#pragma config WINDIS= OFF
#pragma config FWDTEN= ON
#pragma config ICS= PGx2
#pragma config GWRP= OFF
#pragma config GCP= OFF
#pragma config JTAGEN= OFF
#define SHORT_DELAY 10000
#define LONG_DELAY 50000
char bitmap[30]={
0xff,0x89,0x89,0x89,0x00,0x00,
0xff,0x86,0x86,0x86,0x00,0x00,
0xff,0xC7,0xC7,0xC7,0x00,0x00,
0xff,0xC7,0xC7,0xC7,0x00,0x00,
0xFF,0xC0,0xC0,0xC0,0x00,0x00
};
void main(void)
{
int i;
TRISA=0XFF00;
T1CON=0X8030;
while(1)
{
for(i=0;i<30;i++)
{
PORTA=bitmap;
TMR1=0;
while(TMR10;
TMR1=0;
while(TMR1仿真效果图
文章评论(0条评论)
登录后参与讨论