I am designing a Serial to Parallel converter with PIC16f84A micro-controller. Where I am going to use pin RA0 for data input, RA1 for clock input and RB0 to RB7 for parallel data output from MCU. Now I cant figure out that how to produce clock signals with data signals, since the serial port RS232 have only one pin for data transmission, and also Hyper Terminal program only use pin no. 3 for data transmission only.
2 Answers
RS232 does not involve a transmitted clock; the reciever must synchonize to the transmission using the start bit, and the baud rate has to be agreed in advance (or inferred from a sequence of characters transmitted, sometimes called "auto-baud")
(If that PIC has a UART, you could use it to make this project easier)
-
\$\begingroup\$ Actually it is possible to "guess" the baudrate. Several implementations can do this in hardware where they find the baud rate without knowing it in advance. \$\endgroup\$ Commented Jan 24, 2013 at 17:39
-
\$\begingroup\$ The PIC16f84a doesn't have a built-in UART functionality. It I set baud rate at the time of programming, I think the timing errors may occur. \$\endgroup\$ Commented Jan 24, 2013 at 18:12
-
\$\begingroup\$ Regardless of a hardware or software UART, setting the baud rate at compile time is fine if 1) the device clock from which the baud rate is divided is sufficiently accurate and the division rounding error is within tolerance and 2) the connected equipment uses only the chosen baud rate, and uses it with sufficient accuracy. \$\endgroup\$ Commented Jan 24, 2013 at 19:07
You could implement a psuedo-clock by bit-banging the extra pins in a serial port (DTR, RTS). You would need a custom driver or c programming. Since you are using hyper terminal, you would need to look into a windows implementation.