PDA

View Full Version : Odd PIC/Hardware(?) issue



Probotics
- 27th May 2009, 00:51
Has anyone had a problem with a PIC refusing to take pulsed input from a particular source? Some specifics:

* PIC being used to read 1-2ms pulses from a radio receiver
* Software and hardware always work perfectly for one model of receiver and never work at all for a second model of receiver. Both receivers made by the same manufacturer. This has been tested by using the same board/PIC/power supply and changing only the receiver - many times. Both receivers work - servos will accept commands from each.
* Scope indicates a nice 1-2ms pulse at 2.93v (high), 0 (low) for one, 3.13 and 0 for the second (working one). I think frequency is about 100hz, but I'm not sure on that one.

Pic 12F675 operating on a 5 volt voltage regulator, GPIO.2 used for signal input. Common ground. wpu on the input line is off. Again, the software works well for the second and does not recognize the first at all.

The data sheet seems to indicate the voltage levels are appropriate for communication and the leakage (amperage consumption for PIC communications) looks very small. Wiring goes receiver, resistor, input pin

Am I missing something obvious? Suggestions, search terms, links and experience are welcome.

Jerson
- 27th May 2009, 02:03
Scope indicates a nice 1-2ms pulse at 2.93v (high), 0 (low) for one, 3.13 and 0 for the second (working one).

Try a pullup resistor for the first one. The High(2.93) seems to be your problem.

sinoteq
- 27th May 2009, 02:16
My theory is:
Because GPIO2 is a Schmitt trigger input it requires 0,8*VDD as High voltage level. That would be 4V in your case. So this design is not really the good. Can you move the input because it is only GPOI2 that has this kind of buffer. If you have a TTL input buffer you get 0.25*VDD+0.8 =2.05 Volts and the problem should go away. Or change the VDD voltage to 3V and run the PIC on the lower voltage.

Probotics
- 27th May 2009, 15:22
Doh: You know I thought something on the input port might have been the issue, searched through the data sheet, found notation that the Schmitt trigger was there, checked the voltage necessary to trigger it....... and somehow read 0.8 VDD as 0.8 volts instead of 0.8 * VDD.

That's gotta be it. Thanks