亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? demo2nd.asm

?? 八核心MCU 之FPPA 80Cxx 原廠範例程序
?? ASM
?? 第 1 頁 / 共 4 頁
字號:
	goto	LEDPWM_CheckLoop;	
	set0	pd.7;		// debug
	goto	LEDPWM_BeginLoop;	
	goto	fpp0MainLoop;	//	goto Motor Begin;
	
	//*************************************************************
	//------ End of Processor-0 Program routine  ------------------
	//*************************************************************
	//*************************************************************
	//------ Processor-1 Program routine  ------------------
	//*************************************************************
	//	Processor 1 Demo is handle the receiver from Infra-Red module 
	//-- This IR Command will dominate this demo kit ! 
	//--- and debug this IR Code to UART
	//---- Processor 1 Running in 500KHz ----
fpp1boot:
	// SP Setting for Processor 1
	mov	a, 0xD8 ;
	mov	sp, a ;
	//	
	// enable another Processors
	mov		a, 0x07;
	mov		fppen, a;		// enable processor 2
fpp1MainLoop:
//---
IR_ReceiverLoop:
	//--- Phase 0, lock in High, wait for going low ---
	//--				
	//--- Phase 1, Identify to Header ---
	//--- Panasonic header is 
	set1	pd.4; //debug	
	// IR Low !!	
IR_WaitIO2Low:	
	wait1	IR_rxIO;		// make sure IO is high first !!
	wait0	IR_rxIO;		// Wait the IR IO low, Header Low phase
	delay	0xC0;			// delay some duration for debounce the Input, 
							// this Duration should wide more normal Data !!
	t0sn	IR_rxIO;		// Wait the IR IO low
	goto	IR_WaitIO2Low;	// Noise maybe !!
	// -- IR is Low really!!
	set0	pd.4; //debug		
IR_PassID_High:	
	wait1	IR_rxIO;			// Wait the IR IO High, pass the ID, Header High phase 
//	set1	pb.3;
	mov		a, 0x08;		// 
	mov		IRSerialBit, a;		// 8 bit serial data in
	mov		a, 0x20;
	mov		lb@RAMPtr, a;	
	//---------------
IR_DataSerialLow:
	wait0	IR_rxIO;			// Wait the IR IO low, then go next phase wait high and calculate High duty
	// IR is low !
IR_DataSerialHigh:			// Next phase !!
	// wait high for calculate the Duty --
	wait1	IR_rxIO;			// Wait the IR IO High!!
	//--- Monitor the High Duty -- Here ---
	// -- IR data is High now !!
	clear	IRHighDuty;	
IR_PollingHighDuty:
	t1sn	IR_rxIO;			// calcultae High duty until IR Data is low
	goto	IRFromHigh2Low;				
	nop;	// increament the counter length, avoid overflow persistently		
	nop;	// increament the counter length, avoid overflow persistently		
	izsn	IRHighDuty;
	goto 	IR_PollingHighDuty;	
	//---- Time-Out, Error Correction --
	goto	IR_ReadDataTimeOutError;
	//---pd.0 is low now, here ---
IRFromHigh2Low:
	mov		a, IRHighDuty;
	sub		a, 0x40;	
	t0sn	flag.1	;		// data is 1 or 0 ?	
	goto	IR_ReadSerialDataHighBit;
	set1	flag.1	;	// set Flag.c = 1
	nop
	goto	IR_ReadSerialnextBit;
IR_ReadSerialDataHighBit:	
	nop
	set0	flag.1	;	// set Flag.c = 0
IR_ReadSerialnextBit:	
	idxm	a, RAMPtr;
	src		a;
	idxm	RAMPtr, a;
	dzsn	IRSerialBit;	
	goto	IR_DataSerialHigh;	
	//--
//	tog	pb.3;
	inc		lb@RAMPtr;
	mov		a, lb@RAMPtr;
//	mov	pc, a;
	ceqsn	a, 0x26 ;
	goto	IR_NextBytesLoop ;
	goto	IR_ReadDataSuccessEnd;
IR_NextBytesLoop:	
//	tog	pb.3;			//debug
	mov		a, 0x08;		// 
	mov		IRSerialBit, a;		// 8 bit serial data in	
	goto	IR_DataSerialHigh;
	
