Make sure you disable the A2D inputs, these are enabled by default and make ports A and E inputs. The 877A also has comparators (but I don't know which port they use), these are possibly also enabled by default.echo_bry said:hi there! is there some1 here who can help me with my problem with my 877 pic. my pic wasnt able to give me the correct output of high logic eventhough i had my PORTC and A in all bit set. what could be the problem with that?thanks
It's really easy, far easier than using an external one - full details are in the datasheet.echo_bry said:hi there ivancho, nweiz thanks for the reply.... the reason why we used an external ADC is that i dont know how to make use of the ADC in the PIC and it will cost us much time..can you show me an example of it?
; Start(ADC) BSF ADCON0, ADON BSF ADCON0, GO_DONE BTFSC ADCON0, GO_DONE GOTO $-1 ; A=ADC_Result MOVF ADRESH,W ANDLW 0x03 MOVWF Acc1H BANKSEL ADRESL MOVF ADRESL,W BANKSEL ADRESH MOVWF VAR2 MOVF Acc1H, W MOVWF VAR2+1
Yes, no problem - a 16 bit subtraction can be done pretty fast, using a 20MHz crystal a 16F877 can perform 5 instructions in 1uS, that's 5,000,000 instructions per second.echo_bry said:wut if i need to compare my inputs by subtracting them : new - previous, then ill check its carry if it is 1 or 0.....can it comprehend with the speed of my sensor which will have its output in just 5 seconds?
I don't really understand the question?.echo_bry said:sir my problem is how can i give my source code an overhaul by not not using the whole PORTBas my input and use only one pin from PORTE as my input...CAN YOU HELP ME WITH MY ADC IN THE PIC?thank you very much sir
Which ones are digital inputs and which ones are used as ADC inputs?sir my problem is how can i give my source code an overhaul by not not using the whole PORTBas my input and use only one pin from PORTE as my input...CAN YOU HELP ME WITH MY ADC IN THE PIC?thank you very much sir