VM142 pull-ups problem

I am building a project using VM142 and i have i little problem. I cannot read a correct value from the INPUTs (PORTA of PIC). I think the problem is with the input pull-ups. There is no external pull-up resistor between the outputs of ULM2803 and the inputs of PIC (RA3, RA2, RA1, RA0). I managed to read a correct value at pins RA3 and RA2 by enabling internal pull-ups of the PIC (setting bit 7 of OPTION_REG) and put WPUA = $FF but no luck with RA0 and RA1. :confused:
Could i solve the problem programmatically OR by soldering 2 resistors between RA0, RA1 and +5V ???

Thank you in advance :slight_smile:

Make sure to configure A0 and A1 as digital I/O (see comparator section of PIC16F630 datasheet).

Comparators are off : CMCON = $7
When i use external pull-up resistors the circuit works just fine. I changed the PIC and the ULN to eliminate a faulty part and the problem persist.

If the weak pull-ups work on the other registers of the port A but not on A0 and A1, then there still must be an issue with this port. Maybe the fact that they are used as programming DATA and CLK is posing problems. Did you disconnect the programmer ?

Although I disconnect the programmer and put WPUA = %00001111 (in order to set the weak pull-ups), A0 and A1 refuse to work.
I use microbasic-pro, maybe there is an issue with the compiler. I 'll try to work with pure asm and see the results.

I really appreciate your help!!! :smiley:

Another tought: Did you select correct bank when you configured CMCON ?

I used an “asm block” inside the basic-style code of microbasic in order to set the correct registers and now it works fine. I switched maually between banks to set CMCON and WPUA.