Hello Vibha, From what i understand ....u r asking a question on simulation. If u want to change the value of Port A while simulating u need to go to debug-> Simulator stimulus->Asynchronous stimulus...right click and assign the pins u need RA0, RA1,..RA5. Now use pulse, high or low stimulus before u single-step through the program or animate the program. Regards, Sibi --- Vibha Ravindran <> wrote: > Hi! > > I am a new user of MPLAB IDE v6.20 and I have some > questions regarding the same. > > I have attached a piece of the code be that I am > working with. I step through the code using the > debugger and watch SFR's - STATUS, > PORTA,TRISA,ADCON1. > > Though I have the correct Bank ( bank 0) for PORT A > selected, I am unable to change the contents of PORT > A. I expect to have 0x08 in PORT A but its contents > remain at 0x00. > > However all the other registers seem to follow the > program as expected. > Please let me know how I can solve this problem. > > Also I would like to understand the meaning of these > statements > TEMP EQU 0x20 > REGA EQU TEMP + 1 <--- What does this mean? > Does it mean that 0x21 is assigned to REGA? > > MOVLW .5 <-- What does a decimal number in place of > a literal mean? > > Thanks! > Vibha > ; Files required: pic16f877.inc > * > > list pf877 ; list directive to > define processor > #include <p16f877.inc> ; processor specific > variable definitions > > __CONFIG _CP_OFF & _WDT_ON & _BODEN_ON & _PWRTE_ON > & _RC_OSC & _WRT_ENABLE_ON & _LVP_ON & _DEBUG_OFF & > _CPD_OFF > > ; > main > > BCF STATUS,RP0 > BCF STATUS,RP1 > CLRF PORTA > MOVLW 0x08 > MOVWF PORTA > > END ; directive 'end of > program' __________________________________________________ Yahoo! Plus - For a better Internet experience http://uk.promotions.yahoo.com/yplus/yoffer.html |