IR_ReadDataSuccessEnd:	
//---
//======== IR Command Code parser and decode command ===
//---	
	mov		a, IRData_Code;
	//---- Command #1 ?!
	ceqsn	a, 0x05;			// KINYO RC-1220
	goto	IRParseCommandCode1;
	//-- IR Code = 0x14, Motor Play command
	//==== if Motor is running now, then pause motor 
	//------  and reset speed to the default setting
	t1sn	MotorCtrl.0;	// motor is running  ?!
	goto 	IRMotorCommandParser0;
	//--- Motor Pause ---	
	clear	MotorSpeed;		// reset Motor Speed, default speed;
	set0	MotorCtrl.0;	// inhitbit Motor
	mov		a, pa;			// release the motor phase 
	and		a, 0x0f;
	mov		pa, a;
	goto 	IRCommandParserEnd;	// end of IR Command Parser
IRMotorCommandParser0:	
	//--- Motor startup ---
	set1	MotorCtrl.0;	// Enable Motor
	goto 	IRCommandParserEnd;	// end of IR Command Parser
IRParseCommandCode1:
	//---- Command #2 ?!
	ceqsn	a, 0x34;		// // KINYO RC-1220
	goto	IRParseCommandCode2;
	//-- IR Code = 0x05, Motor Speed Up command
	t0sn	MotorSpeed.7;
	goto 	IRCommandParserEnd;	// limited Speed, invalid Command
	set1	flag.1	;	// set Flag.c = 1
	mov		a, MotorSpeed;
	slc		a;
	mov		MotorSpeed, a;
	goto 	IRCommandParserEnd;	// end of IR Command Parser
IRParseCommandCode2:
	//---- Command #3 ?!
	ceqsn	a, 0x35;		// // KINYO RC-1220
	goto	IRParseCommandCode3;
	//-- IR Code = 0x02, Motor Speed Down command
	t1sn	MotorSpeed.0;
	goto 	IRCommandParserEnd;	// limited Speed, invalid Command
	set0	flag.1	;	// set Flag.c = 0	
	mov		a, MotorSpeed;
	src		a;
	mov		MotorSpeed, a;	
IRParseCommandCode3:
	//---- Command #4 ?!
	ceqsn	a, 0x32;		// // KINYO RC-1220
	goto	IRSMotorCommandCode0;
	//-- IR Code = 0x0c, Music On/Off ---
	t1sn	MusicCtrl.0;	// Melody is playing  ?!
	goto 	IRMusicCommandParser0;
	//--- Melody Pause ---	
	set0	MusicCtrl.0;	// inhitbit Music
	mov		a, 0xFF;
	mov		MusicFr, a;	// invalid Frequency 
	set0	fppen.6 ;	// Disable Processor.5
	set0	BuzzerIO;	
	goto 	IRCommandParserEnd;	// end of IR Command Parser
IRMusicCommandParser0:	
	set1	MusicCtrl.0;	// enable Music
	goto 	IRCommandParserEnd;	// end of IR Command Parser
IRSMotorCommandCode0:	
	//---- Servo Motor Command  ?!
	ceqsn	a, 0x21;		// // KINYO RC-1220
	goto	IRSMotorCommandCode1;
	mov		a, PWMSet;
	ceqsn	a, 0x78;	// PWM Maxinum ?
	goto	ServoPWMInc;
	goto 	IRCommandParserEnd;	// No Active, end of IR Command Parser
ServoPWMInc:	
	mov		a, 0x0A;
	add		a, PWMSet;
	mov		PWMSet, a;
	goto 	IRCommandParserEnd;	// No Active, end of IR Command Parser
IRSMotorCommandCode1:
	ceqsn	a, 0x20;		// // KINYO RC-1220
	goto	IRSMotorCommandCode2;
	mov		a, PWMSet;
	ceqsn	a, 0x00;	// PWM Mininum ?
	goto	ServoPWMDec;
	goto 	IRCommandParserEnd;	// No Active, end of IR Command Parser
