On Sun, Jul 24, 2005 at 10:12:40PM -0700, Daniel Gliebe wrote: > Ok, I have some news tonight. I have connected a 74LS04 between the > computer's TX pin and the camera's RX pin. Using HyperTerminal I have > successfully sent the Zoom in, Zoom out, and Stop commands to the > camera! I found that the camera expects the data to be exactly 4800bps, > 8-bits, 1 stop bit, Even parity, non-inverted (i.e. the line is always > high, and high = 0, low = 1). I couldn't find a MAX232 chip but I > thought I'd try this anyway. This is unfortunately a good way to tear up your 74LS04. RS232 serial is specified to swing between -12V and 12V, which is well out of the input range of the inverter. You probably lucked up and have a port that swings a lot smaller than that. The conventional technique for limiting the swing is to use a current limiting resistor and a 4.7V zener diode at the 74LS04 input. The zener will cap the positive voltage at 4.7V and the negative voltage to around -0.6V. > My biggest problem was the fact that a PC can't send non-inverted data, > but it can send 4800,8,E,1. The PC sends RS232 format. It's "inverted" because -12V represents a 1 bit and 12V represents a 0 bit in RS-232. > Where as my BS2 can send inverted data, > but it can't send 4800,8,E,1. The BS2 isn't sending inverted data. It's TTL serial format. Chips like the MAX232 convert between TTL and RS-232. > The 74LS04 allowed me to invert the data > coming from the computer's Com port and combination worked. As far as I > can tell, the BS2 can only send 7 data bits with Even Parity and 8 data > bits with No parity. Am I wrong or is that limitation correct? No clue. > > BTW, here's what this whole project is all about. A friend gave me a > SpeedDome Ultra V dome camera minus the camera block. I bought two of > these Hitachi VK-S274 off ebay for only $150 each. :-) I placed one in > the dome camera and that works fine. It also came in handy to help > troubleshoot communicating with the second camera. I want to build my > own box for the second camera and program a PIC 16F628 to control > various functions of the camera using external buttons. > Kinda like a > camcorder. Then I can use it for time lapse protography and various > other fun stuff. PIC USARTS don't calculate parity. However, it will send a 9th bit. So you can calculate parity and then specify the hardware to send it. The PICLIST parity computation page is here: http://www.piclist.com/techref/microchip/math/bit/parity.htm > > Now here's another question. At this point I am only familiar with the > BS2, PIC 16F84 and 16F628. I program everything using PicBasicPro. Do > you know if the 16F628 can send 4800,8,E,1 even though the BS2 Can't? See above. You'll have to compute the parity yourself. The USART will send it for you. > If not perhaps someone could suggest a different PIC that I might find > more useful? I'm not sure beyond your list. BAJ -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist