///////////////////////////////////////////////////////////// //Descrition: / //Firmware: 0125-00-00 / //Hardware: 1199B / //Processor: PIC18F6620 / //Last Rev: 2003/06/15 / ///////////////////////////////////////////////////////////// //Revision history / //00 2002/12/14 Initial release / ///////////////////////////////////////////////////////////// #include "012500.h" ///////////////////////////////////////////////////////////// #org 0x1000,0x1f00 void testnop(){ byte temp; temp=0x10; #asm movlw 0x00 movwf 0xfea movlw &temp movwf 0xfe9 nop nop nop nop nop nop nop nop nop nop nop nop decf 0xfef,f //should be 0x0f nop nop #endasm } void main() { ///////////////////////////////////////////////////////////// output_a(0x00); output_b(0x00); output_c(0x40); output_d(0x00); output_e(0x00); output_f(0x00); output_g(0x02); //----------------------------------------------------------- set_tris_a(0xCF); set_tris_b(0xCF); set_tris_c(0x80); set_tris_d(0x00); set_tris_e(0x00); set_tris_f(0x02); set_tris_g(0xE4); ///////////////////////////////////////////////////////////// port_b_pullups(false); ///////////////////////////////////////////////////////////// setup_adc_ports(ANALOG_AN0_TO_AN3); setup_adc(ADC_CLOCK_INTERNAL); setup_psp(PSP_DISABLED); setup_spi(FALSE); setup_wdt(WDT_OFF); setup_timer_0(RTCC_INTERNAL); setup_timer_1(T1_DISABLED); setup_timer_2(T2_DIV_BY_1,255,1); setup_timer_3(T3_DISABLED|T3_DIV_BY_1); setup_ccp1(CCP_PWM); setup_ccp2(CCP_PWM); setup_comparator(NC_NC_NC_NC); setup_vref(FALSE); //enable_interrupts(INT_RDA); //enable_interrupts(INT_RDA2); //enable_interrupts(global); while(true){ //WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW testnop(); delay_ms(1); //WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW } }