;********************************************************************** ; Analyzes IR remote control signals * ;********************************************************************** ; * ; Filename: iralyze.asm * ; Date: 22/8/2002 * ; File Version: $Revision: 1.1 $ * ; * ; Author: Prashant Bhandary * ; * ;********************************************************************** ; ; ; Currently done for a 16F876 ; list p=16f876 ; list directive to define processor #include ; processor specific variable definitions __CONFIG _CP_OFF & _WDT_OFF & _BODEN_ON & _PWRTE_ON & _HS_OSC & _WRT_ENABLE_ON & _LVP_OFF & _DEBUG_OFF & _CPD_OFF ; dly1 equ 04h dly2 equ 00h dly3 equ 00h baud19_2 equ .31 ;19.2K baud with high speed enable(10MHz crystal) ; ; Error codes ERR_HEADER equ 0x80 ; Indicates error byte to follow ERR_NO_SIGNAL equ 0x41 ; Indicates no signal received ERR_TIMEOUT equ 0x42 ; Indicates end of signal MaxTimeout equ 0x80 ; Timeout count for delay after signal ; ; Data ORG 20H ; Data Origin ; DlyHsb RES 1 ; MSB of delay count DlyMsb RES 1 ; MSB of delay count DlyLsb RES 1 ; LSB of delay count ; ; Timeout delay waiting for start of signal Wait1 RES 1 Wait2 RES 1 Wait3 RES 1 ; PortA_ RES 1 ; Store last state of Port A InpBit equ 0 InpMask equ (1<