ServoPWMDec:	
	mov		a, PWMSet;
	sub		a, 0x0A;
	mov		PWMSet, a;
	goto 	IRCommandParserEnd;	// No Active, end of IR Command Parser
IRSMotorCommandCode2:
	ceqsn	a, 0x47;		// // KINYO RC-1220
	goto	IRSMotorCommandCode3;
	mov		a, 0x78;
	mov		PWMSet, a;
	goto 	IRCommandParserEnd;	// No Active, end of IR Command Parser
IRSMotorCommandCode3:
	ceqsn	a, 0x46;		// // KINYO RC-1220
//	goto	IRSMotorCommandCode3;
	goto 	IRCommandParserEnd;	// No Active, end of IR Command Parser
	mov		a, 0x00;
	mov		PWMSet, a;
//	goto 	IRCommandParserEnd;	// No Active, end of IR Command Parser
///============== For Debug using the UART ===========
IRCommandParserEnd:
	//--- Tx out the UART(RS232) to Host PC---
	//------ Reset FIFO Buffer pointer
	mov		a, 0x20;			// 
	mov		lb@RAMPtr, a;	// reset the FIFO Pointer	
IR_ReceiveUARTOut:				// UART Rx FIFO to Host PC
	idxm	a, RAMPtr;
	call	Tx0putc_hex;
	mov		a, 0x20;			// blank
	mov		Tx0Buf, a;
	call	Tx0putc;
	inc		lb@RAMPtr;
	mov		a, lb@RAMPtr;
	ceqsn	a, 0x26;		// End of Slave Rx
	goto	IR_ReceiveUARTOut;

	call	Tx0Printf_LFCR;		// 
IR_ReadDataTimeOutError:
	call	IR_DelaySometime;
//====== End of Debug for UART ===========================
	set1	pd.4; //debug	
	goto	IR_ReceiverLoop;		
	goto	fpp1MainLoop;	//	goto Motor Begin;
	//--

//========== start of MCU2 program =========//
	//*************************************************************
	//------ Processor-2 Program routine  ------------------
	//*************************************************************
	//	Processor Demo is handle the LCM Display Module 
	//  and Demonstration a look alike Stopwatch!! 
	//---- Processor 2 Running in 250KHz ----
fpp2boot:
	// SP Setting for Processor 2
	mov	a, 0xE0 ;
	mov	sp, a ;
	//	
	//---
	set0	LCMen;
	set0	LCMrw;
	set0	LCMrs;
	//--
	set0	LCMd4;
	set0	LCMd5;
	set0	LCMd6;
	set0	LCMd7;
fpp2MainLoop:	
InitialLCMLOOP:	
	//--
	//---Initial LCM ---
	//--
	set0	LCMen;		// clear En
	delay	0x80;
	delay	0x40;
	//-- write 0x30 for High Nibble --
	set1	LCMd4;
	set1	LCMd5;
	call	LCM_EnTrigger;
	delay	0xff;		// delay more than 4.1 ms
	delay	0xff;	
	delay	0x40;
	//-- write 0x30 for High Nibble --
	set1	LCMd4;
	set1	LCMd5;
	call	LCM_EnTrigger;
	delay	0xC0;		// delay more than 100us	
	delay	0x40;
	//-- write 0x30 for High Nibble --
	set1	LCMd4;
	set1	LCMd5;
	call	LCM_EnTrigger;
	delay	0x80;		
	delay	0x40;
	//-- write 0x20 for High Nibble -- // 4-Bit Data Mode
	set0	LCMd4;
	set1	LCMd5;
	call	LCM_EnTrigger;
	//---
	mov		a, 0x28;	// two Row display module and 5x7 segments
	call	LCM_WriteCommandData;	
	delay	0xC0;		
	delay	0x40;
	mov		a, 0x0C;	// Display On, Cursor Off , and No blinking
	call	LCM_WriteCommandData;	
	delay	0xA0;		
	delay	0x40;
	mov		a, 0x06;	// Entry Mode 
	call	LCM_WriteCommandData;		
	delay	0xA0;		
	delay	0x40;
	///----------
	///------End of Initial LCM ------
	///----------
	mov		a, 0x01;	// Clear Display
	call	LCM_WriteCommandData;		
	delay	0x60;		
	delay	0x40;
	mov		a, 0x02;	// Cursor go Home 
	call	LCM_WriteCommandData;		
	delay	0xff;		
	delay	0x40;
	//	
	mov		a, 0x80;			// Cursor move to First Row
	call	LCM_WriteCommandData;		
	delay	0xA0;	
	delay	0x40;
	//-- Initialize the display : Show LEGO and Display Form ----
	//--
