All,
OK, stupid newbie question.
I am trying to get/assign a variable value by reading one of the inputs on the 16F628A and not having much success. All of the A/D example I can find reference the 16F877 and as such, some of the syntax in PIC Basic Pro is not supported on the 16F628A.
Basically, all I want to do is have for example, a a variable voltage source connected to PORTA.0, take samples of that port and assign a value to a variable based on those samples.
When I use routine examples based on the 16F677, I get a variety of errors on compiling, most related to ADCON0.
These same routines do work on the 16F877, but I don't want or need that chip as to the best I can tell, the 16F628A does support analog inputs on RA/AN 0-3.
I'm not sure if I'm initializing the port wrong or what!
Any Help would be appreciated!
Assembly or basic examples are fine, I can do either.
Thanks,
Bob
OK, stupid newbie question.
I am trying to get/assign a variable value by reading one of the inputs on the 16F628A and not having much success. All of the A/D example I can find reference the 16F877 and as such, some of the syntax in PIC Basic Pro is not supported on the 16F628A.
Basically, all I want to do is have for example, a a variable voltage source connected to PORTA.0, take samples of that port and assign a value to a variable based on those samples.
When I use routine examples based on the 16F677, I get a variety of errors on compiling, most related to ADCON0.
These same routines do work on the 16F877, but I don't want or need that chip as to the best I can tell, the 16F628A does support analog inputs on RA/AN 0-3.
I'm not sure if I'm initializing the port wrong or what!
Any Help would be appreciated!
Assembly or basic examples are fine, I can do either.
Thanks,
Bob