how to setup a PIC for A/D and PWM?
April 12, 2010
After some tries, i realy got some problems with making my PIC 16F876A working right.
I need it to be able to A/D konvert 3 analog inputs, 1 where it need to be able measure lenght (10-30cm), and the 2 others it only need to be able to see if there is someting or not. For detection objects.
I also need to use the 2 PWM outputs, where it shall be able to switch between speeds (slow and fast) Think i got the PWM to work on a 16F628.
Couting on using an ekstern 20Mhz crystal.
Right now, 1 of my problems is also that i think the __config isent set correct, but i cant figure out how to set it right.
I am writing the code in Asseamble. Using MPLAB with a picstart plus burner.
Not so good at making software, and it is begining to get on my nerves, that i cant get it to work right.
But the good news, is that my motor controller is finaly working :0)
This code, i will have a trim meter (10K ohm) at AN0, and then by turning the trim meter, i will have a binar reading on port B0-B7. But it wont work.