LCM_Initialize:	
	//--- Row # 1
	mov		a, la@LCMLOGOTab ;		// ASCII String table 
	mov		lb@LCMStrPt, a ;
	mov		a, ha@LCMLOGOTab ;
	mov		hb@LCMStrPt, a ;
	clear	FirstRowPos;	
	mov		a, 0x80;			// Cursor move to First Row
	call	LCM_WriteCommandData;		
	delay	0xB0;
	delay	0x60;
LCMShowLogoString:	
	set1	LCMrs;		// RS high
//	set1	pb.2;		// RS high, 
	ldtabl  LCMStrPt ;
	call	LCM_WriteCommandData;		
//	set0	pb.2;		// RS low
	set0	LCMrs;		// RS low
	inc		FirstRowPos;
	mov		a, FirstRowPos;
	ceqsn	a, 0x0F;
	goto	LCMShowFisrtRowNext;
	goto	LCMShowFirstRowExit;	
LCMShowFisrtRowNext:	
	inc		lb@LCMStrPt;
	ldtabl  LCMStrPt ;
	ceqsn   a, 0 ;
	goto	LCMShowLogoString ;	
LCMShowFirstRowExit:	
	//--- initial Clock Parameters
	clear	u10Sec;
	clear	u100Sec;
	clear	s1Sec;
	clear	s10Sec;
	clear	m1Min;
	clear	m10Min;
	clear	h1Hour;
	clear	h10Hour;
	//--- Row # 2
	mov		a, la@ClockTab ;		// ASCII String table 
	mov		lb@LCMStrPt, a ;
	mov		a, ha@ClockTab ;
	mov		hb@LCMStrPt, a ;
	mov		a, 0xc0;	// Second Row
	call	LCM_WriteCommandData;		
	delay	0xB0;
	delay	0x60;
LCMShowClockString:	
//	set1	pb.2;		// RS high, 
	set1	LCMrs;		// RS high
	ldtabl  LCMStrPt ;
	call	LCM_WriteCommandData;		
//	set0	pb.2;		// RS low
	set0	LCMrs;		// RS low
	
	inc		lb@LCMStrPt;
	ldtabl  LCMStrPt ;
	ceqsn   a, 0 ;
	goto	LCMShowClockString ;	
	//--- Re-initial and Set Next Rolling pointer
//	mov		a, la@LCMLOGOTab ;		// ASCII String table 
//	mov		lb@LCMStrPt, a ;
//	add		a, 0x01;
//	mov		Nextpoint, a;
//	mov		a, ha@LCMLOGOTab ;
//	mov		hb@LCMStrPt, a ;	
	// enable another Processors
	mov		a, 0x0F;
	mov		fppen, a;		// enable processor 3
	//--	
	//-- Delay in a while ---
	mov     a, 0xF0 ;
    mov     ClockDelayT0, a ;
InitialClockDelayLoop:
    delay   0xF0 ;
    delay   0xF0 ;
    delay   0xF0 ;
    dzsn    ClockDelayT0 ;
    goto    InitialClockDelayLoop ;
	
//	goto	$;
//	goto	fpp2MainLoop;	//	goto Motor Begin;
ClockDemoLoop:
	//---- 1/100 Sec
	//---- This delay is not based on 1 Sec !!
	///--  This just demonstrate a real running timer instead of real clock!!
	//--
.ifdef 0
//	mov		a, u100Sec ;
	mov		a, s1Sec;
	ceqsn	a, 0x00;
	goto	LCMShowLogoRollingStringExit;

	clear	FirstRowPos;	
	//-- Backup the next pointer
	mov		a, lb@LCMStrPt;
	add		a, 0x01;
	mov		Nextpoint, a;
	ldtabl  LCMStrPt ;
	ceqsn   a, 0x00 ;
	goto	SetNextPointerExit;	
	//--- Reset Table Pointer
