PDA

View Full Version : using TOCK pin as output?



droptail
- 7th November 2006, 22:18
Can the A.4/TOCK pin of a 16C716 be used as an LCD (serial) output? Something is unique about this pin/setup? Doesn't seem to work as other pins.
thanks

mister_e
- 7th November 2006, 23:17
Or it's only an input AND/OR it's an open drain type AND/OR there's some analog stuff multiplex wich have to be disable. The datasheet will give you the answer(s).

droptail
- 8th November 2006, 00:44
Pin RA4 is multiplexed with the Timer0 module clock
input to become the RA4/T0CKI pin. The RA4/T0CKI
pin is a Schmitt Trigger input and an open drain output.
All other RA port pins have TTL input levels and full
CMOS output drivers.

I have to see if the Timer0 module clock input which this pin MUX's with is enabled I believe. I don't know what role the open drain output has if any on the serout?

mister_e
- 8th November 2006, 03:41
place a 1K pull-up resistor to this pin and post your results.

droptail
- 8th November 2006, 03:41
Pin RA4 is multiplexed with the Timer0 module clock input to become the RA4/T0CKI pin. The RA4/T0CKI pin is a Schmitt Trigger input and an open drain output.

I cannot determine by the data sheet, if the peripheral is enabled by default, and if so, how to disable. This being figured out, will the above description support the desired function, that is open drain output to serout an LCD command?

droptail
- 8th November 2006, 17:15
Yes, it works. This is because the pin has an open drain output rather then the usual bipolar stage of the rest of the output pins. This means it can pull to ground when set to 0, but it will simply float when set to a 1, instead of going high. Somewhat confusing in the data sheet, I believe this is not an optional analog pin, as the rest of PORTA.