# Dave_H

EstablishedMember

7

0 Neutral

• Rank
Newbrie
1. ## Call Tree

Hi, I've looked around although can't see any other posts on this - I have certain Code Tree entries coloured red - why is this? Thanks D
2. ## Servo Motor Control

Hi I've fixed the problem by changing the subroutine to int values and by changing the return result to a short after searching ad problems from the forum this seems to have fixed the problem. I'll go back and change things one at a time next to find where exactly the problem was. Chisterz. What is the problem that you have been facing ?(I'll see if I can help ??!!) I tend to send the results to an LCD display to show the actual result from the a/d conversion. I'll have a play at writing the value to eeprom thanks for the tip. I have been using the eeprom memory to store recipe in
3. ## Servo Motor Control

Hi I been trying to control a servo motor by using two analog ports as feedbacks to give the motors actual direction. I.E if analog port 2 is greater than 3 go clockwise. If 3 is greater than 2 go anticlockwise. But for some reason when the number exceed 255 on ethier port the motor changes direction as it is looping back to zero (0-255). I understand that I need to use a 16 bit int to get the whole range that I require which I thought I had done. The number appear correctly upon an LCD screen when 5v=1023 on both ports. So I'm not sure exactly what I'm doing wrong?? help ????????????
4. ## Problem With A/d Input Channel

I'm using a 16F877A. The first test was done using vdd . The second set of tests where done using vref on analog 3. After changing the adcon setting . Dave
5. ## Problem With A/d Input Channel

Hi DaveT I tried it with 5V ref on AN3 and also get a response of 1023 @ 5V. But again if I move the voltage down to 2.5V the response come out as 574 not 511. also 1V = 240 2V = 480 3V = 655 4V = 896 5v = 1023 I trying to control an amplifier which requires a D-A setpoint between 0-5 V. Which Then give an actual value back between 0-5V. Many thanks Dave H
6. ## Problem With A/d Input Channel

Hi thankyou for the reply 5V direct from a thandor test supply. VREF+ = 5v VDD VREF- = 0V VSS ADCON1=0X82; AN0-AN4=ANALOG. AN5-AN7 DIGITAL. I assumed that the ADC is 10bits wide once ADRESH and ADRESL is added together before the result is returned ?? Dave
7. ## Problem With A/d Input Channel

Hi I've beening testing the response from an A/D input RA0. By putting the result directly onto an LCD display. but it does not seem to be as linear as I expected . Here are the results that I've achieved. Tested using DC bench supply. 1.0V = 192 2.0V = 384 2.5V = 480 3.0V = 527 4.0V = 704 5.0V = 824 I assumed that @ 2.5V the digital response would be around 412 counts but it seems to be a long way out. It also seems to jump periodically in larger increment when you increment slowly from 0-5V. I've added filtering caps and resistors to the input but this does not se
×