//	mov		a, la@ClockTab ;		// ASCII String table 
//	mov		a, la@LCMLOGOTab ;	
	mov		a, la@LCMLOGOTab ;	
	mov		Nextpoint, a;
SetNextPointerExit:	
	ldtabl  LCMStrPt ;	
	mov		a, 0x80;			// Cursor move to First Row
	call	LCM_WriteCommandData;		
	delay	0xB0;
	delay	0x60;
LCMShowLogoRollingString:	
	set1	LCMrs;		// RS high
	ldtabl  LCMStrPt ;
	call	LCM_WriteCommandData;		
	set0	LCMrs;		// RS low
	//-- End of Row
	inc		FirstRowPos;
	mov		a, FirstRowPos;
	ceqsn	a, 0x0F;
	goto	LCMShowRollingNext;
	//-- Reset Table pointer to Next character
	mov		a, Nextpoint;
	mov		lb@LCMStrPt, a ;	
	goto	LCMShowLogoRollingStringExit;
LCMShowRollingNext:	
	inc		lb@LCMStrPt;
	ldtabl  LCMStrPt ;
	ceqsn   a, 0x00 ;
	goto	LCMShowLogoRollingString ;	
	//--- Reset Table Pointer
//	mov		a, la@ClockTab ;		// ASCII String table 
	mov		a, la@LCMLOGOTab ;	
	mov		lb@LCMStrPt, a ;
	ldtabl  LCMStrPt ;
	goto	LCMShowLogoRollingString ;	
LCMShowLogoRollingStringExit:	
	clear	FirstRowPos;	
