Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

to simulate a RS232 serial data 1

Status
Not open for further replies.

pancy

Technical User
Jan 23, 2004
17
HK
I am using a motorola 68HC912 board. I would like to use an output pin to simulate a serial output, just like the ones used in a RS232 port.
Could you please advice me on how I can do it? Thank you.
 
Zeit,
Sorry I'm new to assembly.
would you mind telling me what a UART is?
I was thinking of assigning a logic 1 or 0 to the output pin for a period of time. However, as I test the output voltage, a "1" gives a +5V and a "0" gives 0V.
I looked up the 232 signal definition, a logic "1" should be -3V to -25V and vice versa for "0".
I really have no idea on what I could do.
 
A UART is a Universal Asynchronous Receiver Transmitter.

In other words, the normal serial port hardware.

Many microcontrollers have a UART of some description built into them, which makes serial communications a good deal easier.

What you are describing is termed "bit banging", a method of programming a microcontroller to produce a serial output without using built in hardware.

The output of a microcontroller port pin is normally 0V or 5V (assuming that the microcontroller is running off a 5V rail).

This is normally fed into an RS232 interface chip like the MAX232 to produce the required +/-10V or so for the outside world.

What is the precise part number of the 68hc912 part that you are using?

If you tell us that, we can look on the Motorola website & download the datasheets etc.

rgds
Zeit.
 
Dear Zeit,
Yes I understand what you mean. There is a serial port in the board.
my board is 68HC912B32. In my project, I have to receive signals from PC and send signals to a servo control board. Both of them need a RS232 port. So I have to connect this port to the pc and simulate an output to the servo control board.

Pancy
 
Thank you very much!
I have bought a MAX232 and is working on it. I think it will work!
Thanks alot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top