i used to work with 16f84a, i swtched to 16f628a because 1k was not enough. Problem is, the 628a pic wouldn't read inputs. I've already simulated it with oshon pic simulator and it was okay. What could be the problem?
The 628A is the replacement for the obselete 84's (in fact it's the replacement for the 628, which was the replacement for the obselete 84's). As such it's pin for pin compatible, and 'almost' 100% software compatible - the only real difference is the extra hardware.
Your problem is too vague to mean anything - BUT, the only real code change required is two lines to turn OFF the extra comparators, which are ON by default. This is clearly explained in the datasheets and the 84 to 628 migration document.
If you check my tutorials these also include the required two lines, and are clearly commented as such.
I used the same circuit for 628. As for the program, i've already included cmcon=7 to turn the comparators off, what is the other line? by the way, I use mikrobasic. Also, what command should i write to set a internal oscillator of 4 MHz?
I used the same circuit for 628. As for the program, i've already included cmcon=7 to turn the comparators off, what is the other line? by the way, I use mikrobasic. Also, what command should i write to set a internal oscillator of 4 MHz?
INTOSC is a type of oscilator used it's set in CONFIGURATION WORD, which is available durring programming, in this case "Internal Oscilator with RA6&RA7 as IO pins". I can't help you with mikrobasic.