.endif	
///--	
	//-- Delay in a while ---

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产99精品在线观看| 久久久久99精品一区| 久久精子c满五个校花| 亚洲美女屁股眼交| 国产一区二区日韩精品| 欧美日韩精品一区二区三区四区 | 国产欧美一区二区精品性| 亚洲国产综合91精品麻豆| 国产在线观看一区二区| 欧美日韩电影在线播放| 国产精品美女久久久久久2018| 日韩av电影天堂| 成人性生交大片免费| 日韩久久久久久| 亚洲成人午夜电影| 97se亚洲国产综合自在线观| 久久蜜臀中文字幕| 欧美96一区二区免费视频| 欧美性一区二区| 日韩毛片精品高清免费| 粉嫩av一区二区三区粉嫩| 日韩欧美的一区| 日韩精品国产精品| 欧美三级电影在线观看| 日韩理论片在线| 成人aa视频在线观看| 国产嫩草影院久久久久| 99re这里只有精品首页| 久久精品在这里| 国产精品一区一区| 久久久欧美精品sm网站| 国产精品久久久爽爽爽麻豆色哟哟| 久久成人免费网| 精品女同一区二区| 国内精品不卡在线| 欧美精品一区二区蜜臀亚洲| 免费看精品久久片| 欧美成人video| 国产在线精品免费av| 久久久久久99久久久精品网站| 久久成人久久爱| 久久人人97超碰com| 久久97超碰色| 国产欧美日韩视频一区二区 | 精品国产一区二区在线观看| 国内精品免费**视频| 日本一区二区三区dvd视频在线| 国产精品一区二区在线观看不卡| 国产亚洲制服色| 成人99免费视频| 一区二区三区色| 欧美精品乱码久久久久久按摩| 日韩精品一二三四| 欧美哺乳videos| 高清不卡一二三区| 有码一区二区三区| 日韩一区和二区| 国产精品一区一区三区| 亚洲人成精品久久久久久| 欧美日韩一区在线| 黄色资源网久久资源365| 欧美激情中文字幕| 欧美三级日韩在线| 狠狠色狠狠色综合系列| 国产精品欧美经典| 91精品国产欧美一区二区18| 国产一区二区伦理| 亚洲激情图片小说视频| 欧美一二三区精品| 99国产精品久久| 免费欧美高清视频| 国产精品国产三级国产aⅴ中文 | 欧美精品黑人性xxxx| 国产一区二区三区精品欧美日韩一区二区三区 | 成人一级视频在线观看| 一区二区视频免费在线观看| 日韩女优av电影| 96av麻豆蜜桃一区二区| 蜜臀久久久久久久| 国产精品黄色在线观看| 日韩欧美高清dvd碟片| 91丨porny丨中文| 国产精品资源网站| 亚洲3atv精品一区二区三区| 国产精品污www在线观看| 在线综合视频播放| 97se亚洲国产综合自在线| 奇米影视在线99精品| 亚洲天堂网中文字| 国产蜜臀97一区二区三区 | 日本中文字幕不卡| 亚洲欧美在线视频| 久久久精品国产免大香伊| 在线电影院国产精品| 91麻豆文化传媒在线观看| 国精产品一区一区三区mba视频| 亚洲成a天堂v人片| 最新国产精品久久精品| 国产亚洲一区二区三区四区 | 日韩国产欧美三级| 亚洲免费观看高清在线观看| 中文字幕精品—区二区四季| 日韩精品一区二区在线| 在线电影国产精品| 欧美网站一区二区| 色先锋久久av资源部| www.久久精品| 国产999精品久久久久久绿帽| 美国欧美日韩国产在线播放| 日韩不卡一区二区三区| 亚洲超丰满肉感bbw| 一级特黄大欧美久久久| 亚洲激情中文1区| 亚洲欧美日韩电影| 亚洲精品国产a| 亚洲欧美另类久久久精品 | 亚洲高清久久久| 亚洲综合色区另类av| 亚洲一区二区三区美女| 亚洲大片一区二区三区| 午夜精品福利在线| 首页欧美精品中文字幕| 青椒成人免费视频| 激情综合亚洲精品| 国产乱理伦片在线观看夜一区| 国产一区二区三区香蕉| 成人a免费在线看| 色婷婷av一区二区三区大白胸| 99久久国产免费看| 欧美性xxxxxx少妇| 欧美剧情片在线观看| 日韩欧美国产综合| 久久精品日产第一区二区三区高清版 | 91精品国产入口在线| 欧美成人综合网站| 国产精品视频一二三| 亚洲裸体在线观看| 亚洲一区二区在线视频| 免费黄网站欧美| 成人免费毛片片v| 色噜噜狠狠成人中文综合| 欧美日韩和欧美的一区二区| 日韩一区二区视频在线观看| 久久先锋资源网| 日韩美女久久久| 蜜桃视频第一区免费观看| 国产一区二区精品久久| 91浏览器在线视频| 日韩欧美一区在线观看| 国产丝袜美腿一区二区三区| 一区二区三区四区乱视频| 日韩不卡手机在线v区| 岛国av在线一区| 欧美日韩三级一区| 国产欧美日韩麻豆91| 无码av免费一区二区三区试看 | 亚洲国产精品自拍| 韩国女主播一区二区三区| av色综合久久天堂av综合| 欧美精品日韩精品| 国产欧美视频一区二区三区| 亚洲国产一区二区视频| 国产精品伊人色| 777精品伊人久久久久大香线蕉| 欧美国产精品专区| 免费人成精品欧美精品| 色综合中文字幕国产 | 中文字幕精品三区| 日韩电影在线免费| av在线不卡免费看| 精品国产成人在线影院| 亚洲综合在线免费观看| 国产高清精品久久久久| 欧美二区三区的天堂| 亚洲精品少妇30p| 国产成都精品91一区二区三| 欧美一区二区三区啪啪| 亚洲精品国产一区二区精华液| 国产美女av一区二区三区| 欧美一区二区三区小说| 亚洲乱码中文字幕综合| 成人高清免费观看| 久久色在线观看| 视频在线观看一区二区三区| 在线观看免费视频综合| 亚洲图片激情小说| 成人精品视频一区二区三区尤物| 精品成a人在线观看| 久久黄色级2电影| 9191国产精品| 亚洲大片在线观看| 欧美熟乱第一页| 亚洲午夜视频在线| 欧美亚洲综合在线| 亚洲曰韩产成在线| 在线视频亚洲一区| 亚洲动漫第一页| 欧美人体做爰大胆视频| 日日夜夜免费精品视频| 欧美日韩一区在线观看|