triptych2008 WROTE:anyway do we need to "teach" the robot as in pr5? pr23 has 4 sensors but the robot in pr5 have only 3 so... ? i guess we would still need to tune the variable resistor..
Yes, you need to tune the VR to set a threshold value for the LM324 comparator. Comparator will give '1' or '0' depending on the comparison result between the threshold and IR sensor's reading.
triptych2008 WROTE:to program the pic, using the UIC00A is enuff right? dont need to install mplab or picc lite if i use the sample source code...
Yes, UIC00A is enough for the job. MPLAB and PICC compiler are used for modification of the source code.
triptych2008 WROTE:last, in the sample source code for pr23, how u get the speed of the motor to be 255, 180 etc..
I don't really understand your question. I assume you are asking why is the speed being set to 0-255 instead of other value. Actually the value is based on the PWM module in PIC.
Since the PWM module in 16F877A is using Timer 2, which is the 8-bit timer, so the max value is 255. <<Please refer to my next post>> That means the duty cycle of the PWM can be set from 0 to 255 and this PWM value will control the speed of the motor. The higher the duty cycle, the faster the speed and vice versa. You can read PIC16F877A datasheet, section "Capture/Compare/PWM Modules" for more details. Inside the sample source code, you may get the motor PWM configuration in init() function.