Gday all
I have been using a 12F675 to do a 10bit ADC then output a corresponding 28Hz PWM signal ( manually generated ), to control a small DC motor.
If ADC is > 512 first pin held low and second pin outputs pulses.
If ADC is < 512 first pin outputs pulses and second pin held low.
Thus i get speed and direction from a single pot.
To validate my ADC readings i hooked up a serial LCD to output the values and all i got was garbage.
When i stopped generating the PWM it all worked again.
I then tried just turning on two leds, ie
one on if ADC > 512 and
other for ADC < 512.
LCD still gave garbage
As such, it appears that turning on other pins can affect what goes out on the SEROUT pin hence resulting in my LCD losing the plot ????
Setup is ADC on GP0
LCD on GP1
LEDs/outputs on GP4/GP5
config bit set to 21EC ie internal oscillator
Power supply is good and i have current limiting resistors on the LEDS. ( Total power draw is within specs for chip )
Any ideas on if the 12F675 suffers crosstalk, resets itself internally between operations??
I have tried pulldown resistors on GP1 and that didnt help.
Andrew
Bookmarks