Hi Petter,
Where are your port settings for Port C & D in the initalization of your PIC?
TRISD = %00000000 'for outputs
TRISD = %11111111 'for inputs
PortD = 0' set port D to low
Same settings needed for portC.
Maybe that's why it's not working. You haven't told the PIC HOW you want to use the pins. This is a similar chip to the 877A. I had no problems using it with only setting the TRISD,C, & D and PORTB,C, & D to what I wanted them to do.
I did see you had tried TRISD = %11111111 in a previous posting but not on the current one.
Also how can you see UT10 change states when you only pause for 1us? Try at least PAUSE 1000 until to get some testing results then fine tune it.
Also since this is an "A" type device do you have .1uF caps across both Vcc & Vdd pins on both sides of the chip as close to the pins as possible? The A series micros are supposedly more sensitive to noise. I couldn't see any because of the crystal being in the way.
Hope some of this helps!
BobK




Bookmarks